tmf: Add a method to indicate if a ODA is user-defined
authorAlexandre Montplaisir <alexmonthy@efficios.com>
Mon, 2 May 2016 22:21:37 +0000 (18:21 -0400)
committerAlexandre Montplaisir <alexmonthy@efficios.com>
Wed, 4 May 2016 22:15:10 +0000 (18:15 -0400)
This will be useful in diffentiating what analyses are considered
"built-in" and which ones were added manually by the user. For
example, some operations might be prevented by the manager (like
deleting non-user-defined analyses). Or a different icon could be
used for them.

Change-Id: I887291f0b754c26cb8aca1e758b1741cb7152f52
Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Signed-off-by: Philippe Proulx <pproulx@efficios.com>
Reviewed-on: https://git.eclipse.org/r/71930
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
tmf/org.eclipse.tracecompass.tmf.core.tests/stubs/org/eclipse/tracecompass/tmf/tests/stubs/analysis/ondemand/OnDemandAnalysisStub.java
tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/analysis/ondemand/IOnDemandAnalysis.java

index 52f20ecbfb00e9a00790b053d99eb2924f3519a4..613da1b7733676a4c70e6b777c3d470d0e6f21d5 100644 (file)
@@ -50,4 +50,9 @@ public class OnDemandAnalysisStub implements IOnDemandAnalysis {
         /* Do nothing */
         return new Object();
     }
+
+    @Override
+    public boolean isUserDefined() {
+        return false;
+    }
 }
index 58ef0fd49616602d8df9f08b59cd7da1fd0d20f7..2d21f1d4e1c591caeb3ed5cc22b269d24f3601d9 100644 (file)
@@ -33,6 +33,14 @@ public interface IOnDemandAnalysis {
      */
     String getName();
 
+    /**
+     * Returns whether or not this analysis is defined by a user, as opposed to
+     * being built into Trace Compass (or an extension plugin).
+     *
+     * @return <code>true</code> if this analysis is defined by a user
+     */
+    boolean isUserDefined();
+
     /**
      * Determine if the current analysis can run on the given trace.
      *
This page took 0.025635 seconds and 5 git commands to generate.