Merge branch 'master' into lttng-luna
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Fri, 5 Jul 2013 22:32:21 +0000 (18:32 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Fri, 5 Jul 2013 22:41:31 +0000 (18:41 -0400)
Conflicts:
lttng/org.eclipse.linuxtools.ctf.core.tests/META-INF/MANIFEST.MF
lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java
lttng/org.eclipse.linuxtools.ctf/feature.xml
lttng/org.eclipse.linuxtools.gdbtrace/feature.xml
lttng/org.eclipse.linuxtools.lttng2.kernel.core.tests/META-INF/MANIFEST.MF
lttng/org.eclipse.linuxtools.lttng2.kernel.core/META-INF/MANIFEST.MF
lttng/org.eclipse.linuxtools.lttng2.kernel.ui/META-INF/MANIFEST.MF
lttng/org.eclipse.linuxtools.lttng2.kernel/feature.xml
lttng/org.eclipse.linuxtools.lttng2.ui/META-INF/MANIFEST.MF
lttng/org.eclipse.linuxtools.lttng2/feature.xml
lttng/org.eclipse.linuxtools.tmf.core.tests/META-INF/MANIFEST.MF
lttng/org.eclipse.linuxtools.tmf.ui.tests/META-INF/MANIFEST.MF
lttng/org.eclipse.linuxtools.tmf/feature.xml

Change-Id: Ia2f059338062068ca4d5b7cc25d6b2ac447ebba3

123 files changed:
org.eclipse.linuxtools.ctf.core.tests/META-INF/MANIFEST.MF
org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java
org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Stream.java
org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputPacketReader.java
org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/StreamInputReader.java
org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/EventDeclaration.java
org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/trace/StreamInputPacketIndex.java
org.eclipse.linuxtools.ctf/feature.xml
org.eclipse.linuxtools.ctf/sourceTemplateFeature/feature.properties [deleted file]
org.eclipse.linuxtools.gdbtrace.core.tests/META-INF/MANIFEST.MF
org.eclipse.linuxtools.gdbtrace.core/META-INF/MANIFEST.MF
org.eclipse.linuxtools.gdbtrace.help/pom.xml
org.eclipse.linuxtools.gdbtrace.ui.tests/META-INF/MANIFEST.MF
org.eclipse.linuxtools.gdbtrace.ui/META-INF/MANIFEST.MF
org.eclipse.linuxtools.gdbtrace/feature.xml
org.eclipse.linuxtools.gdbtrace/sourceTemplateFeature/feature.properties [deleted file]
org.eclipse.linuxtools.lttng.alltests/.classpath [new file with mode: 0644]
org.eclipse.linuxtools.lttng.alltests/.gitignore [new file with mode: 0644]
org.eclipse.linuxtools.lttng.alltests/.project [new file with mode: 0644]
org.eclipse.linuxtools.lttng.alltests/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
org.eclipse.linuxtools.lttng.alltests/.settings/org.eclipse.core.runtime.prefs [new file with mode: 0644]
org.eclipse.linuxtools.lttng.alltests/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.eclipse.linuxtools.lttng.alltests/.settings/org.eclipse.jdt.ui.prefs [new file with mode: 0644]
org.eclipse.linuxtools.lttng.alltests/META-INF/MANIFEST.MF [new file with mode: 0644]
org.eclipse.linuxtools.lttng.alltests/about.html [new file with mode: 0644]
org.eclipse.linuxtools.lttng.alltests/build.properties [new file with mode: 0644]
org.eclipse.linuxtools.lttng.alltests/plugin.properties [new file with mode: 0644]
org.eclipse.linuxtools.lttng.alltests/src/org/eclipse/linuxtools/lttng/alltests/RunAllTests.java [new file with mode: 0644]
org.eclipse.linuxtools.lttng.help/pom.xml
org.eclipse.linuxtools.lttng.releng-site/pom.xml
org.eclipse.linuxtools.lttng2.core.tests/META-INF/MANIFEST.MF
org.eclipse.linuxtools.lttng2.core/META-INF/MANIFEST.MF
org.eclipse.linuxtools.lttng2.kernel.core.tests/META-INF/MANIFEST.MF
org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/StateSystemTest.java
org.eclipse.linuxtools.lttng2.kernel.core/META-INF/MANIFEST.MF
org.eclipse.linuxtools.lttng2.kernel.ui.tests/META-INF/MANIFEST.MF
org.eclipse.linuxtools.lttng2.kernel.ui/META-INF/MANIFEST.MF
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowEntry.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowEvent.java [deleted file]
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowPresentationProvider.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowView.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesEntry.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesEvent.java [deleted file]
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesPresentationProvider.java
org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesView.java
org.eclipse.linuxtools.lttng2.kernel/feature.xml
org.eclipse.linuxtools.lttng2.kernel/sourceTemplateFeature/feature.properties [deleted file]
org.eclipse.linuxtools.lttng2.ui.tests/META-INF/MANIFEST.MF
org.eclipse.linuxtools.lttng2.ui/META-INF/MANIFEST.MF
org.eclipse.linuxtools.lttng2/feature.xml
org.eclipse.linuxtools.lttng2/sourceTemplateFeature/feature.properties [deleted file]
org.eclipse.linuxtools.tmf.core.tests/META-INF/MANIFEST.MF
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfTraceTest.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/InMemoryBackend.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statesystem/AbstractTmfStateProvider.java
org.eclipse.linuxtools.tmf.help/pom.xml
org.eclipse.linuxtools.tmf.ui.tests/META-INF/MANIFEST.MF
org.eclipse.linuxtools.tmf.ui/META-INF/MANIFEST.MF
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/Messages.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfTraceElement.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/messages.properties [new file with mode: 0644]
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/callstack/CallStackEvent.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphView.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/Messages.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/messages.properties [new file with mode: 0644]
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/ITimeGraphPresentationProvider2.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphCombo.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphPresentationProvider.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/model/TimeEvent.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/model/TimeGraphEntry.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/ITmfTimeGraphDrawingHelper.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java
org.eclipse.linuxtools.tmf/feature.xml
org.eclipse.linuxtools.tmf/sourceTemplateFeature/feature.properties [deleted file]
org.eclipse.linuxtools.tracing.rcp.product/.gitignore [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.product/.project [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.product/about.html [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.product/epl-v10.html [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.product/license.html [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.product/pom.xml [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.product/tracing.product [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/.classpath [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/.gitignore [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/.project [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/.settings/org.eclipse.core.runtime.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/.settings/org.eclipse.jdt.ui.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/.settings/org.eclipse.pde.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/META-INF/MANIFEST.MF [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/about.html [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/about.ini [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/about.properties [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/build.properties [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/icons/alt_about.gif [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/icons/alt_window_16.gif [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/icons/alt_window_32.gif [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/license.html [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/plugin.properties [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/plugin.xml [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/plugin_customization.ini [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/pom.xml [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/Application.java [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/ApplicationActionBarAdvisor.java [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/ApplicationWorkbenchAdvisor.java [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/ApplicationWorkbenchWindowAdvisor.java [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/TracingRcpPlugin.java [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/messages/Messages.java [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/messages/messages.properties [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp/.gitignore [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp/.project [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp/.settings/org.eclipse.core.runtime.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp/build.properties [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp/epl-v10.html [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp/feature.properties [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp/feature.xml [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp/license.html [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp/p2.inf [new file with mode: 0644]
org.eclipse.linuxtools.tracing.rcp/pom.xml [new file with mode: 0644]
pom.xml

index e95a4b62285f0e781dacd5d7568f361eac3ecb6f..221d58ac60991881883584dc8dd6398ef3584392 100644 (file)
@@ -11,5 +11,6 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Require-Bundle: org.junit;bundle-version="4.0.0",
  org.eclipse.core.runtime;bundle-version="3.8.0",
  org.eclipse.linuxtools.ctf.core;bundle-version="3.0.0"
-Export-Package: org.eclipse.linuxtools.ctf.core.tests.shared
+Export-Package: org.eclipse.linuxtools.ctf.core.tests,
+ org.eclipse.linuxtools.ctf.core.tests.shared
 Import-Package: org.antlr.runtime;version="3.2.0"
index a71d92f921f707fc513c10f25d145139a23db372..925a6845847faef8b23712071fc163e1dea7d280 100644 (file)
@@ -117,7 +117,7 @@ public class CTFTrace implements IDefinitionScope {
     /**
      * Collection of streams contained in the trace.
      */
-    private final Map<Long, Stream> streams =  new HashMap<Long, Stream>();
+    private final Map<Long, Stream> streams = new HashMap<Long, Stream>();
 
     /**
      * Collection of environment variables set by the tracer
@@ -137,9 +137,8 @@ public class CTFTrace implements IDefinitionScope {
     private static final Comparator<File> METADATA_COMPARATOR = new MetadataComparator();
 
     /** map of all the event types */
-    private final Map<Long,HashMap<Long, IEventDeclaration>> eventDecs = new HashMap<Long, HashMap<Long,IEventDeclaration>>();
-    /** map of all the event types */
-    private final Map<StreamInput,HashMap<Long, EventDefinition>> eventDefs = new HashMap<StreamInput, HashMap<Long,EventDefinition>>();
+    private final Map<Long, HashMap<Long, IEventDeclaration>> eventDecs = new HashMap<Long, HashMap<Long, IEventDeclaration>>();
+
     /** map of all the indexes */
     private final Map<StreamInput, StreamInputPacketIndex> indexes = new HashMap<StreamInput, StreamInputPacketIndex>();
 
@@ -151,8 +150,6 @@ public class CTFTrace implements IDefinitionScope {
     /** Callsite helpers */
     private TreeSet<CTFCallsite> callsitesByIP = new TreeSet<CTFCallsite>();
 
-
-
     // ------------------------------------------------------------------------
     // Constructors
     // ------------------------------------------------------------------------
@@ -197,8 +194,7 @@ public class CTFTrace implements IDefinitionScope {
         /* Open all the trace files */
         /* Create the definitions needed to read things from the files */
         if (packetHeaderDecl != null) {
-            packetHeaderDef = packetHeaderDecl.createDefinition(this,
-                    "packet.header"); //$NON-NLS-1$
+            packetHeaderDef = packetHeaderDecl.createDefinition(this, "packet.header"); //$NON-NLS-1$
         }
 
         /* List files not called metadata and not hidden. */
@@ -235,6 +231,7 @@ public class CTFTrace implements IDefinitionScope {
 
     /**
      * Dispose the trace
+     *
      * @since 2.0
      */
     public void dispose() {
@@ -247,7 +244,8 @@ public class CTFTrace implements IDefinitionScope {
                 }
             }
         }
-        System.gc(); // Invoke GC to release MappedByteBuffer objects (Java bug JDK-4724038)
+        // Invoke GC to release MappedByteBuffer objects (Java bug JDK-4724038)
+        System.gc();
     }
 
     // ------------------------------------------------------------------------
@@ -268,11 +266,13 @@ public class CTFTrace implements IDefinitionScope {
 
     /**
      * Gets an index for a given StreamInput
-     * @param id the StreamInput
+     *
+     * @param id
+     *            the StreamInput
      * @return The index
      */
-    StreamInputPacketIndex getIndex(StreamInput id){
-        if(! indexes.containsKey(id)){
+    StreamInputPacketIndex getIndex(StreamInput id) {
+        if (!indexes.containsKey(id)) {
             indexes.put(id, new StreamInputPacketIndex());
         }
         return indexes.get(id);
@@ -280,15 +280,17 @@ public class CTFTrace implements IDefinitionScope {
 
     /**
      * Gets an event Declaration hashmap for a given StreamInput
-     * @param id the StreamInput
-     * @return the hashmap with the event definitions
+     *
+     * @param id
+     *            the StreamInput
+     * @return an empty hashmap, please see deprecated
      * @since 2.0
+     * @deprecated You should be using
+     *             {@link StreamInputReader#getEventDefinitions()} instead.
      */
+    @Deprecated
     public Map<Long, EventDefinition> getEventDefs(StreamInput id) {
-        if(! eventDefs.containsKey(id)){
-            eventDefs.put(id, new HashMap<Long, EventDefinition>());
-        }
-        return eventDefs.get(id);
+        return new HashMap<Long, EventDefinition>();
     }
 
     /**
@@ -529,7 +531,7 @@ public class CTFTrace implements IDefinitionScope {
             fc = fis.getChannel();
 
             /* Map one memory page of 4 kiB */
-            byteBuffer = fc.map(MapMode.READ_ONLY, 0, Math.min((int)fc.size(), 4096));
+            byteBuffer = fc.map(MapMode.READ_ONLY, 0, Math.min((int) fc.size(), 4096));
         } catch (IOException e) {
             /* Shouldn't happen at this stage if every other check passed */
             throw new CTFReaderException(e);
@@ -572,7 +574,8 @@ public class CTFTrace implements IDefinitionScope {
             /* Read the stream ID */
             Definition streamIDDef = packetHeaderDef.lookupDefinition("stream_id"); //$NON-NLS-1$
 
-            if (streamIDDef instanceof IntegerDefinition) { //this doubles as a null check
+            if (streamIDDef instanceof IntegerDefinition) { // this doubles as a
+                                                            // null check
                 long streamID = ((IntegerDefinition) streamIDDef).getValue();
                 stream = streams.get(streamID);
             } else {
@@ -646,11 +649,12 @@ public class CTFTrace implements IDefinitionScope {
 
         /* It should be ok now. */
         streams.put(stream.getId(), stream);
-        eventDecs.put(stream.getId(), new HashMap<Long,IEventDeclaration>());
+        eventDecs.put(stream.getId(), new HashMap<Long, IEventDeclaration>());
     }
 
     /**
      * gets the Environment variables from the trace metadata (See CTF spec)
+     *
      * @return the environment variables in a map form (key value)
      * @since 2.0
      */
@@ -660,7 +664,9 @@ public class CTFTrace implements IDefinitionScope {
 
     /**
      * Look up a specific environment variable
-     * @param key the key to look for
+     *
+     * @param key
+     *            the key to look for
      * @return the value of the variable, can be null.
      */
     public String lookupEnvironment(String key) {
@@ -669,8 +675,11 @@ public class CTFTrace implements IDefinitionScope {
 
     /**
      * Add a variable to the environment variables
-     * @param varName the name of the variable
-     * @param varValue the value of the variable
+     *
+     * @param varName
+     *            the name of the variable
+     * @param varValue
+     *            the value of the variable
      */
     public void addEnvironmentVar(String varName, String varValue) {
         environment.put(varName, varValue);
@@ -678,8 +687,11 @@ public class CTFTrace implements IDefinitionScope {
 
     /**
      * Add a clock to the clock list
-     * @param nameValue the name of the clock (full name with scope)
-     * @param ctfClock the clock
+     *
+     * @param nameValue
+     *            the name of the clock (full name with scope)
+     * @param ctfClock
+     *            the clock
      */
     public void addClock(String nameValue, CTFClock ctfClock) {
         clocks.put(nameValue, ctfClock);
@@ -687,16 +699,15 @@ public class CTFTrace implements IDefinitionScope {
 
     /**
      * gets the clock with a specific name
-     * @param name the name of the clock.
+     *
+     * @param name
+     *            the name of the clock.
      * @return the clock
      */
     public CTFClock getClock(String name) {
         return clocks.get(name);
     }
 
-
-
-
     /**
      * gets the clock if there is only one. (this is 100% of the use cases as of
      * June 2012)
@@ -799,22 +810,26 @@ public class CTFTrace implements IDefinitionScope {
 
     /**
      * Does a given stream contain any events?
-     * @param id the stream ID
+     *
+     * @param id
+     *            the stream ID
      * @return true if the stream has events.
      */
-    public boolean hasEvents(Long id){
+    public boolean hasEvents(Long id) {
         return eventDecs.containsKey(id);
     }
 
     /**
      * Add an event declaration map to the events map.
-     * @param id the id of a stream
+     *
+     * @param id
+     *            the id of a stream
      * @return the hashmap containing events.
      * @since 2.0
      */
-    public Map<Long, IEventDeclaration> createEvents(Long id){
+    public Map<Long, IEventDeclaration> createEvents(Long id) {
         HashMap<Long, IEventDeclaration> value = eventDecs.get(id);
-        if( value == null ) {
+        if (value == null) {
             value = new HashMap<Long, IEventDeclaration>();
             eventDecs.put(id, value);
         }
index 774a95e8878a3b35fb1e0aacfac914effba7a447..4482aecb22556ea2d05d793d35aa62abefde5e7b 100644 (file)
@@ -19,6 +19,7 @@ import java.util.Set;
 
 import org.eclipse.linuxtools.ctf.core.event.IEventDeclaration;
 import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration;
+import org.eclipse.linuxtools.internal.ctf.core.event.EventDeclaration;
 import org.eclipse.linuxtools.internal.ctf.core.event.metadata.exceptions.ParseException;
 
 /**
@@ -243,9 +244,12 @@ public class Stream {
         if (events.get(event.getId()) != null) {
             throw new ParseException("Event id already exists"); //$NON-NLS-1$
         }
-
-        /* Put the event in the map */
-        events.put(event.getId(), event);
+        if (event.getId() == null) {
+            events.put(EventDeclaration.UNSET_EVENT_ID, event);
+        } else {
+            /* Put the event in the map */
+            events.put(event.getId(), event);
+        }
     }
 
     /**
index 7076d26719ba5720978a951adf174bae548d6fd2..678cb029a6b2763980f39bcf8990c17726f967c8 100644 (file)
@@ -15,7 +15,6 @@ import java.io.IOException;
 import java.nio.MappedByteBuffer;
 import java.nio.channels.FileChannel.MapMode;
 import java.util.Collection;
-import java.util.Map;
 
 import org.eclipse.linuxtools.ctf.core.event.EventDefinition;
 import org.eclipse.linuxtools.ctf.core.event.IEventDeclaration;
@@ -61,9 +60,6 @@ public class StreamInputPacketReader implements IDefinitionScope {
     /** Stream event context definition.*/
     private final StructDefinition streamEventContextDef;
 
-    /** Maps event ID to event definitions. */
-    private final Map<Long, EventDefinition> events;
-
     /** Reference to the index entry of the current packet. */
     private StreamInputPacketIndexEntry currentPacket = null;
 
@@ -100,7 +96,6 @@ public class StreamInputPacketReader implements IDefinitionScope {
         bitBuffer = new BitBuffer();
         bitBuffer.setByteOrder(streamInputReader.getByteOrder());
 
-        events = streamInputReader.getStreamInput().getStream().getTrace().getEventDefs(streamInputReader.getStreamInput());
         lostSoFar = 0;
 
         /* Create trace packet header definition. */
@@ -140,9 +135,9 @@ public class StreamInputPacketReader implements IDefinitionScope {
         Collection<IEventDeclaration> eventDecls = streamInputReader.getStreamInput().getStream().getEvents().values();
 
         for (IEventDeclaration event : eventDecls) {
-            if (!events.containsKey(event.getId())) {
+            if (!streamInputReader.getEventDefinitions().containsKey(event.getId())) {
                 EventDefinition eventDef = event.createDefinition(streamInputReader);
-                events.put(event.getId(), eventDef);
+                streamInputReader.addEventDefinition(event.getId(), eventDef);
             }
         }
     }
@@ -291,7 +286,7 @@ public class StreamInputPacketReader implements IDefinitionScope {
      */
     public EventDefinition readNextEvent() throws CTFReaderException {
         /* Default values for those fields */
-        long eventID = 0;
+        long eventID = EventDeclaration.UNSET_EVENT_ID;
         long timestamp = 0;
 
         if (lostEventsInThisPacket > lostSoFar) {
@@ -350,7 +345,7 @@ public class StreamInputPacketReader implements IDefinitionScope {
         }
 
         /* Get the right event definition using the event id. */
-        EventDefinition eventDef = events.get(eventID);
+        EventDefinition eventDef = streamInputReader.getEventDefinitions().get(eventID);
         if (eventDef == null) {
             throw new CTFReaderException("Incorrect event id : " + eventID); //$NON-NLS-1$
         }
index 0c77abef53c098cc05b38cfbbd460aec3e2a3f3e..13bfa922a8a9f067229769598f45e1b7a35ad1b2 100644 (file)
@@ -13,6 +13,9 @@
 package org.eclipse.linuxtools.ctf.core.trace;
 
 import java.nio.ByteOrder;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
 
 import org.eclipse.linuxtools.ctf.core.event.EventDefinition;
 import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
@@ -56,6 +59,8 @@ public class StreamInputReader {
 
     private CTFTraceReader parent;
 
+    /** Map of all the event types */
+    private final Map<Long, EventDefinition> eventDefs = new HashMap<Long,EventDefinition>();
 
     // ------------------------------------------------------------------------
     // Constructors
@@ -165,6 +170,30 @@ public class StreamInputReader {
         return streamInput;
     }
 
+    /**
+     * Gets the event definition hashmap for this StreamInput
+     *
+     * @return Unmodifiable map with the event definitions
+     * @since 2.1
+     */
+    public Map<Long, EventDefinition> getEventDefinitions() {
+        return Collections.unmodifiableMap(eventDefs);
+    }
+
+    /**
+     * Add an event definition to this stream input reader.
+     *
+     * @param id
+     *            The id of the event definition. This will overwrite any
+     *            existing definition with the same id.
+     * @param def
+     *            The matching event definition
+     * @since 2.1
+     */
+    public void addEventDefinition(Long id, EventDefinition def) {
+        eventDefs.put(id, def);
+    }
+
     // ------------------------------------------------------------------------
     // Operations
     // ------------------------------------------------------------------------
index 26b3c75d431ec5c36a18bd1a11054b8396304698..28f5c7e06a7ac881c0dfd1ca1d3c59f7b74c127b 100644 (file)
@@ -28,6 +28,12 @@ import org.eclipse.linuxtools.ctf.core.trace.StreamInputReader;
  */
 public class EventDeclaration implements IEventDeclaration {
 
+    /** Id of lost events */
+    public static final long LOST_EVENT_ID = -1L;
+
+    /** Id of events when not set */
+    public static final long UNSET_EVENT_ID = -2L;
+
     // ------------------------------------------------------------------------
     // Attributes
     // ------------------------------------------------------------------------
@@ -50,7 +56,7 @@ public class EventDeclaration implements IEventDeclaration {
     /**
      * Event id (can be null if only event in the stream).
      */
-    private Long id = null;
+    private Long id = UNSET_EVENT_ID;
 
     /**
      * Stream to which belongs this event.
@@ -100,7 +106,7 @@ public class EventDeclaration implements IEventDeclaration {
     public static synchronized EventDeclaration getLostEventDeclaration() {
         EventDeclaration lostEvent = new EventDeclaration();
         lostEvent.fields = new StructDeclaration(1);
-        lostEvent.id = -1L;
+        lostEvent.id = LOST_EVENT_ID;
         lostEvent.name = "Lost event"; //$NON-NLS-1$
         return lostEvent;
     }
@@ -218,7 +224,7 @@ public class EventDeclaration implements IEventDeclaration {
      * @return is the id set?
      */
     public boolean idIsSet() {
-        return id != null;
+        return (id != null && id != UNSET_EVENT_ID);
     }
 
     /**
index 14366d45472200f56f002e69dac0c5c76c095104..ef74805e138d21539618240d5dcfa78970d348df 100644 (file)
@@ -40,6 +40,7 @@ public class StreamInputPacketIndex {
 
     /**
      * Gets the entries
+     *
      * @return the entries
      */
     public Vector<StreamInputPacketIndexEntry> getEntries() {
@@ -48,6 +49,7 @@ public class StreamInputPacketIndex {
 
     /**
      * Gets an iterator to the entries
+     *
      * @return an iterator to the entries
      */
     public ListIterator<StreamInputPacketIndexEntry> listIterator() {
@@ -56,7 +58,9 @@ public class StreamInputPacketIndex {
 
     /**
      * Gets an iterator to the entries at a given position
-     * @param n the position to get
+     *
+     * @param n
+     *            the position to get
      * @return the iterator
      */
     public ListIterator<StreamInputPacketIndexEntry> listIterator(int n) {
@@ -81,15 +85,13 @@ public class StreamInputPacketIndex {
         assert (entry.getContentSizeBits() != 0);
 
         if (entry.getTimestampBegin() > entry.getTimestampEnd()) {
-            throw new CTFReaderException(
-                    "Packet begin timestamp is after end timestamp"); //$NON-NLS-1$
+            throw new CTFReaderException("Packet begin timestamp is after end timestamp"); //$NON-NLS-1$
         }
 
         if (!this.entries.isEmpty()) {
             if (entry.getTimestampBegin() < this.entries.lastElement()
                     .getTimestampBegin()) {
-                throw new CTFReaderException(
-                        "Packets begin timestamp decreasing"); //$NON-NLS-1$
+                throw new CTFReaderException("Packets begin timestamp decreasing"); //$NON-NLS-1$
             }
         }
 
@@ -119,7 +121,7 @@ public class StreamInputPacketIndex {
         /*
          * If the index is empty, return the iterator at the very beginning.
          */
-        ifthis.getEntries().isEmpty()) {
+        if (this.getEntries().isEmpty()) {
             return this.getEntries().listIterator();
         }
 
@@ -151,12 +153,30 @@ public class StreamInputPacketIndex {
                  * the packet to return is before the guess.
                  */
                 max = guessI - 1;
-            } else if (timestamp >= guessEntry.getTimestampBegin()) {
+            } else if (timestamp > guessEntry.getTimestampBegin()) {
                 /*
                  * If the timestamp is after the begin timestamp, we know that
                  * the packet to return is after the guess or is the guess.
                  */
                 min = guessI;
+            } else if (timestamp == guessEntry.getTimestampBegin()) {
+                /*
+                 * If the timestamp is equal to the begin timestamp, we want to
+                 * return the first packetIndexEntry that have this timestamp.
+                 */
+                if (guessI > 0) {
+                    StreamInputPacketIndexEntry previousGuessEntry = this.entries.get(guessI - 1);
+                    while (guessI > 0 && guessEntry.getTimestampBegin() == previousGuessEntry.getTimestampBegin()) {
+                        guessEntry = previousGuessEntry;
+                        guessI--;
+                        if (guessI - 1 >= 0) {
+                            previousGuessEntry = this.entries.get(guessI - 1);
+                        }
+                    }
+                    min = guessI;
+                    max = guessI;
+                }
+
             }
         }
 
index 9aa91972e36c14b30a14ede87cd0d151a1009508..5f5179678a9f5b201ef0bbfaeadda5daf505c6cf 100644 (file)
@@ -3,7 +3,9 @@
       id="org.eclipse.linuxtools.ctf"
       label="%featureName"
       version="3.0.0.qualifier"
-      provider-name="%featureProvider">
+      provider-name="%featureProvider"
+      license-feature="org.eclipse.linuxtools.license.feature"
+      license-feature-version="1.0.0.qualifier">
 
    <description url="http://www.example.com/description">
       %description
diff --git a/org.eclipse.linuxtools.ctf/sourceTemplateFeature/feature.properties b/org.eclipse.linuxtools.ctf/sourceTemplateFeature/feature.properties
deleted file mode 100644 (file)
index 2531f59..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-###############################################################################
-# Copyright (c) 2013 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
index 2b10296ef02993ad61d6aa6f61621126b76ab79b..1fb7a378d5e8701ec7e35ad4b38dcd7cc65d83bd 100644 (file)
@@ -4,8 +4,10 @@ Bundle-Name: %Bundle-Name
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Version: 3.0.0.qualifier
 Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.gdbtrace.core.tests
+Bundle-SymbolicName: org.eclipse.linuxtools.gdbtrace.core.tests;singleton:=true
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Fragment-Host: org.eclipse.linuxtools.gdbtrace.core
-Require-Bundle: org.junit;bundle-version="4.0.0"
+Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.gdbtrace.core;bundle-version="3.0.0"
+Export-Package: org.eclipse.linuxtools.gdbtrace.core.tests
index 2d222cdb9c3590842689523b7646d01f2011d44b..8786d48a66c9e61c65016c07f311bd39688033e3 100644 (file)
@@ -15,7 +15,7 @@ Require-Bundle: org.eclipse.core.runtime,
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.linuxtools.internal.gdbtrace.core;x-internal:=true,
+Export-Package: org.eclipse.linuxtools.internal.gdbtrace.core;x-friends:="org.eclipse.linuxtools.gdbtrace.core.tests",
  org.eclipse.linuxtools.internal.gdbtrace.core.event;x-friends:="org.eclipse.linuxtools.gdbtrace.ui",
  org.eclipse.linuxtools.internal.gdbtrace.core.trace;x-friends:="org.eclipse.linuxtools.gdbtrace.ui"
 Import-Package: org.eclipse.cdt.dsf.concurrent,
index a1a3c30cff213bee33aa6a82fe72b17fa85cc4b6..33c2c691a7dd5db7a315f31b323f9fa3ca0c9276 100644 (file)
             <phase>generate-sources</phase>
             <configuration>
               <echo>Generating GDB Tracepoint Analysis Help Files</echo>
-              <tasks>
+              <target>
                 <property name="compile_classpath" refid="maven.compile.classpath" />
                 <ant target="build" inheritRefs="true" antfile="build.xml" />
-              </tasks>
+              </target>
             </configuration>
             <goals>
               <goal>run</goal>
@@ -48,9 +48,9 @@
             <phase>clean</phase>
             <configuration>
               <echo>Cleaning up generated GDB Tracepoint Analysis Help Files</echo>
-              <tasks>
+              <target>
                 <ant target="clean" antfile="build.xml" />
-              </tasks>
+              </target>
             </configuration>
             <goals>
               <goal>run</goal>
index 3dd9e20193de838b81bfd93421c7611446634c64..8e729ea5f94f7edc59317410d12f5260c1064d47 100644 (file)
@@ -4,8 +4,11 @@ Bundle-Name: %Bundle-Name
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Version: 3.0.0.qualifier
 Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.gdbtrace.ui.tests
+Bundle-SymbolicName: org.eclipse.linuxtools.gdbtrace.ui.tests;singleton:=true
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Fragment-Host: org.eclipse.linuxtools.gdbtrace.ui
-Require-Bundle: org.junit;bundle-version="4.0.0"
+Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.core.runtime,
+ org.eclipse.ui,
+ org.eclipse.linuxtools.gdbtrace.ui;bundle-version="3.0.0"
+Export-Package: org.eclipse.linuxtools.gdbtrace.ui.tests
index 4a8d6ccca2269771b6beb4e43a1bcf97afdd556d..980bae69d4f22e6a843dcc93dcb5db4558dd28b5 100644 (file)
@@ -17,7 +17,7 @@ Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.linuxtools.gdbtrace.core;bundle-version="3.0.0"
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Export-Package: org.eclipse.linuxtools.internal.gdbtrace.ui;x-internal:=true,
+Export-Package: org.eclipse.linuxtools.internal.gdbtrace.ui;x-friends:="org.eclipse.linuxtools.gdbtrace.ui.tests",
  org.eclipse.linuxtools.internal.gdbtrace.ui.views;x-internal:=true,
  org.eclipse.linuxtools.internal.gdbtrace.ui.views.events;x-internal:=true,
  org.eclipse.linuxtools.internal.gdbtrace.ui.views.project.dialogs;x-internal:=true,
index 87cb78f520c84337929a1478c389a5791b4038a6..58338f28c2d774f0e7cda6849867b9a91d44dfb2 100644 (file)
@@ -3,7 +3,9 @@
       id="org.eclipse.linuxtools.gdbtrace"
       label="%featureName"
       version="3.0.0.qualifier"
-      provider-name="%featureProvider">
+      provider-name="%featureProvider"
+      license-feature="org.eclipse.linuxtools.license.feature"
+      license-feature-version="1.0.0.qualifier">
 
    <description>
       %description
diff --git a/org.eclipse.linuxtools.gdbtrace/sourceTemplateFeature/feature.properties b/org.eclipse.linuxtools.gdbtrace/sourceTemplateFeature/feature.properties
deleted file mode 100644 (file)
index d2bf491..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2013 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
diff --git a/org.eclipse.linuxtools.lttng.alltests/.classpath b/org.eclipse.linuxtools.lttng.alltests/.classpath
new file mode 100644 (file)
index 0000000..ad32c83
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.linuxtools.lttng.alltests/.gitignore b/org.eclipse.linuxtools.lttng.alltests/.gitignore
new file mode 100644 (file)
index 0000000..1a2476f
--- /dev/null
@@ -0,0 +1,2 @@
+bin/
+target
diff --git a/org.eclipse.linuxtools.lttng.alltests/.project b/org.eclipse.linuxtools.lttng.alltests/.project
new file mode 100644 (file)
index 0000000..849f406
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.linuxtools.lttng.alltests</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.eclipse.linuxtools.lttng.alltests/.settings/org.eclipse.core.resources.prefs b/org.eclipse.linuxtools.lttng.alltests/.settings/org.eclipse.core.resources.prefs
new file mode 100644 (file)
index 0000000..99f26c0
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.linuxtools.lttng.alltests/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.linuxtools.lttng.alltests/.settings/org.eclipse.core.runtime.prefs
new file mode 100644 (file)
index 0000000..5a0ad22
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.linuxtools.lttng.alltests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.linuxtools.lttng.alltests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..7acb262
--- /dev/null
@@ -0,0 +1,393 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.linuxtools.lttng.alltests/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.linuxtools.lttng.alltests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644 (file)
index 0000000..4fd0c70
--- /dev/null
@@ -0,0 +1,56 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.linuxtools.lttng.alltests/META-INF/MANIFEST.MF b/org.eclipse.linuxtools.lttng.alltests/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..200f802
--- /dev/null
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 2.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.linuxtools.lttng.alltests;singleton:=true
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.linuxtools.ctf.core.tests;bundle-version="2.1.0",
+ org.eclipse.linuxtools.gdbtrace.core.tests;bundle-version="2.1.0",
+ org.eclipse.linuxtools.gdbtrace.ui.tests;bundle-version="2.1.0",
+ org.eclipse.linuxtools.lttng2.core.tests;bundle-version="2.1.0",
+ org.eclipse.linuxtools.lttng2.ui.tests;bundle-version="2.1.0",
+ org.eclipse.linuxtools.lttng2.kernel.core.tests;bundle-version="2.1.0",
+ org.eclipse.linuxtools.lttng2.kernel.ui.tests;bundle-version="2.1.0",
+ org.eclipse.linuxtools.tmf.core.tests;bundle-version="2.1.0",
+ org.eclipse.linuxtools.tmf.ui.tests;bundle-version="2.1.0"
diff --git a/org.eclipse.linuxtools.lttng.alltests/about.html b/org.eclipse.linuxtools.lttng.alltests/about.html
new file mode 100644 (file)
index 0000000..c258ef5
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+<p>June 5, 2006</p>    
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.lttng.alltests/build.properties b/org.eclipse.linuxtools.lttng.alltests/build.properties
new file mode 100644 (file)
index 0000000..f7a0b98
--- /dev/null
@@ -0,0 +1,18 @@
+###############################################################################
+# Copyright (c) 2013 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.linuxtools.lttng.alltests/plugin.properties b/org.eclipse.linuxtools.lttng.alltests/plugin.properties
new file mode 100644 (file)
index 0000000..e9a8bb6
--- /dev/null
@@ -0,0 +1,15 @@
+###############################################################################
+# Copyright (c) 2013 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Ericsson - Initial API and implementation
+###############################################################################
+
+#Properties file for org.eclipse.linuxtools.lttng.alltests
+Bundle-Vendor = Eclipse Linux Tools
+Bundle-Name = Linux Tools LTTng Component All Tests
diff --git a/org.eclipse.linuxtools.lttng.alltests/src/org/eclipse/linuxtools/lttng/alltests/RunAllTests.java b/org.eclipse.linuxtools.lttng.alltests/src/org/eclipse/linuxtools/lttng/alltests/RunAllTests.java
new file mode 100644 (file)
index 0000000..b7f0093
--- /dev/null
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng.alltests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Master test suite for all Linux Tools LTTng unit tests.
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    org.eclipse.linuxtools.ctf.core.tests.AllCtfCoreTests.class,
+    org.eclipse.linuxtools.gdbtrace.core.tests.AllGdbTraceCoreTests.class,
+    org.eclipse.linuxtools.gdbtrace.ui.tests.AllGdbTraceUITests.class,
+    org.eclipse.linuxtools.lttng2.core.tests.AllTests.class,
+    org.eclipse.linuxtools.lttng2.ui.tests.AllTests.class,
+    org.eclipse.linuxtools.lttng2.kernel.core.tests.AllTests.class,
+    org.eclipse.linuxtools.lttng2.kernel.ui.tests.AllTests.class,
+    org.eclipse.linuxtools.tmf.core.tests.AllTmfCoreTests.class,
+    org.eclipse.linuxtools.tmf.ui.tests.AllTmfUITests.class,
+})
+public class RunAllTests {
+
+}
index 6da7886ab79c885dab82221dd000b4fe8a16d9af..69e58ce55a2e4967ea7752f1f28611fce630b189 100644 (file)
             <phase>generate-sources</phase>
             <configuration>
               <echo>Generating LTTng Help Files</echo>
-              <tasks>
+              <target>
                 <property name="compile_classpath" refid="maven.compile.classpath" />
                 <ant target="build" inheritRefs="true" antfile="build.xml" />
-              </tasks>
+              </target>
             </configuration>
             <goals>
               <goal>run</goal>
@@ -48,9 +48,9 @@
             <phase>clean</phase>
             <configuration>
               <echo>Cleaning up generated LTTng Help Files</echo>
-              <tasks>
+              <target>
                 <ant target="clean" antfile="build.xml" />
-              </tasks>
+              </target>
             </configuration>
             <goals>
               <goal>run</goal>
index 16739a2c19daf6b29c65a7f61714b24663f50d1f..395da01b6eb174cb8165f564a87d231bd20952f6 100644 (file)
@@ -39,7 +39,7 @@
                 <goal>run</goal>
               </goals>
               <configuration>
-              <tasks>
+              <target>
                 <delete includeemptydirs="false">
                   <fileset
                     dir="${lttngPackageDestination}">
@@ -52,7 +52,7 @@
                     <include name="**" />
                   </fileset>
                 </copy>
-              </tasks>
+              </target>
             </configuration>
           </execution>
         </executions>
index 59f09411c53c7d4413af742bfcda0a7293ed7e88..db015d99861589bded784b5dbc536beb59999388 100644 (file)
@@ -4,8 +4,10 @@ Bundle-Name: %Bundle-Name
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Version: 3.0.0.qualifier
 Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.core.tests
+Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.core.tests;singleton:=true
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Fragment-Host: org.eclipse.linuxtools.lttng2.core
-Require-Bundle: org.junit;bundle-version="4.0.0"
+Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.lttng2.core;bundle-version="3.0.0"
+Export-Package: org.eclipse.linuxtools.lttng2.core.tests
index 66de625258e690e6a923a8c1cb0769e1f183cb1a..fdf605147985cdaed3ceeb0992aecb041f730315 100644 (file)
@@ -10,5 +10,5 @@ Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Require-Bundle: org.eclipse.core.runtime
 Export-Package: org.eclipse.linuxtools.internal.lttng2.core;x-friends:="org.eclipse.linuxtools.lttng2.core.tests",
- org.eclipse.linuxtools.internal.lttng2.core.control.model;x-friends:="org.eclipse.linuxtools.lttng2.ui",
- org.eclipse.linuxtools.internal.lttng2.core.control.model.impl;x-friends:="org.eclipse.linuxtools.lttng2.ui"
+ org.eclipse.linuxtools.internal.lttng2.core.control.model;x-friends:="org.eclipse.linuxtools.lttng2.ui,org.eclipse.linuxtools.lttng2.ui.tests,org.eclipse.linuxtools.lttng2.core.tests",
+ org.eclipse.linuxtools.internal.lttng2.core.control.model.impl;x-friends:="org.eclipse.linuxtools.lttng2.ui,org.eclipse.linuxtools.lttng2.ui.tests,org.eclipse.linuxtools.lttng2.core.tests"
index 6f0114b17d42fb8a0832c45a4d7935f7f3507819..adbf197ddc79b6428357ded88042b574263d8c27 100644 (file)
@@ -4,10 +4,12 @@ Bundle-Name: %Bundle-Name
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Version: 3.0.0.qualifier
 Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.kernel.core.tests
+Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.kernel.core.tests;singleton:=true
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Fragment-Host: org.eclipse.linuxtools.lttng2.kernel.core
 Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.core.runtime,
  org.eclipse.linuxtools.tmf.core;bundle-version="3.0.0",
- org.eclipse.linuxtools.tmf.core.tests;bundle-version="3.0.0"
+ org.eclipse.linuxtools.tmf.core.tests;bundle-version="3.0.0",
+ org.eclipse.linuxtools.lttng2.kernel.core;bundle-version="3.0.0"
+Export-Package: org.eclipse.linuxtools.lttng2.kernel.core.tests
index b9ddedd4fafed21b4df9e69568dc5c0d95c5435f..487e4b7542c203fa0440933a807d7293f4953b26 100644 (file)
@@ -145,8 +145,8 @@ public abstract class StateSystemTest {
     }
 
     /**
-     * Range query, but with a t2 far off the end of the trace.
-     * The result should still be valid.
+     * Range query, but with a t2 far off the end of the trace. The result
+     * should still be valid.
      */
     @Test
     public void testRangeQuery2() {
@@ -405,4 +405,22 @@ public abstract class StateSystemTest {
             fail();
         }
     }
+
+    @Test
+    public void testFirstIntervalIsConsidered() {
+        try {
+            List<ITmfStateInterval> list = ssq.queryFullState(1331668248014135800L);
+            ITmfStateInterval interval = list.get(233);
+            assertEquals(1331668247516664825L, interval.getStartTime());
+
+            int valueInt = interval.getStateValue().unboxInt();
+            assertEquals(1, valueInt);
+        } catch (TimeRangeException e) {
+            fail();
+        } catch (StateSystemDisposedException e) {
+            fail();
+        } catch (StateValueTypeException e) {
+            fail();
+        }
+    }
 }
index 44140b9027b08188be8e49be301c15db0b367649..7e84ee5353fe81a12ea505e892a6bca9d1bf53b6 100644 (file)
@@ -12,6 +12,6 @@ Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.core.resources,
  org.eclipse.linuxtools.ctf.core;bundle-version="3.0.0",
  org.eclipse.linuxtools.tmf.core;bundle-version="3.0.0"
-Export-Package: org.eclipse.linuxtools.internal.lttng2.kernel.core;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui",
- org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider;x-internal:=true,
+Export-Package: org.eclipse.linuxtools.internal.lttng2.kernel.core;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui,org.eclipse.linuxtools.lttng2.kernel.core.tests",
+ org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider;x-friends:="org.eclipse.linuxtools.lttng2.kernel.core.tests",
  org.eclipse.linuxtools.lttng2.kernel.core.trace
index f132a921bc553708b57e50c5ae6f53584b0de96b..e917574461bf3410e714d6d381fba819744c836f 100644 (file)
@@ -4,8 +4,11 @@ Bundle-Name: %Bundle-Name
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Version: 3.0.0.qualifier
 Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.kernel.ui.tests
+Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.kernel.ui.tests;singleton:=true
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Fragment-Host: org.eclipse.linuxtools.lttng2.kernel.ui
-Require-Bundle: org.junit;bundle-version="4.0.0"
+Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.core.runtime,
+ org.eclipse.ui,
+ org.eclipse.linuxtools.lttng2.kernel.ui;bundle-version="3.0.0"
+Export-Package: org.eclipse.linuxtools.lttng2.kernel.ui.tests
index 7d5fbf9d1de73f968f2278138ec7729086dfefc7..aa69287ab20f25a32d3ead92007d83373e9f18c6 100644 (file)
@@ -17,7 +17,7 @@ Require-Bundle: org.eclipse.ui,
  org.eclipse.linuxtools.lttng2.core;bundle-version="3.0.0",
  org.eclipse.linuxtools.lttng2.ui;bundle-version="3.0.0",
  org.eclipse.linuxtools.lttng2.kernel.core;bundle-version="3.0.0"
-Export-Package: org.eclipse.linuxtools.internal.lttng2.kernel.ui;x-internal:=true,
+Export-Package: org.eclipse.linuxtools.internal.lttng2.kernel.ui;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui.tests",
  org.eclipse.linuxtools.internal.lttng2.kernel.ui.viewers.events;x-internal:=true,
  org.eclipse.linuxtools.internal.lttng2.kernel.ui.views;x-internal:=true,
  org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow;x-internal:=true,
index 2cd832138d034e3ecdc22c068616713c85bf4685..d12a8630913fd1853507f8292cecd6d0fd9a3477 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012, 2013 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson, Ã‰cole Polytechnique de Montréal
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -8,39 +8,27 @@
  *
  * Contributors:
  *   Patrick Tasse - Initial API and implementation
+ *   Geneviève Bastien - Move code to provide base classes for time graph view
  *******************************************************************************/
 
 package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 import org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.EventIterator;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
 
 /**
  * An entry in the Control Flow view
  */
-public class ControlFlowEntry implements ITimeGraphEntry {
-    private final int fThreadQuark;
-    private final LttngKernelTrace fTrace;
-    private ControlFlowEntry fParent = null;
-    private final ArrayList<ControlFlowEntry> fChildren = new ArrayList<ControlFlowEntry>();
-    private String fName;
+public class ControlFlowEntry extends TimeGraphEntry {
+
     private final int fThreadId;
     private final int fParentThreadId;
-    private long fStartTime = -1;
-    private long fEndTime = -1;
-    private List<ITimeEvent> fEventList = new ArrayList<ITimeEvent>();
-    private List<ITimeEvent> fZoomedEventList = null;
+    private final int fThreadQuark;
 
     /**
      * Constructor
      *
-     * @param threadQuark
+     * @param quark
      *            The attribute quark matching the thread
      * @param trace
      *            The trace on which we are working
@@ -55,85 +43,11 @@ public class ControlFlowEntry implements ITimeGraphEntry {
      * @param endTime
      *            The end time of this process
      */
-    public ControlFlowEntry(int threadQuark, LttngKernelTrace trace, String execName, int threadId, int parentThreadId, long startTime, long endTime) {
-        fThreadQuark = threadQuark;
-        fTrace = trace;
-        fName = execName;
+    public ControlFlowEntry(int quark, LttngKernelTrace trace, String execName, int threadId, int parentThreadId, long startTime, long endTime) {
+        super(quark, trace, execName, startTime, endTime);
         fThreadId = threadId;
         fParentThreadId = parentThreadId;
-        fStartTime = startTime;
-        fEndTime = endTime;
-    }
-
-    @Override
-    public ITimeGraphEntry getParent() {
-        return fParent;
-    }
-
-    @Override
-    public boolean hasChildren() {
-        return fChildren.size() > 0;
-    }
-
-    @Override
-    public List<ControlFlowEntry> getChildren() {
-        return fChildren;
-    }
-
-    @Override
-    public String getName() {
-        return fName;
-    }
-
-    /**
-     * Update the entry name
-     * @param execName the updated entry name
-     */
-    public void setName(String execName) {
-        fName = execName;
-    }
-
-    @Override
-    public long getStartTime() {
-        return fStartTime;
-    }
-
-    @Override
-    public long getEndTime() {
-        return fEndTime;
-    }
-
-    @Override
-    public boolean hasTimeEvents() {
-        return true;
-    }
-
-    @Override
-    public Iterator<ITimeEvent> getTimeEventsIterator() {
-        return new EventIterator(fEventList, fZoomedEventList);
-    }
-
-    @Override
-    public Iterator<ITimeEvent> getTimeEventsIterator(long startTime, long stopTime, long visibleDuration) {
-        return new EventIterator(fEventList, fZoomedEventList, startTime, stopTime);
-    }
-
-    /**
-     * Get the quark of the attribute matching this thread's TID
-     *
-     * @return The quark
-     */
-    public int getThreadQuark() {
-        return fThreadQuark;
-    }
-
-    /**
-     * Get the CTF trace object
-     *
-     * @return The trace
-     */
-    public LttngKernelTrace getTrace() {
-        return fTrace;
+        fThreadQuark = quark;
     }
 
     /**
@@ -145,6 +59,11 @@ public class ControlFlowEntry implements ITimeGraphEntry {
         return fThreadId;
     }
 
+    @Override
+    public LttngKernelTrace getTrace() {
+        return (LttngKernelTrace) super.getTrace();
+    }
+
     /**
      * Get this thread's parent TID
      *
@@ -155,54 +74,12 @@ public class ControlFlowEntry implements ITimeGraphEntry {
     }
 
     /**
-     * Add an event to this process's timeline
-     *
-     * @param event
-     *            The time event
-     */
-    public void addEvent(ITimeEvent event) {
-        long start = event.getTime();
-        long end = start + event.getDuration();
-        synchronized (fEventList) {
-            fEventList.add(event);
-            if (fStartTime == -1 || start < fStartTime) {
-                fStartTime = start;
-            }
-            if (fEndTime == -1 || end > fEndTime) {
-                fEndTime = end;
-            }
-        }
-    }
-
-    /**
-     * Set the general event list of this entry
-     *
-     * @param eventList
-     *            The list of time events
-     */
-    public void setEventList(List<ITimeEvent> eventList) {
-        fEventList = eventList;
-    }
-
-    /**
-     * Set the zoomed event list of this entry
+     * Get the quark of the attribute matching this thread's TID
      *
-     * @param eventList
-     *            The list of time events
+     * @return The quark
      */
-    public void setZoomedEventList(List<ITimeEvent> eventList) {
-        fZoomedEventList = eventList;
+    public int getThreadQuark() {
+        return fThreadQuark;
     }
 
-    /**
-     * Add a child entry to this one (to show relationships between processes as
-     * a tree)
-     *
-     * @param child
-     *            The child entry
-     */
-    public void addChild(ControlFlowEntry child) {
-        child.fParent = this;
-        fChildren.add(child);
-    }
 }
diff --git a/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowEvent.java b/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/controlflow/ControlFlowEvent.java
deleted file mode 100644 (file)
index b84f5dd..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2013 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Patrick Tasse - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow;
-
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;
-
-/**
- * Time Event specific to the control flow view
- */
-public class ControlFlowEvent extends TimeEvent {
-
-    private final int fStatus;
-
-    /**
-     * Constructor
-     *
-     * @param entry
-     *            The entry to which this time event is assigned
-     * @param time
-     *            The timestamp of this event
-     * @param duration
-     *            The duration of this event
-     * @param status
-     *            The status assigned to the event
-     */
-    public ControlFlowEvent(ITimeGraphEntry entry, long time, long duration,
-            int status) {
-        super(entry, time, duration);
-        fStatus = status;
-    }
-
-    /**
-     * Get this event's status
-     *
-     * @return The integer matching this status
-     */
-    public int getStatus() {
-        return fStatus;
-    }
-
-    @Override
-    public String toString() {
-        return "ControlFlowEvent start=" + fTime + " end=" + (fTime + fDuration) + " duration=" + fDuration + " status=" + fStatus; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-    }
-}
index 6ded4d72274121785b7aadd0c50ce03f475516cf..cb148e03d1febdbc998f72f5e9e9572aa23b1dca 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012, 2013 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson, Ã‰cole Polytechnique de Montréal
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *   Patrick Tasse - Initial API and implementation
+ *   Geneviève Bastien - Move code to provide base classes for time graph view
  *******************************************************************************/
 
 package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow;
@@ -30,6 +31,8 @@ import org.eclipse.linuxtools.tmf.core.statevalue.ITmfStateValue;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.StateItem;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.GC;
@@ -42,30 +45,38 @@ import org.eclipse.swt.graphics.Rectangle;
 public class ControlFlowPresentationProvider extends TimeGraphPresentationProvider {
 
     private enum State {
-        UNKNOWN      (new RGB(100, 100, 100)),
-        WAIT_BLOCKED (new RGB(200, 200,   0)),
-        WAIT_FOR_CPU (new RGB(200, 100,   0)),
-        USERMODE     (new RGB(  0, 200,   0)),
-        SYSCALL      (new RGB(  0,   0, 200)),
-        INTERRUPTED  (new RGB(200,   0, 100));
+        UNKNOWN        (new RGB(100, 100, 100)),
+        WAIT_BLOCKED   (new RGB(200, 200, 0)),
+        WAIT_FOR_CPU   (new RGB(200, 100, 0)),
+        USERMODE       (new RGB(0,   200, 0)),
+        SYSCALL        (new RGB(0,     0, 200)),
+        INTERRUPTED    (new RGB(200,   0, 100));
 
         public final RGB rgb;
 
-        private State (RGB rgb) {
+        private State(RGB rgb) {
             this.rgb = rgb;
         }
+
     }
 
-    @Override
-    public String getStateTypeName() {
-        return Messages.ControlFlowView_stateTypeName;
+    /**
+     * Default constructor
+     */
+    public ControlFlowPresentationProvider() {
+        super(Messages.ControlFlowView_stateTypeName);
+    }
+
+    private static State[] getStateValues() {
+        return State.values();
     }
 
     @Override
     public StateItem[] getStateTable() {
-        StateItem[] stateTable = new StateItem[State.values().length];
+        State[] states = getStateValues();
+        StateItem[] stateTable = new StateItem[states.length];
         for (int i = 0; i < stateTable.length; i++) {
-            State state = State.values()[i];
+            State state = states[i];
             stateTable[i] = new StateItem(state.rgb, state.toString());
         }
         return stateTable;
@@ -73,8 +84,8 @@ public class ControlFlowPresentationProvider extends TimeGraphPresentationProvid
 
     @Override
     public int getStateTableIndex(ITimeEvent event) {
-        if (event instanceof ControlFlowEvent) {
-            int status = ((ControlFlowEvent) event).getStatus();
+        if (event instanceof TimeEvent && ((TimeEvent) event).hasValue()) {
+            int status = ((TimeEvent) event).getValue();
             return getMatchingState(status).ordinal();
         }
         return TRANSPARENT;
@@ -82,9 +93,11 @@ public class ControlFlowPresentationProvider extends TimeGraphPresentationProvid
 
     @Override
     public String getEventName(ITimeEvent event) {
-        if (event instanceof ControlFlowEvent) {
-            int status = ((ControlFlowEvent) event).getStatus();
-            return getMatchingState(status).toString();
+        if (event instanceof TimeEvent) {
+            TimeEvent ev = (TimeEvent) event;
+            if (ev.hasValue()) {
+                return getMatchingState(ev.getValue()).toString();
+            }
         }
         return Messages.ControlFlowView_multipleStates;
     }
@@ -109,54 +122,58 @@ public class ControlFlowPresentationProvider extends TimeGraphPresentationProvid
     @Override
     public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event) {
         Map<String, String> retMap = new LinkedHashMap<String, String>();
-        if (event instanceof ControlFlowEvent) {
-            ControlFlowEntry entry = (ControlFlowEntry) event.getEntry();
+
+        if (event instanceof TimeEvent && ((TimeEvent) event).hasValue()) {
+            TimeGraphEntry entry = (TimeGraphEntry) event.getEntry();
             ITmfStateSystem ssq = entry.getTrace().getStateSystems().get(LttngKernelTrace.STATE_ID);
-            int tid = entry.getThreadId();
-
-            try {
-                //Find every CPU first, then get the current thread
-                int cpusQuark = ssq.getQuarkAbsolute(Attributes.CPUS);
-                List<Integer> cpuQuarks = ssq.getSubAttributes(cpusQuark, false);
-                for (Integer cpuQuark : cpuQuarks) {
-                    int currentThreadQuark = ssq.getQuarkRelative(cpuQuark, Attributes.CURRENT_THREAD);
-                    ITmfStateInterval interval = ssq.querySingleState(event.getTime(), currentThreadQuark);
-                    if (!interval.getStateValue().isNull()) {
-                        ITmfStateValue state = interval.getStateValue();
-                        int currentThreadId = state.unboxInt();
-                        if (tid == currentThreadId) {
-                            retMap.put(Messages.ControlFlowView_attributeCpuName, ssq.getAttributeName(cpuQuark));
-                            break;
-                        }
-                    }
-                }
+            if (entry instanceof ControlFlowEntry) {
+                ControlFlowEntry entry2 = (ControlFlowEntry) entry;
+                int tid = entry2.getThreadId();
 
-            } catch (AttributeNotFoundException e) {
-                e.printStackTrace();
-            } catch (TimeRangeException e) {
-                e.printStackTrace();
-            } catch (StateValueTypeException e) {
-                e.printStackTrace();
-            } catch (StateSystemDisposedException e) {
-                /* Ignored */
-            }
-            int status = ((ControlFlowEvent) event).getStatus();
-            if (status == StateValues.PROCESS_STATUS_RUN_SYSCALL) {
                 try {
-                    int syscallQuark = ssq.getQuarkRelative(entry.getThreadQuark(), Attributes.SYSTEM_CALL);
-                    ITmfStateInterval value = ssq.querySingleState(event.getTime(), syscallQuark);
-                    if (!value.getStateValue().isNull()) {
-                        ITmfStateValue state = value.getStateValue();
-                        retMap.put(Messages.ControlFlowView_attributeSyscallName, state.toString());
+                    // Find every CPU first, then get the current thread
+                    int cpusQuark = ssq.getQuarkAbsolute(Attributes.CPUS);
+                    List<Integer> cpuQuarks = ssq.getSubAttributes(cpusQuark, false);
+                    for (Integer cpuQuark : cpuQuarks) {
+                        int currentThreadQuark = ssq.getQuarkRelative(cpuQuark, Attributes.CURRENT_THREAD);
+                        ITmfStateInterval interval = ssq.querySingleState(event.getTime(), currentThreadQuark);
+                        if (!interval.getStateValue().isNull()) {
+                            ITmfStateValue state = interval.getStateValue();
+                            int currentThreadId = state.unboxInt();
+                            if (tid == currentThreadId) {
+                                retMap.put(Messages.ControlFlowView_attributeCpuName, ssq.getAttributeName(cpuQuark));
+                                break;
+                            }
+                        }
                     }
 
                 } catch (AttributeNotFoundException e) {
                     e.printStackTrace();
                 } catch (TimeRangeException e) {
                     e.printStackTrace();
+                } catch (StateValueTypeException e) {
+                    e.printStackTrace();
                 } catch (StateSystemDisposedException e) {
                     /* Ignored */
                 }
+                int status = ((TimeEvent) event).getValue();
+                if (status == StateValues.PROCESS_STATUS_RUN_SYSCALL) {
+                    try {
+                        int syscallQuark = ssq.getQuarkRelative(entry2.getThreadQuark(), Attributes.SYSTEM_CALL);
+                        ITmfStateInterval value = ssq.querySingleState(event.getTime(), syscallQuark);
+                        if (!value.getStateValue().isNull()) {
+                            ITmfStateValue state = value.getStateValue();
+                            retMap.put(Messages.ControlFlowView_attributeSyscallName, state.toString());
+                        }
+
+                    } catch (AttributeNotFoundException e) {
+                        e.printStackTrace();
+                    } catch (TimeRangeException e) {
+                        e.printStackTrace();
+                    } catch (StateSystemDisposedException e) {
+                        /* Ignored */
+                    }
+                }
             }
         }
 
@@ -168,12 +185,13 @@ public class ControlFlowPresentationProvider extends TimeGraphPresentationProvid
         if (bounds.width <= gc.getFontMetrics().getAverageCharWidth()) {
             return;
         }
-        if (!(event instanceof ControlFlowEvent)) {
+        if (!(event instanceof TimeEvent)) {
             return;
         }
         ControlFlowEntry entry = (ControlFlowEntry) event.getEntry();
         ITmfStateSystem ss = entry.getTrace().getStateSystems().get(LttngKernelTrace.STATE_ID);
-        int status = ((ControlFlowEvent) event).getStatus();
+        int status = ((TimeEvent) event).getValue();
+
         if (status != StateValues.PROCESS_STATUS_RUN_SYSCALL) {
             return;
         }
@@ -193,5 +211,4 @@ public class ControlFlowPresentationProvider extends TimeGraphPresentationProvid
             /* Ignored */
         }
     }
-
 }
index e9181da46b3878450460612b5119be5b95f49457..da4666f4b83391bb719f20c5da8815e320dcec6d 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012, 2013 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson, Ã‰cole Polytechnique de Montréal
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -8,75 +8,42 @@
  *
  * Contributors:
  *   Patrick Tasse - Initial API and implementation
- *   Bernd Hufmann - Updated signal handling
+ *   Geneviève Bastien - Move code to provide base classes for time graph view
  *******************************************************************************/
 
 package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
-import java.util.HashMap;
 import java.util.List;
 
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
 import org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace;
-import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.AttributeNotFoundException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateSystemDisposedException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateValueTypeException;
 import org.eclipse.linuxtools.tmf.core.exceptions.TimeRangeException;
 import org.eclipse.linuxtools.tmf.core.interval.ITmfStateInterval;
-import org.eclipse.linuxtools.tmf.core.signal.TmfRangeSynchSignal;
-import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
-import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;
-import org.eclipse.linuxtools.tmf.core.signal.TmfTraceClosedSignal;
-import org.eclipse.linuxtools.tmf.core.signal.TmfTraceOpenedSignal;
-import org.eclipse.linuxtools.tmf.core.signal.TmfTraceSelectedSignal;
 import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem;
 import org.eclipse.linuxtools.tmf.core.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
-import org.eclipse.linuxtools.tmf.ui.views.TmfView;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphRangeListener;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphSelectionListener;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphTimeListener;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphCombo;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphRangeUpdateEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphSelectionEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphTimeEvent;
+import org.eclipse.linuxtools.tmf.ui.views.timegraph.AbstractTimeGraphView;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.Resolution;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.TimeFormat;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.TreeColumn;
-import org.eclipse.ui.IActionBars;
 
 /**
  * The Control Flow view main object
  *
  */
-public class ControlFlowView extends TmfView {
+public class ControlFlowView extends AbstractTimeGraphView {
 
     // ------------------------------------------------------------------------
     // Constants
@@ -87,13 +54,13 @@ public class ControlFlowView extends TmfView {
      */
     public static final String ID = "org.eclipse.linuxtools.lttng2.kernel.ui.views.controlflow"; //$NON-NLS-1$
 
-    private static final String PROCESS_COLUMN    = Messages.ControlFlowView_processColumn;
-    private static final String TID_COLUMN        = Messages.ControlFlowView_tidColumn;
-    private static final String PTID_COLUMN       = Messages.ControlFlowView_ptidColumn;
+    private static final String PROCESS_COLUMN = Messages.ControlFlowView_processColumn;
+    private static final String TID_COLUMN = Messages.ControlFlowView_tidColumn;
+    private static final String PTID_COLUMN = Messages.ControlFlowView_ptidColumn;
     private static final String BIRTH_TIME_COLUMN = Messages.ControlFlowView_birthTimeColumn;
-    private static final String TRACE_COLUMN      = Messages.ControlFlowView_traceColumn;
+    private static final String TRACE_COLUMN = Messages.ControlFlowView_traceColumn;
 
-    private final String[] COLUMN_NAMES = new String[] {
+    private static final String[] COLUMN_NAMES = new String[] {
             PROCESS_COLUMN,
             TID_COLUMN,
             PTID_COLUMN,
@@ -101,151 +68,49 @@ public class ControlFlowView extends TmfView {
             TRACE_COLUMN
     };
 
-    private final String[] FILTER_COLUMN_NAMES = new String[] {
+    private static final String[] FILTER_COLUMN_NAMES = new String[] {
             PROCESS_COLUMN,
             TID_COLUMN
     };
 
-    /**
-     * Redraw state enum
-     */
-    private enum State { IDLE, BUSY, PENDING }
-
-    // ------------------------------------------------------------------------
-    // Fields
-    // ------------------------------------------------------------------------
-
-    // The timegraph combo
-    private TimeGraphCombo fTimeGraphCombo;
-
-    // The selected trace
-    private ITmfTrace fTrace;
-
-    // The timegraph entry list
-    private ArrayList<ControlFlowEntry> fEntryList;
-
-    // The trace to entry list hash map
-    final private HashMap<ITmfTrace, ArrayList<ControlFlowEntry>> fEntryListMap = new HashMap<ITmfTrace, ArrayList<ControlFlowEntry>>();
-
-    // The trace to build thread hash map
-    final private HashMap<ITmfTrace, BuildThread> fBuildThreadMap = new HashMap<ITmfTrace, BuildThread>();
-
-    // The start time
-    private long fStartTime;
-
-    // The end time
-    private long fEndTime;
-
-    // The display width
-    private final int fDisplayWidth;
-
-    // The zoom thread
-    private ZoomThread fZoomThread;
-
-    // The next resource action
-    private Action fNextResourceAction;
-
-    // The previous resource action
-    private Action fPreviousResourceAction;
-
-    // A comparator class
-    private final ControlFlowEntryComparator fControlFlowEntryComparator = new ControlFlowEntryComparator();
-
-    // The redraw state used to prevent unnecessary queuing of display runnables
-    private State fRedrawState = State.IDLE;
-
-    // The redraw synchronization object
-    final private Object fSyncObj = new Object();
-
     // ------------------------------------------------------------------------
-    // Classes
+    // Constructors
     // ------------------------------------------------------------------------
 
-    private class TreeContentProvider implements ITreeContentProvider {
-
-        @Override
-        public void dispose() {
-        }
-
-        @Override
-        public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-        }
-
-        @Override
-        public Object[] getElements(Object inputElement) {
-            return (ITimeGraphEntry[]) inputElement;
-        }
-
-        @Override
-        public Object[] getChildren(Object parentElement) {
-            ITimeGraphEntry entry = (ITimeGraphEntry) parentElement;
-            List<? extends ITimeGraphEntry> children = entry.getChildren();
-            return children.toArray(new ITimeGraphEntry[children.size()]);
-        }
-
-        @Override
-        public Object getParent(Object element) {
-            ITimeGraphEntry entry = (ITimeGraphEntry) element;
-            return entry.getParent();
-        }
-
-        @Override
-        public boolean hasChildren(Object element) {
-            ITimeGraphEntry entry = (ITimeGraphEntry) element;
-            return entry.hasChildren();
-        }
-
+    /**
+     * Constructor
+     */
+    public ControlFlowView() {
+        super(ID, COLUMN_NAMES, FILTER_COLUMN_NAMES, new ControlFlowPresentationProvider());
+        setTreeLabelProvider(new ControlFlowTreeLabelProvider());
+        setEntryComparator(new ControlFlowEntryComparator());
     }
 
-    private class TreeLabelProvider implements ITableLabelProvider {
-
-        @Override
-        public void addListener(ILabelProviderListener listener) {
-        }
-
-        @Override
-        public void dispose() {
-        }
-
-        @Override
-        public boolean isLabelProperty(Object element, String property) {
-            return false;
-        }
-
-        @Override
-        public void removeListener(ILabelProviderListener listener) {
-        }
+    @Override
+    protected String getNextText() {
+        return Messages.ControlFlowView_nextProcessActionNameText;
+    }
 
-        @Override
-        public Image getColumnImage(Object element, int columnIndex) {
-            return null;
-        }
+    @Override
+    protected String getNextTooltip() {
+        return Messages.ControlFlowView_nextProcessActionToolTipText;
+    }
 
-        @Override
-        public String getColumnText(Object element, int columnIndex) {
-            ControlFlowEntry entry = (ControlFlowEntry) element;
-            if (columnIndex == 0) {
-                return entry.getName();
-            } else if (columnIndex == 1) {
-                return Integer.toString(entry.getThreadId());
-            } else if (columnIndex == 2) {
-                if (entry.getParentThreadId() > 0) {
-                    return Integer.toString(entry.getParentThreadId());
-                }
-            } else if (columnIndex == 3) {
-                return Utils.formatTime(entry.getStartTime(), TimeFormat.CALENDAR, Resolution.NANOSEC);
-            } else if (columnIndex == 4) {
-                return entry.getTrace().getName();
-            }
-            return ""; //$NON-NLS-1$
-        }
+    @Override
+    protected String getPrevText() {
+        return Messages.ControlFlowView_previousProcessActionNameText;
+    }
 
+    @Override
+    protected String getPrevTooltip() {
+        return Messages.ControlFlowView_previousProcessActionToolTipText;
     }
 
     private static class ControlFlowEntryComparator implements Comparator<ITimeGraphEntry> {
 
         @Override
         public int compare(ITimeGraphEntry o1, ITimeGraphEntry o2) {
+
             int result = 0;
 
             if ((o1 instanceof ControlFlowEntry) && (o2 instanceof ControlFlowEntry)) {
@@ -268,357 +133,50 @@ public class ControlFlowView extends TmfView {
         }
     }
 
-    private class BuildThread extends Thread {
-        private final ITmfTrace fBuildTrace;
-        private final IProgressMonitor fMonitor;
-
-        public BuildThread(ITmfTrace trace) {
-            super("ControlFlowView build"); //$NON-NLS-1$
-            fBuildTrace = trace;
-            fMonitor = new NullProgressMonitor();
-        }
-
-        @Override
-        public void run() {
-            buildEventList(fBuildTrace, fMonitor);
-            synchronized (fBuildThreadMap) {
-                fBuildThreadMap.remove(this);
-            }
-        }
-
-        public void cancel() {
-            fMonitor.setCanceled(true);
-        }
-    }
-
-    private class ZoomThread extends Thread {
-        private final ArrayList<ControlFlowEntry> fZoomEntryList;
-        private final long fZoomStartTime;
-        private final long fZoomEndTime;
-        private final long fResolution;
-        private final IProgressMonitor fMonitor;
-
-        public ZoomThread(ArrayList<ControlFlowEntry> entryList, long startTime, long endTime) {
-            super("ControlFlowView zoom"); //$NON-NLS-1$
-            fZoomEntryList = entryList;
-            fZoomStartTime = startTime;
-            fZoomEndTime = endTime;
-            fResolution = Math.max(1, (fZoomEndTime - fZoomStartTime) / fDisplayWidth);
-            fMonitor = new NullProgressMonitor();
-        }
-
-        @Override
-        public void run() {
-            if (fZoomEntryList == null) {
-                return;
-            }
-            for (ControlFlowEntry entry : fZoomEntryList) {
-                if (fMonitor.isCanceled()) {
-                    break;
-                }
-                zoom(entry, fMonitor);
-            }
-        }
-
-        private void zoom(ControlFlowEntry entry, IProgressMonitor monitor) {
-            if (fZoomStartTime <= fStartTime && fZoomEndTime >= fEndTime) {
-                entry.setZoomedEventList(null);
-            } else {
-                List<ITimeEvent> zoomedEventList = getEventList(entry, fZoomStartTime, fZoomEndTime, fResolution, monitor);
-                if (zoomedEventList != null) {
-                    entry.setZoomedEventList(zoomedEventList);
-                }
-            }
-            redraw();
-            for (ControlFlowEntry child : entry.getChildren()) {
-                if (fMonitor.isCanceled()) {
-                    return;
-                }
-                zoom(child, monitor);
-            }
-        }
-
-        public void cancel() {
-            fMonitor.setCanceled(true);
-        }
-    }
-
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
-
     /**
-     * Constructor
-     */
-    public ControlFlowView() {
-        super(ID);
-        fDisplayWidth = Display.getDefault().getBounds().width;
-    }
-
-    // ------------------------------------------------------------------------
-    // ViewPart
-    // ------------------------------------------------------------------------
-
-    @Override
-    public void createPartControl(Composite parent) {
-        fTimeGraphCombo = new TimeGraphCombo(parent, SWT.NONE);
-
-        fTimeGraphCombo.setTreeContentProvider(new TreeContentProvider());
-
-        fTimeGraphCombo.setTreeLabelProvider(new TreeLabelProvider());
-
-        fTimeGraphCombo.setTimeGraphProvider(new ControlFlowPresentationProvider());
-
-        fTimeGraphCombo.setTreeColumns(COLUMN_NAMES);
-
-        fTimeGraphCombo.setFilterContentProvider(new TreeContentProvider());
-
-        fTimeGraphCombo.setFilterLabelProvider(new TreeLabelProvider());
-
-        fTimeGraphCombo.setFilterColumns(FILTER_COLUMN_NAMES);
-
-        fTimeGraphCombo.getTimeGraphViewer().addRangeListener(new ITimeGraphRangeListener() {
-            @Override
-            public void timeRangeUpdated(TimeGraphRangeUpdateEvent event) {
-                final long startTime = event.getStartTime();
-                final long endTime = event.getEndTime();
-                TmfTimeRange range = new TmfTimeRange(new CtfTmfTimestamp(startTime), new CtfTmfTimestamp(endTime));
-                TmfTimestamp time = new CtfTmfTimestamp(fTimeGraphCombo.getTimeGraphViewer().getSelectedTime());
-                broadcast(new TmfRangeSynchSignal(ControlFlowView.this, range, time));
-                if (fZoomThread != null) {
-                    fZoomThread.cancel();
-                }
-                startZoomThread(startTime, endTime);
-            }
-        });
-
-        fTimeGraphCombo.getTimeGraphViewer().addTimeListener(new ITimeGraphTimeListener() {
-            @Override
-            public void timeSelected(TimeGraphTimeEvent event) {
-                long time = event.getTime();
-                broadcast(new TmfTimeSynchSignal(ControlFlowView.this, new CtfTmfTimestamp(time)));
-            }
-        });
-
-        fTimeGraphCombo.addSelectionListener(new ITimeGraphSelectionListener() {
-            @Override
-            public void selectionChanged(TimeGraphSelectionEvent event) {
-                //ITimeGraphEntry selection = event.getSelection();
-            }
-        });
-
-        fTimeGraphCombo.getTimeGraphViewer().setTimeFormat(TimeFormat.CALENDAR);
-
-        // View Action Handling
-        makeActions();
-        contributeToActionBars();
-
-        ITmfTrace trace = getActiveTrace();
-        if (trace != null) {
-            traceSelected(new TmfTraceSelectedSignal(this, trace));
-        }
-
-        // make selection available to other views
-        getSite().setSelectionProvider(fTimeGraphCombo.getTreeViewer());
-    }
-
-    @Override
-    public void setFocus() {
-        fTimeGraphCombo.setFocus();
-    }
-
-    // ------------------------------------------------------------------------
-    // Signal handlers
-    // ------------------------------------------------------------------------
-    /**
-     * Handler for the trace opened signal.
-     * @param signal
-     *            The incoming signal
-     * @since 2.0
-     */
-    @TmfSignalHandler
-    public void traceOpened(TmfTraceOpenedSignal signal) {
-        fTrace = signal.getTrace();
-        loadTrace();
-    }
-
-    /**
-     * Handler for the trace selected signal
+     * @author gbastien
      *
-     * @param signal
-     *            The incoming signal
      */
-    @TmfSignalHandler
-    public void traceSelected(final TmfTraceSelectedSignal signal) {
-        if (signal.getTrace() == fTrace) {
-            return;
-        }
-        fTrace = signal.getTrace();
-        loadTrace();
-    }
+    protected static class ControlFlowTreeLabelProvider extends TreeLabelProvider {
 
-    /**
-     * Trace is closed: clear the data structures and the view
-     *
-     * @param signal the signal received
-     */
-    @TmfSignalHandler
-    public void traceClosed(final TmfTraceClosedSignal signal) {
-        synchronized (fBuildThreadMap) {
-            BuildThread buildThread = fBuildThreadMap.remove(signal.getTrace());
-            if (buildThread != null) {
-                buildThread.cancel();
-            }
-        }
-        synchronized (fEntryListMap) {
-            fEntryListMap.remove(signal.getTrace());
-        }
-        if (signal.getTrace() == fTrace) {
-            fTrace = null;
-            fStartTime = 0;
-            fEndTime = 0;
-            if (fZoomThread != null) {
-                fZoomThread.cancel();
-            }
-            refresh();
-        }
-    }
-
-    /**
-     * Handler for the synch signal
-     *
-     * @param signal
-     *            The signal that's received
-     */
-    @TmfSignalHandler
-    public void synchToTime(final TmfTimeSynchSignal signal) {
-        if (signal.getSource() == this || fTrace == null) {
-            return;
-        }
-        final long time = signal.getCurrentTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
+        @Override
+        public String getColumnText(Object element, int columnIndex) {
+            ControlFlowEntry entry = (ControlFlowEntry) element;
 
-        int thread = -1;
-        for (ITmfTrace trace : TmfTraceManager.getTraceSet(fTrace)) {
-            if (thread > 0) {
-                break;
-            }
-            if (trace instanceof LttngKernelTrace) {
-                LttngKernelTrace ctfKernelTrace = (LttngKernelTrace) trace;
-                ITmfStateSystem ssq = ctfKernelTrace.getStateSystems().get(LttngKernelTrace.STATE_ID);
-                if (time >= ssq.getStartTime() && time <= ssq.getCurrentEndTime()) {
-                    List<Integer> currentThreadQuarks = ssq.getQuarks(Attributes.CPUS, "*", Attributes.CURRENT_THREAD);  //$NON-NLS-1$
-                    for (int currentThreadQuark : currentThreadQuarks) {
-                        try {
-                            ITmfStateInterval currentThreadInterval = ssq.querySingleState(time, currentThreadQuark);
-                            int currentThread = currentThreadInterval.getStateValue().unboxInt();
-                            if (currentThread > 0) {
-                                int statusQuark = ssq.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThread), Attributes.STATUS);
-                                ITmfStateInterval statusInterval = ssq.querySingleState(time, statusQuark);
-                                if (statusInterval.getStartTime() == time) {
-                                    thread = currentThread;
-                                    break;
-                                }
-                            }
-                        } catch (AttributeNotFoundException e) {
-                            e.printStackTrace();
-                        } catch (TimeRangeException e) {
-                            e.printStackTrace();
-                        } catch (StateValueTypeException e) {
-                            e.printStackTrace();
-                        } catch (StateSystemDisposedException e) {
-                            /* Ignored */
-                        }
-                    }
+            if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_processColumn)) {
+                return entry.getName();
+            } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_tidColumn)) {
+                return Integer.toString(entry.getThreadId());
+            } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_ptidColumn)) {
+                if (entry.getParentThreadId() > 0) {
+                    return Integer.toString(entry.getParentThreadId());
                 }
+            } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_birthTimeColumn)) {
+                return Utils.formatTime(entry.getStartTime(), TimeFormat.CALENDAR, Resolution.NANOSEC);
+            } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_traceColumn)) {
+                return entry.getTrace().getName();
             }
+            return ""; //$NON-NLS-1$
         }
-        final int selectedThread = thread;
-
-        Display.getDefault().asyncExec(new Runnable() {
-            @Override
-            public void run() {
-                if (fTimeGraphCombo.isDisposed()) {
-                    return;
-                }
-                fTimeGraphCombo.getTimeGraphViewer().setSelectedTime(time, true);
-                startZoomThread(fTimeGraphCombo.getTimeGraphViewer().getTime0(), fTimeGraphCombo.getTimeGraphViewer().getTime1());
-
-                if (selectedThread > 0) {
-                    for (Object element : fTimeGraphCombo.getTimeGraphViewer().getExpandedElements()) {
-                        if (element instanceof ControlFlowEntry) {
-                            ControlFlowEntry entry = (ControlFlowEntry) element;
-                            if (entry.getThreadId() == selectedThread) {
-                                fTimeGraphCombo.setSelection(entry);
-                                break;
-                            }
-                        }
-                    }
-                }
-            }
-        });
-    }
 
-    /**
-     * Handler for the range sync signal
-     *
-     * @param signal
-     *            The signal that's received
-     */
-    @TmfSignalHandler
-    public void synchToRange(final TmfRangeSynchSignal signal) {
-        if (signal.getSource() == this || fTrace == null) {
-            return;
-        }
-        if (signal.getCurrentRange().getIntersection(fTrace.getTimeRange()) == null) {
-            return;
-        }
-        final long startTime = signal.getCurrentRange().getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-        final long endTime = signal.getCurrentRange().getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-        final long time = signal.getCurrentTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-        Display.getDefault().asyncExec(new Runnable() {
-            @Override
-            public void run() {
-                if (fTimeGraphCombo.isDisposed()) {
-                    return;
-                }
-                fTimeGraphCombo.getTimeGraphViewer().setStartFinishTime(startTime, endTime);
-                fTimeGraphCombo.getTimeGraphViewer().setSelectedTime(time, false);
-                startZoomThread(startTime, endTime);
-            }
-        });
     }
 
     // ------------------------------------------------------------------------
     // Internal
     // ------------------------------------------------------------------------
 
-    private void loadTrace() {
-        synchronized (fEntryListMap) {
-            fEntryList = fEntryListMap.get(fTrace);
-            if (fEntryList == null) {
-                synchronized (fBuildThreadMap) {
-                    BuildThread buildThread = new BuildThread(fTrace);
-                    fBuildThreadMap.put(fTrace, buildThread);
-                    buildThread.start();
-                }
-            } else {
-                fStartTime = fTrace.getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-                fEndTime = fTrace.getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-                refresh();
-            }
-        }
-    }
+    @Override
+    protected void buildEventList(final ITmfTrace trace, IProgressMonitor monitor) {
+        setStartTime(Long.MAX_VALUE);
+        setEndTime(Long.MIN_VALUE);
 
-    private void buildEventList(final ITmfTrace trace, IProgressMonitor monitor) {
-        fStartTime = Long.MAX_VALUE;
-        fEndTime = Long.MIN_VALUE;
-        ArrayList<ControlFlowEntry> rootList = new ArrayList<ControlFlowEntry>();
-        for (ITmfTrace aTrace : TmfTraceManager.getTraceSet(trace)) {
+        ArrayList<TimeGraphEntry> rootList = new ArrayList<TimeGraphEntry>();
+        for (ITmfTrace aTrace : fTraceManager.getActiveTraceSet()) {
             if (monitor.isCanceled()) {
                 return;
             }
             if (aTrace instanceof LttngKernelTrace) {
-                ArrayList<ControlFlowEntry> entryList = new ArrayList<ControlFlowEntry>();
+                ArrayList<TimeGraphEntry> entryList = new ArrayList<TimeGraphEntry>();
                 LttngKernelTrace ctfKernelTrace = (LttngKernelTrace) aTrace;
                 ITmfStateSystem ssq = ctfKernelTrace.getStateSystems().get(LttngKernelTrace.STATE_ID);
                 if (!ssq.waitUntilBuilt()) {
@@ -626,8 +184,8 @@ public class ControlFlowView extends TmfView {
                 }
                 long start = ssq.getStartTime();
                 long end = ssq.getCurrentEndTime() + 1;
-                fStartTime = Math.min(fStartTime, start);
-                fEndTime = Math.max(fEndTime, end);
+                setStartTime(Math.min(getStartTime(), start));
+                setEndTime(Math.max(getEndTime(), end));
                 List<Integer> threadQuarks = ssq.getQuarks(Attributes.THREADS, "*"); //$NON-NLS-1$
                 for (int threadQuark : threadQuarks) {
                     if (monitor.isCanceled()) {
@@ -651,11 +209,12 @@ public class ControlFlowView extends TmfView {
                             continue;
                         }
                         int ppidQuark = ssq.getQuarkRelative(threadQuark, Attributes.PPID);
-                        List<ITmfStateInterval> execNameIntervals = ssq.queryHistoryRange(execNameQuark, start, end - 1); // use monitor when available in api
+                        List<ITmfStateInterval> execNameIntervals = ssq.queryHistoryRange(execNameQuark, start, end - 1);
+                        // use monitor when available in api
                         if (monitor.isCanceled()) {
                             return;
                         }
-                        ControlFlowEntry entry = null;
+                        TimeGraphEntry entry = null;
                         for (ITmfStateInterval execNameInterval : execNameIntervals) {
                             if (monitor.isCanceled()) {
                                 return;
@@ -674,7 +233,8 @@ public class ControlFlowView extends TmfView {
                                     entry = new ControlFlowEntry(threadQuark, ctfKernelTrace, execName, threadId, ppid, startTime, endTime);
                                     entryList.add(entry);
                                 } else {
-                                    // update the name of the entry to the latest execName
+                                    // update the name of the entry to the
+                                    // latest execName
                                     entry.setName(execName);
                                 }
                                 entry.addEvent(new TimeEvent(entry, startTime, endTime - startTime));
@@ -694,15 +254,14 @@ public class ControlFlowView extends TmfView {
                 }
                 buildTree(entryList, rootList);
             }
-            Collections.sort(rootList, fControlFlowEntryComparator);
-            synchronized (fEntryListMap) {
-                fEntryListMap.put(trace, (ArrayList<ControlFlowEntry>) rootList.clone());
-            }
-            if (trace == fTrace) {
+            Collections.sort(rootList, getEntryComparator());
+            putEntryList(trace, (ArrayList<TimeGraphEntry>) rootList.clone());
+
+            if (trace.equals(getTrace())) {
                 refresh();
             }
         }
-        for (ControlFlowEntry entry : rootList) {
+        for (TimeGraphEntry entry : rootList) {
             if (monitor.isCanceled()) {
                 return;
             }
@@ -710,12 +269,14 @@ public class ControlFlowView extends TmfView {
         }
     }
 
-    private static void buildTree(ArrayList<ControlFlowEntry> entryList,
-            ArrayList<ControlFlowEntry> rootList) {
-        for (ControlFlowEntry entry : entryList) {
+    private static void buildTree(ArrayList<TimeGraphEntry> entryList,
+            ArrayList<TimeGraphEntry> rootList) {
+        for (TimeGraphEntry listentry : entryList) {
+            ControlFlowEntry entry = (ControlFlowEntry) listentry;
             boolean root = true;
             if (entry.getParentThreadId() > 0) {
-                for (ControlFlowEntry parent : entryList) {
+                for (TimeGraphEntry parententry : entryList) {
+                    ControlFlowEntry parent = (ControlFlowEntry) parententry;
                     if (parent.getThreadId() == entry.getParentThreadId() &&
                             entry.getStartTime() >= parent.getStartTime() &&
                             entry.getStartTime() <= parent.getEndTime()) {
@@ -731,37 +292,41 @@ public class ControlFlowView extends TmfView {
         }
     }
 
-    private void buildStatusEvents(ITmfTrace trace, ControlFlowEntry entry, IProgressMonitor monitor) {
+    private void buildStatusEvents(ITmfTrace trace, TimeGraphEntry entry, IProgressMonitor monitor) {
         ITmfStateSystem ssq = entry.getTrace().getStateSystems().get(LttngKernelTrace.STATE_ID);
+
         long start = ssq.getStartTime();
         long end = ssq.getCurrentEndTime() + 1;
-        long resolution = Math.max(1, (end - start) / fDisplayWidth);
+        long resolution = Math.max(1, (end - start) / getDisplayWidth());
         List<ITimeEvent> eventList = getEventList(entry, entry.getStartTime(), entry.getEndTime(), resolution, monitor);
         if (monitor.isCanceled()) {
             return;
         }
         entry.setEventList(eventList);
-        if (trace == fTrace) {
+        if (trace.equals(getTrace())) {
             redraw();
         }
         for (ITimeGraphEntry child : entry.getChildren()) {
             if (monitor.isCanceled()) {
                 return;
             }
-            buildStatusEvents(trace, (ControlFlowEntry) child, monitor);
+            buildStatusEvents(trace, (TimeGraphEntry) child, monitor);
         }
     }
 
-    private static List<ITimeEvent> getEventList(ControlFlowEntry entry,
-            long startTime, long endTime, long resolution,
-            IProgressMonitor monitor) {
+    @Override
+    protected List<ITimeEvent> getEventList(TimeGraphEntry tgentry, long startTime, long endTime, long resolution, IProgressMonitor monitor) {
+        List<ITimeEvent> eventList = null;
+        if (!(tgentry instanceof ControlFlowEntry)) {
+            return eventList;
+        }
+        ControlFlowEntry entry = (ControlFlowEntry) tgentry;
         final long realStart = Math.max(startTime, entry.getStartTime());
         final long realEnd = Math.min(endTime, entry.getEndTime());
         if (realEnd <= realStart) {
             return null;
         }
         ITmfStateSystem ssq = entry.getTrace().getStateSystems().get(LttngKernelTrace.STATE_ID);
-        List<ITimeEvent> eventList = null;
         try {
             int statusQuark = ssq.getQuarkRelative(entry.getThreadQuark(), Attributes.STATUS);
             List<ITmfStateInterval> statusIntervals = ssq.queryHistoryRange(statusQuark, realStart, realEnd - 1, resolution, monitor);
@@ -782,7 +347,7 @@ public class ControlFlowView extends TmfView {
                 if (lastEndTime != time && lastEndTime != -1) {
                     eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime));
                 }
-                eventList.add(new ControlFlowEvent(entry, time, duration, status));
+                eventList.add(new TimeEvent(entry, time, duration, status));
                 lastEndTime = time + duration;
             }
         } catch (AttributeNotFoundException e) {
@@ -795,104 +360,68 @@ public class ControlFlowView extends TmfView {
         return eventList;
     }
 
-    private void refresh() {
-        Display.getDefault().asyncExec(new Runnable() {
-            @Override
-            public void run() {
-                if (fTimeGraphCombo.isDisposed()) {
-                    return;
-                }
-                ITimeGraphEntry[] entries = null;
-                synchronized (fEntryListMap) {
-                    fEntryList = fEntryListMap.get(fTrace);
-                    if (fEntryList == null) {
-                        fEntryList = new ArrayList<ControlFlowEntry>();
+    /**
+     * Returns a value corresponding to the selected entry.
+     *
+     * Used in conjunction with selectEntry to change the selected entry. If one
+     * of these methods is overridden in child class, then both should be.
+     *
+     * @param time
+     *            The currently selected time
+     * @return a value identifying the entry
+     */
+    private int getSelectionValue(long time) {
+        int thread = -1;
+        for (ITmfTrace trace : fTraceManager.getActiveTraceSet()) {
+            if (thread > 0) {
+                break;
+            }
+            if (trace instanceof LttngKernelTrace) {
+                LttngKernelTrace ctfKernelTrace = (LttngKernelTrace) trace;
+                ITmfStateSystem ssq = ctfKernelTrace.getStateSystems().get(LttngKernelTrace.STATE_ID);
+                if (time >= ssq.getStartTime() && time <= ssq.getCurrentEndTime()) {
+                    List<Integer> currentThreadQuarks = ssq.getQuarks(Attributes.CPUS, "*", Attributes.CURRENT_THREAD); //$NON-NLS-1$
+                    for (int currentThreadQuark : currentThreadQuarks) {
+                        try {
+                            ITmfStateInterval currentThreadInterval = ssq.querySingleState(time, currentThreadQuark);
+                            int currentThread = currentThreadInterval.getStateValue().unboxInt();
+                            if (currentThread > 0) {
+                                int statusQuark = ssq.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThread), Attributes.STATUS);
+                                ITmfStateInterval statusInterval = ssq.querySingleState(time, statusQuark);
+                                if (statusInterval.getStartTime() == time) {
+                                    thread = currentThread;
+                                    break;
+                                }
+                            }
+                        } catch (AttributeNotFoundException e) {
+                            e.printStackTrace();
+                        } catch (TimeRangeException e) {
+                            e.printStackTrace();
+                        } catch (StateValueTypeException e) {
+                            e.printStackTrace();
+                        } catch (StateSystemDisposedException e) {
+                            /* Ignored */
+                        }
                     }
-                    entries = fEntryList.toArray(new ITimeGraphEntry[0]);
                 }
-                Arrays.sort(entries, fControlFlowEntryComparator);
-                fTimeGraphCombo.setInput(entries);
-                fTimeGraphCombo.getTimeGraphViewer().setTimeBounds(fStartTime, fEndTime);
-
-                long timestamp = fTrace == null ? 0 : fTraceManager.getCurrentTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-                long startTime = fTrace == null ? 0 : fTraceManager.getCurrentRange().getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-                long endTime = fTrace == null ? 0 : fTraceManager.getCurrentRange().getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-                startTime = Math.max(startTime, fStartTime);
-                endTime = Math.min(endTime, fEndTime);
-                fTimeGraphCombo.getTimeGraphViewer().setSelectedTime(timestamp, false);
-                fTimeGraphCombo.getTimeGraphViewer().setStartFinishTime(startTime, endTime);
-
-                for (TreeColumn column : fTimeGraphCombo.getTreeViewer().getTree().getColumns()) {
-                    column.pack();
-                }
-
-                startZoomThread(startTime, endTime);
             }
-        });
+        }
+        return thread;
     }
 
-    private void redraw() {
-        synchronized (fSyncObj) {
-            if (fRedrawState == State.IDLE) {
-                fRedrawState = State.BUSY;
-            } else {
-                fRedrawState = State.PENDING;
-                return;
-            }
-        }
-        Display.getDefault().asyncExec(new Runnable() {
-            @Override
-            public void run() {
-                if (fTimeGraphCombo.isDisposed()) {
-                    return;
-                }
-                fTimeGraphCombo.redraw();
-                fTimeGraphCombo.update();
-                synchronized (fSyncObj) {
-                    if (fRedrawState == State.PENDING) {
-                        fRedrawState = State.IDLE;
-                        redraw();
-                    } else {
-                        fRedrawState = State.IDLE;
+    @Override
+    protected void synchingToTime(long time) {
+        int selected = getSelectionValue(time);
+        if (selected > 0) {
+            for (Object element : getTimeGraphCombo().getTimeGraphViewer().getExpandedElements()) {
+                if (element instanceof ControlFlowEntry) {
+                    ControlFlowEntry entry = (ControlFlowEntry) element;
+                    if (entry.getThreadId() == selected) {
+                        getTimeGraphCombo().setSelection(entry);
+                        break;
                     }
                 }
             }
-        });
-    }
-
-    private void startZoomThread(long startTime, long endTime) {
-        if (fZoomThread != null) {
-            fZoomThread.cancel();
         }
-        fZoomThread = new ZoomThread(fEntryList, startTime, endTime);
-        fZoomThread.start();
-    }
-
-    private void makeActions() {
-        fPreviousResourceAction = fTimeGraphCombo.getTimeGraphViewer().getPreviousItemAction();
-        fPreviousResourceAction.setText(Messages.ControlFlowView_previousProcessActionNameText);
-        fPreviousResourceAction.setToolTipText(Messages.ControlFlowView_previousProcessActionToolTipText);
-        fNextResourceAction = fTimeGraphCombo.getTimeGraphViewer().getNextItemAction();
-        fNextResourceAction.setText(Messages.ControlFlowView_nextProcessActionNameText);
-        fNextResourceAction.setToolTipText(Messages.ControlFlowView_nextProcessActionToolTipText);
-    }
-
-    private void contributeToActionBars() {
-        IActionBars bars = getViewSite().getActionBars();
-        fillLocalToolBar(bars.getToolBarManager());
-    }
-
-    private void fillLocalToolBar(IToolBarManager manager) {
-        manager.add(fTimeGraphCombo.getShowFilterAction());
-        manager.add(fTimeGraphCombo.getTimeGraphViewer().getShowLegendAction());
-        manager.add(new Separator());
-        manager.add(fTimeGraphCombo.getTimeGraphViewer().getResetScaleAction());
-        manager.add(fTimeGraphCombo.getTimeGraphViewer().getPreviousEventAction());
-        manager.add(fTimeGraphCombo.getTimeGraphViewer().getNextEventAction());
-        manager.add(fPreviousResourceAction);
-        manager.add(fNextResourceAction);
-        manager.add(fTimeGraphCombo.getTimeGraphViewer().getZoomInAction());
-        manager.add(fTimeGraphCombo.getTimeGraphViewer().getZoomOutAction());
-        manager.add(new Separator());
     }
 }
index 5b12b8661c0077fcc1ff0c1a5984d9e794821278..34d43c4185c81234394814e2ad54f6355ad0e1c0 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012, 2013 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson, Ã‰cole Polytechnique de Montréal
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -8,25 +8,20 @@
  *
  * Contributors:
  *   Patrick Tasse - Initial API and implementation
+ *   Geneviève Bastien - Move code to provide base classes for time graph view
  *******************************************************************************/
 
 package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 import org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.EventIterator;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
 
 /**
  * An entry, or row, in the resource view
  *
  * @author Patrick Tasse
  */
-public class ResourcesEntry implements ITimeGraphEntry {
+public class ResourcesEntry extends TimeGraphEntry {
 
     /** Type of resource */
     public static enum Type {
@@ -37,113 +32,88 @@ public class ResourcesEntry implements ITimeGraphEntry {
         /** Entries for IRQs */
         IRQ,
         /** Entries for Soft IRQ */
-        SOFT_IRQ }
+        SOFT_IRQ
+    }
 
-    private final int fQuark;
-    private final LttngKernelTrace fTrace;
-    private ITimeGraphEntry fParent = null;
-    private final List<ITimeGraphEntry> children = null;
-    private final String fName;
-    private final Type fType;
     private final int fId;
-    private long fStartTime;
-    private long fEndTime;
-    private List<ITimeEvent> fEventList = new ArrayList<ITimeEvent>();
-    private List<ITimeEvent> fZoomedEventList = null;
+    private final Type fType;
+    private final int fQuark;
 
     /**
-     * Standard constructor
+     * Constructor
      *
      * @param quark
-     *            The quark of the state system attribute whose state is shown
-     *            on this row
+     *            The attribute quark matching the entry
      * @param trace
-     *            The trace that this view is talking about
+     *            The trace on which we are working
+     * @param name
+     *            The exec_name of this entry
+     * @param startTime
+     *            The start time of this entry lifetime
+     * @param endTime
+     *            The end time of this entry
      * @param type
-     *            Type of entry, see the Type enum
+     *            The type of this entry
      * @param id
-     *            The integer id associated with this entry or row
+     *            The id of this entry
      */
-    public ResourcesEntry(int quark, LttngKernelTrace trace, Type type, int id) {
-        fQuark = quark;
-        fTrace = trace;
-        fType = type;
+    public ResourcesEntry(int quark, LttngKernelTrace trace, String name, long startTime, long endTime, Type type, int id) {
+        super(quark, trace, name, startTime, endTime);
         fId = id;
-        fName = type.toString() + ' ' + Integer.toString(id);
-    }
-
-    @Override
-    public ITimeGraphEntry getParent() {
-        return fParent;
-    }
-
-    @Override
-    public boolean hasChildren() {
-        return children != null && children.size() > 0;
-    }
-
-    @Override
-    public List<ITimeGraphEntry> getChildren() {
-        return children;
-    }
-
-    @Override
-    public String getName() {
-        return fName;
-    }
-
-    @Override
-    public long getStartTime() {
-        return fStartTime;
-    }
-
-    @Override
-    public long getEndTime() {
-        return fEndTime;
-    }
-
-    @Override
-    public boolean hasTimeEvents() {
-        return true;
-    }
-
-    @Override
-    public Iterator<ITimeEvent> getTimeEventsIterator() {
-        return new EventIterator(fEventList, fZoomedEventList);
-    }
-
-    @Override
-    public Iterator<ITimeEvent> getTimeEventsIterator(long startTime, long stopTime, long visibleDuration) {
-        return new EventIterator(fEventList, fZoomedEventList, startTime, stopTime);
+        fType = type;
+        fQuark = quark;
     }
 
     /**
-     * Assign a parent entry to this one, to organize them in a tree in the
-     * view.
+     * Constructor
      *
-     * @param parent
-     *            The parent entry
+     * @param trace
+     *            The trace on which we are working
+     * @param name
+     *            The exec_name of this entry
+     * @param startTime
+     *            The start time of this entry lifetime
+     * @param endTime
+     *            The end time of this entry
+     * @param id
+     *            The id of this entry
      */
-    public void setParent(ITimeGraphEntry parent) {
-        fParent = parent;
+    public ResourcesEntry(LttngKernelTrace trace, String name, long startTime, long endTime, int id) {
+        this(-1, trace, name, startTime, endTime, Type.NULL, id);
     }
 
     /**
-     * Retrieve the attribute quark that's represented by this entry.
+     * Constructor
      *
-     * @return The integer quark
+     * @param quark
+     *            The attribute quark matching the entry
+     * @param trace
+     *            The trace on which we are working
+     * @param startTime
+     *            The start time of this entry lifetime
+     * @param endTime
+     *            The end time of this entry
+     * @param type
+     *            The type of this entry
+     * @param id
+     *            The id of this entry
      */
-    public int getQuark() {
-        return fQuark;
+    public ResourcesEntry(int quark, LttngKernelTrace trace, long startTime, long endTime, Type type, int id) {
+        this(quark, trace, type.toString() + " " + id, startTime, endTime, type, id); //$NON-NLS-1$
     }
 
     /**
-     * Retrieve the trace that is associated to this Resource view.
+     * Get the entry's id
      *
-     * @return The LTTng 2 kernel trace
+     * @return the entry's id
      */
+    public int getId() {
+        return fId;
+    }
+
+    @Override
     public LttngKernelTrace getTrace() {
-        return fTrace;
+        return (LttngKernelTrace) super.getTrace();
     }
 
     /**
@@ -156,36 +126,43 @@ public class ResourcesEntry implements ITimeGraphEntry {
     }
 
     /**
-     * Get the integer ID associated with this entry.
+     * Retrieve the attribute quark that's represented by this entry.
      *
-     * @return The ID
+     * @return The integer quark The attribute quark matching the entry
      */
-    public int getId() {
-        return fId;
+    public int getQuark() {
+        return fQuark;
     }
 
-    /**
-     * Assign the target event list to this view.
-     *
-     * @param eventList
-     *            The list of time events
-     */
-    public void setEventList(List<ITimeEvent> eventList) {
-        fEventList = eventList;
-        if (eventList != null && eventList.size() > 0) {
-            fStartTime = eventList.get(0).getTime();
-            ITimeEvent lastEvent = eventList.get(eventList.size() - 1);
-            fEndTime = lastEvent.getTime() + lastEvent.getDuration();
+    @Override
+    public boolean hasTimeEvents() {
+        if (fType == Type.NULL) {
+            return false;
         }
+        return true;
     }
 
     /**
-     * Assign the zoomed event list to this view.
+     * Add a child to this entry of type ResourcesEntry
      *
-     * @param eventList
-     *            The list of "zoomed" time events
+     * @param entry
+     *            The entry to add
      */
-    public void setZoomedEventList(List<ITimeEvent> eventList) {
-        fZoomedEventList = eventList;
+    public void addChild(ResourcesEntry entry) {
+        int index;
+        for (index = 0; index < getChildren().size(); index++) {
+            ResourcesEntry other = (ResourcesEntry) getChildren().get(index);
+            if (entry.getType().compareTo(other.getType()) < 0) {
+                break;
+            } else if (entry.getType().equals(other.getType())) {
+                if (entry.getId() < other.getId()) {
+                    break;
+                }
+            }
+        }
+
+        entry.setParent(this);
+        getChildren().add(index, entry);
     }
+
 }
diff --git a/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesEvent.java b/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/resources/ResourcesEvent.java
deleted file mode 100644 (file)
index d8acb7d..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012, 2013 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Patrick Tasse - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources;
-
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesEntry.Type;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;
-
-/**
- * Time Event implementation specific to the Resource View
- *
- * @author Patrick Tasse
- */
-public class ResourcesEvent extends TimeEvent {
-
-    private final Type fType;
-    private int fValue;
-
-    /**
-     * Standard constructor
-     *
-     * @param entry
-     *            The entry that this event affects
-     * @param time
-     *            The start time of the event
-     * @param duration
-     *            The duration of the event
-     * @param value
-     *            The value type associated to this event
-     */
-    public ResourcesEvent(ResourcesEntry entry, long time, long duration,
-            int value) {
-        super(entry, time, duration);
-        fType = entry.getType();
-        fValue = value;
-    }
-
-    /**
-     * Base constructor, with no value assigned
-     *
-     * @param entry
-     *            The entry that this event affects
-     * @param time
-     *            The start time of the event
-     * @param duration
-     *            The duration of the event
-     */
-    public ResourcesEvent(ResourcesEntry entry, long time, long duration) {
-        super(entry, time, duration);
-        fType = Type.NULL;
-    }
-
-    /**
-     * Retrieve the value associated with this event
-     *
-     * @return The integer value
-     */
-    public int getValue() {
-        return fValue;
-    }
-
-    /**
-     * Retrieve the type of this entry. Uses the ResourcesEntry.Type interface.
-     *
-     * @return The entry type
-     */
-    public Type getType() {
-        return fType;
-    }
-
-    @Override
-    public String toString() {
-        return "ResourcesEvent start=" + fTime + " end=" + (fTime + fDuration) + " duration=" + fDuration + " type=" + fType + " value=" + fValue; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-    }
-}
index f604752bf70b91a8188e60822d0d73d2cf257542..52ad1a023f590af73ccb9d532fa6255be52d38dd 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012, 2013 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson, Ã‰cole Polytechnique de Montréal
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *   Patrick Tasse - Initial API and implementation
+ *   Geneviève Bastien - Move code to provide base classes for time graph view
  *******************************************************************************/
 
 package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources;
@@ -30,9 +31,10 @@ import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem;
 import org.eclipse.linuxtools.tmf.core.statevalue.ITmfStateValue;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.StateItem;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphViewer;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.ITmfTimeGraphDrawingHelper;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.Resolution;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.TimeFormat;
@@ -49,109 +51,102 @@ import org.eclipse.swt.graphics.Rectangle;
  */
 public class ResourcesPresentationProvider extends TimeGraphPresentationProvider {
 
-    private final TimeGraphViewer fTimeGraphViewer;
-    private long fLastThreadId = -1; // used to draw the process name label only once per thread id
+    private long fLastThreadId = -1;
 
     private enum State {
-        IDLE            (new RGB(200, 200, 200)),
-        USERMODE        (new RGB(0, 200, 0)),
-        SYSCALL         (new RGB(0, 0, 200)),
-        IRQ             (new RGB(200,   0, 100)),
-        SOFT_IRQ        (new RGB(200, 150, 100)),
-        IRQ_ACTIVE      (new RGB(200,   0, 100)),
-        SOFT_IRQ_RAISED (new RGB(200, 200, 0)),
-        SOFT_IRQ_ACTIVE (new RGB(200, 150, 100));
+        IDLE             (new RGB(200, 200, 200)),
+        USERMODE         (new RGB(0,   200, 0)),
+        SYSCALL          (new RGB(0,     0, 200)),
+        IRQ              (new RGB(200,   0, 100)),
+        SOFT_IRQ         (new RGB(200, 150, 100)),
+        IRQ_ACTIVE       (new RGB(200,   0, 100)),
+        SOFT_IRQ_RAISED  (new RGB(200, 200, 0)),
+        SOFT_IRQ_ACTIVE  (new RGB(200, 150, 100));
 
         public final RGB rgb;
 
-        private State (RGB rgb) {
+        private State(RGB rgb) {
             this.rgb = rgb;
         }
     }
 
     /**
      * Default constructor
-     *
-     * @param timeGraphViewer the time graph viewer
      */
-    public ResourcesPresentationProvider(TimeGraphViewer timeGraphViewer) {
+    public ResourcesPresentationProvider() {
         super();
-        this.fTimeGraphViewer = timeGraphViewer;
     }
 
-    @Override
-    public String getStateTypeName() {
-        return Messages.ResourcesView_stateTypeName;
+    private static State[] getStateValues() {
+        return State.values();
     }
 
-    @Override
-    public StateItem[] getStateTable() {
-        StateItem[] stateTable = new StateItem[State.values().length];
-        for (int i = 0; i < stateTable.length; i++) {
-            State state = State.values()[i];
-            stateTable[i] = new StateItem(state.rgb, state.toString());
+    private static State getEventState(ITimeEvent event) {
+        if (event instanceof TimeEvent && ((TimeEvent) event).hasValue()) {
+            TimeEvent tcEvent = (TimeEvent) event;
+
+            ResourcesEntry entry = (ResourcesEntry) event.getEntry();
+            int value = tcEvent.getValue();
+
+            if (entry.getType() == Type.CPU) {
+                if (value == StateValues.CPU_STATUS_IDLE) {
+                    return State.IDLE;
+                } else if (value == StateValues.CPU_STATUS_RUN_USERMODE) {
+                    return State.USERMODE;
+                } else if (value == StateValues.CPU_STATUS_RUN_SYSCALL) {
+                    return State.SYSCALL;
+                } else if (value == StateValues.CPU_STATUS_IRQ) {
+                    return State.IRQ;
+                } else if (value == StateValues.CPU_STATUS_SOFTIRQ) {
+                    return State.SOFT_IRQ;
+                }
+            } else if ((entry.getType() == Type.IRQ) && (tcEvent.hasValue()) && (value != ResourcesView.NO_VALUE_EVENT)) {
+                return State.IRQ_ACTIVE;
+            } else if ((entry.getType() == Type.SOFT_IRQ) && (tcEvent.hasValue()) && (value != ResourcesView.NO_VALUE_EVENT)) {
+                if (value == StateValues.SOFT_IRQ_RAISED) {
+                    return State.SOFT_IRQ_RAISED;
+                }
+                return State.SOFT_IRQ_ACTIVE;
+            }
         }
-        return stateTable;
+        return null;
     }
 
     @Override
     public int getStateTableIndex(ITimeEvent event) {
-        if (event instanceof ResourcesEvent) {
-            ResourcesEvent resourcesEvent = (ResourcesEvent) event;
-            if (resourcesEvent.getType() == Type.CPU) {
-                int status = resourcesEvent.getValue();
-                if (status == StateValues.CPU_STATUS_IDLE) {
-                    return State.IDLE.ordinal();
-                } else if (status == StateValues.CPU_STATUS_RUN_USERMODE) {
-                    return State.USERMODE.ordinal();
-                } else if (status == StateValues.CPU_STATUS_RUN_SYSCALL) {
-                    return State.SYSCALL.ordinal();
-                } else if (status == StateValues.CPU_STATUS_IRQ) {
-                    return State.IRQ.ordinal();
-                } else if (status == StateValues.CPU_STATUS_SOFTIRQ) {
-                    return State.SOFT_IRQ.ordinal();
-                }
-            } else if (resourcesEvent.getType() == Type.IRQ) {
-                return State.IRQ_ACTIVE.ordinal();
-            } else if (resourcesEvent.getType() == Type.SOFT_IRQ) {
-                int cpu = resourcesEvent.getValue();
-                if (cpu == StateValues.SOFT_IRQ_RAISED) {
-                    return State.SOFT_IRQ_RAISED.ordinal();
-                }
-                return State.SOFT_IRQ_ACTIVE.ordinal();
-            } else {
-                return INVISIBLE; // NULL
+        State state = getEventState(event);
+        if (state != null) {
+            return state.ordinal();
+        }
+        if (event instanceof TimeEvent) {
+            TimeEvent tcEvent = (TimeEvent) event;
+            if (tcEvent.hasValue()) {
+                return INVISIBLE;
             }
         }
         return TRANSPARENT;
     }
 
+    @Override
+    public StateItem[] getStateTable() {
+        State[] states = getStateValues();
+        StateItem[] stateTable = new StateItem[states.length];
+        for (int i = 0; i < stateTable.length; i++) {
+            State state = states[i];
+            stateTable[i] = new StateItem(state.rgb, state.toString());
+        }
+        return stateTable;
+    }
+
     @Override
     public String getEventName(ITimeEvent event) {
-        if (event instanceof ResourcesEvent) {
-            ResourcesEvent resourcesEvent = (ResourcesEvent) event;
-            if (resourcesEvent.getType() == Type.CPU) {
-                int status = resourcesEvent.getValue();
-                if (status == StateValues.CPU_STATUS_IDLE) {
-                    return State.IDLE.toString();
-                } else if (status == StateValues.CPU_STATUS_RUN_USERMODE) {
-                    return State.USERMODE.toString();
-                } else if (status == StateValues.CPU_STATUS_RUN_SYSCALL) {
-                    return State.SYSCALL.toString();
-                } else if (status == StateValues.CPU_STATUS_IRQ) {
-                    return State.IRQ.toString();
-                } else if (status == StateValues.CPU_STATUS_SOFTIRQ) {
-                    return State.SOFT_IRQ.toString();
-                }
-            } else if (resourcesEvent.getType() == Type.IRQ) {
-                return State.IRQ_ACTIVE.toString();
-            } else if (resourcesEvent.getType() == Type.SOFT_IRQ) {
-                int cpu = resourcesEvent.getValue();
-                if (cpu == StateValues.SOFT_IRQ_RAISED) {
-                    return State.SOFT_IRQ_RAISED.toString();
-                }
-                return State.SOFT_IRQ_ACTIVE.toString();
-            } else {
+        State state = getEventState(event);
+        if (state != null) {
+            return state.toString();
+        }
+        if (event instanceof TimeEvent) {
+            TimeEvent tcEvent = (TimeEvent) event;
+            if (tcEvent.hasValue()) {
                 return null;
             }
         }
@@ -162,119 +157,119 @@ public class ResourcesPresentationProvider extends TimeGraphPresentationProvider
     public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event, long hoverTime) {
 
         Map<String, String> retMap = new LinkedHashMap<String, String>();
-        if (event instanceof ResourcesEvent) {
+        if (event instanceof TimeEvent && ((TimeEvent) event).hasValue()) {
 
-            ResourcesEvent resourcesEvent = (ResourcesEvent) event;
+            TimeEvent tcEvent = (TimeEvent) event;
+            ResourcesEntry entry = (ResourcesEntry) event.getEntry();
 
-            // Check for IRQ or Soft_IRQ type
-            if (resourcesEvent.getType().equals(Type.IRQ) || resourcesEvent.getType().equals(Type.SOFT_IRQ)) {
+            if (tcEvent.hasValue()) {
+                // Check for IRQ or Soft_IRQ type
+                if (entry.getType().equals(Type.IRQ) || entry.getType().equals(Type.SOFT_IRQ)) {
 
-                // Get CPU of IRQ or SoftIRQ and provide it for the tooltip display
-                int cpu = resourcesEvent.getValue();
-                if (cpu >= 0) {
-                    retMap.put(Messages.ResourcesView_attributeCpuName, String.valueOf(cpu));
+                    // Get CPU of IRQ or SoftIRQ and provide it for the tooltip display
+                    int cpu = tcEvent.getValue();
+                    if (cpu >= 0) {
+                        retMap.put(Messages.ResourcesView_attributeCpuName, String.valueOf(cpu));
+                    }
                 }
-            }
 
-            // Check for type CPU
-            if (resourcesEvent.getType().equals(Type.CPU)) {
-                int status = resourcesEvent.getValue();
-
-                if (status == StateValues.CPU_STATUS_IRQ) {
-                    // In IRQ state get the IRQ that caused the interruption
-                    ResourcesEntry entry = (ResourcesEntry) event.getEntry();
-                    ITmfStateSystem ss = entry.getTrace().getStateSystems().get(LttngKernelTrace.STATE_ID);
-                    int cpu = entry.getId();
-
-                    try {
-                        List<ITmfStateInterval> fullState = ss.queryFullState(event.getTime());
-                        List<Integer> irqQuarks = ss.getQuarks(Attributes.RESOURCES, Attributes.IRQS, "*"); //$NON-NLS-1$
-
-                        for (int irqQuark : irqQuarks) {
-                            if (fullState.get(irqQuark).getStateValue().unboxInt() == cpu) {
-                                ITmfStateInterval value = ss.querySingleState(event.getTime(), irqQuark);
-                                if (!value.getStateValue().isNull()) {
-                                    int irq = Integer.parseInt(ss.getAttributeName(irqQuark));
-                                    retMap.put(Messages.ResourcesView_attributeIrqName, String.valueOf(irq));
+                // Check for type CPU
+                else if (entry.getType().equals(Type.CPU)) {
+                    int status = tcEvent.getValue();
+
+                    if (status == StateValues.CPU_STATUS_IRQ) {
+                        // In IRQ state get the IRQ that caused the interruption
+                        ITmfStateSystem ss = entry.getTrace().getStateSystems().get(LttngKernelTrace.STATE_ID);
+                        int cpu = entry.getId();
+
+                        try {
+                            List<ITmfStateInterval> fullState = ss.queryFullState(event.getTime());
+                            List<Integer> irqQuarks = ss.getQuarks(Attributes.RESOURCES, Attributes.IRQS, "*"); //$NON-NLS-1$
+
+                            for (int irqQuark : irqQuarks) {
+                                if (fullState.get(irqQuark).getStateValue().unboxInt() == cpu) {
+                                    ITmfStateInterval value = ss.querySingleState(event.getTime(), irqQuark);
+                                    if (!value.getStateValue().isNull()) {
+                                        int irq = Integer.parseInt(ss.getAttributeName(irqQuark));
+                                        retMap.put(Messages.ResourcesView_attributeIrqName, String.valueOf(irq));
+                                    }
+                                    break;
                                 }
-                                break;
                             }
+                        } catch (AttributeNotFoundException e) {
+                            e.printStackTrace();
+                        } catch (TimeRangeException e) {
+                            e.printStackTrace();
+                        } catch (StateValueTypeException e) {
+                            e.printStackTrace();
+                        } catch (StateSystemDisposedException e) {
+                            /* Ignored */
                         }
-                    } catch (AttributeNotFoundException e) {
-                        e.printStackTrace();
-                    } catch (TimeRangeException e) {
-                        e.printStackTrace();
-                    } catch (StateValueTypeException e) {
-                        e.printStackTrace();
-                    } catch (StateSystemDisposedException e) {
-                        /* Ignored */
-                    }
-                } else if (status == StateValues.CPU_STATUS_SOFTIRQ) {
-                    // In SOFT_IRQ state get the SOFT_IRQ that caused the interruption
-                    ResourcesEntry entry = (ResourcesEntry) event.getEntry();
-                    ITmfStateSystem ss = entry.getTrace().getStateSystems().get(LttngKernelTrace.STATE_ID);
-                    int cpu = entry.getId();
-
-                    try {
-                        List<ITmfStateInterval> fullState = ss.queryFullState(event.getTime());
-                        List<Integer> softIrqQuarks = ss.getQuarks(Attributes.RESOURCES, Attributes.SOFT_IRQS, "*"); //$NON-NLS-1$
-
-                        for (int softIrqQuark : softIrqQuarks) {
-                            if (fullState.get(softIrqQuark).getStateValue().unboxInt() == cpu) {
-                                ITmfStateInterval value = ss.querySingleState(event.getTime(), softIrqQuark);
-                                if (!value.getStateValue().isNull()) {
-                                    int softIrq = Integer.parseInt(ss.getAttributeName(softIrqQuark));
-                                    retMap.put(Messages.ResourcesView_attributeSoftIrqName, String.valueOf(softIrq));
+                    } else if (status == StateValues.CPU_STATUS_SOFTIRQ) {
+                        // In SOFT_IRQ state get the SOFT_IRQ that caused the interruption
+                        ITmfStateSystem ss = entry.getTrace().getStateSystems().get(LttngKernelTrace.STATE_ID);
+                        int cpu = entry.getId();
+
+                        try {
+                            List<ITmfStateInterval> fullState = ss.queryFullState(event.getTime());
+                            List<Integer> softIrqQuarks = ss.getQuarks(Attributes.RESOURCES, Attributes.SOFT_IRQS, "*"); //$NON-NLS-1$
+
+                            for (int softIrqQuark : softIrqQuarks) {
+                                if (fullState.get(softIrqQuark).getStateValue().unboxInt() == cpu) {
+                                    ITmfStateInterval value = ss.querySingleState(event.getTime(), softIrqQuark);
+                                    if (!value.getStateValue().isNull()) {
+                                        int softIrq = Integer.parseInt(ss.getAttributeName(softIrqQuark));
+                                        retMap.put(Messages.ResourcesView_attributeSoftIrqName, String.valueOf(softIrq));
+                                    }
+                                    break;
                                 }
-                                break;
                             }
+                        } catch (AttributeNotFoundException e) {
+                            e.printStackTrace();
+                        } catch (TimeRangeException e) {
+                            e.printStackTrace();
+                        } catch (StateValueTypeException e) {
+                            e.printStackTrace();
+                        } catch (StateSystemDisposedException e) {
+                            /* Ignored */
                         }
-                    } catch (AttributeNotFoundException e) {
-                        e.printStackTrace();
-                    } catch (TimeRangeException e) {
-                        e.printStackTrace();
-                    } catch (StateValueTypeException e) {
-                        e.printStackTrace();
-                    } catch (StateSystemDisposedException e) {
-                        /* Ignored */
-                    }
-                } else if (status == StateValues.CPU_STATUS_RUN_USERMODE || status == StateValues.CPU_STATUS_RUN_SYSCALL){
-                    // In running state get the current tid
-                    ResourcesEntry entry = (ResourcesEntry) event.getEntry();
-                    ITmfStateSystem ssq = entry.getTrace().getStateSystems().get(LttngKernelTrace.STATE_ID);
-
-                    try {
-                        retMap.put(Messages.ResourcesView_attributeHoverTime, Utils.formatTime(hoverTime, TimeFormat.CALENDAR, Resolution.NANOSEC));
-                        int cpuQuark = entry.getQuark();
-                        int currentThreadQuark = ssq.getQuarkRelative(cpuQuark, Attributes.CURRENT_THREAD);
-                        ITmfStateInterval interval = ssq.querySingleState(hoverTime, currentThreadQuark);
-                        if (!interval.getStateValue().isNull()) {
-                            ITmfStateValue value = interval.getStateValue();
-                            int currentThreadId = value.unboxInt();
-                            retMap.put(Messages.ResourcesView_attributeTidName, Integer.toString(currentThreadId));
-                            int execNameQuark = ssq.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThreadId), Attributes.EXEC_NAME);
-                            interval = ssq.querySingleState(hoverTime, execNameQuark);
+                    } else if (status == StateValues.CPU_STATUS_RUN_USERMODE || status == StateValues.CPU_STATUS_RUN_SYSCALL) {
+                        // In running state get the current tid
+                        ITmfStateSystem ssq = entry.getTrace().getStateSystems().get(LttngKernelTrace.STATE_ID);
+
+                        try {
+                            retMap.put(Messages.ResourcesView_attributeHoverTime, Utils.formatTime(hoverTime, TimeFormat.CALENDAR, Resolution.NANOSEC));
+                            int cpuQuark = entry.getQuark();
+                            int currentThreadQuark = ssq.getQuarkRelative(cpuQuark, Attributes.CURRENT_THREAD);
+                            ITmfStateInterval interval = ssq.querySingleState(hoverTime, currentThreadQuark);
                             if (!interval.getStateValue().isNull()) {
-                                value = interval.getStateValue();
-                                retMap.put(Messages.ResourcesView_attributeProcessName, value.unboxStr());
-                            }
-                            if (status == StateValues.CPU_STATUS_RUN_SYSCALL) {
-                                int syscallQuark = ssq.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThreadId), Attributes.SYSTEM_CALL);
-                                interval = ssq.querySingleState(hoverTime, syscallQuark);
+                                ITmfStateValue value = interval.getStateValue();
+                                int currentThreadId = value.unboxInt();
+                                retMap.put(Messages.ResourcesView_attributeTidName, Integer.toString(currentThreadId));
+                                int execNameQuark = ssq.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThreadId), Attributes.EXEC_NAME);
+                                interval = ssq.querySingleState(hoverTime, execNameQuark);
                                 if (!interval.getStateValue().isNull()) {
                                     value = interval.getStateValue();
-                                    retMap.put(Messages.ResourcesView_attributeSyscallName, value.unboxStr());
+                                    retMap.put(Messages.ResourcesView_attributeProcessName, value.unboxStr());
+                                }
+                                if (status == StateValues.CPU_STATUS_RUN_SYSCALL) {
+                                    int syscallQuark = ssq.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThreadId), Attributes.SYSTEM_CALL);
+                                    interval = ssq.querySingleState(hoverTime, syscallQuark);
+                                    if (!interval.getStateValue().isNull()) {
+                                        value = interval.getStateValue();
+                                        retMap.put(Messages.ResourcesView_attributeSyscallName, value.unboxStr());
+                                    }
                                 }
                             }
+                        } catch (AttributeNotFoundException e) {
+                            e.printStackTrace();
+                        } catch (TimeRangeException e) {
+                            e.printStackTrace();
+                        } catch (StateValueTypeException e) {
+                            e.printStackTrace();
+                        } catch (StateSystemDisposedException e) {
+                            /* Ignored */
                         }
-                    } catch (AttributeNotFoundException e) {
-                        e.printStackTrace();
-                    } catch (TimeRangeException e) {
-                        e.printStackTrace();
-                    } catch (StateValueTypeException e) {
-                        e.printStackTrace();
-                    } catch (StateSystemDisposedException e) {
-                        /* Ignored */
                     }
                 }
             }
@@ -285,21 +280,29 @@ public class ResourcesPresentationProvider extends TimeGraphPresentationProvider
 
     @Override
     public void postDrawEvent(ITimeEvent event, Rectangle bounds, GC gc) {
+        ITmfTimeGraphDrawingHelper drawingHelper = getDrawingHelper();
         if (bounds.width <= gc.getFontMetrics().getAverageCharWidth()) {
             return;
         }
-        if (!(event instanceof ResourcesEvent)) {
+
+        if (!(event instanceof TimeEvent)) {
             return;
         }
-        ResourcesEvent resourcesEvent = (ResourcesEvent) event;
-        if (!resourcesEvent.getType().equals(Type.CPU)) {
+        TimeEvent tcEvent = (TimeEvent) event;
+        if (!tcEvent.hasValue()) {
             return;
         }
-        int status = resourcesEvent.getValue();
+
+        ResourcesEntry entry = (ResourcesEntry) event.getEntry();
+        if (!entry.getType().equals(Type.CPU)) {
+            return;
+        }
+
+        int status = tcEvent.getValue();
         if (status != StateValues.CPU_STATUS_RUN_USERMODE && status != StateValues.CPU_STATUS_RUN_SYSCALL) {
             return;
         }
-        ResourcesEntry entry = (ResourcesEntry) event.getEntry();
+
         ITmfStateSystem ss = entry.getTrace().getStateSystems().get(LttngKernelTrace.STATE_ID);
         long time = event.getTime();
         try {
@@ -318,9 +321,9 @@ public class ResourcesPresentationProvider extends TimeGraphPresentationProvider
                             gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_WHITE));
                             long startTime = Math.max(tidInterval.getStartTime(), event.getTime());
                             long endTime = Math.min(tidInterval.getEndTime() + 1, event.getTime() + event.getDuration());
-                            if (fTimeGraphViewer.getXForTime(endTime) > bounds.x) {
-                                int x = Math.max(fTimeGraphViewer.getXForTime(startTime), bounds.x);
-                                int width = Math.min(fTimeGraphViewer.getXForTime(endTime), bounds.x + bounds.width) - x;
+                            if (drawingHelper.getXForTime(endTime) > bounds.x) {
+                                int x = Math.max(drawingHelper.getXForTime(startTime), bounds.x);
+                                int width = Math.min(drawingHelper.getXForTime(endTime), bounds.x + bounds.width) - x;
                                 int drawn = Utils.drawText(gc, value.unboxStr(), x + 1, bounds.y - 2, width - 1, true, true);
                                 if (drawn > 0) {
                                     fLastThreadId = currentThreadId;
@@ -335,9 +338,9 @@ public class ResourcesPresentationProvider extends TimeGraphPresentationProvider
                             gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_WHITE));
                             long startTime = Math.max(tidInterval.getStartTime(), event.getTime());
                             long endTime = Math.min(tidInterval.getEndTime() + 1, event.getTime() + event.getDuration());
-                            if (fTimeGraphViewer.getXForTime(endTime) > bounds.x) {
-                                int x = Math.max(fTimeGraphViewer.getXForTime(startTime), bounds.x);
-                                int width = Math.min(fTimeGraphViewer.getXForTime(endTime), bounds.x + bounds.width) - x;
+                            if (drawingHelper.getXForTime(endTime) > bounds.x) {
+                                int x = Math.max(drawingHelper.getXForTime(startTime), bounds.x);
+                                int width = Math.min(drawingHelper.getXForTime(endTime), bounds.x + bounds.width) - x;
                                 Utils.drawText(gc, value.unboxStr().substring(4), x + 1, bounds.y - 2, width - 1, true, true);
                             }
                         }
@@ -345,7 +348,7 @@ public class ResourcesPresentationProvider extends TimeGraphPresentationProvider
                 }
                 time = tidInterval.getEndTime() + 1;
                 if (time < event.getTime() + event.getDuration()) {
-                    int x = fTimeGraphViewer.getXForTime(time);
+                    int x = drawingHelper.getXForTime(time);
                     if (x >= bounds.x) {
                         gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_GRAY));
                         gc.drawLine(x, bounds.y + 1, x, bounds.y + bounds.height - 2);
index 52c225c9e3e061190f3ba9cb62e801551008d7d1..69fb7e653651fd647eab9a4a0820e2471edf01fa 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012, 2013 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson, Ã‰cole Polytechnique de Montréal
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  *
  * Contributors:
  *   Patrick Tasse - Initial API and implementation
+ *   Geneviève Bastien - Move code to provide base classes for time graph views
  *******************************************************************************/
 
 package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources;
 
 import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.Separator;
 import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
 import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesEntry.Type;
 import org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace;
-import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.AttributeNotFoundException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateSystemDisposedException;
 import org.eclipse.linuxtools.tmf.core.exceptions.StateValueTypeException;
 import org.eclipse.linuxtools.tmf.core.exceptions.TimeRangeException;
 import org.eclipse.linuxtools.tmf.core.interval.ITmfStateInterval;
-import org.eclipse.linuxtools.tmf.core.signal.TmfRangeSynchSignal;
-import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
-import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;
-import org.eclipse.linuxtools.tmf.core.signal.TmfTraceClosedSignal;
-import org.eclipse.linuxtools.tmf.core.signal.TmfTraceOpenedSignal;
-import org.eclipse.linuxtools.tmf.core.signal.TmfTraceSelectedSignal;
 import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem;
-import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
-import org.eclipse.linuxtools.tmf.ui.views.TmfView;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphRangeListener;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphTimeListener;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphRangeUpdateEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphTimeEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphViewer;
+import org.eclipse.linuxtools.tmf.ui.views.timegraph.AbstractTimeGraphView;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.TimeFormat;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IActionBars;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
 
 /**
  * Main implementation for the LTTng 2.0 kernel Resource view
  *
  * @author Patrick Tasse
  */
-public class ResourcesView extends TmfView {
-
-    // ------------------------------------------------------------------------
-    // Constants
-    // ------------------------------------------------------------------------
+public class ResourcesView extends AbstractTimeGraphView {
 
     /** View ID. */
     public static final String ID = "org.eclipse.linuxtools.lttng2.kernel.ui.views.resources"; //$NON-NLS-1$
 
     /**
-     * Redraw state enum
+     * Default value for events with no other value. Since value in this case is
+     * often a CPU number, this constant should be <0
      */
-    private enum State { IDLE, BUSY, PENDING }
-
-    // ------------------------------------------------------------------------
-    // Fields
-    // ------------------------------------------------------------------------
-
-    // The time graph viewer
-    TimeGraphViewer fTimeGraphViewer;
-
-    // The selected trace
-    private ITmfTrace fTrace;
-
-    // The time graph entry list
-    private ArrayList<TraceEntry> fEntryList;
-
-    // The trace to entry list hash map
-    final private HashMap<ITmfTrace, ArrayList<TraceEntry>> fEntryListMap = new HashMap<ITmfTrace, ArrayList<TraceEntry>>();
-
-    // The trace to build thread hash map
-    final private HashMap<ITmfTrace, BuildThread> fBuildThreadMap = new HashMap<ITmfTrace, BuildThread>();
+    public static final int NO_VALUE_EVENT = -999;
 
-    // The start time
-    private long fStartTime;
+    private static final String PROCESS_COLUMN = Messages.ControlFlowView_processColumn;
 
-    // The end time
-    private long fEndTime;
+    private static final String[] COLUMN_NAMES = new String[] {
+            PROCESS_COLUMN
+    };
 
-    // The display width
-    private final int fDisplayWidth;
+    private static final String[] FILTER_COLUMN_NAMES = new String[] {
+            PROCESS_COLUMN
+    };
 
-    // The next resource action
-    private Action fNextResourceAction;
-
-    // The previous resource action
-    private Action fPreviousResourceAction;
-
-    // The zoom thread
-    private ZoomThread fZoomThread;
-
-    // The redraw state used to prevent unnecessary queuing of display runnables
-    private State fRedrawState = State.IDLE;
-
-    // The redraw synchronization object
-    final private Object fSyncObj = new Object();
-
-    // ------------------------------------------------------------------------
-    // Classes
-    // ------------------------------------------------------------------------
-
-    private class TraceEntry implements ITimeGraphEntry {
-        // The Trace
-        private final LttngKernelTrace fKernelTrace;
-        // The start time
-        private final long fTraceStartTime;
-        // The end time
-        private final long fTraceEndTime;
-        // The children of the entry
-        private final ArrayList<ResourcesEntry> fChildren;
-        // The name of entry
-        private final String fName;
-
-        public TraceEntry(LttngKernelTrace trace, String name, long startTime, long endTime) {
-            fKernelTrace = trace;
-            fChildren = new ArrayList<ResourcesEntry>();
-            fName = name;
-            fTraceStartTime = startTime;
-            fTraceEndTime = endTime;
-        }
-
-        @Override
-        public ITimeGraphEntry getParent() {
-            return null;
-        }
-
-        @Override
-        public boolean hasChildren() {
-            return fChildren != null && fChildren.size() > 0;
-        }
-
-        @Override
-        public List<ResourcesEntry> getChildren() {
-            return fChildren;
-        }
-
-        @Override
-        public String getName() {
-            return fName;
-        }
-
-        @Override
-        public long getStartTime() {
-            return fTraceStartTime;
-        }
-
-        @Override
-        public long getEndTime() {
-            return fTraceEndTime;
-        }
-
-        @Override
-        public boolean hasTimeEvents() {
-            return false;
-        }
-
-        @Override
-        public Iterator<ITimeEvent> getTimeEventsIterator() {
-            return null;
-        }
-
-        @Override
-        public <T extends ITimeEvent> Iterator<T> getTimeEventsIterator(long startTime, long stopTime, long visibleDuration) {
-            return null;
-        }
-
-        public LttngKernelTrace getTrace() {
-            return fKernelTrace;
-        }
-
-        public void addChild(ResourcesEntry entry) {
-            int index;
-            for (index = 0; index < fChildren.size(); index++) {
-                ResourcesEntry other = fChildren.get(index);
-                if (entry.getType().compareTo(other.getType()) < 0) {
-                    break;
-                } else if (entry.getType().equals(other.getType())) {
-                    if (entry.getId() < other.getId()) {
-                        break;
-                    }
-                }
-            }
-            entry.setParent(this);
-            fChildren.add(index, entry);
-        }
-    }
-
-    private static class TraceEntryComparator implements Comparator<ITimeGraphEntry> {
-        @Override
-        public int compare(ITimeGraphEntry o1, ITimeGraphEntry o2) {
-            int result = o1.getStartTime() < o2.getStartTime() ? -1 : o1.getStartTime() > o2.getStartTime() ? 1 : 0;
-            if (result == 0) {
-                result = o1.getName().compareTo(o2.getName());
-            }
-            return result;
-        }
-    }
-
-    private class BuildThread extends Thread {
-        private final ITmfTrace fBuildTrace;
-        private final IProgressMonitor fMonitor;
-
-        public BuildThread(ITmfTrace trace) {
-            super("ResourcesView build"); //$NON-NLS-1$
-            fBuildTrace = trace;
-            fMonitor = new NullProgressMonitor();
-        }
-
-        @Override
-        public void run() {
-            buildEventList(fBuildTrace, fMonitor);
-            synchronized (fBuildThreadMap) {
-                fBuildThreadMap.remove(this);
-            }
-        }
-
-        public void cancel() {
-            fMonitor.setCanceled(true);
-        }
-    }
-
-    private class ZoomThread extends Thread {
-        private final ArrayList<TraceEntry> fZoomEntryList;
-        private final long fZoomStartTime;
-        private final long fZoomEndTime;
-        private final IProgressMonitor fMonitor;
-
-        public ZoomThread(ArrayList<TraceEntry> entryList, long startTime, long endTime) {
-            super("ResourcesView zoom"); //$NON-NLS-1$
-            fZoomEntryList = entryList;
-            fZoomStartTime = startTime;
-            fZoomEndTime = endTime;
-            fMonitor = new NullProgressMonitor();
-        }
-
-        @Override
-        public void run() {
-            if (fZoomEntryList == null) {
-                return;
-            }
-            long resolution = Math.max(1, (fZoomEndTime - fZoomStartTime) / fDisplayWidth);
-            for (TraceEntry traceEntry : fZoomEntryList) {
-                if (!traceEntry.fKernelTrace.getStateSystems().get(LttngKernelTrace.STATE_ID).waitUntilBuilt()) {
-                    return;
-                }
-                for (ITimeGraphEntry child : traceEntry.getChildren()) {
-                    if (fMonitor.isCanceled()) {
-                        break;
-                    }
-                    ResourcesEntry entry = (ResourcesEntry) child;
-                    if (fZoomStartTime <= fStartTime && fZoomEndTime >= fEndTime) {
-                        entry.setZoomedEventList(null);
-                    } else {
-                        List<ITimeEvent> zoomedEventList = getEventList(entry, fZoomStartTime, fZoomEndTime, resolution, true, fMonitor);
-                        if (zoomedEventList != null) {
-                            entry.setZoomedEventList(zoomedEventList);
-                        }
-                    }
-                    redraw();
-                }
-            }
-        }
-
-        public void cancel() {
-            fMonitor.setCanceled(true);
-        }
-    }
+    private static final int[] WEIGHTS = { 15, 85 };
 
     // ------------------------------------------------------------------------
     // Constructors
@@ -302,215 +69,62 @@ public class ResourcesView extends TmfView {
      * Default constructor
      */
     public ResourcesView() {
-        super(ID);
-        fDisplayWidth = Display.getDefault().getBounds().width;
+        super(ID, COLUMN_NAMES, FILTER_COLUMN_NAMES, new ResourcesPresentationProvider());
+        setWeight(WEIGHTS);
     }
 
-    // ------------------------------------------------------------------------
-    // ViewPart
-    // ------------------------------------------------------------------------
-
     @Override
-    public void createPartControl(Composite parent) {
-        fTimeGraphViewer = new TimeGraphViewer(parent, SWT.NONE);
-
-        fTimeGraphViewer.setTimeGraphProvider(new ResourcesPresentationProvider(fTimeGraphViewer));
-
-        fTimeGraphViewer.setTimeFormat(TimeFormat.CALENDAR);
-
-        fTimeGraphViewer.addRangeListener(new ITimeGraphRangeListener() {
-            @Override
-            public void timeRangeUpdated(TimeGraphRangeUpdateEvent event) {
-                long startTime = event.getStartTime();
-                long endTime = event.getEndTime();
-                TmfTimeRange range = new TmfTimeRange(new CtfTmfTimestamp(startTime), new CtfTmfTimestamp(endTime));
-                TmfTimestamp time = new CtfTmfTimestamp(fTimeGraphViewer.getSelectedTime());
-                broadcast(new TmfRangeSynchSignal(ResourcesView.this, range, time));
-                startZoomThread(startTime, endTime);
-            }
-        });
-
-        fTimeGraphViewer.addTimeListener(new ITimeGraphTimeListener() {
-            @Override
-            public void timeSelected(TimeGraphTimeEvent event) {
-                long time = event.getTime();
-                broadcast(new TmfTimeSynchSignal(ResourcesView.this, new CtfTmfTimestamp(time)));
-            }
-        });
-
-        // View Action Handling
-        makeActions();
-        contributeToActionBars();
-
-        ITmfTrace trace = getActiveTrace();
-        if (trace != null) {
-            traceSelected(new TmfTraceSelectedSignal(this, trace));
-        }
+    protected String getNextText() {
+        return Messages.ResourcesView_nextResourceActionNameText;
     }
 
     @Override
-    public void setFocus() {
-        fTimeGraphViewer.setFocus();
-    }
-
-    // ------------------------------------------------------------------------
-    // Signal handlers
-    // ------------------------------------------------------------------------
-
-    /**
-     * Handler for the trace opened signal.
-     * @param signal the trace selected signal
-     * @since 2.0
-     */
-    @TmfSignalHandler
-    public void traceOpened(TmfTraceOpenedSignal signal) {
-        fTrace = signal.getTrace();
-        loadTrace();
+    protected String getNextTooltip() {
+        return Messages.ResourcesView_nextResourceActionToolTipText;
     }
 
-    /**
-     * Handler for the trace selected signal
-     *
-     * @param signal
-     *            The incoming signal
-     */
-    @TmfSignalHandler
-    public void traceSelected(final TmfTraceSelectedSignal signal) {
-        if (signal.getTrace() == fTrace) {
-            return;
-        }
-        fTrace = signal.getTrace();
-        loadTrace();
-    }
-
-    /**
-     * Trace is disposed: clear the data structures and the view
-     *
-     * @param signal the signal received
-     */
-    @TmfSignalHandler
-    public void traceClosed(final TmfTraceClosedSignal signal) {
-        synchronized (fBuildThreadMap) {
-            BuildThread buildThread = fBuildThreadMap.remove(signal.getTrace());
-            if (buildThread != null) {
-                buildThread.cancel();
-            }
-        }
-        synchronized (fEntryListMap) {
-            fEntryListMap.remove(signal.getTrace());
-        }
-        if (signal.getTrace() == fTrace) {
-            fTrace = null;
-            fStartTime = 0;
-            fEndTime = 0;
-            if (fZoomThread != null) {
-                fZoomThread.cancel();
-            }
-            refresh();
-        }
-    }
-
-    /**
-     * Handler for the TimeSynch signal
-     *
-     * @param signal
-     *            The incoming signal
-     */
-    @TmfSignalHandler
-    public void synchToTime(final TmfTimeSynchSignal signal) {
-        if (signal.getSource() == this || fTrace == null) {
-            return;
-        }
-        final long time = signal.getCurrentTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-        Display.getDefault().asyncExec(new Runnable() {
-            @Override
-            public void run() {
-                if (fTimeGraphViewer.getControl().isDisposed()) {
-                    return;
-                }
-                fTimeGraphViewer.setSelectedTime(time, true);
-                startZoomThread(fTimeGraphViewer.getTime0(), fTimeGraphViewer.getTime1());
-            }
-        });
+    @Override
+    protected String getPrevText() {
+        return Messages.ResourcesView_previousResourceActionNameText;
     }
 
-    /**
-     * Handler for the RangeSynch signal
-     *
-     * @param signal
-     *            The incoming signal
-     */
-    @TmfSignalHandler
-    public void synchToRange(final TmfRangeSynchSignal signal) {
-        if (signal.getSource() == this || fTrace == null) {
-            return;
-        }
-        if (signal.getCurrentRange().getIntersection(fTrace.getTimeRange()) == null) {
-            return;
-        }
-        final long startTime = signal.getCurrentRange().getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-        final long endTime = signal.getCurrentRange().getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-        final long time = signal.getCurrentTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-        Display.getDefault().asyncExec(new Runnable() {
-            @Override
-            public void run() {
-                if (fTimeGraphViewer.getControl().isDisposed()) {
-                    return;
-                }
-                fTimeGraphViewer.setStartFinishTime(startTime, endTime);
-                fTimeGraphViewer.setSelectedTime(time, false);
-                startZoomThread(startTime, endTime);
-            }
-        });
+    @Override
+    protected String getPrevTooltip() {
+        return Messages.ResourcesView_previousResourceActionToolTipText;
     }
 
     // ------------------------------------------------------------------------
     // Internal
     // ------------------------------------------------------------------------
 
-    private void loadTrace() {
-        synchronized (fEntryListMap) {
-            fEntryList = fEntryListMap.get(fTrace);
-            if (fEntryList == null) {
-                synchronized (fBuildThreadMap) {
-                    BuildThread buildThread = new BuildThread(fTrace);
-                    fBuildThreadMap.put(fTrace, buildThread);
-                    buildThread.start();
-                }
-            } else {
-                fStartTime = fTrace.getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-                fEndTime = fTrace.getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-                refresh();
-            }
-        }
-    }
+    @Override
+    protected void buildEventList(ITmfTrace trace, IProgressMonitor monitor) {
+        setStartTime(Long.MAX_VALUE);
+        setEndTime(Long.MIN_VALUE);
 
-    private void buildEventList(final ITmfTrace trace, IProgressMonitor monitor) {
-        fStartTime = Long.MAX_VALUE;
-        fEndTime = Long.MIN_VALUE;
-        ArrayList<TraceEntry> entryList = new ArrayList<TraceEntry>();
-        for (ITmfTrace aTrace : TmfTraceManager.getTraceSet(trace)) {
+        ArrayList<ResourcesEntry> entryList = new ArrayList<ResourcesEntry>();
+        for (ITmfTrace aTrace : fTraceManager.getActiveTraceSet()) {
             if (monitor.isCanceled()) {
                 return;
             }
             if (aTrace instanceof LttngKernelTrace) {
-                LttngKernelTrace ctfKernelTrace = (LttngKernelTrace) aTrace;
-                ITmfStateSystem ssq = ctfKernelTrace.getStateSystems().get(LttngKernelTrace.STATE_ID);
+                LttngKernelTrace lttngKernelTrace = (LttngKernelTrace) aTrace;
+                ITmfStateSystem ssq = lttngKernelTrace.getStateSystems().get(LttngKernelTrace.STATE_ID);
                 if (!ssq.waitUntilBuilt()) {
                     return;
                 }
                 long startTime = ssq.getStartTime();
                 long endTime = ssq.getCurrentEndTime() + 1;
-                TraceEntry groupEntry = new TraceEntry(ctfKernelTrace, aTrace.getName(), startTime, endTime);
+                ResourcesEntry groupEntry = new ResourcesEntry(lttngKernelTrace, aTrace.getName(), startTime, endTime, 0);
                 entryList.add(groupEntry);
-                fStartTime = Math.min(fStartTime, startTime);
-                fEndTime = Math.max(fEndTime, endTime);
+                setStartTime(Math.min(getStartTime(), startTime));
+                setEndTime(Math.max(getEndTime(), endTime));
                 List<Integer> cpuQuarks = ssq.getQuarks(Attributes.CPUS, "*"); //$NON-NLS-1$
                 ResourcesEntry[] cpuEntries = new ResourcesEntry[cpuQuarks.size()];
                 for (int i = 0; i < cpuQuarks.size(); i++) {
                     int cpuQuark = cpuQuarks.get(i);
                     int cpu = Integer.parseInt(ssq.getAttributeName(cpuQuark));
-                    ResourcesEntry entry = new ResourcesEntry(cpuQuark, ctfKernelTrace, Type.CPU, cpu);
+                    ResourcesEntry entry = new ResourcesEntry(cpuQuark, lttngKernelTrace, getStartTime(), getEndTime(), Type.CPU, cpu);
                     groupEntry.addChild(entry);
                     cpuEntries[i] = entry;
                 }
@@ -519,7 +133,7 @@ public class ResourcesView extends TmfView {
                 for (int i = 0; i < irqQuarks.size(); i++) {
                     int irqQuark = irqQuarks.get(i);
                     int irq = Integer.parseInt(ssq.getAttributeName(irqQuark));
-                    ResourcesEntry entry = new ResourcesEntry(irqQuark, ctfKernelTrace, Type.IRQ, irq);
+                    ResourcesEntry entry = new ResourcesEntry(irqQuark, lttngKernelTrace, getStartTime(), getEndTime(), Type.IRQ, irq);
                     groupEntry.addChild(entry);
                     irqEntries[i] = entry;
                 }
@@ -528,37 +142,37 @@ public class ResourcesView extends TmfView {
                 for (int i = 0; i < softIrqQuarks.size(); i++) {
                     int softIrqQuark = softIrqQuarks.get(i);
                     int softIrq = Integer.parseInt(ssq.getAttributeName(softIrqQuark));
-                    ResourcesEntry entry = new ResourcesEntry(softIrqQuark, ctfKernelTrace, Type.SOFT_IRQ, softIrq);
+                    ResourcesEntry entry = new ResourcesEntry(softIrqQuark, lttngKernelTrace, getStartTime(), getEndTime(), Type.SOFT_IRQ, softIrq);
                     groupEntry.addChild(entry);
                     softIrqEntries[i] = entry;
                 }
             }
         }
-        synchronized (fEntryListMap) {
-            fEntryListMap.put(trace, (ArrayList<TraceEntry>) entryList.clone());
-        }
-        if (trace == fTrace) {
+        putEntryList(trace, (ArrayList<TimeGraphEntry>) entryList.clone());
+
+        if (trace.equals(getTrace())) {
             refresh();
         }
-        for (TraceEntry traceEntry : entryList) {
+        for (ResourcesEntry traceEntry : entryList) {
             if (monitor.isCanceled()) {
                 return;
             }
-            LttngKernelTrace ctfKernelTrace = traceEntry.getTrace();
-            ITmfStateSystem ssq = ctfKernelTrace.getStateSystems().get(LttngKernelTrace.STATE_ID);
+            LttngKernelTrace lttngKernelTrace = traceEntry.getTrace();
+            ITmfStateSystem ssq = lttngKernelTrace.getStateSystems().get(LttngKernelTrace.STATE_ID);
             long startTime = ssq.getStartTime();
             long endTime = ssq.getCurrentEndTime() + 1;
-            long resolution = (endTime - startTime) / fDisplayWidth;
-            for (ResourcesEntry entry : traceEntry.getChildren()) {
-                List<ITimeEvent> eventList = getEventList(entry, startTime, endTime, resolution, false, monitor);
+            long resolution = (endTime - startTime) / getDisplayWidth();
+            for (TimeGraphEntry entry : traceEntry.getChildren()) {
+                List<ITimeEvent> eventList = getEventList(entry, startTime, endTime, resolution, monitor);
                 entry.setEventList(eventList);
                 redraw();
             }
         }
     }
 
-    private static List<ITimeEvent> getEventList(ResourcesEntry entry,
-            long startTime, long endTime, long resolution, boolean includeNull,
+    @Override
+    protected List<ITimeEvent> getEventList(TimeGraphEntry entry,
+            long startTime, long endTime, long resolution,
             IProgressMonitor monitor) {
         ITmfStateSystem ssq = entry.getTrace().getStateSystems().get(LttngKernelTrace.STATE_ID);
         final long realStart = Math.max(startTime, ssq.getStartTime());
@@ -567,9 +181,15 @@ public class ResourcesView extends TmfView {
             return null;
         }
         List<ITimeEvent> eventList = null;
-        int quark = entry.getQuark();
+
+        if (!(entry instanceof ResourcesEntry)) {
+            return eventList;
+        }
+        ResourcesEntry resourcesEntry = (ResourcesEntry) entry;
+        int quark = resourcesEntry.getQuark();
+
         try {
-            if (entry.getType().equals(Type.CPU)) {
+            if (resourcesEntry.getType().equals(Type.CPU)) {
                 int statusQuark = ssq.getQuarkRelative(quark, Attributes.STATUS);
                 List<ITmfStateInterval> statusIntervals = ssq.queryHistoryRange(statusQuark, realStart, realEnd - 1, resolution, monitor);
                 eventList = new ArrayList<ITimeEvent>(statusIntervals.size());
@@ -585,15 +205,15 @@ public class ResourcesView extends TmfView {
                         if (lastEndTime != time && lastEndTime != -1) {
                             eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime));
                         }
-                        eventList.add(new ResourcesEvent(entry, time, duration, status));
+                        eventList.add(new TimeEvent(entry, time, duration, status));
                         lastEndTime = time + duration;
                     } else {
-                        if (includeNull) {
-                            eventList.add(new ResourcesEvent(entry, time, duration));
+                        if (true) {// includeNull) {
+                            eventList.add(new TimeEvent(entry, time, duration, NO_VALUE_EVENT));
                         }
                     }
                 }
-            } else if (entry.getType().equals(Type.IRQ)) {
+            } else if (resourcesEntry.getType().equals(Type.IRQ)) {
                 List<ITmfStateInterval> irqIntervals = ssq.queryHistoryRange(quark, realStart, realEnd - 1, resolution, monitor);
                 eventList = new ArrayList<ITimeEvent>(irqIntervals.size());
                 long lastEndTime = -1;
@@ -606,20 +226,20 @@ public class ResourcesView extends TmfView {
                     long duration = irqInterval.getEndTime() - time + 1;
                     if (!irqInterval.getStateValue().isNull()) {
                         int cpu = irqInterval.getStateValue().unboxInt();
-                        eventList.add(new ResourcesEvent(entry, time, duration, cpu));
+                        eventList.add(new TimeEvent(entry, time, duration, cpu));
                         lastIsNull = false;
                     } else {
                         if (lastEndTime != time && lastEndTime != -1 && lastIsNull) {
-                            eventList.add(new ResourcesEvent(entry, lastEndTime, time - lastEndTime, -1));
-                        }
-                        if (includeNull) {
-                            eventList.add(new ResourcesEvent(entry, time, duration));
+                            /* This is a special case where we want to show IRQ_ACTIVE state but we don't know the CPU (it is between two null samples) */
+                            eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime, -1));
+                        } else {
+                            eventList.add(new TimeEvent(entry, time, duration, NO_VALUE_EVENT));
                         }
                         lastIsNull = true;
                     }
                     lastEndTime = time + duration;
                 }
-            } else if (entry.getType().equals(Type.SOFT_IRQ)) {
+            } else if (resourcesEntry.getType().equals(Type.SOFT_IRQ)) {
                 List<ITmfStateInterval> softIrqIntervals = ssq.queryHistoryRange(quark, realStart, realEnd - 1, resolution, monitor);
                 eventList = new ArrayList<ITimeEvent>(softIrqIntervals.size());
                 long lastEndTime = -1;
@@ -632,19 +252,20 @@ public class ResourcesView extends TmfView {
                     long duration = softIrqInterval.getEndTime() - time + 1;
                     if (!softIrqInterval.getStateValue().isNull()) {
                         int cpu = softIrqInterval.getStateValue().unboxInt();
-                        eventList.add(new ResourcesEvent(entry, time, duration, cpu));
+                        eventList.add(new TimeEvent(entry, time, duration, cpu));
                     } else {
                         if (lastEndTime != time && lastEndTime != -1 && lastIsNull) {
-                            eventList.add(new ResourcesEvent(entry, lastEndTime, time - lastEndTime, -1));
-                        }
-                        if (includeNull) {
-                            eventList.add(new ResourcesEvent(entry, time, duration));
+                            /* This is a special case where we want to show IRQ_ACTIVE state but we don't know the CPU (it is between two null samples) */
+                            eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime, -1));
+                        } else {
+                            eventList.add(new TimeEvent(entry, time, duration, NO_VALUE_EVENT));
                         }
                         lastIsNull = true;
                     }
                     lastEndTime = time + duration;
                 }
             }
+
         } catch (AttributeNotFoundException e) {
             e.printStackTrace();
         } catch (TimeRangeException e) {
@@ -657,101 +278,4 @@ public class ResourcesView extends TmfView {
         return eventList;
     }
 
-    private void refresh() {
-        Display.getDefault().asyncExec(new Runnable() {
-            @Override
-            public void run() {
-                if (fTimeGraphViewer.getControl().isDisposed()) {
-                    return;
-                }
-                ITimeGraphEntry[] entries = null;
-                synchronized (fEntryListMap) {
-                    fEntryList = fEntryListMap.get(fTrace);
-                    if (fEntryList == null) {
-                        fEntryList = new ArrayList<TraceEntry>();
-                    }
-                    entries = fEntryList.toArray(new ITimeGraphEntry[0]);
-                }
-                if (entries != null) {
-                    Arrays.sort(entries, new TraceEntryComparator());
-                    fTimeGraphViewer.setInput(entries);
-                    fTimeGraphViewer.setTimeBounds(fStartTime, fEndTime);
-
-                    long timestamp = fTrace == null ? 0 : fTraceManager.getCurrentTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-                    long startTime = fTrace == null ? 0 : fTraceManager.getCurrentRange().getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-                    long endTime = fTrace == null ? 0 : fTraceManager.getCurrentRange().getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
-                    startTime = Math.max(startTime, fStartTime);
-                    endTime = Math.min(endTime, fEndTime);
-                    fTimeGraphViewer.setSelectedTime(timestamp, false);
-                    fTimeGraphViewer.setStartFinishTime(startTime, endTime);
-
-                    startZoomThread(startTime, endTime);
-                }
-            }
-        });
-    }
-
-    private void redraw() {
-        synchronized (fSyncObj) {
-            if (fRedrawState == State.IDLE) {
-                fRedrawState = State.BUSY;
-            } else {
-                fRedrawState = State.PENDING;
-                return;
-            }
-        }
-        Display.getDefault().asyncExec(new Runnable() {
-            @Override
-            public void run() {
-                if (fTimeGraphViewer.getControl().isDisposed()) {
-                    return;
-                }
-                fTimeGraphViewer.getControl().redraw();
-                fTimeGraphViewer.getControl().update();
-                synchronized (fSyncObj) {
-                    if (fRedrawState == State.PENDING) {
-                        fRedrawState = State.IDLE;
-                        redraw();
-                    } else {
-                        fRedrawState = State.IDLE;
-                    }
-                }
-            }
-        });
-    }
-
-    private void startZoomThread(long startTime, long endTime) {
-        if (fZoomThread != null) {
-            fZoomThread.cancel();
-        }
-        fZoomThread = new ZoomThread(fEntryList, startTime, endTime);
-        fZoomThread.start();
-    }
-
-    private void makeActions() {
-        fPreviousResourceAction = fTimeGraphViewer.getPreviousItemAction();
-        fPreviousResourceAction.setText(Messages.ResourcesView_previousResourceActionNameText);
-        fPreviousResourceAction.setToolTipText(Messages.ResourcesView_previousResourceActionToolTipText);
-        fNextResourceAction = fTimeGraphViewer.getNextItemAction();
-        fNextResourceAction.setText(Messages.ResourcesView_nextResourceActionNameText);
-        fNextResourceAction.setToolTipText(Messages.ResourcesView_previousResourceActionToolTipText);
-    }
-
-    private void contributeToActionBars() {
-        IActionBars bars = getViewSite().getActionBars();
-        fillLocalToolBar(bars.getToolBarManager());
-    }
-
-    private void fillLocalToolBar(IToolBarManager manager) {
-        manager.add(fTimeGraphViewer.getShowLegendAction());
-        manager.add(new Separator());
-        manager.add(fTimeGraphViewer.getResetScaleAction());
-        manager.add(fTimeGraphViewer.getPreviousEventAction());
-        manager.add(fTimeGraphViewer.getNextEventAction());
-        manager.add(fPreviousResourceAction);
-        manager.add(fNextResourceAction);
-        manager.add(fTimeGraphViewer.getZoomInAction());
-        manager.add(fTimeGraphViewer.getZoomOutAction());
-        manager.add(new Separator());
-    }
 }
index a7f7a886c50faf4042fca974e881e446dcaafa2e..eaeedba471822d11d4188620b49c724a4acd3f7f 100644 (file)
@@ -4,7 +4,9 @@
       id="org.eclipse.linuxtools.lttng2.kernel"
       label="%featureName"
       version="3.0.0.qualifier"
-      provider-name="%featureProvider">
+      provider-name="%featureProvider"
+      license-feature="org.eclipse.linuxtools.license.feature"
+      license-feature-version="1.0.0.qualifier">
 
    <description>
       %description
diff --git a/org.eclipse.linuxtools.lttng2.kernel/sourceTemplateFeature/feature.properties b/org.eclipse.linuxtools.lttng2.kernel/sourceTemplateFeature/feature.properties
deleted file mode 100644 (file)
index d2bf491..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2013 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
index d3af4c87d864f91ec7e546efa7cb112779d2e6c7..3a486057b2c128cde5ea2d06eef5dde659201e6d 100644 (file)
@@ -4,8 +4,21 @@ Bundle-Name: %Bundle-Name
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Version: 3.0.0.qualifier
 Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.ui.tests
+Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.ui.tests;singleton:=true
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Fragment-Host: org.eclipse.linuxtools.lttng2.ui
-Require-Bundle: org.junit;bundle-version="4.0.0"
+Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.core.commands,
+ org.eclipse.core.runtime,
+ org.eclipse.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.linuxtools.lttng2.core;bundle-version="3.0.0",
+ org.eclipse.linuxtools.lttng2.ui;bundle-version="3.0.0"
+Import-Package: org.eclipse.rse.core,
+ org.eclipse.rse.core.model,
+ org.eclipse.rse.core.subsystems,
+ org.eclipse.rse.services.shells,
+ org.eclipse.rse.services.terminals,
+ org.eclipse.rse.subsystems.files.core,
+ org.eclipse.rse.subsystems.files.core.servicesubsystem
+Export-Package: org.eclipse.linuxtools.lttng2.ui.tests
index e1416c81edcf6fd2429e069a5a349bd861f83de4..2bba394069ae4552bd15e6cbdef2de1396d8c988 100644 (file)
@@ -15,18 +15,18 @@ Require-Bundle: org.eclipse.ui,
  org.eclipse.linuxtools.lttng2.core;bundle-version="3.0.0",
  org.eclipse.linuxtools.tmf.core;bundle-version="3.0.0",
  org.eclipse.linuxtools.tmf.ui;bundle-version="3.0.0"
-Export-Package: org.eclipse.linuxtools.internal.lttng2.ui;x-internal:=true,
- org.eclipse.linuxtools.internal.lttng2.ui.views.control;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui",
- org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs;x-internal:=true,
+Export-Package: org.eclipse.linuxtools.internal.lttng2.ui;x-friends:="org.eclipse.linuxtools.lttng2.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.ui.views.control;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui,org.eclipse.linuxtools.lttng2.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs;x-friends:="org.eclipse.linuxtools.lttng2.ui.tests",
  org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers;x-internal:=true,
- org.eclipse.linuxtools.internal.lttng2.ui.views.control.logging;x-internal:=true,
+ org.eclipse.linuxtools.internal.lttng2.ui.views.control.logging;x-friends:="org.eclipse.linuxtools.lttng2.ui.tests",
  org.eclipse.linuxtools.internal.lttng2.ui.views.control.messages;x-internal:=true,
- org.eclipse.linuxtools.internal.lttng2.ui.views.control.model;x-internal:=true,
- org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl;x-internal:=true,
- org.eclipse.linuxtools.internal.lttng2.ui.views.control.preferences;x-internal:=true,
- org.eclipse.linuxtools.internal.lttng2.ui.views.control.property;x-internal:=true,
- org.eclipse.linuxtools.internal.lttng2.ui.views.control.remote;x-internal:=true,
- org.eclipse.linuxtools.internal.lttng2.ui.views.control.service;x-internal:=true
+ org.eclipse.linuxtools.internal.lttng2.ui.views.control.model;x-friends:="org.eclipse.linuxtools.lttng2.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl;x-friends:="org.eclipse.linuxtools.lttng2.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.ui.views.control.preferences;x-friends:="org.eclipse.linuxtools.lttng2.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.ui.views.control.property;x-friends:="org.eclipse.linuxtools.lttng2.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.ui.views.control.remote;x-friends:="org.eclipse.linuxtools.lttng2.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.ui.views.control.service;x-friends:="org.eclipse.linuxtools.lttng2.ui.tests"
 Import-Package: org.eclipse.rse.core,
  org.eclipse.rse.core.model,
  org.eclipse.rse.core.subsystems,
index bb031a22dd84ff3d647b8e68fa94646bdcc3b9c8..07ddb7c42dbe024829c4f9a2fa46c5564abf658f 100644 (file)
@@ -3,7 +3,9 @@
       id="org.eclipse.linuxtools.lttng2"
       label="%featureName"
       version="3.0.0.qualifier"
-      provider-name="%featureProvider">
+      provider-name="%featureProvider"
+      license-feature="org.eclipse.linuxtools.license.feature"
+      license-feature-version="1.0.0.qualifier">
 
    <description url="http://www.example.com/description">
       %description
diff --git a/org.eclipse.linuxtools.lttng2/sourceTemplateFeature/feature.properties b/org.eclipse.linuxtools.lttng2/sourceTemplateFeature/feature.properties
deleted file mode 100644 (file)
index d2bf491..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2013 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
index 05d136befe35183d3a64527fe207b19d5716dac9..9117e0a55af4a8b699d43e3b199112672cca066a 100644 (file)
@@ -14,5 +14,6 @@ Require-Bundle: org.junit;bundle-version="4.0.0",
  org.eclipse.linuxtools.tmf.core;bundle-version="3.0.0",
  org.eclipse.linuxtools.ctf.core;bundle-version="3.0.0",
  org.eclipse.linuxtools.ctf.core.tests;bundle-version="3.0.0"
-Export-Package: org.eclipse.linuxtools.tmf.core.tests.shared,
+Export-Package: org.eclipse.linuxtools.tmf.core.tests,
+ org.eclipse.linuxtools.tmf.core.tests.shared,
  org.eclipse.linuxtools.tmf.tests.stubs.trace;x-friends:="org.eclipse.linuxtools.tmf.ui.tests"
index 4eb16037e4b7486eb7b09ce86fe4805f1aab48ee..913e465d56ed6b2dcd37176ce58ea751feb3e533 100644 (file)
@@ -14,6 +14,7 @@
 package org.eclipse.linuxtools.tmf.core.tests.ctfadaptor;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
@@ -348,4 +349,19 @@ public class CtfTmfTraceTest {
         IStatus result = fixture.validate(project, path);
         assertTrue(result.isOK());
     }
+
+    /**
+     * Run the boolean hasEvent(final String) method test
+     */
+    @Test
+    public void testEventLookup() {
+        assertTrue(fixture.hasEvent("sched_switch"));
+        assertFalse(fixture.hasEvent("Sched_switch"));
+        String[] events = { "sched_switch", "sched_wakeup", "timer_init" };
+        assertTrue(fixture.hasAllEvents(events));
+        assertTrue(fixture.hasAtLeastOneOfEvents(events));
+        String[] names = { "inexistent", "sched_switch", "SomeThing" };
+        assertTrue(fixture.hasAtLeastOneOfEvents(names));
+        assertFalse(fixture.hasAllEvents(names));
+    }
 }
index cfd6841abe05b71be7216a7ca793742417a522b0..b4eedf3d1df7b2488f047c6031ed775aadc429bc 100644 (file)
@@ -185,7 +185,7 @@ public class InMemoryBackend implements IStateHistoryBackend {
 
         /* The returned value is < 0 if the exact key was not found. */
         if (mid < 0) {
-            mid = -mid;
+            mid = -mid - 1;
         }
 
         /*
index befd10461cd188bd7bd09a130d82a3934623a1d4..8311e7acb8fc351abd3183feab786cb491110e6f 100644 (file)
@@ -122,7 +122,7 @@ public class CtfIterator extends CTFTraceReader implements ITmfContext,
      * @return boolean
      * @since 2.0
      */
-    public boolean seek(final CtfLocationInfo ctfLocationData) {
+    public synchronized boolean seek(final CtfLocationInfo ctfLocationData) {
         boolean ret = false;
 
         /* Adjust the timestamp depending on the trace's offset */
@@ -139,11 +139,12 @@ public class CtfIterator extends CTFTraceReader implements ITmfContext,
          * assign the location index correctly
          */
         long index = 0;
-        if (this.getCurrentEvent() != null) {
-            currTimestamp = this.getCurrentEvent().getTimestamp().getValue();
+        final CtfTmfEvent currentEvent = this.getCurrentEvent();
+        if (currentEvent != null) {
+            currTimestamp = currentEvent.getTimestamp().getValue();
 
             for (long i = 0; i < ctfLocationData.getIndex(); i++) {
-                if (currTimestamp == this.getCurrentEvent().getTimestamp().getValue()) {
+                if (currTimestamp == currentEvent.getTimestamp().getValue()) {
                     index++;
                 } else {
                     index = 0;
@@ -246,7 +247,7 @@ public class CtfIterator extends CTFTraceReader implements ITmfContext,
      * @return boolean successful or not
      */
     @Override
-    public boolean advance() {
+    public synchronized boolean advance() {
         long index = curLocation.getLocationInfo().getIndex();
         long timestamp = curLocation.getLocationInfo().getTimestamp();
         boolean ret = super.advance();
index 1cfa63b3c3e80e574608bb0585997daac9f98481..700b0a9d7d228c807e0bbe948349375249192527 100644 (file)
@@ -20,6 +20,7 @@ import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.ctf.core.event.IEventDeclaration;
 import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
 import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
 import org.eclipse.linuxtools.ctf.core.trace.CTFTraceReader;
@@ -29,9 +30,9 @@ import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTraceProperties;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfEventParser;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTraceProperties;
 import org.eclipse.linuxtools.tmf.core.trace.TmfTrace;
 
 /**
@@ -307,6 +308,63 @@ public class CtfTmfTrace extends TmfTrace
         return 0;
     }
 
+    /**
+     * Returns whether or not an event is in the metadata of the trace,
+     * therefore if it can possibly be in the trace. It does not verify whether
+     * or not the event is actually in the trace
+     *
+     * @param eventName
+     *            The name of the event to check
+     * @return Whether the event is in the metadata or not
+     * @since 2.1
+     */
+    public boolean hasEvent(final String eventName) {
+        Map<Long, IEventDeclaration> events = fTrace.getEvents(0L);
+        if (events != null) {
+            for (IEventDeclaration decl : events.values()) {
+                if (decl.getName().equals(eventName)) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Return whether all requested events are in the metadata
+     *
+     * @param names
+     *            The array of events to check for
+     * @return Whether all events are in the metadata
+     * @since 2.1
+     */
+    public boolean hasAllEvents(String[] names) {
+        for (String name : names) {
+            if (!hasEvent(name)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Returns whether the metadata contains at least one of the requested
+     * events
+     *
+     * @param names
+     *            The array of event names of check for
+     * @return Whether one of the event is present in trace metadata
+     * @since 2.1
+     */
+    public boolean hasAtLeastOneOfEvents(String[] names) {
+        for (String name : names) {
+            if (hasEvent(name)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
     // -------------------------------------------
     // Parser
     // -------------------------------------------
index 95214e1d735a5510caaab3c0a18a8c05b659642e..78e5e8cef66457c984c23b08eb46b0120a0b83ff 100644 (file)
@@ -141,8 +141,7 @@ public abstract class AbstractTmfStateProvider implements ITmfStateProvider {
          * the state. That way, when that event leaves the queue, we will know
          * for sure that the state system processed the preceding real event.
          */
-        TmfTimestamp ts = new TmfTimestamp(0); /* it must not be -1! */
-        TmfEvent ev = new TmfEvent(null, ts, null, null, null, null);
+        TmfEvent ev = new EmptyEvent();
 
         try {
             eventsQueue.put(ev);
@@ -154,6 +153,20 @@ public abstract class AbstractTmfStateProvider implements ITmfStateProvider {
         }
     }
 
+    // ------------------------------------------------------------------------
+    // Inner classes
+    // ------------------------------------------------------------------------
+
+    /**
+     * Empty event that should be totally ignored by the event handler. It can
+     * by used for synchronisation purposes.
+     */
+    private class EmptyEvent extends TmfEvent {
+        public EmptyEvent() {
+            super(null, new TmfTimestamp(0), null, null, null, null);
+        }
+    }
+
     /**
      * This is the runner class for the second thread, which will take the
      * events from the queue and pass them through the state system.
@@ -171,6 +184,12 @@ public abstract class AbstractTmfStateProvider implements ITmfStateProvider {
             try {
                 event = eventsQueue.take();
                 while (event.getTimestamp().getValue() != -1) {
+                    if (event instanceof EmptyEvent) {
+                        /* Synchronization event, should be ignored */
+                        event = eventsQueue.take();
+                        continue;
+                    }
+
                     currentEvent = event;
 
                     /* Make sure this is an event the sub-class can process */
index 712da3b6f49b16cb750803c90814c1be5fd97a27..7813c7c55a9a4e56fda65d9ece5d47e6fc39fcb3 100644 (file)
             <phase>generate-sources</phase>
             <configuration>
               <echo>Generating TMF Help Files</echo>
-              <tasks>
+              <target>
                 <property name="compile_classpath" refid="maven.compile.classpath" />
                 <ant target="build" inheritRefs="true" antfile="build.xml" />
-              </tasks>
+              </target>
             </configuration>
             <goals>
               <goal>run</goal>
@@ -48,9 +48,9 @@
             <phase>clean</phase>
             <configuration>
               <echo>Cleaning up generated TMF Help Files</echo>
-              <tasks>
+              <target>
                 <ant target="clean" antfile="build.xml" />
-              </tasks>
+              </target>
             </configuration>
             <goals>
               <goal>run</goal>
index 5147cd507cb1f463778bca6e706c939730df4af1..14860f03565a8ab41cbff9152bd678d77400198b 100644 (file)
@@ -14,3 +14,4 @@ Require-Bundle: org.junit;bundle-version="4.0.0",
  org.eclipse.linuxtools.tmf.core;bundle-version="3.0.0",
  org.eclipse.linuxtools.tmf.ui;bundle-version="3.0.0",
  org.eclipse.linuxtools.tmf.core.tests;bundle-version="3.0.0"
+Export-Package: org.eclipse.linuxtools.tmf.ui.tests
index 5ce60c4497c2abfcae68b0281b1aaa6fbdc48472..d40c3d322cd34a4476909dfd5ce89bf02b4662e0 100644 (file)
@@ -45,6 +45,7 @@ Export-Package: org.eclipse.linuxtools.internal.tmf.ui;x-friends:="org.eclipse.l
  org.eclipse.linuxtools.tmf.ui.views.statesystem,
  org.eclipse.linuxtools.tmf.ui.views.statistics,
  org.eclipse.linuxtools.tmf.ui.views.timechart,
+ org.eclipse.linuxtools.tmf.ui.views.timegraph,
  org.eclipse.linuxtools.tmf.ui.views.uml2sd,
  org.eclipse.linuxtools.tmf.ui.views.uml2sd.core,
  org.eclipse.linuxtools.tmf.ui.views.uml2sd.dialogs,
diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/Messages.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/Messages.java
new file mode 100644 (file)
index 0000000..f510694
--- /dev/null
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Jean-Christian Kouamé - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.ui.project.model;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Message strings for TMF model handling.
+ *
+ * @author Jean-Christian Kouamé
+ * @since 2.1
+ */
+public class Messages extends NLS {
+
+    private static final String BUNDLE_NAME = "org.eclipse.linuxtools.tmf.ui.project.model.messages"; //$NON-NLS-1$
+
+    /** The category of the resource properties */
+    public static String TmfTraceElement_ResourceProperties;
+
+    /** The category of the trace properties */
+    public static String TmfTraceElement_TraceProperties;
+
+    /** The descriptor for the name property */
+    public static String TmfTraceElement_Name;
+
+    /** The descriptor for the path property */
+    public static String TmfTraceElement_Path;
+
+    /** The descriptor for the location properties */
+    public static String TmfTraceElement_Location;
+
+    /** The descriptor for the event type property */
+    public static String TmfTraceElement_EventType;
+
+    /** The description for the linked property */
+    public static String TmfTraceElement_IsLinked;
+
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
index 2a81f93472c5ccb4e72a8766ebf4044bb86a6344..bb0c361a54747ca62d12c55d686ffa2e29c73bdf 100644 (file)
@@ -12,6 +12,8 @@
  *   Geneviève Bastien - Moved supplementary files handling to parent class,
  *                       added code to copy trace
  *   Patrick Tasse - Close editors to release resources
+ *   Jean-Christian Kouame - added trace properties to be shown into
+ *                           the properties view
  *******************************************************************************/
 
 package org.eclipse.linuxtools.tmf.ui.project.model;
@@ -38,7 +40,9 @@ import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomXmlTraceDefin
 import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTraceProperties;
 import org.eclipse.linuxtools.tmf.core.trace.TmfTrace;
+import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
 import org.eclipse.linuxtools.tmf.ui.editors.TmfEventsEditor;
 import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
 import org.eclipse.ui.IActionFilter;
@@ -77,12 +81,13 @@ public class TmfTraceElement extends TmfWithFolderElement implements IActionFilt
     public static final String IS_LINKED = "isLinked"; //$NON-NLS-1$
 
     // Property View stuff
-    private static final String sfInfoCategory = "Info"; //$NON-NLS-1$
-    private static final String sfName = "name"; //$NON-NLS-1$
-    private static final String sfPath = "path"; //$NON-NLS-1$
-    private static final String sfLocation = "location"; //$NON-NLS-1$
-    private static final String sfEventType = "type"; //$NON-NLS-1$
-    private static final String sfIsLinked = "linked"; //$NON-NLS-1$
+    private static final String sfResourcePropertiesCategory = Messages.TmfTraceElement_ResourceProperties;
+    private static final String sfName = Messages.TmfTraceElement_Name;
+    private static final String sfPath = Messages.TmfTraceElement_Path;
+    private static final String sfLocation = Messages.TmfTraceElement_Location;
+    private static final String sfEventType = Messages.TmfTraceElement_EventType;
+    private static final String sfIsLinked = Messages.TmfTraceElement_IsLinked;
+    private static final String sfTracePropertiesCategory = Messages.TmfTraceElement_TraceProperties;
 
     private static final ReadOnlyTextPropertyDescriptor sfNameDescriptor = new ReadOnlyTextPropertyDescriptor(sfName, sfName);
     private static final ReadOnlyTextPropertyDescriptor sfPathDescriptor = new ReadOnlyTextPropertyDescriptor(sfPath, sfPath);
@@ -94,11 +99,11 @@ public class TmfTraceElement extends TmfWithFolderElement implements IActionFilt
             sfTypeDescriptor, sfIsLinkedDescriptor };
 
     static {
-        sfNameDescriptor.setCategory(sfInfoCategory);
-        sfPathDescriptor.setCategory(sfInfoCategory);
-        sfLocationDescriptor.setCategory(sfInfoCategory);
-        sfTypeDescriptor.setCategory(sfInfoCategory);
-        sfIsLinkedDescriptor.setCategory(sfInfoCategory);
+        sfNameDescriptor.setCategory(sfResourcePropertiesCategory);
+        sfPathDescriptor.setCategory(sfResourcePropertiesCategory);
+        sfLocationDescriptor.setCategory(sfResourcePropertiesCategory);
+        sfTypeDescriptor.setCategory(sfResourcePropertiesCategory);
+        sfIsLinkedDescriptor.setCategory(sfResourcePropertiesCategory);
     }
 
     private static final String BOOKMARKS_HIDDEN_FILE = ".bookmarks"; //$NON-NLS-1$
@@ -408,8 +413,43 @@ public class TmfTraceElement extends TmfWithFolderElement implements IActionFilt
         return null;
     }
 
+    /**
+     * Get the trace properties of this traceElement if the corresponding trace
+     * is opened in an editor
+     *
+     * @return a map with the names and values of the trace properties
+     *         respectively as keys and values
+     */
+    private Map<String, String> getTraceProperties() {
+        for (ITmfTrace trace : TmfTraceManager.getInstance().getOpenedTraces()) {
+            if (trace.getResource().equals(this.getResource())) {
+                if (trace instanceof ITmfTraceProperties) {
+                    ITmfTraceProperties traceProperties = (ITmfTraceProperties) trace;
+                    return traceProperties.getTraceProperties();
+                }
+            }
+        }
+        return new HashMap<String, String>();
+    }
+
     @Override
     public IPropertyDescriptor[] getPropertyDescriptors() {
+        Map<String, String> traceProperties = getTraceProperties();
+        if (!traceProperties.isEmpty()) {
+            IPropertyDescriptor[] propertyDescriptorArray = new IPropertyDescriptor[traceProperties.size() + sfDescriptors.length];
+            int index = 0;
+            for (Map.Entry<String, String> varName : traceProperties.entrySet()) {
+                ReadOnlyTextPropertyDescriptor descriptor = new ReadOnlyTextPropertyDescriptor(this.getName() + "_" + varName.getKey(), varName.getKey()); //$NON-NLS-1$
+                descriptor.setCategory(sfTracePropertiesCategory);
+                propertyDescriptorArray[index] = descriptor;
+                index++;
+            }
+            for (int i = 0; i < sfDescriptors.length; i++) {
+                propertyDescriptorArray[index] = sfDescriptors[i];
+                index++;
+            }
+            return propertyDescriptorArray;
+        }
         return Arrays.copyOf(sfDescriptors, sfDescriptors.length);
     }
 
@@ -439,6 +479,14 @@ public class TmfTraceElement extends TmfWithFolderElement implements IActionFilt
             }
         }
 
+        Map<String, String> traceProperties = getTraceProperties();
+        if (id != null && !traceProperties.isEmpty()) {
+            String key = (String) id;
+            key = key.replaceFirst(this.getName() + "_", ""); //$NON-NLS-1$ //$NON-NLS-2$
+            String value = traceProperties.get(key);
+            return value;
+        }
+
         return null;
     }
 
@@ -488,6 +536,7 @@ public class TmfTraceElement extends TmfWithFolderElement implements IActionFilt
 
     /**
      * Close opened editors associated with this trace.
+     *
      * @since 2.0
      */
     public void closeEditors() {
diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/messages.properties b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/messages.properties
new file mode 100644 (file)
index 0000000..03ba4b3
--- /dev/null
@@ -0,0 +1,20 @@
+###############################################################################
+# Copyright (c) 2013 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Ericsson - Initial API and implementation
+###############################################################################
+
+# Environment properties dialog
+TmfTraceElement_ResourceProperties = Resource properties
+TmfTraceElement_TraceProperties = Trace properties
+TmfTraceElement_Name = name
+TmfTraceElement_Path = path
+TmfTraceElement_Location = location
+TmfTraceElement_EventType = type
+TmfTraceElement_IsLinked = linked
\ No newline at end of file
index e7d037a0964f3c17488f1013960c8ff670f51bbf..ed5497be4e36fcd88858ee383c7dc1ef5dc1ed79 100644 (file)
@@ -46,6 +46,7 @@ public class CallStackEvent extends TimeEvent {
      *
      * @return The integer value
      */
+    @Override
     public int getValue() {
         return fValue;
     }
diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphView.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/AbstractTimeGraphView.java
new file mode 100644 (file)
index 0000000..615ad1e
--- /dev/null
@@ -0,0 +1,860 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 Ericsson, Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Patrick Tasse - Initial API and implementation
+ *   Bernd Hufmann - Updated signal handling
+ *   Geneviève Bastien - Move code to provide base classes for time graph view
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.ui.views.timegraph;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.signal.TmfRangeSynchSignal;
+import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTraceClosedSignal;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTraceOpenedSignal;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTraceSelectedSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.ui.views.TmfView;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphRangeListener;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphSelectionListener;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphTimeListener;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphCombo;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphRangeUpdateEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphSelectionEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphTimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.TimeFormat;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.TreeColumn;
+import org.eclipse.ui.IActionBars;
+
+/**
+ * An abstract view all time graph views can inherit
+ *
+ * This view contains a time graph combo, divided between a treeview on the
+ * left, showing entries and a canvas on the right to draw something for these
+ * entries.
+ *
+ * @since 2.1
+ */
+public abstract class AbstractTimeGraphView extends TmfView {
+
+    private final String[] fColumns;
+    private final String[] fFilterColumns;
+
+    /**
+     * Redraw state enum
+     */
+    private enum State {
+        IDLE, BUSY, PENDING
+    }
+
+    // ------------------------------------------------------------------------
+    // Fields
+    // ------------------------------------------------------------------------
+
+    /** The timegraph combo */
+    private TimeGraphCombo fTimeGraphCombo;
+
+    /** The selected trace */
+    private ITmfTrace fTrace;
+
+    /** The timegraph entry list */
+    private List<TimeGraphEntry> fEntryList;
+
+    /** The trace to entry list hash map */
+    private final Map<ITmfTrace, List<TimeGraphEntry>> fEntryListMap = new HashMap<ITmfTrace, List<TimeGraphEntry>>();
+
+    /* The trace to build thread hash map */
+    private final Map<ITmfTrace, BuildThread> fBuildThreadMap = new HashMap<ITmfTrace, BuildThread>();
+
+    /** The start time */
+    private long fStartTime;
+
+    /** The end time */
+    private long fEndTime;
+
+    /** The display width */
+    private final int fDisplayWidth;
+
+    /** The zoom thread */
+    private ZoomThread fZoomThread;
+
+    /** The next resource action */
+    private Action fNextResourceAction;
+
+    /** The previous resource action */
+    private Action fPreviousResourceAction;
+
+    /** The relative weight of the sash */
+    private int[] fWeight = { 1, 1 };
+
+    /** A comparator class */
+    private Comparator<ITimeGraphEntry> fEntryComparator = null;
+
+    /**  The redraw state used to prevent unnecessary queuing of display runnables */
+    private State fRedrawState = State.IDLE;
+
+    /** The redraw synchronization object */
+    private final Object fSyncObj = new Object();
+
+    /** The presentation provider for this view */
+    private final TimeGraphPresentationProvider fPresentation;
+
+    private TreeLabelProvider fLabelProvider = new TreeLabelProvider();
+
+    // ------------------------------------------------------------------------
+    // Getters and setters
+    // ------------------------------------------------------------------------
+
+    /**
+     * Getter for the time graph combo
+     *
+     * @return The Time graph combo
+     */
+    protected TimeGraphCombo getTimeGraphCombo() {
+        return fTimeGraphCombo;
+    }
+
+    /**
+     * Sets the tree label provider
+     *
+     * @param tlp
+     *            The tree label provider
+     */
+    protected void setTreeLabelProvider(final TreeLabelProvider tlp) {
+        fLabelProvider = tlp;
+    }
+
+    /**
+     * Sets the relative weight of each part of the time graph combo
+     *
+     * @param weights
+     *            The array of relative weights of each part of the combo
+     */
+    protected void setWeight(final int[] weights) {
+        fWeight = weights;
+    }
+
+    /**
+     * Gets the display width
+     *
+     * @return the display width
+     */
+    protected int getDisplayWidth() {
+        return fDisplayWidth;
+    }
+
+    /**
+     * Gets the comparator for the entries
+     *
+     * @return The entry comparator
+     */
+    protected Comparator<ITimeGraphEntry> getEntryComparator() {
+        return fEntryComparator;
+    }
+
+    /**
+     * Sets the comparator class for the entries * Gets the display width
+     *
+     * @param comparator
+     *            A comparator object
+     */
+    protected void setEntryComparator(final Comparator<ITimeGraphEntry> comparator) {
+        fEntryComparator = comparator;
+    }
+
+    /**
+     * Gets the trace displayed in the view
+     *
+     * @return The trace
+     */
+    protected ITmfTrace getTrace() {
+        return fTrace;
+    }
+
+    /**
+     * Sets the trace to display
+     *
+     * @param trace
+     *            The trace
+     */
+    protected void setTrace(final ITmfTrace trace) {
+        fTrace = trace;
+    }
+
+    /**
+     * Gets the start time
+     *
+     * @return The start time
+     */
+    protected long getStartTime() {
+        return fStartTime;
+    }
+
+    /**
+     * Sets the start time
+     *
+     * @param time
+     *            The start time
+     */
+    protected void setStartTime(long time) {
+        fStartTime = time;
+    }
+
+    /**
+     * Gets the end time
+     *
+     * @return The end time
+     */
+    protected long getEndTime() {
+        return fEndTime;
+    }
+
+    /**
+     * Sets the end time
+     *
+     * @param time
+     *            The end time
+     */
+    protected void setEndTime(long time) {
+        fEndTime = time;
+    }
+
+    /**
+     * Gets the entry list map
+     *
+     * @return the entry list map
+     */
+    protected Map<ITmfTrace, List<TimeGraphEntry>> getEntryListMap() {
+        return Collections.unmodifiableMap(fEntryListMap);
+    }
+
+    /**
+     * Adds an entry to the entry list
+     *
+     * @param trace
+     *            the trace to add
+     * @param list
+     *            The list of time graph entries
+     */
+    protected void putEntryList(ITmfTrace trace, List<TimeGraphEntry> list) {
+        synchronized(fEntryListMap) {
+            fEntryListMap.put(trace, list);
+        }
+    }
+
+    /**
+     * Text for the "next" button
+     *
+     * @return The "next" button text
+     */
+    protected String getNextText() {
+        return Messages.AbstractTimeGraphtView_NextText;
+    }
+
+    /**
+     * Tooltip for the "next" button
+     *
+     * @return Tooltip for the "next" button
+     */
+    protected String getNextTooltip() {
+        return Messages.AbstractTimeGraphView_NextTooltip;
+    }
+
+    /**
+     * Text for the "Previous" button
+     *
+     * @return The "Previous" button text
+     */
+    protected String getPrevText() {
+        return Messages.AbstractTimeGraphView_PreviousText;
+    }
+
+    /**
+     * Tooltip for the "previous" button
+     *
+     * @return Tooltip for the "previous" button
+     */
+    protected String getPrevTooltip() {
+        return Messages.AbstractTimeGraphView_PreviousTooltip;
+    }
+
+    // ------------------------------------------------------------------------
+    // Classes
+    // ------------------------------------------------------------------------
+
+    private class TreeContentProvider implements ITreeContentProvider {
+
+        @Override
+        public void dispose() {
+        }
+
+        @Override
+        public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+        }
+
+        @Override
+        public Object[] getElements(Object inputElement) {
+            return (ITimeGraphEntry[]) inputElement;
+        }
+
+        @Override
+        public Object[] getChildren(Object parentElement) {
+            ITimeGraphEntry entry = (ITimeGraphEntry) parentElement;
+            List<? extends ITimeGraphEntry> children = entry.getChildren();
+            return children.toArray(new ITimeGraphEntry[children.size()]);
+        }
+
+        @Override
+        public Object getParent(Object element) {
+            ITimeGraphEntry entry = (ITimeGraphEntry) element;
+            return entry.getParent();
+        }
+
+        @Override
+        public boolean hasChildren(Object element) {
+            ITimeGraphEntry entry = (ITimeGraphEntry) element;
+            return entry.hasChildren();
+        }
+
+    }
+
+    /**
+     * Base class to provide the labels for the left tree view entry. Views
+     * extending this class typically need to override the getColumnText method
+     * if they have more than one column to display
+     */
+    protected static class TreeLabelProvider implements ITableLabelProvider {
+
+        @Override
+        public void addListener(ILabelProviderListener listener) {
+        }
+
+        @Override
+        public void dispose() {
+        }
+
+        @Override
+        public boolean isLabelProperty(Object element, String property) {
+            return false;
+        }
+
+        @Override
+        public void removeListener(ILabelProviderListener listener) {
+        }
+
+        @Override
+        public Image getColumnImage(Object element, int columnIndex) {
+            return null;
+        }
+
+        @Override
+        public String getColumnText(Object element, int columnIndex) {
+            TimeGraphEntry entry = (TimeGraphEntry) element;
+            if (columnIndex == 0) {
+                return entry.getName();
+            }
+            return ""; //$NON-NLS-1$
+        }
+
+    }
+
+    private class BuildThread extends Thread {
+        private final ITmfTrace fBuildTrace;
+        private final IProgressMonitor fMonitor;
+
+        public BuildThread(final ITmfTrace trace, final String name) {
+            super(name + " build"); //$NON-NLS-1$
+            fBuildTrace = trace;
+            fMonitor = new NullProgressMonitor();
+        }
+
+        @Override
+        public void run() {
+            buildEventList(fBuildTrace, fMonitor);
+            synchronized (fBuildThreadMap) {
+                fBuildThreadMap.remove(this);
+            }
+        }
+
+        public void cancel() {
+            fMonitor.setCanceled(true);
+        }
+    }
+
+    private class ZoomThread extends Thread {
+        private final List<TimeGraphEntry> fZoomEntryList;
+        private final long fZoomStartTime;
+        private final long fZoomEndTime;
+        private final long fResolution;
+        private final IProgressMonitor fMonitor;
+
+        public ZoomThread(List<TimeGraphEntry> entryList, long startTime, long endTime, String name) {
+            super(name + " zoom"); //$NON-NLS-1$
+            fZoomEntryList = entryList;
+            fZoomStartTime = startTime;
+            fZoomEndTime = endTime;
+            fResolution = Math.max(1, (fZoomEndTime - fZoomStartTime) / fDisplayWidth);
+            fMonitor = new NullProgressMonitor();
+        }
+
+        @Override
+        public void run() {
+            if (fZoomEntryList == null) {
+                return;
+            }
+            for (TimeGraphEntry entry : fZoomEntryList) {
+                if (fMonitor.isCanceled()) {
+                    break;
+                }
+                zoom(entry, fMonitor);
+            }
+        }
+
+        private void zoom(TimeGraphEntry entry, IProgressMonitor monitor) {
+            if (fZoomStartTime <= fStartTime && fZoomEndTime >= fEndTime) {
+                entry.setZoomedEventList(null);
+            } else {
+                List<ITimeEvent> zoomedEventList = getEventList(entry, fZoomStartTime, fZoomEndTime, fResolution, monitor);
+                if (zoomedEventList != null) {
+                    entry.setZoomedEventList(zoomedEventList);
+                }
+            }
+            redraw();
+            for (TimeGraphEntry child : entry.getChildren()) {
+                if (fMonitor.isCanceled()) {
+                    return;
+                }
+                zoom(child, monitor);
+            }
+        }
+
+        public void cancel() {
+            fMonitor.setCanceled(true);
+        }
+    }
+
+    // ------------------------------------------------------------------------
+    // Constructors
+    // ------------------------------------------------------------------------
+
+    /**
+     * Constructor
+     *
+     * @param id
+     *            The id of the view
+     * @param cols
+     *            The columns to display in the tree view on the left
+     * @param filterCols
+     *            The columns list to filter the view
+     * @param pres
+     *            The presentation provider
+     */
+    public AbstractTimeGraphView(String id, String[] cols, String[] filterCols,
+            TimeGraphPresentationProvider pres) {
+        super(id);
+        fColumns = cols;
+        fFilterColumns = filterCols;
+        fPresentation = pres;
+        fDisplayWidth = Display.getDefault().getBounds().width;
+    }
+
+    // ------------------------------------------------------------------------
+    // ViewPart
+    // ------------------------------------------------------------------------
+
+    @Override
+    public void createPartControl(Composite parent) {
+        fTimeGraphCombo = new TimeGraphCombo(parent, SWT.NONE, fWeight);
+
+        fTimeGraphCombo.setTreeContentProvider(new TreeContentProvider());
+
+        fTimeGraphCombo.setTreeLabelProvider(fLabelProvider);
+
+        fTimeGraphCombo.setTimeGraphProvider(fPresentation);
+
+        fTimeGraphCombo.setTreeColumns(fColumns);
+
+        fTimeGraphCombo.setFilterContentProvider(new TreeContentProvider());
+
+        fTimeGraphCombo.setFilterLabelProvider(new TreeLabelProvider());
+
+        fTimeGraphCombo.setFilterColumns(fFilterColumns);
+
+        fTimeGraphCombo.getTimeGraphViewer().addRangeListener(new ITimeGraphRangeListener() {
+            @Override
+            public void timeRangeUpdated(TimeGraphRangeUpdateEvent event) {
+                final long startTime = event.getStartTime();
+                final long endTime = event.getEndTime();
+                TmfTimeRange range = new TmfTimeRange(new CtfTmfTimestamp(startTime), new CtfTmfTimestamp(endTime));
+                TmfTimestamp time = new CtfTmfTimestamp(fTimeGraphCombo.getTimeGraphViewer().getSelectedTime());
+                broadcast(new TmfRangeSynchSignal(AbstractTimeGraphView.this, range, time));
+                if (fZoomThread != null) {
+                    fZoomThread.cancel();
+                }
+                startZoomThread(startTime, endTime);
+            }
+        });
+
+        fTimeGraphCombo.getTimeGraphViewer().addTimeListener(new ITimeGraphTimeListener() {
+            @Override
+            public void timeSelected(TimeGraphTimeEvent event) {
+                long time = event.getTime();
+                broadcast(new TmfTimeSynchSignal(AbstractTimeGraphView.this, new CtfTmfTimestamp(time)));
+            }
+        });
+
+        fTimeGraphCombo.addSelectionListener(new ITimeGraphSelectionListener() {
+            @Override
+            public void selectionChanged(TimeGraphSelectionEvent event) {
+                // ITimeGraphEntry selection = event.getSelection();
+            }
+        });
+
+        fTimeGraphCombo.getTimeGraphViewer().setTimeFormat(TimeFormat.CALENDAR);
+
+        // View Action Handling
+        makeActions();
+        contributeToActionBars();
+
+        ITmfTrace trace = getActiveTrace();
+        if (trace != null) {
+            traceSelected(new TmfTraceSelectedSignal(this, trace));
+        }
+
+        // make selection available to other views
+        getSite().setSelectionProvider(fTimeGraphCombo.getTreeViewer());
+    }
+
+    @Override
+    public void setFocus() {
+        fTimeGraphCombo.setFocus();
+    }
+
+    // ------------------------------------------------------------------------
+    // Signal handlers
+    // ------------------------------------------------------------------------
+
+    /**
+     * Handler for the trace opened signal.
+     *
+     * @param signal
+     *            The incoming signal
+     * @since 2.0
+     */
+    @TmfSignalHandler
+    public void traceOpened(TmfTraceOpenedSignal signal) {
+        fTrace = signal.getTrace();
+        loadTrace();
+    }
+
+    /**
+     * Handler for the trace selected signal
+     *
+     * @param signal
+     *            The incoming signal
+     */
+    @TmfSignalHandler
+    public void traceSelected(final TmfTraceSelectedSignal signal) {
+        if (signal.getTrace() == fTrace) {
+            return;
+        }
+        fTrace = signal.getTrace();
+
+        loadTrace();
+    }
+
+    /**
+     * Trace is closed: clear the data structures and the view
+     *
+     * @param signal
+     *            the signal received
+     */
+    @TmfSignalHandler
+    public void traceClosed(final TmfTraceClosedSignal signal) {
+        synchronized (fBuildThreadMap) {
+            BuildThread buildThread = fBuildThreadMap.remove(signal.getTrace());
+            if (buildThread != null) {
+                buildThread.cancel();
+            }
+        }
+        synchronized (fEntryListMap) {
+            fEntryListMap.remove(signal.getTrace());
+        }
+        if (signal.getTrace() == fTrace) {
+            fTrace = null;
+            fStartTime = 0;
+            fEndTime = 0;
+            if (fZoomThread != null) {
+                fZoomThread.cancel();
+            }
+            refresh();
+        }
+    }
+
+    /**
+     * Handler for the synch signal
+     *
+     * @param signal
+     *            The signal that's received
+     */
+    @TmfSignalHandler
+    public void synchToTime(final TmfTimeSynchSignal signal) {
+        if (signal.getSource() == this || fTrace == null) {
+            return;
+        }
+        final long time = signal.getCurrentTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
+
+        Display.getDefault().asyncExec(new Runnable() {
+            @Override
+            public void run() {
+                if (fTimeGraphCombo.isDisposed()) {
+                    return;
+                }
+                fTimeGraphCombo.getTimeGraphViewer().setSelectedTime(time, true);
+                startZoomThread(fTimeGraphCombo.getTimeGraphViewer().getTime0(), fTimeGraphCombo.getTimeGraphViewer().getTime1());
+
+                synchingToTime(time);
+            }
+        });
+    }
+
+    /**
+     * Handler for the range sync signal
+     *
+     * @param signal
+     *            The signal that's received
+     */
+    @TmfSignalHandler
+    public void synchToRange(final TmfRangeSynchSignal signal) {
+        if (signal.getSource() == this || fTrace == null) {
+            return;
+        }
+        if (signal.getCurrentRange().getIntersection(fTrace.getTimeRange()) == null) {
+            return;
+        }
+        final long startTime = signal.getCurrentRange().getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
+        final long endTime = signal.getCurrentRange().getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
+        final long time = signal.getCurrentTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
+        Display.getDefault().asyncExec(new Runnable() {
+            @Override
+            public void run() {
+                if (fTimeGraphCombo.isDisposed()) {
+                    return;
+                }
+                fTimeGraphCombo.getTimeGraphViewer().setStartFinishTime(startTime, endTime);
+                fTimeGraphCombo.getTimeGraphViewer().setSelectedTime(time, false);
+                startZoomThread(startTime, endTime);
+            }
+        });
+    }
+
+    // ------------------------------------------------------------------------
+    // Internal
+    // ------------------------------------------------------------------------
+
+    private void loadTrace() {
+        synchronized (fEntryListMap) {
+            fEntryList = fEntryListMap.get(fTrace);
+            if (fEntryList == null) {
+                synchronized (fBuildThreadMap) {
+                    BuildThread buildThread = new BuildThread(fTrace, this.getName());
+                    fBuildThreadMap.put(fTrace, buildThread);
+                    buildThread.start();
+                }
+            } else {
+                fStartTime = fTrace.getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
+                fEndTime = fTrace.getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
+                refresh();
+            }
+        }
+    }
+
+    /**
+     * Method called when synching to a given timestamp. Inheriting classes can
+     * perform actions here to update the view at the given timestamp.
+     *
+     * @param time
+     *            The currently selected time
+     */
+    protected void synchingToTime(long time) {
+
+    }
+
+    /**
+     * Build the entries list to show in this time graph
+     *
+     * Called from the BuildThread
+     *
+     * @param trace
+     *            The trace being built
+     * @param monitor
+     *            The progress monitor object
+     */
+    protected abstract void buildEventList(final ITmfTrace trace, IProgressMonitor monitor);
+
+    /**
+     * Gets the list of event for an entry in a given timerange
+     *
+     * @param entry
+     *            The entry to get events for
+     * @param startTime
+     *            Start of the time range
+     * @param endTime
+     *            End of the time range
+     * @param resolution
+     *            The resolution
+     * @param monitor
+     *            The progress monitor object
+     * @return The list of events for the entry
+     */
+    protected abstract List<ITimeEvent> getEventList(TimeGraphEntry entry,
+            long startTime, long endTime, long resolution,
+            IProgressMonitor monitor);
+
+    /**
+     * Refresh the display
+     */
+    protected void refresh() {
+        Display.getDefault().asyncExec(new Runnable() {
+            @Override
+            public void run() {
+                if (fTimeGraphCombo.isDisposed()) {
+                    return;
+                }
+                ITimeGraphEntry[] entries = null;
+                synchronized (fEntryListMap) {
+                    fEntryList = fEntryListMap.get(fTrace);
+                    if (fEntryList == null) {
+                        fEntryList = new ArrayList<TimeGraphEntry>();
+                    }
+                    entries = fEntryList.toArray(new ITimeGraphEntry[0]);
+                }
+                if (fEntryComparator != null) {
+                    Arrays.sort(entries, fEntryComparator);
+                }
+                fTimeGraphCombo.setInput(entries);
+                fTimeGraphCombo.getTimeGraphViewer().setTimeBounds(fStartTime, fEndTime);
+
+                long timestamp = fTrace == null ? 0 : fTraceManager.getCurrentTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
+                long startTime = fTrace == null ? 0 : fTraceManager.getCurrentRange().getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
+                long endTime = fTrace == null ? 0 : fTraceManager.getCurrentRange().getEndTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue();
+                startTime = Math.max(startTime, fStartTime);
+                endTime = Math.min(endTime, fEndTime);
+                fTimeGraphCombo.getTimeGraphViewer().setSelectedTime(timestamp, false);
+                fTimeGraphCombo.getTimeGraphViewer().setStartFinishTime(startTime, endTime);
+
+                for (TreeColumn column : fTimeGraphCombo.getTreeViewer().getTree().getColumns()) {
+                    column.pack();
+                }
+
+                startZoomThread(startTime, endTime);
+            }
+        });
+    }
+
+    /**
+     * Redraw the canvas
+     */
+    protected void redraw() {
+        synchronized (fSyncObj) {
+            if (fRedrawState == State.IDLE) {
+                fRedrawState = State.BUSY;
+            } else {
+                fRedrawState = State.PENDING;
+                return;
+            }
+        }
+        Display.getDefault().asyncExec(new Runnable() {
+            @Override
+            public void run() {
+                if (fTimeGraphCombo.isDisposed()) {
+                    return;
+                }
+                fTimeGraphCombo.redraw();
+                fTimeGraphCombo.update();
+                synchronized (fSyncObj) {
+                    if (fRedrawState == State.PENDING) {
+                        fRedrawState = State.IDLE;
+                        redraw();
+                    } else {
+                        fRedrawState = State.IDLE;
+                    }
+                }
+            }
+        });
+    }
+
+    private void startZoomThread(long startTime, long endTime) {
+        if (fZoomThread != null) {
+            fZoomThread.cancel();
+        }
+        fZoomThread = new ZoomThread(fEntryList, startTime, endTime, getName());
+        fZoomThread.start();
+    }
+
+    private void makeActions() {
+        fPreviousResourceAction = fTimeGraphCombo.getTimeGraphViewer().getPreviousItemAction();
+        fPreviousResourceAction.setText(getPrevText());
+        fPreviousResourceAction.setToolTipText(getPrevTooltip());
+        fNextResourceAction = fTimeGraphCombo.getTimeGraphViewer().getNextItemAction();
+        fNextResourceAction.setText(getNextText());
+        fNextResourceAction.setToolTipText(getNextTooltip());
+    }
+
+    private void contributeToActionBars() {
+        IActionBars bars = getViewSite().getActionBars();
+        fillLocalToolBar(bars.getToolBarManager());
+    }
+
+    private void fillLocalToolBar(IToolBarManager manager) {
+        if (fFilterColumns.length > 0) {
+            manager.add(fTimeGraphCombo.getShowFilterAction());
+        }
+        manager.add(fTimeGraphCombo.getTimeGraphViewer().getShowLegendAction());
+        manager.add(new Separator());
+        manager.add(fTimeGraphCombo.getTimeGraphViewer().getResetScaleAction());
+        manager.add(fTimeGraphCombo.getTimeGraphViewer().getPreviousEventAction());
+        manager.add(fTimeGraphCombo.getTimeGraphViewer().getNextEventAction());
+        manager.add(fPreviousResourceAction);
+        manager.add(fNextResourceAction);
+        manager.add(fTimeGraphCombo.getTimeGraphViewer().getZoomInAction());
+        manager.add(fTimeGraphCombo.getTimeGraphViewer().getZoomOutAction());
+        manager.add(new Separator());
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/Messages.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/Messages.java
new file mode 100644 (file)
index 0000000..1d0ff0c
--- /dev/null
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.ui.views.timegraph;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Generic messages for the bar charts
+ *
+ * @since 2.1
+ */
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "org.eclipse.linuxtools.tmf.ui.views.timegraph.messages"; //$NON-NLS-1$
+
+    public static String AbstractTimeGraphtView_NextText;
+    public static String AbstractTimeGraphView_NextTooltip;
+    public static String AbstractTimeGraphView_PreviousText;
+    public static String AbstractTimeGraphView_PreviousTooltip;
+    public static String TimeGraphPresentationProvider_multipleStates;
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/messages.properties b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timegraph/messages.properties
new file mode 100644 (file)
index 0000000..ea1eba7
--- /dev/null
@@ -0,0 +1,5 @@
+AbstractTimeGraphtView_NextText=Next
+AbstractTimeGraphView_NextTooltip=Next element
+AbstractTimeGraphView_PreviousText=Previous
+AbstractTimeGraphView_PreviousTooltip=Previous element
+TimeGraphPresentationProvider_multipleStates=multiple states
diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/ITimeGraphPresentationProvider2.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/ITimeGraphPresentationProvider2.java
new file mode 100644 (file)
index 0000000..8d5ea2c
--- /dev/null
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Add drawing helper methods
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.ui.widgets.timegraph;
+
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.ITmfTimeGraphDrawingHelper;
+
+/**
+ * Extension of the ITimeGraphPresentationProvider interface to avoid API breakage
+ *
+ * @author Geneviève Bastien
+ * @since 2.1
+ * TODO: Add me to ITimeGraphPresentationProvider before the 3.0 release
+ */
+public interface ITimeGraphPresentationProvider2 extends ITimeGraphPresentationProvider {
+
+    /**
+     * Returns the drawing helper for this presentation provider.
+     *
+     * @return The drawing helper
+     */
+    ITmfTimeGraphDrawingHelper getDrawingHelper();
+
+    /**
+     * Sets this presentation provider's drawing helper.
+     * This helper be needed to know where to draw items, get its coordinates
+     * given a time, etc.
+     *
+     * @param helper
+     *            The drawing helper
+     */
+    void setDrawingHelper(ITmfTimeGraphDrawingHelper helper);
+
+}
\ No newline at end of file
index 7ba43cde66aebe47eda024819b8de1ab2dcbab34..2c695fc491370706b45da90e980b8a1ee4696c88 100644 (file)
@@ -79,39 +79,45 @@ public class TimeGraphCombo extends Composite {
     // Fields
     // ------------------------------------------------------------------------
 
-    // The tree viewer
+    /** The tree viewer */
     private TreeViewer fTreeViewer;
 
-    // The time viewer
+    /** The time viewer */
     private TimeGraphViewer fTimeGraphViewer;
 
-    // The top-level input (children excluded)
+    /** The top-level input (children excluded) */
     private List<? extends ITimeGraphEntry> fTopInput;
 
-    // The selection listener map
+    /** The selection listener map */
     private final Map<ITimeGraphSelectionListener, SelectionListenerWrapper> fSelectionListenerMap = new HashMap<ITimeGraphSelectionListener, SelectionListenerWrapper>();
 
-    // The map of viewer filters
+    /** The map of viewer filters */
     private final Map<ViewerFilter, ViewerFilter> fViewerFilterMap = new HashMap<ViewerFilter, ViewerFilter>();
 
-    // Flag to block the tree selection changed listener when triggered by the time graph combo
+    /**
+     * Flag to block the tree selection changed listener when triggered by the
+     * time graph combo
+     */
     private boolean fInhibitTreeSelection = false;
 
-    // Number of filler rows used by the tree content provider
+    /** Number of filler rows used by the tree content provider */
     private int fNumFillerRows;
 
-    // Calculated item height for Linux workaround
+    /** Calculated item height for Linux workaround */
     private int fLinuxItemHeight = 0;
 
-    // The button that opens the filter dialog
+    /** The button that opens the filter dialog */
     private Action showFilterAction;
 
-    // The filter dialog
+    /** The filter dialog */
     private TimeGraphFilterDialog fFilterDialog;
 
-    // The filter generated from the filter dialog
+    /** The filter generated from the filter dialog */
     private RawViewerFilter fFilter;
 
+    /** Default weight of each part of the sash */
+    private static final int[] DEFAULT_WEIGHTS = { 1, 1 };
+
     // ------------------------------------------------------------------------
     // Classes
     // ------------------------------------------------------------------------
@@ -326,6 +332,23 @@ public class TimeGraphCombo extends Composite {
      * @param style the style of widget to construct
      */
     public TimeGraphCombo(Composite parent, int style) {
+        this(parent, style, DEFAULT_WEIGHTS);
+    }
+
+    /**
+     * Constructs a new instance of this class given its parent and a style
+     * value describing its behavior and appearance.
+     *
+     * @param parent
+     *            a widget which will be the parent of the new instance (cannot
+     *            be null)
+     * @param style
+     *            the style of widget to construct
+     * @param weights
+     *            The relative weights of each side of the sash form
+     * @since 2.1
+     */
+    public TimeGraphCombo(Composite parent, int style, int[] weights) {
         super(parent, style);
         setLayout(new FillLayout());
 
@@ -608,7 +631,7 @@ public class TimeGraphCombo extends Composite {
         // to a value that would cause blank space to be drawn at the bottom of the tree.
         fNumFillerRows = Display.getDefault().getBounds().height / getItemHeight(tree);
 
-        sash.setWeights(new int[] { 1, 1 });
+        sash.setWeights(weights);
     }
 
     // ------------------------------------------------------------------------
index a33d6c1e58c33acdca24a7b87bcb513cd33bfb42..807b174b0da5201053e0be9fb2cd4ca0e20b9109 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2013 Ericsson
+ * Copyright (c) 2009, 2013 Ericsson, Ã‰cole Polytechnique de Montréal
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -9,6 +9,7 @@
  * Contributors:
  *   Alvaro Sanchez-Leon - Initial API and implementation
  *   Patrick Tasse - Refactoring
+ *   Geneviève Bastien - Add drawing helper methods
  *******************************************************************************/
 
 package org.eclipse.linuxtools.tmf.ui.widgets.timegraph;
@@ -18,6 +19,7 @@ import java.util.Map;
 import org.eclipse.linuxtools.internal.tmf.ui.Messages;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.ITmfTimeGraphDrawingHelper;
 import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Rectangle;
@@ -29,7 +31,10 @@ import org.eclipse.swt.graphics.Rectangle;
  * @author Patrick Tasse
  *
  */
-public class TimeGraphPresentationProvider implements ITimeGraphPresentationProvider {
+public class TimeGraphPresentationProvider implements ITimeGraphPresentationProvider2 {
+
+    private ITmfTimeGraphDrawingHelper fDrawingHelper;
+    private final String fStateTypeName;
 
     // ------------------------------------------------------------------------
     // Constants
@@ -40,9 +45,26 @@ public class TimeGraphPresentationProvider implements ITimeGraphPresentationProv
     // Operations
     // ------------------------------------------------------------------------
 
+    /**
+     * Constructor
+     * @param stateTypeName  The state type name
+     * @since 2.1
+     */
+    public TimeGraphPresentationProvider(String stateTypeName) {
+        fStateTypeName = stateTypeName;
+    }
+
+    /**
+     * Constructor
+     * @since 2.1
+     */
+    public TimeGraphPresentationProvider() {
+        this(Messages.TmfTimeLegend_TRACE_STATES);
+    }
+
     @Override
     public String getStateTypeName() {
-        return Messages.TmfTimeLegend_TRACE_STATES;
+        return fStateTypeName;
     }
 
     /**
@@ -64,6 +86,22 @@ public class TimeGraphPresentationProvider implements ITimeGraphPresentationProv
         return 0;
     }
 
+    /**
+     * @since 2.1
+     */
+    @Override
+    public ITmfTimeGraphDrawingHelper getDrawingHelper() {
+        return fDrawingHelper;
+    }
+
+    /**
+     * @since 2.1
+     */
+    @Override
+    public void setDrawingHelper(ITmfTimeGraphDrawingHelper helper) {
+        fDrawingHelper = helper;
+    }
+
     @Override
     public void postDrawControl(Rectangle bounds, GC gc) {
         // Override to add own drawing code
index 6cd1c0a699d8ea539e765a3f0cf814c1e517756a..8b1db841cef6c2c84f4c12095b812164f4a2994a 100644 (file)
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *   Patrick Tasse - Initial API and implementation
+ *   Geneviève Bastien - Added the fValue parameter to avoid subclassing
  *******************************************************************************/
 
 package org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model;
@@ -29,6 +30,13 @@ public class TimeEvent implements ITimeEvent {
     /** Duration of this time event */
     protected long fDuration;
 
+    private final int fValue;
+
+    /**
+     * Default value when no other value present
+     */
+    private static final int NOVALUE = Integer.MIN_VALUE;
+
     /**
      * Standard constructor
      *
@@ -40,9 +48,49 @@ public class TimeEvent implements ITimeEvent {
      *            The duration of the event
      */
     public TimeEvent(ITimeGraphEntry entry, long time, long duration) {
+        this(entry, time, duration, NOVALUE);
+
+    }
+
+    /**
+     * Constructor
+     *
+     * @param entry
+     *            The entry to which this time event is assigned
+     * @param time
+     *            The timestamp of this event
+     * @param duration
+     *            The duration of this event
+     * @param value
+     *            The status assigned to the event
+     * @since 2.1
+     */
+    public TimeEvent(ITimeGraphEntry entry, long time, long duration,
+            int value) {
         fEntry = entry;
         fTime = time;
         fDuration = duration;
+        fValue = value;
+    }
+
+    /**
+     * Get this event's status
+     *
+     * @return The integer matching this status
+     * @since 2.1
+     */
+    public int getValue() {
+        return fValue;
+    }
+
+    /**
+     * Return whether an event has a value
+     *
+     * @return true if the event has a value
+     * @since 2.1
+     */
+    public boolean hasValue() {
+        return (fValue != NOVALUE);
     }
 
     @Override
@@ -62,6 +110,6 @@ public class TimeEvent implements ITimeEvent {
 
     @Override
     public String toString() {
-        return "TimeEvent start=" + fTime + " end=" + (fTime + fDuration) + " duration=" + fDuration; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        return "TimeEvent start=" + fTime + " end=" + (fTime + fDuration) + " duration=" + fDuration + " value=" + (hasValue() ? fValue : "N/A"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
     }
 }
diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/model/TimeGraphEntry.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/model/TimeGraphEntry.java
new file mode 100644 (file)
index 0000000..a56ecbd
--- /dev/null
@@ -0,0 +1,217 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 Ericsson, Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Patrick Tasse - Initial API and implementation
+ *   Geneviève Bastien - Move code to provide base classes for time graph view
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+
+/**
+ * An entry for use in the time graph views
+ *
+ * @since 2.1
+ */
+public class TimeGraphEntry implements ITimeGraphEntry {
+
+    /** Id field that may be used by views, so they don't have to extend this class if they don't need to */
+    private final int fEntryId;
+    private final ITmfTrace fTrace;
+
+    /** Entry's parent */
+    private TimeGraphEntry fParent = null;
+
+    /** List of child entries */
+    private final List<TimeGraphEntry> fChildren = new ArrayList<TimeGraphEntry>();
+
+    /** Name of this entry (text to show) */
+    private String fName;
+    private long fStartTime = -1;
+    private long fEndTime = -1;
+    private List<ITimeEvent> fEventList = new ArrayList<ITimeEvent>();
+    private List<ITimeEvent> fZoomedEventList = null;
+
+    /**
+     * Constructor
+     *
+     * @param entryid
+     *            Some id attribute for the entry whose state is shown on this
+     *            row
+     * @param trace
+     *            The trace on which we are working
+     * @param name
+     *            The exec_name of this entry
+     * @param startTime
+     *            The start time of this process's lifetime
+     * @param endTime
+     *            The end time of this process
+     */
+    public TimeGraphEntry(int entryid, ITmfTrace trace, String name, long startTime, long endTime) {
+        fEntryId = entryid;
+        fTrace = trace;
+        fName = name;
+        fStartTime = startTime;
+        fEndTime = endTime;
+    }
+
+    // ---------------------------------------------
+    // Getters and setters
+    // ---------------------------------------------
+
+    @Override
+    public ITimeGraphEntry getParent() {
+        return fParent;
+    }
+
+    /**
+     * Sets the entry's parent
+     *
+     * @param entry The new parent entry
+     */
+    protected void setParent(TimeGraphEntry entry) {
+        fParent = entry;
+    }
+
+    @Override
+    public boolean hasChildren() {
+        return fChildren.size() > 0;
+    }
+
+    @Override
+    public List<TimeGraphEntry> getChildren() {
+        return fChildren;
+    }
+
+    @Override
+    public String getName() {
+        return fName;
+    }
+
+    /**
+     * Update the entry name
+     *
+     * @param name
+     *            the updated entry name
+     */
+    public void setName(String name) {
+        fName = name;
+    }
+
+    @Override
+    public long getStartTime() {
+        return fStartTime;
+    }
+
+    @Override
+    public long getEndTime() {
+        return fEndTime;
+    }
+
+    @Override
+    public boolean hasTimeEvents() {
+        return true;
+    }
+
+    @Override
+    public Iterator<ITimeEvent> getTimeEventsIterator() {
+        if (hasTimeEvents()) {
+            return new EventIterator(fEventList, fZoomedEventList);
+        }
+        return null;
+    }
+
+    @Override
+    public Iterator<ITimeEvent> getTimeEventsIterator(long startTime, long stopTime, long visibleDuration) {
+        if (!hasTimeEvents()) {
+            return null;
+        }
+        return new EventIterator(fEventList, fZoomedEventList, startTime, stopTime);
+    }
+
+    /**
+     * Get the id of this entry
+     *
+     * @return The entry id
+     */
+    public int getEntryId() {
+        return fEntryId;
+    }
+
+    /**
+     * Get the trace object
+     *
+     * @return The trace
+     */
+    public ITmfTrace getTrace() {
+        return fTrace;
+    }
+
+    /**
+     * Add an event to this process's timeline
+     *
+     * @param event
+     *            The time event
+     */
+    public void addEvent(ITimeEvent event) {
+        long start = event.getTime();
+        long end = start + event.getDuration();
+        synchronized (fEventList) {
+            fEventList.add(event);
+            if (fStartTime == -1 || start < fStartTime) {
+                fStartTime = start;
+            }
+            if (fEndTime == -1 || end > fEndTime) {
+                fEndTime = end;
+            }
+        }
+    }
+
+    /**
+     * Set the general event list of this entry.
+     *
+     * Creates a copy of the list to avoid the caller still modifying the list
+     *
+     * @param eventList
+     *            The list of time events
+     */
+    public void setEventList(List<ITimeEvent> eventList) {
+        fEventList = new ArrayList<ITimeEvent>(eventList);
+    }
+
+    /**
+     * Set the zoomed event list of this entry.
+     *
+     * Creates a copy of the list to avoid the caller still modifying the list
+     *
+     * @param eventList
+     *            The list of time events
+     */
+    public void setZoomedEventList(List<ITimeEvent> eventList) {
+        fZoomedEventList = new ArrayList<ITimeEvent>(eventList);
+    }
+
+    /**
+     * Add a child entry to this one (to show relationships between processes as
+     * a tree)
+     *
+     * @param child
+     *            The child entry
+     */
+    public void addChild(TimeGraphEntry child) {
+        child.fParent = this;
+        fChildren.add(child);
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/ITmfTimeGraphDrawingHelper.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/ITmfTimeGraphDrawingHelper.java
new file mode 100644 (file)
index 0000000..26dbd21
--- /dev/null
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets;
+
+/**
+ * This interface provides functions to convert a model element to a drawing
+ * element and vice versa.
+ *
+ * Views who implement this interface allow access to some model-to-canvas and
+ * vice-versa functions without having to expose their full functionnalities.
+ *
+ * @author gbastien
+ * @since 2.1
+ */
+public interface ITmfTimeGraphDrawingHelper {
+
+    /**
+     * Return the x coordinate corresponding to a time
+     *
+     * @param time
+     *            the time
+     * @return the x coordinate corresponding to the time
+     */
+    int getXForTime(long time);
+
+    /**
+     * Return the time corresponding to an x coordinate
+     *
+     * @param x
+     *            the x coordinate
+     * @return the time corresponding to the x coordinate
+     */
+    long getTimeAtX(int x);
+}
index dda1a0df2933873a7552a52f69101a4f4b80f116..df69754014fb0238bdb5939fc3c57a282589415a 100644 (file)
@@ -1,5 +1,6 @@
 /*****************************************************************************
- * Copyright (c) 2007, 2013 Intel Corporation, Ericsson.
+ * Copyright (c) 2007, 2013 Intel Corporation and others
+ *
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,8 +9,10 @@
  * Contributors:
  *   Intel Corporation - Initial API and implementation
  *   Ruslan A. Scherbakov, Intel - Initial API and implementation
- *   Alvaro Sanchez-Leon - Updated for TMF
- *   Patrick Tasse - Refactoring
+ *   Alvaro Sanchez-Leon, Ericsson - Updated for TMF
+ *   Patrick Tasse, Ericsson - Refactoring
+ *   Geneviève Bastien, Ã‰cole Polytechnique de Montréal - Move code to
+ *                            provide base classes for time graph view
  *****************************************************************************/
 
 package org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets;
@@ -26,6 +29,7 @@ import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider2;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphTreeListener;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.StateItem;
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphTreeExpansionEvent;
@@ -70,7 +74,7 @@ import org.eclipse.swt.widgets.ScrollBar;
  * @author Alvaro Sanchez-Leon
  * @author Patrick Tasse
  */
-public class TimeGraphControl extends TimeGraphBaseControl implements FocusListener, KeyListener, MouseMoveListener, MouseListener, MouseWheelListener, ControlListener, SelectionListener, MouseTrackListener, TraverseListener, ISelectionProvider, MenuDetectListener {
+public class TimeGraphControl extends TimeGraphBaseControl implements FocusListener, KeyListener, MouseMoveListener, MouseListener, MouseWheelListener, ControlListener, SelectionListener, MouseTrackListener, TraverseListener, ISelectionProvider, MenuDetectListener, ITmfTimeGraphDrawingHelper {
 
 
     /** Max scrollbar size */
@@ -211,6 +215,10 @@ public class TimeGraphControl extends TimeGraphBaseControl implements FocusListe
     public void setTimeGraphProvider(ITimeGraphPresentationProvider timeGraphProvider) {
         fTimeGraphProvider = timeGraphProvider;
 
+        if (timeGraphProvider instanceof ITimeGraphPresentationProvider2) {
+            ((ITimeGraphPresentationProvider2) timeGraphProvider).setDrawingHelper(this);
+        }
+
         if (fEventColorMap != null) {
             for (Color color : fEventColorMap) {
                 fResourceManager.destroyColor(color.getRGB());
@@ -906,13 +914,9 @@ public class TimeGraphControl extends TimeGraphBaseControl implements FocusListe
     }
 
     /**
-     * Return the x coordinate corresponding to a time
-     *
-     * @param time the time
-     * @return the x coordinate corresponding to the time
-     *
      * @since 2.0
      */
+    @Override
     public int getXForTime(long time) {
         if (null == fTimeProvider) {
             return -1;
@@ -927,13 +931,9 @@ public class TimeGraphControl extends TimeGraphBaseControl implements FocusListe
     }
 
     /**
-     * Return the time corresponding to an x coordinate
-     *
-     * @param coord The X coordinate
-     * @return The time corresponding to the x coordinate
-     *
      * @since 2.0
      */
+    @Override
     public long getTimeAtX(int coord) {
         if (null == fTimeProvider) {
             return -1;
index 60e9c73fb1812d0acdfa111a98335d28a760a8d0..65558d484de32021dc10ecf308dd7f27d46333ef 100644 (file)
@@ -3,7 +3,9 @@
       id="org.eclipse.linuxtools.tmf"
       label="%featureName"
       version="3.0.0.qualifier"
-      provider-name="%featureProvider">
+      provider-name="%featureProvider"
+      license-feature="org.eclipse.linuxtools.license.feature"
+      license-feature-version="1.0.0.qualifier">
 
    <description>
       %description
diff --git a/org.eclipse.linuxtools.tmf/sourceTemplateFeature/feature.properties b/org.eclipse.linuxtools.tmf/sourceTemplateFeature/feature.properties
deleted file mode 100644 (file)
index d2bf491..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2013 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
diff --git a/org.eclipse.linuxtools.tracing.rcp.product/.gitignore b/org.eclipse.linuxtools.tracing.rcp.product/.gitignore
new file mode 100644 (file)
index 0000000..fb60f67
--- /dev/null
@@ -0,0 +1,2 @@
+bin/
+target/
diff --git a/org.eclipse.linuxtools.tracing.rcp.product/.project b/org.eclipse.linuxtools.tracing.rcp.product/.project
new file mode 100644 (file)
index 0000000..e709a51
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.linuxtools.tracing.rcp.product</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+       </buildSpec>
+       <natures>
+       </natures>
+</projectDescription>
diff --git a/org.eclipse.linuxtools.tracing.rcp.product/about.html b/org.eclipse.linuxtools.tracing.rcp.product/about.html
new file mode 100644 (file)
index 0000000..c258ef5
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+<p>June 5, 2006</p>    
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tracing.rcp.product/epl-v10.html b/org.eclipse.linuxtools.tracing.rcp.product/epl-v10.html
new file mode 100644 (file)
index 0000000..9321f40
--- /dev/null
@@ -0,0 +1,256 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
+
+<style type="text/css">
+  body {
+    size: 8.5in 11.0in;
+    margin: 0.25in 0.5in 0.25in 0.5in;
+    tab-interval: 0.5in;
+    }
+  p {          
+    margin-left: auto;
+    margin-top:  0.5em;
+    margin-bottom: 0.5em;
+    }
+  p.list {
+       margin-left: 0.5in;
+    margin-top:  0.05em;
+    margin-bottom: 0.05em;
+    }
+  </style></head><body lang="EN-US">
+
+<p align="center"><b>Eclipse Public License - v 1.0</b></p>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+</body></html>
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tracing.rcp.product/license.html b/org.eclipse.linuxtools.tracing.rcp.product/license.html
new file mode 100644 (file)
index 0000000..6e579a5
--- /dev/null
@@ -0,0 +1,164 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+   (COLLECTIVELY "CONTENT").  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the 
+Eclipse Public License Version 1.0
+   ("EPL").  A copy of the EPL is provided with this Content and is also
+ available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+   For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, 
+documentation and other files maintained in the Eclipse Foundation 
+source code
+   repository ("Repository") in software modules ("Modules") and made 
+available as downloadable archives ("Downloads").</p>
+
+<ul>
+       <li>Content may be structured and packaged into modules to 
+facilitate delivering, extending, and upgrading the Content.  Typical 
+modules may include plug-ins ("Plug-ins"), plug-in fragments 
+("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or 
+Fragments and associated material.  Each Feature may be packaged as a 
+sub-directory in a directory named "features".  Within a Feature, files 
+named "feature.xml" may contain a list of the names and version numbers 
+of the Plug-ins
+      and/or Fragments associated with that Feature.</li>
+       <li>Features may also include other Features ("Included 
+Features"). Within a Feature, files named "feature.xml" may contain a 
+list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be 
+contained in files named "about.html" ("Abouts"). The terms and 
+conditions governing Features and
+Included Features should be contained in files named "license.html" 
+("Feature Licenses").  Abouts and Feature Licenses may be located in any
+ directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is 
+installed using the Provisioning Technology (as defined below), you must
+ agree to a license ("Feature Update License") during the
+installation process.  If the Feature contains Included Features, the 
+Feature Update License should either provide you with the terms and 
+conditions governing the Included Features or
+inform you where you can locate them.  Feature Update Licenses may be 
+found in the "license" property of files named "feature.properties" 
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the 
+terms and conditions (or references to such terms and conditions) that 
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER 
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+  SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+       <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND 
+CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, 
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions 
+govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, 
+examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of 
+allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This 
+capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about 
+packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install
+ Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to
+ be presented to, and accepted by, the users of the Provisioning 
+Technology
+   in accordance with the Specification. By using Provisioning 
+Technology in such a manner and making it available in accordance with 
+the
+   Specification, you further acknowledge your agreement to, and the 
+acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in 
+which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, 
+extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology 
+may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user 
+the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable 
+Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable 
+Software Agreement must inform the user of the terms and conditions that
+ govern
+       the Installable Software and must solicit acceptance by the end 
+user in the manner prescribed in such Installable Software Agreement. 
+Upon such
+       indication of agreement by the user, the provisioning Technology 
+will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are
+ currently may have restrictions on the import, possession, and use, 
+and/or re-export to
+   another country, of encryption software. BEFORE using any encryption 
+software, please check the country's laws, regulations and policies 
+concerning the import,
+   possession, or use, and re-export of encryption software, to see if 
+this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+
+
+</body></html>
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tracing.rcp.product/pom.xml b/org.eclipse.linuxtools.tracing.rcp.product/pom.xml
new file mode 100644 (file)
index 0000000..36b338a
--- /dev/null
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <version>0.0.1-SNAPSHOT</version>
+    <artifactId>tracing</artifactId>
+    <packaging>eclipse-repository</packaging>
+    <name>Linux Tools Trace Viewer Product</name>
+
+    <parent>
+      <artifactId>linuxtools-lttng-parent</artifactId>
+      <groupId>org.eclipse.linuxtools.lttng</groupId>
+      <version>2.1.0-SNAPSHOT</version>
+    </parent>
+
+    <properties>
+        <productId>org.eclipse.linuxtools.tracing.rcp</productId>
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.eclipse.tycho</groupId>
+                <artifactId>tycho-p2-director-plugin</artifactId>
+                <version>${tycho-version}</version>
+                <executions>
+                    <execution>
+                        <id>materialize-products</id>
+                        <goals>
+                            <goal>materialize-products</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>archive-products</id>
+                        <goals>
+                            <goal>archive-products</goal>
+                        </goals>
+                        <configuration>
+                            <formats>
+                                <linux>tar.gz</linux>
+                                <solaris>zip</solaris>
+                                <win32>zip</win32>
+                            </formats>
+                        </configuration>
+                    </execution>
+                </executions>
+                <configuration>
+                    <products>
+                        <product>
+                            <archiveFileName>linuxtools-trace-viewer-${project.version}</archiveFileName>
+                            <id>${productId}</id>
+                            <rootFolder>eclipse</rootFolder>
+                        </product>
+                    </products>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <groupId>org.eclipse.linuxtools.tracing.rcp.product</groupId>
+</project>
diff --git a/org.eclipse.linuxtools.tracing.rcp.product/tracing.product b/org.eclipse.linuxtools.tracing.rcp.product/tracing.product
new file mode 100644 (file)
index 0000000..a8968ac
--- /dev/null
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product name="Linux Tools Trace Viewer" uid="org.eclipse.linuxtools.tracing.rcp" id="org.eclipse.linuxtools.tracing.rcp.ui.product" application="org.eclipse.linuxtools.tracing.rcp.ui.application" version="0.0.1.qualifier" useFeatures="true" includeLaunchers="true">
+
+   <aboutInfo>
+      <image path="/org.eclipse.linuxtools.tracing.rcp.ui/icons/alt_about.gif"/>
+      <text>
+         Linux Tools Trace Viewer
+
+Version: 0.0.1
+
+Copyright (c) 2013 Ericsson
+
+All rights reserved. This program and the accompanying materials are
+made available under the terms of the Eclipse Public License v1.0 which
+accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+      </text>
+   </aboutInfo>
+
+   <configIni use="default">
+   </configIni>
+
+   <launcherArgs>
+      <programArgs>--launcher.XXMaxPermSize 256m</programArgs>
+      <vmArgsLin>-Xms512m -Xmx1024m  -Dosgi.requiredJavaVersion=1.6</vmArgsLin>
+      <vmArgsMac>-Xms512m -Xmx1024m -XstartOnFirstThread -Dosgi.requiredJavaVersion=1.6 -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
+      <vmArgsSol>-Xms512m -Xmx1024m  -Dosgi.requiredJavaVersion=1.6</vmArgsSol>
+      <vmArgsWin>-Xms512m -Xmx1024m  -Dosgi.requiredJavaVersion=1.6</vmArgsWin>
+   </launcherArgs>
+
+   <windowImages i16="/org.eclipse.linuxtools.tracing.rcp.ui/icons/alt_window_16.gif" i32="/org.eclipse.linuxtools.tracing.rcp.ui/icons/alt_window_32.gif"/>
+
+
+   <launcher name="traceViewer">
+      <solaris/>
+      <win useIco="false">
+         <bmp/>
+      </win>
+   </launcher>
+
+
+   <vm>
+      <linux include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</linux>
+      <macos include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</macos>
+      <solaris include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</solaris>
+      <windows include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6</windows>
+   </vm>
+
+   <license>
+        <url>http://eclipse.org/legal/epl/notice.php</url>
+        <text>
+   Eclipse Foundation Software User Agreement
+February 1, 2011
+
+Usage Of Content
+
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY &amp;quot;CONTENT&amp;quot;).
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
+BELOW, THEN YOU MAY NOT USE THE CONTENT.
+
+Applicable Licenses
+
+Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 (&amp;quot;EPL&amp;quot;). A copy of the EPL is
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.
+For purposes of the EPL, &amp;quot;Program&amp;quot; will mean the Content.
+
+Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation source code
+repository (&amp;quot;Repository&amp;quot;) in software modules (&amp;quot;Modules&amp;quot;) and made available
+as downloadable archives (&amp;quot;Downloads&amp;quot;).
+
+      - Content may be structured and packaged into modules to facilitate delivering,
+         extending, and upgrading the Content. Typical modules may include plug-ins (&amp;quot;Plug-ins&amp;quot;),
+         plug-in fragments (&amp;quot;Fragments&amp;quot;), and features (&amp;quot;Features&amp;quot;).
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)
+         in a directory named &amp;quot;plugins&amp;quot;.
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.
+         Each Feature may be packaged as a sub-directory in a directory named &amp;quot;features&amp;quot;.
+         Within a Feature, files named &amp;quot;feature.xml&amp;quot; may contain a list of the names and version
+         numbers of the Plug-ins and/or Fragments associated with that Feature.
+       - Features may also include other Features (&amp;quot;Included Features&amp;quot;). Within a Feature, files
+         named &amp;quot;feature.xml&amp;quot; may contain a list of the names and version numbers of Included Features.
+
+The terms and conditions governing Plug-ins and Fragments should be
+contained in files named &amp;quot;about.html&amp;quot; (&amp;quot;Abouts&amp;quot;). The terms and
+conditions governing Features and Included Features should be contained
+in files named &amp;quot;license.html&amp;quot; (&amp;quot;Feature Licenses&amp;quot;). Abouts and Feature
+Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:
+
+       - The top-level (root) directory
+       - Plug-in and Fragment directories
+       - Inside Plug-ins and Fragments packaged as JARs
+       - Sub-directories of the directory named &amp;quot;src&amp;quot; of certain Plug-ins
+       - Feature directories
+
+Note: if a Feature made available by the Eclipse Foundation is installed using the
+Provisioning Technology (as defined below), you must agree to a license (&amp;quot;Feature 
+Update License&amp;quot;) during the installation process. If the Feature contains
+Included Features, the Feature Update License should either provide you
+with the terms and conditions governing the Included Features or inform
+you where you can locate them. Feature Update Licenses may be found in
+the &amp;quot;license&amp;quot; property of files named &amp;quot;feature.properties&amp;quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in that directory.
+
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):
+
+       - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)
+
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License
+is provided, please contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.
+
+Use of Provisioning Technology
+
+The Eclipse Foundation makes available provisioning software, examples of which include,
+but are not limited to, p2 and the Eclipse Update Manager (&amp;quot;Provisioning Technology&amp;quot;) for
+the purpose of allowing users to install software, documentation, information and/or
+other materials (collectively &amp;quot;Installable Software&amp;quot;). This capability is provided with
+the intent of allowing such users to install, extend and update Eclipse-based products.
+Information about packaging Installable Software is available at
+http://eclipse.org/equinox/p2/repository_packaging.html (&amp;quot;Specification&amp;quot;).
+
+You may use Provisioning Technology to allow other parties to install Installable Software.
+You shall be responsible for enabling the applicable license agreements relating to the
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+in accordance with the Specification. By using Provisioning Technology in such a manner and
+making it available in accordance with the Specification, you further acknowledge your
+agreement to, and the acquisition of all necessary rights to permit the following:
+
+       1. A series of actions may occur (&amp;quot;Provisioning Process&amp;quot;) in which a user may execute
+          the Provisioning Technology on a machine (&amp;quot;Target Machine&amp;quot;) with the intent of installing,
+          extending or updating the functionality of an Eclipse-based product.
+       2. During the Provisioning Process, the Provisioning Technology may cause third party
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that
+          govern the use of the Installable Software (&amp;quot;Installable Software Agreement&amp;quot;) and such
+          Installable Software Agreement shall be accessed from the Target Machine in accordance
+          with the Specification. Such Installable Software Agreement must inform the user of the
+          terms and conditions that govern the Installable Software and must solicit acceptance by
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such
+          indication of agreement by the user, the provisioning Technology will complete installation
+          of the Installable Software.
+
+Cryptography
+
+Content may contain encryption software. The country in which you are
+currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country&amp;apos;s laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.
+
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.
+         </text>
+   </license>
+
+   <plugins>
+   </plugins>
+
+   <features>
+      <feature id="org.eclipse.linuxtools.tracing.rcp"/>
+      <feature id="org.eclipse.linuxtools.lttng2.kernel"/>
+      <feature id="org.eclipse.linuxtools.lttng2"/>
+      <feature id="org.eclipse.linuxtools.tmf"/>
+      <feature id="org.eclipse.linuxtools.ctf"/>
+      <feature id="org.eclipse.e4.rcp"/>
+      <feature id="org.eclipse.rse.ssh"/>
+      <feature id="org.eclipse.rse.core"/>
+      <feature id="org.eclipse.rse.ftp"/>
+      <feature id="org.eclipse.rse.local"/>
+      <feature id="org.eclipse.rse.dstore"/>
+      <feature id="org.eclipse.rse.telnet"/>
+      <feature id="org.eclipse.tm.terminal"/>
+      <feature id="org.eclipse.emf.ecore"/>
+      <feature id="org.eclipse.rse"/>
+      <feature id="org.eclipse.emf.common"/>
+      <feature id="org.eclipse.rse.terminals"/>
+      <feature id="org.eclipse.help"/>
+   </features>
+
+   <configurations>
+      <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4" />
+      <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
+      <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="1" />
+      <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
+      <plugin id="org.eclipse.linuxtools.tracing.rcp.ui" autoStart="false" startLevel="5" />
+      <plugin id="org.eclipse.osgi" autoStart="true" startLevel="-1" />
+      <plugin id="org.eclipse.update.configurator" autoStart="true" startLevel="3" />
+   </configurations>
+
+</product>
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/.classpath b/org.eclipse.linuxtools.tracing.rcp.ui/.classpath
new file mode 100644 (file)
index 0000000..ad32c83
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/.gitignore b/org.eclipse.linuxtools.tracing.rcp.ui/.gitignore
new file mode 100644 (file)
index 0000000..fb60f67
--- /dev/null
@@ -0,0 +1,2 @@
+bin/
+target/
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/.project b/org.eclipse.linuxtools.tracing.rcp.ui/.project
new file mode 100644 (file)
index 0000000..7e5c960
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.linuxtools.tracing.rcp.ui</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/.settings/org.eclipse.core.resources.prefs b/org.eclipse.linuxtools.tracing.rcp.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100644 (file)
index 0000000..99f26c0
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.linuxtools.tracing.rcp.ui/.settings/org.eclipse.core.runtime.prefs
new file mode 100644 (file)
index 0000000..5a0ad22
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.linuxtools.tracing.rcp.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..bca8c27
--- /dev/null
@@ -0,0 +1,389 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.linuxtools.tracing.rcp.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644 (file)
index 0000000..4fd0c70
--- /dev/null
@@ -0,0 +1,56 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/.settings/org.eclipse.pde.prefs b/org.eclipse.linuxtools.tracing.rcp.ui/.settings/org.eclipse.pde.prefs
new file mode 100644 (file)
index 0000000..97b4320
--- /dev/null
@@ -0,0 +1,32 @@
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/META-INF/MANIFEST.MF b/org.eclipse.linuxtools.tracing.rcp.ui/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..18277c0
--- /dev/null
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 0.0.1.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.linuxtools.tracing.rcp.ui;singleton:=true
+Bundle-Activator: org.eclipse.linuxtools.internal.tracing.rcp.ui.TracingRcpPlugin
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.tmf.ui;bundle-version="2.0.0",
+ org.eclipse.linuxtools.tmf.core;bundle-version="2.0.0",
+ org.eclipse.core.resources,
+ org.eclipse.ui.ide,
+ org.eclipse.update.configurator;bundle-version="3.3.200",
+ org.eclipse.equinox.p2.ui.sdk;bundle-version="1.0.300"
+Export-Package: org.eclipse.linuxtools.internal.tracing.rcp.ui;x-internal:=true,
+ org.eclipse.linuxtools.internal.tracing.rcp.ui.messages;x-internal:=true
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/about.html b/org.eclipse.linuxtools.tracing.rcp.ui/about.html
new file mode 100644 (file)
index 0000000..a01ee84
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>    
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/about.ini b/org.eclipse.linuxtools.tracing.rcp.ui/about.ini
new file mode 100644 (file)
index 0000000..6443de8
--- /dev/null
@@ -0,0 +1,32 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=icons/alt_window_32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+aboutImage=icons/alt_about.gif
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+
+
+
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/about.properties b/org.eclipse.linuxtools.tracing.rcp.ui/about.properties
new file mode 100644 (file)
index 0000000..9b4399d
--- /dev/null
@@ -0,0 +1,28 @@
+###############################################################################
+# Copyright (c) 2013 Ericsson
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Bernd Hufmann - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=Linux Tools Trace Viewer\n\
+\n\
+Version: {featureVersion}\n\
+\n\
+Copyright (c) 2013 Ericsson\n\
+\n\
+All rights reserved. This program and the accompanying materials are\n\
+made available under the terms of the Eclipse Public License v1.0 which\n\
+accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+
+#Build id: {0}\n\
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/build.properties b/org.eclipse.linuxtools.tracing.rcp.ui/build.properties
new file mode 100644 (file)
index 0000000..0b8a238
--- /dev/null
@@ -0,0 +1,12 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+               META-INF/,\
+               .,\
+               plugin.properties,\
+               icons/,\
+               about.html,\
+               plugin_customization.ini,\
+               about.ini,\
+               about.properties
+src.includes = about.html
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/icons/alt_about.gif b/org.eclipse.linuxtools.tracing.rcp.ui/icons/alt_about.gif
new file mode 100644 (file)
index 0000000..20d9ad2
Binary files /dev/null and b/org.eclipse.linuxtools.tracing.rcp.ui/icons/alt_about.gif differ
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/icons/alt_window_16.gif b/org.eclipse.linuxtools.tracing.rcp.ui/icons/alt_window_16.gif
new file mode 100644 (file)
index 0000000..05626b1
Binary files /dev/null and b/org.eclipse.linuxtools.tracing.rcp.ui/icons/alt_window_16.gif differ
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/icons/alt_window_32.gif b/org.eclipse.linuxtools.tracing.rcp.ui/icons/alt_window_32.gif
new file mode 100644 (file)
index 0000000..b432f88
Binary files /dev/null and b/org.eclipse.linuxtools.tracing.rcp.ui/icons/alt_window_32.gif differ
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/license.html b/org.eclipse.linuxtools.tracing.rcp.ui/license.html
new file mode 100644 (file)
index 0000000..6e579a5
--- /dev/null
@@ -0,0 +1,164 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+   (COLLECTIVELY "CONTENT").  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the 
+Eclipse Public License Version 1.0
+   ("EPL").  A copy of the EPL is provided with this Content and is also
+ available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+   For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, 
+documentation and other files maintained in the Eclipse Foundation 
+source code
+   repository ("Repository") in software modules ("Modules") and made 
+available as downloadable archives ("Downloads").</p>
+
+<ul>
+       <li>Content may be structured and packaged into modules to 
+facilitate delivering, extending, and upgrading the Content.  Typical 
+modules may include plug-ins ("Plug-ins"), plug-in fragments 
+("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or 
+Fragments and associated material.  Each Feature may be packaged as a 
+sub-directory in a directory named "features".  Within a Feature, files 
+named "feature.xml" may contain a list of the names and version numbers 
+of the Plug-ins
+      and/or Fragments associated with that Feature.</li>
+       <li>Features may also include other Features ("Included 
+Features"). Within a Feature, files named "feature.xml" may contain a 
+list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be 
+contained in files named "about.html" ("Abouts"). The terms and 
+conditions governing Features and
+Included Features should be contained in files named "license.html" 
+("Feature Licenses").  Abouts and Feature Licenses may be located in any
+ directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is 
+installed using the Provisioning Technology (as defined below), you must
+ agree to a license ("Feature Update License") during the
+installation process.  If the Feature contains Included Features, the 
+Feature Update License should either provide you with the terms and 
+conditions governing the Included Features or
+inform you where you can locate them.  Feature Update Licenses may be 
+found in the "license" property of files named "feature.properties" 
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the 
+terms and conditions (or references to such terms and conditions) that 
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER 
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+  SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+       <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND 
+CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, 
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions 
+govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, 
+examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of 
+allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This 
+capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about 
+packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install
+ Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to
+ be presented to, and accepted by, the users of the Provisioning 
+Technology
+   in accordance with the Specification. By using Provisioning 
+Technology in such a manner and making it available in accordance with 
+the
+   Specification, you further acknowledge your agreement to, and the 
+acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in 
+which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, 
+extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology 
+may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user 
+the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable 
+Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable 
+Software Agreement must inform the user of the terms and conditions that
+ govern
+       the Installable Software and must solicit acceptance by the end 
+user in the manner prescribed in such Installable Software Agreement. 
+Upon such
+       indication of agreement by the user, the provisioning Technology 
+will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are
+ currently may have restrictions on the import, possession, and use, 
+and/or re-export to
+   another country, of encryption software. BEFORE using any encryption 
+software, please check the country's laws, regulations and policies 
+concerning the import,
+   possession, or use, and re-export of encryption software, to see if 
+this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+
+
+</body></html>
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/plugin.properties b/org.eclipse.linuxtools.tracing.rcp.ui/plugin.properties
new file mode 100644 (file)
index 0000000..1ae88f8
--- /dev/null
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2013 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Bernd Hufmann - Initial API and implementation
+###############################################################################
+
+#Properties file for org.eclipse.linuxtools.tracing.rcp.ui
+Bundle-Vendor = Eclipse Linux Tools
+Bundle-Name = Linux Tools Trace Viewer UI Plug-in
+
+menu.main.file = File
+menu.main.window = Window
+menu.main.help = Help
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/plugin.xml b/org.eclipse.linuxtools.tracing.rcp.ui/plugin.xml
new file mode 100644 (file)
index 0000000..b6b19f9
--- /dev/null
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+   <extension
+         id="application"
+         point="org.eclipse.core.runtime.applications">
+      <application>org.eclipse.linuxtools.tracing.rcp.product
+         <run
+               class="org.eclipse.linuxtools.internal.tracing.rcp.ui.Application">
+         </run>
+      </application>
+   </extension>
+   
+      <extension
+         id="product"
+         point="org.eclipse.core.runtime.products">
+      <product
+            application="org.eclipse.linuxtools.tracing.rcp.ui.application"
+            name="Linux Tools Trace Viewer">
+            <property
+               name="appName"
+               value="Linux Tools Trace Viewer">
+            </property>
+            <property
+               name="cssTheme"
+               value="org.eclipse.e4.ui.css.theme.e4_default">
+            </property>
+            
+            <property
+               name="preferenceCustomization"
+               value="plugin_customization.ini">
+            </property>
+            <property
+                  name="aboutImage"
+                  value="icons/alt_about.gif">
+            </property>
+            <property
+                  name="aboutText"
+                  value="Linux Tools Trace Viewer&#x0A;&#x0A;Version: 0.0.1&#x0A;&#x0A;Copyright (c) 2013 Ericsson&#x0A;&#x0A;All rights reserved. This program and the accompanying materials are&#x0A;made available under the terms of the Eclipse Public License v1.0 which&#x0A;accompanies this distribution, and is available at&#x0A;http://www.eclipse.org/legal/epl-v10.html">
+            </property>
+            <property
+                  name="windowImages"
+                  value="icons/alt_window_16.gif,icons/alt_window_32.gif">
+            </property>
+      </product>
+   </extension>
+   
+   -->
+   <extension point="org.eclipse.ui.activities">
+      <activity name="Tracine RCP"                    id="org.eclipse.linuxtools.internal.tracing.rcp.ui"      description="Tracing RCP" />
+      <activity name="Unwanted Java Perspective"      id="org.eclipse.unwantedJavaPerspective"     description="" />
+      <activity name="Unwanted Team Perspective"      id="org.eclipse.unwantedTeamPerspective"     description="" />
+      <activity name="Unwanted Debug Perspective"     id="org.eclipse.unwantedDebugPerspective"    description="" />
+      <activity name="Unwanted PluginDev Perspective" id="org.eclipse.unwantedPluginDevPerspective" description="" />      
+      <activity name="Unwanted Resource Perspective"  id="org.eclipse.unwantedResourcePerspective"  description="" />
+      <activity name="Unwanted Search Perspective"  id="org.eclipse.unwantedSearch"  description="" />
+      <activityPatternBinding activityId="org.eclipse.linuxtools.internal.tracing.rcp.ui"      pattern="org\.eclipse\.linuxtools.*" />
+      <activityPatternBinding activityId="org.eclipse.unwantedJavaPerspective"     pattern="org\.eclipse\.jdt.*" />
+      <activityPatternBinding activityId="org.eclipse.unwantedTeamPerspective"     pattern="org\.eclipse\.team.*" />
+      <activityPatternBinding activityId="org.eclipse.unwantedDebugPerspective"    pattern="org\.eclipse\.debug.*" />
+      <activityPatternBinding activityId="org.eclipse.unwantedSearch" pattern="org\.eclipse\.search.*" />
+      <activityPatternBinding activityId="org.eclipse.unwantedResourcePerspective"  pattern="org\.eclipse\.ui\.[r]*" />
+      <defaultEnablement id="org.eclipse.linuxtools.internal.tracing.rcp.ui" />
+   </extension>
+   <extension
+         point="org.eclipse.ui.menus">
+      <menuContribution
+            allPopups="false"
+            locationURI="menu:org.eclipse.ui.main.menu">
+         <menu
+               id="org.eclipse.linuxtools.tracing.rcp.ui.menuFile"
+               label="%menu.main.file"
+               mnemonic="F">
+            <command
+                  commandId="org.eclipse.ui.file.restartWorkbench"
+                  style="push">
+            </command>
+            <separator
+                  name="org.eclipse.linuxtools.tracing.rcp.ui.separator4"
+                  visible="true">
+            </separator>
+            <command
+                  commandId="org.eclipse.ui.file.exit"
+                  style="push">
+            </command>
+         </menu>
+      </menuContribution>
+      <menuContribution
+            allPopups="false"
+            locationURI="menu:org.eclipse.ui.main.menu">
+         <menu
+               id="org.eclipse.linuxtools.tracing.rcp.ui.menuWindow"
+               label="%menu.main.window">
+            <command
+                  commandId="org.eclipse.ui.perspectives.showPerspective"
+                  style="push">
+            </command>
+            <command
+                  commandId="org.eclipse.ui.views.showView"
+                  style="push">
+            </command>
+            <separator
+                  name="org.eclipse.linuxtools.tracing.rcp.ui.separator1"
+                  visible="true">
+            </separator>
+            <command
+                  commandId="org.eclipse.ui.window.savePerspective"
+                  style="push">
+            </command>
+            <command
+                  commandId="org.eclipse.ui.window.resetPerspective"
+                  style="push">
+            </command>
+            <separator
+                  name="org.eclipse.linuxtools.tracing.rcp.ui.separator2"
+                  visible="true">
+            </separator>
+            <command
+                  commandId="org.eclipse.ui.window.preferences"
+                  style="push">
+            </command>
+         </menu>
+      </menuContribution>
+      <menuContribution
+            allPopups="false"
+            locationURI="menu:org.eclipse.ui.main.menu">
+         <menu
+               id="org.eclipse.linuxtools.tracing.rcp.ui.menuhelp"
+               label="%menu.main.help"
+               mnemonic="H">
+            <command
+                  commandId="org.eclipse.ui.help.helpContents"
+                  style="push">
+            </command>
+            <command
+                  commandId="org.eclipse.equinox.p2.ui.sdk.install"
+                  style="push">
+            </command>
+            <separator
+                  name="org.eclipse.linuxtools.tracing.rcp.ui.separator3"
+                  visible="true">
+            </separator>
+            <command
+                  commandId="org.eclipse.ui.help.aboutAction"
+                  style="push">
+            </command>
+         </menu>
+      </menuContribution>
+   </extension>
+
+</plugin>
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/plugin_customization.ini b/org.eclipse.linuxtools.tracing.rcp.ui/plugin_customization.ini
new file mode 100644 (file)
index 0000000..cdc17a1
--- /dev/null
@@ -0,0 +1,2 @@
+org.eclipse.e4.ui.css.swt.theme/themeid=org.eclipse.e4.ui.css.theme.e4_default
+org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = false
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/pom.xml b/org.eclipse.linuxtools.tracing.rcp.ui/pom.xml
new file mode 100644 (file)
index 0000000..8b3aefe
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <version>0.0.1-SNAPSHOT</version>
+    <artifactId>org.eclipse.linuxtools.tracing.rcp.ui</artifactId>
+    <groupId>org.eclipse.linuxtools.tracing.rcp.ui</groupId>
+
+    <name>Linux Tools Trace Viewer UI Plug-in</name>
+
+    <parent>
+      <artifactId>linuxtools-lttng-parent</artifactId>
+      <groupId>org.eclipse.linuxtools.lttng</groupId>
+      <version>2.1.0-SNAPSHOT</version>
+    </parent>
+
+    <properties>
+        <productId>org.eclipse.linuxtools.tracing.rcp.ui.product</productId>
+    </properties>
+
+ <build>
+     <resources>
+      <resource>
+        <directory>src</directory>
+        <excludes>
+          <exclude>**/*.java</exclude>
+        </excludes>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.eclipse.tycho</groupId>
+        <artifactId>tycho-source-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/Application.java b/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/Application.java
new file mode 100644 (file)
index 0000000..f3c8afa
--- /dev/null
@@ -0,0 +1,56 @@
+/**********************************************************************
+ * Copyright (c) 2013 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.tracing.rcp.ui;
+
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.app.IApplicationContext;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * This class controls all aspects of the application's execution
+ * @author Bernd Hufmann
+ */
+public class Application implements IApplication {
+
+    @Override
+    public Object start(IApplicationContext context) throws Exception {
+        Display display = PlatformUI.createDisplay();
+        try {
+            int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
+            if (returnCode == PlatformUI.RETURN_RESTART) {
+                return IApplication.EXIT_RESTART;
+            }
+            return IApplication.EXIT_OK;
+        } finally {
+            display.dispose();
+        }
+    }
+
+    @Override
+    public void stop() {
+        if (!PlatformUI.isWorkbenchRunning()) {
+            return;
+        }
+        final IWorkbench workbench = PlatformUI.getWorkbench();
+        final Display display = workbench.getDisplay();
+        display.syncExec(new Runnable() {
+            @Override
+            public void run() {
+                if (!display.isDisposed()) {
+                    workbench.close();
+                }
+            }
+        });
+    }
+}
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/ApplicationActionBarAdvisor.java b/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/ApplicationActionBarAdvisor.java
new file mode 100644 (file)
index 0000000..1e3806a
--- /dev/null
@@ -0,0 +1,38 @@
+/**********************************************************************
+ * Copyright (c) 2013 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.tracing.rcp.ui;
+
+import org.eclipse.ui.application.ActionBarAdvisor;
+import org.eclipse.ui.application.IActionBarConfigurer;
+
+/**
+ * ActionBarAdvisor implementation of the LTTng RCP.
+ *
+ * @author Bernd Hufmann
+ *
+ */
+public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
+
+    // ------------------------------------------------------------------------
+    // Constructor(s)
+    // ------------------------------------------------------------------------
+    /**
+     * Default constructor
+     *
+     * @param configurer
+     *          - An action bar configure instance
+     */
+    public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
+        super(configurer);
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/ApplicationWorkbenchAdvisor.java b/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/ApplicationWorkbenchAdvisor.java
new file mode 100644 (file)
index 0000000..3f26174
--- /dev/null
@@ -0,0 +1,202 @@
+/**********************************************************************
+ * Copyright (c) 2013 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.tracing.rcp.ui;
+
+import java.net.URL;
+
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.application.IWorkbenchConfigurer;
+import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
+import org.eclipse.ui.application.WorkbenchAdvisor;
+import org.eclipse.ui.application.WorkbenchWindowAdvisor;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.osgi.framework.Bundle;
+
+
+/**
+ * WorkbenchAdvisor implementation of the LTTng RCP.
+ *
+ * @author Bernd Hufmann
+ */
+@SuppressWarnings("restriction")
+public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
+
+    // ------------------------------------------------------------------------
+    // Constants
+    // ------------------------------------------------------------------------
+    // The default perspective
+    private static final String PERSPECTIVE_ID = "org.eclipse.linuxtools.lttng2.kernel.ui.perspective"; //$NON-NLS-1$
+
+
+    private final static String ICONS_PATH = "$nl$/icons/full/"; //$NON-NLS-1$
+    private final static String PATH_ELOCALTOOL = ICONS_PATH + "elcl16/"; //$NON-NLS-1$
+    private final static String PATH_DLOCALTOOL = ICONS_PATH + "dlcl16/"; //$NON-NLS-1$
+    private final static String PATH_ETOOL = ICONS_PATH + "etool16/"; //$NON-NLS-1$
+    private final static String PATH_DTOOL = ICONS_PATH + "dtool16/"; //$NON-NLS-1$
+    private final static String PATH_OBJECT = ICONS_PATH + "obj16/"; //$NON-NLS-1$
+    private final static String PATH_WIZBAN = ICONS_PATH + "wizban/";//$NON-NLS-1$
+
+    // ------------------------------------------------------------------------
+    // Operations
+    // ------------------------------------------------------------------------
+    @Override
+    public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
+        return new ApplicationWorkbenchWindowAdvisor(configurer);
+    }
+
+    @Override
+    public void initialize(IWorkbenchConfigurer configurer) {
+        configurer.setSaveAndRestore(true);
+        declareWorkbenchImages();
+    }
+
+    @Override
+    public String getInitialWindowPerspectiveId() {
+        return PERSPECTIVE_ID;
+    }
+
+    @Override
+    public IAdaptable getDefaultPageInput() {
+        IWorkspace workspace = ResourcesPlugin.getWorkspace();
+        return workspace.getRoot();
+    }
+
+    @Override
+    public void preStartup() {
+        IDE.registerAdapters();
+    }
+
+    // ------------------------------------------------------------------------
+    // Helper methods
+    // ------------------------------------------------------------------------
+    private void declareWorkbenchImages() {
+
+        Bundle ideBundle = Platform.getBundle(IDEWorkbenchPlugin.IDE_WORKBENCH);
+
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC,
+                PATH_ETOOL + "build_exec.gif", false); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC_HOVER,
+                PATH_ETOOL + "build_exec.gif", false); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC_DISABLED,
+                PATH_DTOOL + "build_exec.gif", false); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_ETOOL_SEARCH_SRC,
+                PATH_ETOOL + "search_src.gif", false); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_ETOOL_SEARCH_SRC_HOVER,
+                PATH_ETOOL + "search_src.gif", false); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_ETOOL_SEARCH_SRC_DISABLED,
+                PATH_DTOOL + "search_src.gif", false); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_ETOOL_NEXT_NAV, PATH_ETOOL
+                + "next_nav.gif", false); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_ETOOL_PREVIOUS_NAV,
+                PATH_ETOOL + "prev_nav.gif", false); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_WIZBAN_NEWPRJ_WIZ,
+                PATH_WIZBAN + "newprj_wiz.png", false); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_WIZBAN_NEWFOLDER_WIZ,
+                PATH_WIZBAN + "newfolder_wiz.png", false); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_WIZBAN_NEWFILE_WIZ,
+                PATH_WIZBAN + "newfile_wiz.png", false); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_WIZBAN_IMPORTDIR_WIZ,
+                PATH_WIZBAN + "importdir_wiz.png", false); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_WIZBAN_IMPORTZIP_WIZ,
+                PATH_WIZBAN + "importzip_wiz.png", false); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_WIZBAN_EXPORTDIR_WIZ,
+                PATH_WIZBAN + "exportdir_wiz.png", false); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_WIZBAN_EXPORTZIP_WIZ,
+                PATH_WIZBAN + "exportzip_wiz.png", false); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle,
+                IDEInternalWorkbenchImages.IMG_WIZBAN_RESOURCEWORKINGSET_WIZ, PATH_WIZBAN
+                + "workset_wiz.png", false); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_DLGBAN_SAVEAS_DLG,
+                PATH_WIZBAN + "saveas_wiz.png", false); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_DLGBAN_QUICKFIX_DLG,
+                PATH_WIZBAN + "quick_fix.png", false); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle, IDE.SharedImages.IMG_OBJ_PROJECT, PATH_OBJECT
+                + "prj_obj.gif", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED, PATH_OBJECT
+                + "cprj_obj.gif", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDE.SharedImages.IMG_OPEN_MARKER, PATH_ELOCALTOOL
+                + "gotoobj_tsk.gif", true); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_ELCL_QUICK_FIX_ENABLED,
+                PATH_ELOCALTOOL + "smartmode_co.gif", true); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_DLCL_QUICK_FIX_DISABLED,
+                PATH_DLOCALTOOL + "smartmode_co.gif", true); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle, IDE.SharedImages.IMG_OBJS_TASK_TSK, PATH_OBJECT
+                + "taskmrk_tsk.gif", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDE.SharedImages.IMG_OBJS_BKMRK_TSK, PATH_OBJECT
+                + "bkmrk_tsk.gif", true); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_OBJS_COMPLETE_TSK,
+                PATH_OBJECT + "complete_tsk.gif", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_OBJS_INCOMPLETE_TSK,
+                PATH_OBJECT + "incomplete_tsk.gif", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_OBJS_WELCOME_ITEM,
+                PATH_OBJECT + "welcome_item.gif", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_OBJS_WELCOME_BANNER,
+                PATH_OBJECT + "welcome_banner.gif", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_OBJS_ERROR_PATH,
+                PATH_OBJECT + "error_tsk.gif", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_OBJS_WARNING_PATH,
+                PATH_OBJECT + "warn_tsk.gif", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_OBJS_INFO_PATH, PATH_OBJECT
+                + "info_tsk.gif", true); //$NON-NLS-1$
+
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_LCL_FLAT_LAYOUT,
+                PATH_ELOCALTOOL + "flatLayout.gif", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_LCL_HIERARCHICAL_LAYOUT,
+                PATH_ELOCALTOOL + "hierarchicalLayout.gif", true); //$NON-NLS-1$
+        declareWorkbenchImage(ideBundle, IDEInternalWorkbenchImages.IMG_ETOOL_PROBLEM_CATEGORY,
+                PATH_ETOOL + "problem_category.gif", true); //$NON-NLS-1$
+    }
+
+    /**
+     * Declares an IDE-specific workbench image.
+     *
+     * Declares all IDE-specific workbench images. This includes both "shared"
+     * images (named in ( @link IDE.SharedImages} ) and internal images (named in
+     * {@link org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages}).
+     *
+     * @param symbolicName
+     *            the symbolic name of the image
+     * @param path
+     *            the path of the image file; this path is relative to the base
+     *            of the IDE plug-in
+     * @param shared
+     *            <code>true</code> if this is a shared image, and
+     *            <code>false</code> if this is not a shared image
+     */
+    private void declareWorkbenchImage(Bundle ideBundle, String symbolicName, String path, boolean shared) {
+        URL url = FileLocator.find(ideBundle, new Path(path), null);
+        ImageDescriptor desc = ImageDescriptor.createFromURL(url);
+        getWorkbenchConfigurer().declareImage(symbolicName, desc, shared);
+    }
+}
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/ApplicationWorkbenchWindowAdvisor.java b/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/ApplicationWorkbenchWindowAdvisor.java
new file mode 100644 (file)
index 0000000..88a5e8f
--- /dev/null
@@ -0,0 +1,144 @@
+/**********************************************************************
+ * Copyright (c) 2013 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.tracing.rcp.ui;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.linuxtools.internal.tracing.rcp.ui.messages.Messages;
+import org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectRegistry;
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.IPerspectiveListener;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.application.ActionBarAdvisor;
+import org.eclipse.ui.application.IActionBarConfigurer;
+import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
+import org.eclipse.ui.application.WorkbenchWindowAdvisor;
+
+/**
+ * The WorkbenchAdvisor implementation of the LTTng RCP.
+ *
+ * @author Bernd Hufmann
+ */
+public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
+
+    // ------------------------------------------------------------------------
+    // Constants
+    // ------------------------------------------------------------------------
+    @SuppressWarnings("nls")
+    private static final String[] UNWANTED_ACTION_SET = {
+        "org.eclipse.search.searchActionSet",
+        "org.eclipse.rse.core.search.searchActionSet",
+        "org.eclipse.debug.ui.launchActionSet",
+        "org.eclipse.debug.ui.debugActionSet",
+        "org.eclipse.debug.ui.breakpointActionSet",
+        "org.eclipse.team.ui",
+        "org.eclipse.ui.externaltools.ExternalToolsSet",
+//        "org.eclipse.update.ui.softwareUpdates",
+//        "org.eclipse.ui.edit.text.actionSet.navigation",
+//        "org.eclipse.ui.actionSet.keyBindings",
+//        "org.eclipse.ui.edit.text.actionSet.navigation",
+        "org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo",
+//        "org.eclipse.ui.edit.text.actionSet.annotationNavigation",
+//        "org.eclipse.ui.NavigateActionSet",
+//        "org.eclipse.jdt.ui.JavaActionSet",
+//        "org.eclipse.jdt.ui.A_OpenActionSet",
+//        "org.eclipse.jdt.ui.text.java.actionSet.presentation",
+//        "org.eclipse.jdt.ui.JavaElementCreationActionSet",
+//        "org.eclipse.jdt.ui.CodingActionSet",
+//        "org.eclipse.jdt.ui.SearchActionSet",
+//        "org.eclipse.jdt.debug.ui.JDTDebugActionSet",
+        "org.eclipse.ui.edit.text.actionSet.openExternalFile",
+//        "org.eclipse.debug.ui.profileActionSet"
+    };
+
+
+    // ------------------------------------------------------------------------
+    // Constructors
+    // ------------------------------------------------------------------------
+
+    /**
+     * Standard constructor
+     * @param configurer
+     *              - the workbench window configurer
+     */
+    public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
+        super(configurer);
+    }
+
+    // ------------------------------------------------------------------------
+    // Operations
+    // ------------------------------------------------------------------------
+    @Override
+    public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
+        return new ApplicationActionBarAdvisor(configurer);
+    }
+
+    @Override
+    public void preWindowOpen() {
+        IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
+        configurer.setShowCoolBar(false);
+        configurer.setShowStatusLine(true);
+        configurer.setShowProgressIndicator(true);
+        configurer.setTitle(Messages.ApplicationWorkbenchWindowAdvisor_WindowTitle);
+    }
+
+    @Override
+    public void postWindowCreate() {
+        super.postWindowOpen();
+        TracingRcpPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().addPerspectiveListener(new PerspectiveListener());
+        createDefaultProject();
+        hideActionSets();
+    }
+
+    // ------------------------------------------------------------------------
+    // Helper methods
+    // ------------------------------------------------------------------------
+
+    /**
+     * Hides the unwanted action sets
+     */
+    private static void hideActionSets() {
+
+        IWorkbenchPage page = TracingRcpPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
+
+        for (int i = 0; i < UNWANTED_ACTION_SET.length; i++) {
+            page.hideActionSet(UNWANTED_ACTION_SET[i]);
+        }
+    }
+
+    private static void createDefaultProject() {
+        TmfProjectRegistry.createProject(Messages.ApplicationWorkbenchWindowAdvisor_DefaultProjectName, null, new NullProgressMonitor());
+    }
+
+    /**
+     *  A perspective listener implementation
+     *  @author Bernd Hufmann
+     */
+    public class PerspectiveListener implements IPerspectiveListener {
+
+        /**
+         *  Default Constructor
+         */
+        public PerspectiveListener() {
+        }
+
+        @Override
+        public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) {
+            createDefaultProject();
+            hideActionSets();
+        }
+
+        @Override
+        public void perspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId) {
+        }
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/TracingRcpPlugin.java b/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/TracingRcpPlugin.java
new file mode 100644 (file)
index 0000000..4d8bfcb
--- /dev/null
@@ -0,0 +1,86 @@
+/**********************************************************************
+ * Copyright (c) 2013 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.tracing.rcp.ui;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ *
+ * @author Bernd Hufmann
+ */
+public class TracingRcpPlugin extends AbstractUIPlugin {
+
+    // ------------------------------------------------------------------------
+    // Constants
+    // ------------------------------------------------------------------------
+    /**
+     * The plug-in ID
+     */
+    public static final String PLUGIN_ID = "org.eclipse.linuxtools.tracing.rcp.ui"; //$NON-NLS-1$
+
+    // ------------------------------------------------------------------------
+    // Attributes
+    // ------------------------------------------------------------------------
+
+    // The shared instance
+    private static TracingRcpPlugin fPlugin;
+
+    // ------------------------------------------------------------------------
+    // Constructor(s)
+    // ------------------------------------------------------------------------
+    /**
+     * The default constructor
+     */
+    public TracingRcpPlugin() {
+    }
+
+    // ------------------------------------------------------------------------
+    // Accessors
+    // ------------------------------------------------------------------------
+    /**
+     * Returns the shared instance
+     *
+     * @return the shared instance
+     */
+    public static TracingRcpPlugin getDefault() {
+        return fPlugin;
+    }
+
+    // ------------------------------------------------------------------------
+    // Operation
+    // ------------------------------------------------------------------------
+    @Override
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        fPlugin = this;
+        }
+
+    @Override
+    public void stop(BundleContext context) throws Exception {
+        fPlugin = null;
+        super.stop(context);
+}
+
+    /**
+     * Returns an image descriptor for the image file at the given
+     * plug-in relative path
+     *
+     * @param path the path
+     * @return the image descriptor
+     */
+    public static ImageDescriptor getImageDescriptor(String path) {
+        return imageDescriptorFromPlugin(PLUGIN_ID, path);
+    }
+}
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/messages/Messages.java b/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/messages/Messages.java
new file mode 100644 (file)
index 0000000..a5ac2f9
--- /dev/null
@@ -0,0 +1,36 @@
+/**********************************************************************
+ * Copyright (c) 2013 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.tracing.rcp.ui.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Messages file for the tracing RCP.
+ *
+ * @author Bernd Hufmann
+ */
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.tracing.rcp.ui.messages.messages"; //$NON-NLS-1$
+
+    /** The name of the default tracing project. */
+    public static String ApplicationWorkbenchWindowAdvisor_DefaultProjectName;
+    /** The RCP title. */
+    public static String ApplicationWorkbenchWindowAdvisor_WindowTitle;
+
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/messages/messages.properties b/org.eclipse.linuxtools.tracing.rcp.ui/src/org/eclipse/linuxtools/internal/tracing/rcp/ui/messages/messages.properties
new file mode 100644 (file)
index 0000000..0706d39
--- /dev/null
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2013 Ericsson.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Bernd Hufmann - initial API and implementation
+###############################################################################
+ApplicationWorkbenchWindowAdvisor_DefaultProjectName=Tracing
+ApplicationWorkbenchWindowAdvisor_WindowTitle=Trace Viewer
diff --git a/org.eclipse.linuxtools.tracing.rcp/.gitignore b/org.eclipse.linuxtools.tracing.rcp/.gitignore
new file mode 100644 (file)
index 0000000..fb60f67
--- /dev/null
@@ -0,0 +1,2 @@
+bin/
+target/
diff --git a/org.eclipse.linuxtools.tracing.rcp/.project b/org.eclipse.linuxtools.tracing.rcp/.project
new file mode 100644 (file)
index 0000000..97b38e4
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.linuxtools.tracing.rcp</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.FeatureBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.FeatureNature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.eclipse.linuxtools.tracing.rcp/.settings/org.eclipse.core.resources.prefs b/org.eclipse.linuxtools.tracing.rcp/.settings/org.eclipse.core.resources.prefs
new file mode 100644 (file)
index 0000000..99f26c0
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.linuxtools.tracing.rcp/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.linuxtools.tracing.rcp/.settings/org.eclipse.core.runtime.prefs
new file mode 100644 (file)
index 0000000..5a0ad22
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.linuxtools.tracing.rcp/build.properties b/org.eclipse.linuxtools.tracing.rcp/build.properties
new file mode 100644 (file)
index 0000000..4e03467
--- /dev/null
@@ -0,0 +1,5 @@
+bin.includes = feature.xml,\
+               feature.properties,\
+               epl-v10.html,\
+               license.html,\
+               p2.inf
diff --git a/org.eclipse.linuxtools.tracing.rcp/epl-v10.html b/org.eclipse.linuxtools.tracing.rcp/epl-v10.html
new file mode 100644 (file)
index 0000000..9321f40
--- /dev/null
@@ -0,0 +1,256 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
+
+<style type="text/css">
+  body {
+    size: 8.5in 11.0in;
+    margin: 0.25in 0.5in 0.25in 0.5in;
+    tab-interval: 0.5in;
+    }
+  p {          
+    margin-left: auto;
+    margin-top:  0.5em;
+    margin-bottom: 0.5em;
+    }
+  p.list {
+       margin-left: 0.5in;
+    margin-top:  0.05em;
+    margin-bottom: 0.05em;
+    }
+  </style></head><body lang="EN-US">
+
+<p align="center"><b>Eclipse Public License - v 1.0</b></p>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>"Contribution" means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>"Contributor" means any person or entity that distributes
+the Program.</p>
+
+<p>"Licensed Patents" mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>"Program" means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>"Recipient" means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and
+indemnify every other Contributor ("Indemnified Contributor")
+against any losses, damages and costs (collectively "Losses")
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+</body></html>
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tracing.rcp/feature.properties b/org.eclipse.linuxtools.tracing.rcp/feature.properties
new file mode 100644 (file)
index 0000000..70df70a
--- /dev/null
@@ -0,0 +1,146 @@
+###############################################################################
+# Copyright (c) 2013 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Bernd Hufmann - Initial API and implementation
+###############################################################################
+
+featureName=Linux Tools Trace Viewer Feature
+
+description=Feature aggregating the plug-in dependencies for the Trace Viewer application.
+
+featureProvider=Eclipse Linux Tools
+
+copyright=Copyright 2013 Ericsson
+
+licenseURL=license.html
+
+license=\
+Eclipse Foundation Software User Agreement\n\
+February 1, 2011\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+       - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tracing.rcp/feature.xml b/org.eclipse.linuxtools.tracing.rcp/feature.xml
new file mode 100644 (file)
index 0000000..ea83ea9
--- /dev/null
@@ -0,0 +1,484 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.linuxtools.tracing.rcp"
+      label="%featureName"
+      version="0.0.1.qualifier"
+      provider-name="%featureProvider"
+      plugin="org.eclipse.linuxtools.tracing.rcp.ui"
+      license-feature="org.eclipse.linuxtools.license.feature"
+      license-feature-version="1.0.0.qualifier">
+
+   <description>
+      %description
+   </description>
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <plugin
+         id="org.antlr.runtime"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.linuxtools.tracing.rcp.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ui.views"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ui.ide"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ui.navigator"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.core.resources"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ui.navigator.resources"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.core.filesystem"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="com.jcraft.jsch"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.jsch.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.security"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.compare"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.compare.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.jface.text"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ui.editors"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ui.forms"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ui.workbench.texteditor"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.core.net"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.search"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.team.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.team.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.debug.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ui.console"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.engine"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.metadata"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ltk.core.refactoring"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ltk.ui.refactoring"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ui.views.properties.tabbed"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.text"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.core.filebuffers"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ui.workbench"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.core.variables"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.repository"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.metadata.repository"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.e4.ui.css.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.e4.ui.css.swt"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.e4.ui.css.swt.theme"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ui.ide.application"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.platform"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.eclipse.ui.intro"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="javax.el"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.help"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.osgi"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ui.net"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.update.configurator"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.ui.sdk"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.operations"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.director"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.artifact.repository"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.jarprocessor"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.security.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.app"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.ds"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.common"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.http.registry"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.jsp.jasper"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.jsp.jasper.registry"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.preferences"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.simpleconfigurator.manipulator"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.frameworkadmin"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.frameworkadmin.equinox"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.sat4j.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.sat4j.pb"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>
diff --git a/org.eclipse.linuxtools.tracing.rcp/license.html b/org.eclipse.linuxtools.tracing.rcp/license.html
new file mode 100644 (file)
index 0000000..6e579a5
--- /dev/null
@@ -0,0 +1,164 @@
+<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+   (COLLECTIVELY "CONTENT").  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the 
+Eclipse Public License Version 1.0
+   ("EPL").  A copy of the EPL is provided with this Content and is also
+ available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+   For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, 
+documentation and other files maintained in the Eclipse Foundation 
+source code
+   repository ("Repository") in software modules ("Modules") and made 
+available as downloadable archives ("Downloads").</p>
+
+<ul>
+       <li>Content may be structured and packaged into modules to 
+facilitate delivering, extending, and upgrading the Content.  Typical 
+modules may include plug-ins ("Plug-ins"), plug-in fragments 
+("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or 
+Fragments and associated material.  Each Feature may be packaged as a 
+sub-directory in a directory named "features".  Within a Feature, files 
+named "feature.xml" may contain a list of the names and version numbers 
+of the Plug-ins
+      and/or Fragments associated with that Feature.</li>
+       <li>Features may also include other Features ("Included 
+Features"). Within a Feature, files named "feature.xml" may contain a 
+list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be 
+contained in files named "about.html" ("Abouts"). The terms and 
+conditions governing Features and
+Included Features should be contained in files named "license.html" 
+("Feature Licenses").  Abouts and Feature Licenses may be located in any
+ directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is 
+installed using the Provisioning Technology (as defined below), you must
+ agree to a license ("Feature Update License") during the
+installation process.  If the Feature contains Included Features, the 
+Feature Update License should either provide you with the terms and 
+conditions governing the Included Features or
+inform you where you can locate them.  Feature Update Licenses may be 
+found in the "license" property of files named "feature.properties" 
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the 
+terms and conditions (or references to such terms and conditions) that 
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER 
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+  SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+       <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND 
+CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, 
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions 
+govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, 
+examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of 
+allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This 
+capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about 
+packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install
+ Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to
+ be presented to, and accepted by, the users of the Provisioning 
+Technology
+   in accordance with the Specification. By using Provisioning 
+Technology in such a manner and making it available in accordance with 
+the
+   Specification, you further acknowledge your agreement to, and the 
+acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in 
+which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, 
+extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology 
+may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user 
+the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable 
+Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable 
+Software Agreement must inform the user of the terms and conditions that
+ govern
+       the Installable Software and must solicit acceptance by the end 
+user in the manner prescribed in such Installable Software Agreement. 
+Upon such
+       indication of agreement by the user, the provisioning Technology 
+will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are
+ currently may have restrictions on the import, possession, and use, 
+and/or re-export to
+   another country, of encryption software. BEFORE using any encryption 
+software, please check the country's laws, regulations and policies 
+concerning the import,
+   possession, or use, and re-export of encryption software, to see if 
+this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+
+
+</body></html>
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tracing.rcp/p2.inf b/org.eclipse.linuxtools.tracing.rcp/p2.inf
new file mode 100644 (file)
index 0000000..5246a0c
--- /dev/null
@@ -0,0 +1,3 @@
+instructions.configure=\
+org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:0,name:Linux Tools,enabled:false); \
+org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:1,name:Linux Tools,enabled:false); 
diff --git a/org.eclipse.linuxtools.tracing.rcp/pom.xml b/org.eclipse.linuxtools.tracing.rcp/pom.xml
new file mode 100644 (file)
index 0000000..20011dd
--- /dev/null
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright (C) 2013 Ericsson
+
+   All rights reserved. This program and the accompanying materials
+   are made available under the terms of the Eclipse Public License v1.0
+   which accompanies this distribution, and is available at
+   http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <artifactId>linuxtools-lttng-parent</artifactId>
+    <groupId>org.eclipse.linuxtools.lttng</groupId>
+    <version>2.1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>org.eclipse.linuxtools.tracing.rcp</artifactId>
+  <version>0.0.1-SNAPSHOT</version>
+  <packaging>eclipse-feature</packaging>
+
+  <name>Linux Tools Trace Viewer Feature</name>
+
+  <groupId>org.eclipse.linuxtools.tracing.rcp</groupId>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.eclipse.tycho.extras</groupId>
+        <artifactId>tycho-source-feature-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>source-feature</id>
+            <phase>package</phase>
+            <goals>
+              <goal>source-feature</goal>
+            </goals>
+            <configuration>
+              <excludes>
+                <plugin id="org.eclipse.core.runtime.compatibility.auth"/>
+                <plugin id="org.eclipse.swt"/>
+                <plugin id="org.eclipse.swt.wpf.win32.x86"/>
+                <plugin id="org.eclipse.swt.gtk.solaris.sparc"/>
+                <plugin id="org.eclipse.swt.gtk.solaris.x86"/>
+                <plugin id="org.eclipse.swt.gtk.linux.ppc"/>
+                <plugin id="org.eclipse.swt.cocoa.macosx"/>
+                <plugin id="org.eclipse.equinox.launcher.gtk.solaris.sparc"/>
+                <plugin id="org.eclipse.equinox.launcher.gtk.linux.x86"/>
+                <plugin id="org.eclipse.equinox.launcher.gtk.linux.x86_64"/>
+                <plugin id="org.eclipse.equinox.launcher.win32.win32.x86"/>
+                <plugin id="org.eclipse.ui.cocoa"/>
+                <plugin id="org.eclipse.core.filesystem.linux.x86"/>
+                <plugin id="org.eclipse.core.filesystem.linux.x86_64"/>
+                <plugin id="org.eclipse.core.filesystem.solaris.sparc"/>
+                <plugin id="org.eclipse.core.filesystem.macosx"/>
+                <plugin id="org.eclipse.core.filesystem.win32.x86"/>
+                <plugin id="org.eclipse.core.resources.win32.x86"/>
+                <plugin id="org.eclipse.core.filesystem.linux.ppc"/>
+                <plugin id="org.eclipse.equinox.launcher.gtk.linux.ppc"/>
+                <plugin id="org.eclipse.equinox.launcher.win32.win32.x86_64"/>
+                <plugin id="org.eclipse.equinox.launcher.wpf.win32.x86"/>
+                <plugin id="org.eclipse.equinox.launcher.cocoa.macosx"/>
+                <plugin id="org.eclipse.equinox.launcher.cocoa.macosx.x86_64"/>
+                <plugin id="org.eclipse.core.net.win32.x86"/>
+                <plugin id="org.eclipse.core.net.linux.x86"/>
+                <plugin id="org.sat4j.core"/>
+                <plugin id="org.sat4j.pb"/>
+              </excludes>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.eclipse.tycho</groupId>
+        <artifactId>tycho-p2-plugin</artifactId>
+        <version>${tycho-version}</version>
+        <executions>
+          <execution>
+            <id>attached-p2-metadata</id>
+            <phase>package</phase>
+            <goals>
+              <goal>p2-metadata</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  
+</project>
diff --git a/pom.xml b/pom.xml
index c27cbe3ede406e785e68e0386b752272c714a19f..54c8b08ad3ef6b147add14f8d96b40770a94ab22 100644 (file)
--- a/pom.xml
+++ b/pom.xml
   </licenses>
   
 <profiles>
+  <profile>
+    <id>tracingRcp</id>
+      <modules>
+        <module>org.eclipse.linuxtools.tracing.rcp</module>
+        <module>org.eclipse.linuxtools.tracing.rcp.ui</module>
+        <module>org.eclipse.linuxtools.tracing.rcp.product</module>
+      </modules>
+  </profile>
   <profile>
     <id>lttngPackage</id>
       <properties>
@@ -54,7 +62,7 @@
         <module>org.eclipse.linuxtools.lttng.releng-site</module>
       </modules>
   </profile> 
-       
+
 </profiles>
 
   <modules>
     <module>org.eclipse.linuxtools.gdbtrace.help</module>
   </modules>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.eclipse.tycho</groupId>
+                <artifactId>target-platform-configuration</artifactId>
+                <version>${tycho-version}</version>
+                <configuration>
+                    <environments>
+                        <environment>
+                            <os>win32</os>
+                            <ws>win32</ws>
+                            <arch>x86</arch>
+                        </environment>
+                        <environment>
+                            <os>win32</os>
+                            <ws>win32</ws>
+                            <arch>x86_64</arch>
+                        </environment>
+                        <environment>
+                            <os>macosx</os>
+                            <ws>cocoa</ws>
+                            <arch>x86_64</arch>
+                        </environment>
+                        <environment>
+                            <os>solaris</os>
+                            <ws>gtk</ws>
+                            <arch>x86</arch>
+                        </environment>
+                        <environment>
+                            <os>solaris</os>
+                            <ws>gtk</ws>
+                            <arch>sparc</arch>
+                        </environment>
+                        <environment>
+                            <os>linux</os>
+                            <ws>gtk</ws>
+                            <arch>x86</arch>
+                        </environment>
+                        <environment>
+                            <os>linux</os>
+                            <ws>gtk</ws>
+                            <arch>x86_64</arch>
+                        </environment>
+                        <environment>
+                            <os>linux</os>
+                            <ws>gtk</ws>
+                            <arch>ppc</arch>
+                        </environment>
+                        <environment>
+                            <os>linux</os>
+                            <ws>gtk</ws>
+                            <arch>ppc64</arch>
+                        </environment>
+                    </environments>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.eclipse.tycho</groupId>
+                <artifactId>tycho-maven-plugin</artifactId>
+                <version>${tycho-version}</version>
+                <extensions>true</extensions>
+            </plugin>
+        </plugins>
+    </build>
+
+
 </project>
This page took 0.19526 seconds and 5 git commands to generate.