Internalize some classes and fix a pile of warnings
authorFrancois Chouinard <fchouinard@gmail.com>
Fri, 25 May 2012 18:40:58 +0000 (14:40 -0400)
committerFrancois Chouinard <fchouinard@gmail.com>
Fri, 25 May 2012 18:57:02 +0000 (14:57 -0400)
128 files changed:
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/FloatDefinitionTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/IntegerDefinitionTest.java
org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/types/VariantDefinitionTest.java
org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java
org.eclipse.linuxtools.ctf.parser/src/org/eclipse/linuxtools/ctf/parser/CTFParser.java
org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java
org.eclipse.linuxtools.lttng.ui/src/org/eclipse/linuxtools/internal/lttng/ui/model/trange/TimeRangeViewerProvider.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/TmfCorePluginTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/TmfCoreTestPlugin.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/TmfEventProviderTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/component/TmfProviderManagerTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfContentTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfEventTypeTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/CtfTmfTraceTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/ctfadaptor/headless/Benchmark.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/event/AllTests.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/AllTests.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfCoalescedDataRequestTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfCoalescedEventRequestTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/request/TmfRequestExecutorTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/AllTests.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfTraceTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/uml2sd/AllTests.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/util/AllTests.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfClientStub.java
org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/component/TmfSyntheticEventProviderStub.java
org.eclipse.linuxtools.tmf.core/META-INF/MANIFEST.MF
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/Activator.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/TmfCorePlugin.java [deleted file]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/Tracer.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/component/TmfProviderManager.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/component/TmfThread.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfCoalescedDataRequest.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfCoalescedEventRequest.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfRequestExecutor.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/TmfCommonConstants.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/TmfProjectNature.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/ITmfComponent.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/ITmfDataProvider.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfComponent.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfDataProvider.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfEventProvider.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfProviderManager.java [deleted file]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfThread.java [deleted file]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfEventField.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/exceptions/TmfTraceException.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/ITmfDataRequest.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/ITmfEventRequest.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedDataRequest.java [deleted file]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedEventRequest.java [deleted file]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfDataRequest.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfEventRequest.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfRequestExecutor.java [deleted file]
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/statesystem/HistoryBuilder.java
org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/views/uml2sd/load/LoadersManagerTest.java
org.eclipse.linuxtools.tmf.ui/META-INF/MANIFEST.MF
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/Activator.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/TmfUiPlugin.java [deleted file]
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/TmfUiTracer.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/dialogs/ManageCustomParsersDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtTrace.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomTxtTraceDefinition.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomXmlTrace.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomXmlTraceDefinition.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/wizards/CustomTxtParserInputWizardPage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/wizards/CustomTxtParserOutputWizardPage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/wizards/CustomXmlParserInputWizardPage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/wizards/CustomXmlParserOutputWizardPage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/DeleteAction.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/DeleteExperimentHandler.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/DeleteExperimentSupplementaryFilesHandler.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/DeleteTraceHandler.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/DeleteTraceSupplementaryFilesHandler.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/DropAdapterAssistant.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/OpenAction.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/OpenTraceHandler.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/RefreshAction.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/RefreshHandler.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/RenameTraceHandler.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/SelectTraceTypeContributionItem.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/SelectTraceTypeHandler.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/editors/EventsViewEditor.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/editors/TmfEventsEditor.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfNavigatorLabelProvider.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/model/TmfProjectModelElement.java
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/wizards/CopyExperimentDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/CopyTraceDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizard.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/NewExperimentDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/NewTmfProjectWizard.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/RenameExperimentDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/RenameTraceDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/SelectTracesWizardPage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsCache.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/colors/ColorSettingsManager.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/colors/ColorSettingsXML.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/colors/ColorsView.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/environment/TmfEnvironmentView.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/events/TmfEventsView.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/filter/FilterManager.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/filter/FilterView.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/timechart/TimeChartDecorationProvider.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/SDView.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/SDWidget.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/TimeCompressionBar.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/dialogs/FilterListDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/dialogs/SearchFilterDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/drawings/impl/ImageImpl.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/handlers/FirstPage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/handlers/LastPage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/handlers/MoveToMessage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/handlers/NextPage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/handlers/OpenSDFiltersDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/handlers/OpenSDFindDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/handlers/OpenSDPagesDialog.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/handlers/PrevPage.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/handlers/ShowNodeEnd.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/handlers/ShowNodeStart.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/handlers/Zoom.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/load/LoadersManager.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/loader/TmfUml2SDSyncLoader.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/uml2sd/preferences/SDViewPref.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphViewer.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/virtualtable/TmfVirtualTable.java

index 8513f2e4f01aef628d1b7a9e8f996434d2029910..e7a9349f73375cd2e9d5ab7cba59f87ee38fb981 100644 (file)
@@ -126,7 +126,6 @@ public class FloatDefinitionTest {
     /**
      * Run the long getValue() method test.
      */
-    @SuppressWarnings("deprecation")
     @Test
     public void testGetValue() {
         singleFixture.setValue(2.0);
index 64d328d5bfdd0157cbcb239e9c78f9a70810bd8f..b13c0e6cfb186c77b80af09ef5605b278f66fccf 100644 (file)
@@ -9,7 +9,6 @@ import org.eclipse.linuxtools.ctf.core.event.types.Encoding;
 import org.eclipse.linuxtools.ctf.core.event.types.IDefinitionScope;
 import org.eclipse.linuxtools.ctf.core.event.types.IntegerDeclaration;
 import org.eclipse.linuxtools.ctf.core.event.types.IntegerDefinition;
-import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition;
 import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
 import org.eclipse.linuxtools.internal.ctf.core.event.io.BitBuffer;
 import org.junit.After;
@@ -47,8 +46,8 @@ public class IntegerDefinitionTest {
     @Before
     public void setUp() throws CTFReaderException {
 
-        StructDefinition structDef = null;
-        boolean found = false;
+//        StructDefinition structDef = null;
+//        boolean found = false;
         IntegerDeclaration id = new IntegerDeclaration( 1, true, 1, ByteOrder.BIG_ENDIAN, Encoding.NONE, clockName, 8);
         fixture = id.createDefinition(null, name);
     }
index 16e49198ecdb93bf3fcce398619b540450b0be9e..046303b932cf4fee681990f62cb64143aa107e85 100644 (file)
@@ -61,16 +61,16 @@ public class VariantDefinitionTest {
 
     private static final String TAG_ID = "a"; //$NON-NLS-1$
 
-    private static final String INT_ID = "_id"; //$NON-NLS-1$
-
-    private static final String STRING_ID = "_args"; //$NON-NLS-1$
-
-    private static final String ENUM_ID = "_enumArgs"; //$NON-NLS-1$
-
-    private static final String SEQUENCE_ID = "_seq"; //$NON-NLS-1$
+//    private static final String INT_ID = "_id"; //$NON-NLS-1$
+//
+//    private static final String STRING_ID = "_args"; //$NON-NLS-1$
+//
+//    private static final String ENUM_ID = "_enumArgs"; //$NON-NLS-1$
+//
+//    private static final String SEQUENCE_ID = "_seq"; //$NON-NLS-1$
 
     private static final String LENGTH_SEQ = "_len"; //$NON-NLS-1$
-    private static final String VAR_FIELD_NAME = "var";
+    private static final String VAR_FIELD_NAME = "var"; //$NON-NLS-1$
     private static final String ENUM_8 = null;
     /**
      * Perform pre-test initialization.
index 2a5a2b63c42870b46980f6cd57e240e2a4081a79..f9d07403640366ceeca075c5df2a27699cd1e2b2 100644 (file)
@@ -661,6 +661,8 @@ class MetadataFileFilter implements FileFilter {
 
 class MetadataComparator implements Comparator<File>, Serializable {
 
+    private static final long serialVersionUID = 1L;
+
     @Override
     public int compare(File o1, File o2) {
         return o1.getName().compareTo(o2.getName());
index 03d9a393f3c37a7cb4bd1bb022a673e4092eeaa2..1a171aa343d3b414a18d069760ac08a0de0dafbd 100644 (file)
@@ -28,7 +28,7 @@ import org.antlr.runtime.tree.RewriteRuleSubtreeStream;
 import org.antlr.runtime.tree.RewriteRuleTokenStream;
 import org.antlr.runtime.tree.TreeAdaptor;
 
-@SuppressWarnings({ "nls", "unused", "unchecked", "rawtypes", "null" })
+@SuppressWarnings({ "nls", "unused", "unchecked", "rawtypes" })
 public class CTFParser extends Parser {
     public static final String[] tokenNames = new String[] { "<invalid>",
             "<EOR>", "<DOWN>", "<UP>", "ALIGNTOK", "CONSTTOK", "CHARTOK",
index 983cc27e58cc2e96577a37db122a14fd74d05cc8..25e39ff4b8f8bdcf1bc88c84fd85a73f1018c48e 100644 (file)
@@ -197,7 +197,7 @@ public class LTTngTrace extends TmfTrace<LttngEvent> implements ITmfEventParser<
             LttngTimestamp safeTimestamp = null;
             TmfTimeRange timeRange = null;
 
-            @SuppressWarnings("unchecked")
+            @SuppressWarnings({ "unchecked", "restriction" })
             @Override
             public void run() {
                 while (!fExecutor.isShutdown()) {
index 4dfbf5c11dc3846348e1e5f82c174f6833f2f575..59881f9f25ab939a4797a8a1a2cbd0e8e80a63b3 100644 (file)
@@ -90,6 +90,10 @@ public class TimeRangeViewerProvider extends TmfTimeAnalysisProvider {
            case TRAP_MODE:\r
                retColor = trapStateToColor.get(stateMode);\r
                break;\r
+\r
+           case PROPERTY:\r
+        case UNKNOWN:\r
+        break;\r
            }\r
        }\r
 \r
index 8fe1998618dae9c1ccb2b63608bf9bee70426cb6..f6b835c14f9b229d6b2e1408a680736f5109d491 100644 (file)
 
 package org.eclipse.linuxtools.tmf.core.tests;
 
-import org.eclipse.linuxtools.internal.tmf.core.TmfCorePlugin;
-
 import junit.framework.TestCase;
 
+import org.eclipse.linuxtools.internal.tmf.core.Activator;
+
 /**
  * <b><u>TmfCorePluginTest</u></b>
  * <p>
  * Test the TMF core plug-in activator
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({ "nls", "restriction" })
 public class TmfCorePluginTest extends TestCase {
 
        // ------------------------------------------------------------------------
@@ -29,7 +29,7 @@ public class TmfCorePluginTest extends TestCase {
        // ------------------------------------------------------------------------
 
        // Plug-in instantiation
-       static final TmfCorePlugin fPlugin = new TmfCorePlugin();
+       static final Activator fPlugin = new Activator();
        
        // ------------------------------------------------------------------------
     // Housekeping
@@ -57,11 +57,11 @@ public class TmfCorePluginTest extends TestCase {
        // ------------------------------------------------------------------------
 
        public void testTmfCorePluginId() throws Exception {
-               assertEquals("Plugin ID", "org.eclipse.linuxtools.tmf.core", TmfCorePlugin.PLUGIN_ID);
+               assertEquals("Plugin ID", "org.eclipse.linuxtools.tmf.core", Activator.PLUGIN_ID);
        }
 
        public void testGetDefault() throws Exception {
-               TmfCorePlugin plugin = TmfCorePlugin.getDefault();
+               Activator plugin = Activator.getDefault();
                assertEquals("getDefault()", plugin, fPlugin);
        }
 
index 68f921081cd102038341398eec802916c855e0d7..70f8cb4059a4f7425977bc0974e9f765d7965832 100644 (file)
@@ -21,7 +21,7 @@ import org.osgi.framework.BundleContext;
  * <p>
  * The activator class controls the plug-in life cycle
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({ "nls", "restriction" })
 public class TmfCoreTestPlugin extends Plugin {
 
     // ------------------------------------------------------------------------
index e92e0c65e8483675d7a1c2a7776b47a9a8609b96..086b1640f800eeb32070abae644062f5f7510741 100644 (file)
@@ -17,8 +17,8 @@ import java.util.Vector;
 
 import junit.framework.TestCase;
 
+import org.eclipse.linuxtools.internal.tmf.core.component.TmfProviderManager;
 import org.eclipse.linuxtools.tmf.core.component.ITmfDataProvider;
-import org.eclipse.linuxtools.tmf.core.component.TmfProviderManager;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
@@ -35,7 +35,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub;
  * <p>
  * Test suite for the TmfEventProvider class.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({ "nls", "restriction" })
 public class TmfEventProviderTest extends TestCase {
 
     TmfEventProviderStub fEventProvider;
index 1e6bb55a1c56802e9734397519755a93f7af6ea3..297b7d9c045ae48b258672d4f5f8d47ff8d3e4a7 100644 (file)
@@ -14,8 +14,8 @@ package org.eclipse.linuxtools.tmf.core.tests.component;
 
 import junit.framework.TestCase;
 
+import org.eclipse.linuxtools.internal.tmf.core.component.TmfProviderManager;
 import org.eclipse.linuxtools.tmf.core.component.TmfDataProvider;
-import org.eclipse.linuxtools.tmf.core.component.TmfProviderManager;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
@@ -25,7 +25,7 @@ import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
  * <p>
  * Test suite for the TmfProviderManager class.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({ "nls", "restriction" })
 public class TmfProviderManagerTest extends TestCase {
 
        public TmfProviderManagerTest(String name) {
index 5b880e6bfce1b83581e6b065d678cb8573351eaf..13a527fa976554e82055fdfbc1221f6e0c69017e 100644 (file)
@@ -1,9 +1,13 @@
 package org.eclipse.linuxtools.tmf.core.tests.ctfadaptor;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfContent;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
-import org.junit.*;
-import static org.junit.Assert.*;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 
 /**
  * The class <code>CtfTmfContentTest</code> contains tests for the class <code>{@link CtfTmfContent}</code>.
@@ -23,15 +27,15 @@ public class CtfTmfContentTest {
     @Test
     public void testCtfTmfContent_1()
         throws Exception {
-        String name = "";
+        String name = ""; //$NON-NLS-1$
         ITmfEventField[] fields = new ITmfEventField[] {};
 
         CtfTmfContent result = new CtfTmfContent(name, fields);
 
         // add additional test code here
         assertNotNull(result);
-        assertEquals("", result.toString());
-        assertEquals("", result.getName());
+        assertEquals("", result.toString()); //$NON-NLS-1$
+        assertEquals("", result.getName()); //$NON-NLS-1$
         assertEquals(null, result.getValue());
     }
 
@@ -45,12 +49,12 @@ public class CtfTmfContentTest {
     @Test
     public void testToString_1()
         throws Exception {
-        CtfTmfContent fixture = new CtfTmfContent("", new ITmfEventField[] {});
+        CtfTmfContent fixture = new CtfTmfContent("", new ITmfEventField[] {}); //$NON-NLS-1$
 
         String result = fixture.toString();
 
         // add additional test code here
-        assertEquals("", result);
+        assertEquals("", result); //$NON-NLS-1$
     }
 
     /**
@@ -63,12 +67,12 @@ public class CtfTmfContentTest {
     @Test
     public void testToString_2()
         throws Exception {
-        CtfTmfContent fixture = new CtfTmfContent("", new ITmfEventField[] {});
+        CtfTmfContent fixture = new CtfTmfContent("", new ITmfEventField[] {}); //$NON-NLS-1$
 
         String result = fixture.toString();
 
         // add additional test code here
-        assertEquals("", result);
+        assertEquals("", result); //$NON-NLS-1$
     }
 
     /**
index 76aaed0483db9db69dd54bf3dd0815893f3b932d..6b197da287577f6460e716abae847554082edd98 100644 (file)
@@ -27,7 +27,7 @@ public class CtfTmfEventTypeTest {
      */
     @Test
     public void testCtfTmfEventType_1() {
-        String contextId = ""; //$NON-NLS-1$
+//        String contextId = ""; //$NON-NLS-1$
         String eventName = ""; //$NON-NLS-1$
         ITmfEventField content = new TmfEventField("", new ITmfEventField[] {}); //$NON-NLS-1$
 
index 00be0db1a84ebb9354d8b9ba146fb6ea580737d4..423b7bbc377b2d622186fbc3d96f83d47308fb6a 100644 (file)
@@ -7,6 +7,7 @@ import static org.junit.Assert.assertTrue;
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
+import org.eclipse.linuxtools.internal.tmf.core.request.TmfCoalescedEventRequest;
 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfLocation;
 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent;
 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfTimestamp;
@@ -17,7 +18,6 @@ import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
-import org.eclipse.linuxtools.tmf.core.request.TmfCoalescedEventRequest;
 import org.eclipse.linuxtools.tmf.core.signal.TmfEndSynchSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignal;
 import org.eclipse.linuxtools.tmf.core.statesystem.IStateSystemQuerier;
@@ -33,6 +33,7 @@ import org.junit.Test;
  * @author ematkho
  * @version $Revision: 1.0 $
  */
+@SuppressWarnings("restriction")
 public class CtfTmfTraceTest {
     private static final String PATH = TestParams.getPath();
 
@@ -72,6 +73,7 @@ public class CtfTmfTraceTest {
     public void testArmRequest_1()
         throws Exception {
         CtfTmfTrace fixture = initTrace();
+        @SuppressWarnings({ "rawtypes", "unchecked" })
         ITmfDataRequest<CtfTmfEvent> request = new TmfCoalescedEventRequest(ITmfEvent.class);
 
         ITmfContext result = fixture.armRequest(request);
@@ -105,6 +107,7 @@ public class CtfTmfTraceTest {
     public void testArmRequest_2()
         throws Exception {
         CtfTmfTrace fixture = initTrace();
+        @SuppressWarnings({ "rawtypes", "unchecked" })
         ITmfDataRequest<CtfTmfEvent> request = new TmfCoalescedEventRequest(ITmfEvent.class);
 
         ITmfContext result = fixture.armRequest(request);
@@ -127,6 +130,7 @@ public class CtfTmfTraceTest {
     public void testArmRequest_3()
         throws Exception {
         CtfTmfTrace fixture = initTrace();
+        @SuppressWarnings({ "rawtypes", "unchecked" })
         ITmfDataRequest<CtfTmfEvent> request = new TmfCoalescedEventRequest(ITmfEvent.class);
 
         ITmfContext result = fixture.armRequest(request);
@@ -149,6 +153,7 @@ public class CtfTmfTraceTest {
     public void testArmRequest_4()
         throws Exception {
         CtfTmfTrace fixture = initTrace();
+        @SuppressWarnings({ "rawtypes", "unchecked" })
         ITmfDataRequest<CtfTmfEvent> request = new TmfCoalescedEventRequest(ITmfEvent.class);
 
         ITmfContext result = fixture.armRequest(request);
index addd1403a93d15cebe69bd96a1b4a864d09fc3b8..201166ff7c90c2270dd859fa38154a124617f56f 100644 (file)
@@ -11,9 +11,6 @@
  *******************************************************************************/
 package org.eclipse.linuxtools.tmf.core.tests.ctfadaptor.headless;
 
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
 import java.util.Vector;
 
 import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfIterator;
@@ -91,16 +88,16 @@ public class Benchmark {
 
     }
 
-    /**
-     * @param timestamp
-     *            the timestamp in UTC to convert to nanoseconds.
-     * @return formatted string.
-     */
-    private static String formatDate(final long timestamp) {
-        final Date d = new Date(timestamp / 1000000);
-        final DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss."); //$NON-NLS-1$
-        final String output = df.format(d) + (timestamp % 1000000000);
-        return output;
-    }
+//    /**
+//     * @param timestamp
+//     *            the timestamp in UTC to convert to nanoseconds.
+//     * @return formatted string.
+//     */
+//    private static String formatDate(final long timestamp) {
+//        final Date d = new Date(timestamp / 1000000);
+//        final DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss."); //$NON-NLS-1$
+//        final String output = df.format(d) + (timestamp % 1000000000);
+//        return output;
+//    }
 
 }
index a0b94e09b39e3d32af646aa888ad4cd4a28d9e38..2ed7b58d334adf39583b12e151794b3ed95e395a 100644 (file)
@@ -16,16 +16,16 @@ package org.eclipse.linuxtools.tmf.core.tests.event;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.eclipse.linuxtools.internal.tmf.core.TmfCorePlugin;
+import org.eclipse.linuxtools.internal.tmf.core.Activator;
 
 /**
  * Test suite for org.eclipse.linuxtools.tmf.core.event
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({ "nls", "restriction" })
 public class AllTests {
 
     public static Test suite() {
-        final TestSuite suite = new TestSuite("Test suite for " + TmfCorePlugin.PLUGIN_ID + ".event"); //$NON-NLS-1$;
+        final TestSuite suite = new TestSuite("Test suite for " + Activator.PLUGIN_ID + ".event"); //$NON-NLS-1$;
         //$JUnit-BEGIN$
         suite.addTestSuite(TmfTimestampTest.class);
         suite.addTestSuite(TmfSimpleTimestampTest.class);
index 0a4ea69490273d90df6333c3e3cb32e5e6d3d3dd..0e33340ea9518465df52d8502ff61bae32617ea6 100644 (file)
@@ -3,13 +3,13 @@ package org.eclipse.linuxtools.tmf.core.tests.request;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.eclipse.linuxtools.internal.tmf.core.TmfCorePlugin;
+import org.eclipse.linuxtools.internal.tmf.core.Activator;
 
-@SuppressWarnings("nls")
+@SuppressWarnings({ "nls", "restriction" })
 public class AllTests {
 
        public static Test suite() {
-               TestSuite suite = new TestSuite("Test suite for " + TmfCorePlugin.PLUGIN_ID + ".request"); //$NON-NLS-1$);
+               TestSuite suite = new TestSuite("Test suite for " + Activator.PLUGIN_ID + ".request"); //$NON-NLS-1$);
                //$JUnit-BEGIN$
                suite.addTestSuite(TmfDataRequestTest.class);
                suite.addTestSuite(TmfEventRequestTest.class);
index 98064bcf91ec4334ff45b68f0f3a3405822333e8..d5401eee4b16e3b011856768dda6502c6f989594 100644 (file)
@@ -15,8 +15,8 @@ package org.eclipse.linuxtools.tmf.core.tests.request;
 
 import junit.framework.TestCase;
 
+import org.eclipse.linuxtools.internal.tmf.core.request.TmfCoalescedDataRequest;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
-import org.eclipse.linuxtools.tmf.core.request.TmfCoalescedDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
 import org.eclipse.linuxtools.tmf.tests.stubs.request.TmfDataRequestStub;
 
@@ -25,7 +25,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.request.TmfDataRequestStub;
  * <p>
  * Test suite for the TmfCoalescedDataRequest class.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({ "nls", "restriction" })
 public class TmfCoalescedDataRequestTest extends TestCase {
 
        // ------------------------------------------------------------------------
@@ -50,7 +50,7 @@ public class TmfCoalescedDataRequestTest extends TestCase {
                super(name);
        }
 
-       @Override
+    @Override
        public void setUp() throws Exception {
                super.setUp();
                TmfDataRequest.reset();
index 29b40eddba7009b447689234f745139bfd112084..ea10bc2ccb707e42b0bdcea1271e636f779e3dad 100644 (file)
@@ -22,15 +22,15 @@ import junit.framework.TestCase;
 
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.internal.tmf.core.component.TmfProviderManager;
+import org.eclipse.linuxtools.internal.tmf.core.request.TmfCoalescedDataRequest;
+import org.eclipse.linuxtools.internal.tmf.core.request.TmfCoalescedEventRequest;
 import org.eclipse.linuxtools.tmf.core.component.ITmfDataProvider;
-import org.eclipse.linuxtools.tmf.core.component.TmfProviderManager;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;
-import org.eclipse.linuxtools.tmf.core.request.TmfCoalescedDataRequest;
-import org.eclipse.linuxtools.tmf.core.request.TmfCoalescedEventRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
@@ -44,7 +44,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub;
  * <p>
  * Test suite for the TmfCoalescedEventRequest class.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({ "nls", "restriction" })
 public class TmfCoalescedEventRequestTest extends TestCase {
 
        // ------------------------------------------------------------------------
index 59949487eade39de8409cec1b5a13a5a8a27977e..0f18f2a7e685e0ed38b33301da7d239a1c5e7864 100644 (file)
@@ -16,14 +16,14 @@ import java.util.concurrent.Executors;
 
 import junit.framework.TestCase;
 
-import org.eclipse.linuxtools.tmf.core.request.TmfRequestExecutor;
+import org.eclipse.linuxtools.internal.tmf.core.request.TmfRequestExecutor;
 
 /**
  * <b><u>TmfRequestExecutorTest</u></b>
  *
  * Test suite for the TmfRequestExecutor class.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({ "nls", "restriction" })
 public class TmfRequestExecutorTest extends TestCase {
 
        // ------------------------------------------------------------------------
@@ -56,7 +56,7 @@ public class TmfRequestExecutorTest extends TestCase {
        // ------------------------------------------------------------------------
 
        /**
-        * Test method for {@link org.eclipse.linuxtools.tmf.core.request.TmfRequestExecutor#TmfRequestExecutor()}.
+        * Test method for {@link org.eclipse.linuxtools.internal.tmf.core.request.TmfRequestExecutor#TmfRequestExecutor()}.
         */
        public void testTmfRequestExecutor() {
                TmfRequestExecutor executor = new TmfRequestExecutor();
@@ -66,7 +66,7 @@ public class TmfRequestExecutorTest extends TestCase {
        }
 
        /**
-        * Test method for {@link org.eclipse.linuxtools.tmf.core.request.TmfRequestExecutor#TmfRequestExecutor(java.util.concurrent.ExecutorService)}.
+        * Test method for {@link org.eclipse.linuxtools.internal.tmf.core.request.TmfRequestExecutor#TmfRequestExecutor(java.util.concurrent.ExecutorService)}.
         */
        public void testTmfRequestExecutorExecutorService() {
                TmfRequestExecutor executor = new TmfRequestExecutor(Executors.newCachedThreadPool());
@@ -76,7 +76,7 @@ public class TmfRequestExecutorTest extends TestCase {
        }
 
        /**
-        * Test method for {@link org.eclipse.linuxtools.tmf.core.request.TmfRequestExecutor#stop()}.
+        * Test method for {@link org.eclipse.linuxtools.internal.tmf.core.request.TmfRequestExecutor#stop()}.
         */
        public void testStop() {
                TmfRequestExecutor executor = new TmfRequestExecutor();
@@ -91,7 +91,7 @@ public class TmfRequestExecutorTest extends TestCase {
        // ------------------------------------------------------------------------
 
        /**
-        * Test method for {@link org.eclipse.linuxtools.tmf.core.request.TmfRequestExecutor#execute(java.lang.Runnable)}.
+        * Test method for {@link org.eclipse.linuxtools.internal.tmf.core.request.TmfRequestExecutor#execute(java.lang.Runnable)}.
         */
        public void testExecute() {
 //             fail("Not yet implemented");
@@ -102,7 +102,7 @@ public class TmfRequestExecutorTest extends TestCase {
        // ------------------------------------------------------------------------
 
        /**
-        * Test method for {@link org.eclipse.linuxtools.tmf.core.request.TmfRequestExecutor#toString()}.
+        * Test method for {@link org.eclipse.linuxtools.internal.tmf.core.request.TmfRequestExecutor#toString()}.
         */
        public void testToString() {
 //             TmfRequestExecutor executor1 = new TmfRequestExecutor();
index 6922309fa029d7734cdb1805f6397d57463d1041..169560421b4f946d6759ec640f089d9e8c160239 100644 (file)
@@ -16,16 +16,16 @@ package org.eclipse.linuxtools.tmf.core.tests.trace;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.eclipse.linuxtools.internal.tmf.core.TmfCorePlugin;
+import org.eclipse.linuxtools.internal.tmf.core.Activator;
 
 /**
  * Test suite for org.eclipse.linuxtools.tmf.core.trace
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({ "nls", "restriction" })
 public class AllTests {
 
        public static Test suite() {
-               TestSuite suite = new TestSuite("Test suite for " + TmfCorePlugin.PLUGIN_ID + ".trace"); //$NON-NLS-1$);
+               TestSuite suite = new TestSuite("Test suite for " + Activator.PLUGIN_ID + ".trace"); //$NON-NLS-1$);
                //$JUnit-BEGIN$
                suite.addTestSuite(TmfLocationTest.class);
         suite.addTestSuite(TmfContextTest.class);
index 655740b9112706054b97c23042965b45bdcad3f5..379ebb3c63a71eee78228cbdfb6179b59d93706e 100644 (file)
@@ -23,8 +23,8 @@ import junit.framework.TestCase;
 
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.internal.tmf.core.component.TmfProviderManager;
 import org.eclipse.linuxtools.tmf.core.component.ITmfDataProvider;
-import org.eclipse.linuxtools.tmf.core.component.TmfProviderManager;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
@@ -43,7 +43,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.trace.TmfTraceStub;
 /**
  * Test suite for the TmfTrace class.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({ "nls", "restriction" })
 public class TmfTraceTest extends TestCase {
 
     // ------------------------------------------------------------------------
index b4e3d74e3a6d8b2c621cd33808bb0fd153a0b23a..01d6327e36f8b8eda0af657014ffb6c4c45a37b7 100644 (file)
@@ -3,13 +3,13 @@ package org.eclipse.linuxtools.tmf.core.tests.uml2sd;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.eclipse.linuxtools.internal.tmf.core.TmfCorePlugin;
+import org.eclipse.linuxtools.internal.tmf.core.Activator;
 
-@SuppressWarnings("nls")
+@SuppressWarnings({ "nls", "restriction" })
 public class AllTests {
 
        public static Test suite() {
-               TestSuite suite = new TestSuite("Test suite for " + TmfCorePlugin.PLUGIN_ID + ".uml2sd"); //$NON-NLS-1$);
+               TestSuite suite = new TestSuite("Test suite for " + Activator.PLUGIN_ID + ".uml2sd"); //$NON-NLS-1$);
                //$JUnit-BEGIN$
                suite.addTestSuite(TmfSyncSequenceDiagramEventTest.class);
                suite.addTestSuite(TmfAsyncSequenceDiagramEventTest.class);
index bc53d4696f33f33dbc35dd833c72df2964c7c105..1693f2aa4043cc68df1dd6201e8198ec8288ee51 100644 (file)
@@ -3,13 +3,13 @@ package org.eclipse.linuxtools.tmf.core.tests.util;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.eclipse.linuxtools.internal.tmf.core.TmfCorePlugin;
+import org.eclipse.linuxtools.internal.tmf.core.Activator;
 
-@SuppressWarnings("nls")
+@SuppressWarnings({ "nls", "restriction" })
 public class AllTests {
 
        public static Test suite() {
-               TestSuite suite = new TestSuite("Test suite for " + TmfCorePlugin.PLUGIN_ID + ".util"); //$NON-NLS-1$);
+               TestSuite suite = new TestSuite("Test suite for " + Activator.PLUGIN_ID + ".util"); //$NON-NLS-1$);
                //$JUnit-BEGIN$
                suite.addTestSuite(TmfFixedArrayTest.class);
                //$JUnit-END$
index 998fac6d0a4e3d2375180e8cfbd8daa1b5e22d8f..4274eff126e3874e3f3d6aabff2d7c9b82b51107 100644 (file)
@@ -12,9 +12,9 @@
 
 package org.eclipse.linuxtools.tmf.tests.stubs.component;
 
+import org.eclipse.linuxtools.internal.tmf.core.component.TmfProviderManager;
 import org.eclipse.linuxtools.tmf.core.component.TmfComponent;
 import org.eclipse.linuxtools.tmf.core.component.TmfDataProvider;
-import org.eclipse.linuxtools.tmf.core.component.TmfProviderManager;
 import org.eclipse.linuxtools.tmf.tests.stubs.event.TmfSyntheticEventStub;
 
 /**
@@ -22,7 +22,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.event.TmfSyntheticEventStub;
  * <p>
  * TODO: Implement me. Please.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({ "nls", "restriction" })
 public class TmfClientStub extends TmfComponent {
 
     private TmfDataProvider<TmfSyntheticEventStub>[] fProviders;
index 179234043534bbf8b50b0bb47eddc51bddcb7e9d..664de2142f784b9f5f66c7ce3abc72162c6386fd 100644 (file)
@@ -14,9 +14,9 @@ package org.eclipse.linuxtools.tmf.tests.stubs.component;
 
 import java.util.concurrent.TimeUnit;
 
+import org.eclipse.linuxtools.internal.tmf.core.component.TmfProviderManager;
 import org.eclipse.linuxtools.tmf.core.component.ITmfDataProvider;
 import org.eclipse.linuxtools.tmf.core.component.TmfEventProvider;
-import org.eclipse.linuxtools.tmf.core.component.TmfProviderManager;
 import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
@@ -31,7 +31,7 @@ import org.eclipse.linuxtools.tmf.tests.stubs.event.TmfSyntheticEventStub;
  * <p>
  * TODO: Implement me. Please.
  */
-@SuppressWarnings("nls")
+@SuppressWarnings({ "nls", "restriction" })
 public class TmfSyntheticEventProviderStub extends TmfEventProvider<TmfSyntheticEventStub> {
 
     public static final int BLOCK_SIZE = 100;
index ef1952aa448a927c815f3a3251cf907ca1060760..6f76d0a22da1bcf19e9c3fca039813e3730be40e 100644 (file)
@@ -5,7 +5,7 @@ Bundle-Vendor: %Bundle-Vendor
 Bundle-Version: 0.5.0.qualifier
 Bundle-Localization: plugin
 Bundle-SymbolicName: org.eclipse.linuxtools.tmf.core;singleton:=true
-Bundle-Activator: org.eclipse.linuxtools.internal.tmf.core.TmfCorePlugin
+Bundle-Activator: org.eclipse.linuxtools.internal.tmf.core.Activator
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
@@ -13,6 +13,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
  org.eclipse.linuxtools.ctf.core;bundle-version="0.1.0",
  org.eclipse.core.filesystem;bundle-version="1.3.100"
 Export-Package: org.eclipse.linuxtools.internal.tmf.core;x-internal:=true,
+ org.eclipse.linuxtools.internal.tmf.core.component;x-internal:=true,
+ org.eclipse.linuxtools.internal.tmf.core.request;x-internal:=true,
  org.eclipse.linuxtools.internal.tmf.core.statesystem;x-internal:=true,
  org.eclipse.linuxtools.internal.tmf.core.trace;x-internal:=true,
  org.eclipse.linuxtools.tmf.core,
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/Activator.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/Activator.java
new file mode 100644 (file)
index 0000000..533fb08
--- /dev/null
@@ -0,0 +1,154 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010, 2011 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:
+ *   Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.tmf.core;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleContext;
+
+/**
+ * <b><u>TmfCorePlugin</u></b>
+ * <p>
+ * The activator class controls the plug-in life cycle. No more than one such
+ * plug-in can exist at any time.
+ */
+public class Activator extends Plugin {
+
+       // ------------------------------------------------------------------------
+    // Attributes
+       // ------------------------------------------------------------------------
+
+    /**
+     * The plug-in ID 
+     */
+       public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.core"; //$NON-NLS-1$
+
+       /**
+     * The shared instance
+     */
+       private static Activator fPlugin;
+       
+       // ------------------------------------------------------------------------
+    // Constructors
+       // ------------------------------------------------------------------------
+
+       /**
+     * Constructor
+     */
+       public Activator() {
+               setDefault(this);
+       }
+
+       // ------------------------------------------------------------------------
+    // Accessors
+       // ------------------------------------------------------------------------
+
+       /**
+     * Returns the TMF UI plug-in instance.
+     *
+     * @return the TMF UI plug-in instance.
+     */
+    public static Activator getDefault() {
+        return fPlugin;
+    }
+
+    // Sets plug-in instance
+       private static void setDefault(Activator plugin) {
+               fPlugin = plugin;
+       }
+
+       // ------------------------------------------------------------------------
+    // Plugin
+       // ------------------------------------------------------------------------
+
+       /*
+        * (non-Javadoc)
+        * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
+        */
+       @Override
+       public void start(BundleContext context) throws Exception {
+               super.start(context);
+               setDefault(this);
+               Tracer.init();
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+        */
+       @Override
+       public void stop(BundleContext context) throws Exception {
+               Tracer.stop();
+               setDefault(null);
+               super.stop(context);
+       }
+
+    /**
+     * Logs a message with severity INFO in the runtime log of the plug-in.
+     * 
+     * @param message A message to log
+     */
+    public void logInfo(String message) {
+        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
+    }
+    
+    /**
+     * Logs a message and exception with severity INFO in the runtime log of the plug-in.
+     * 
+     * @param message A message to log
+     * @param exception A exception to log
+     */
+    public void logInfo(String message, Throwable exception) {
+        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
+    }
+
+    /**
+     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+     * 
+     * @param message A message to log
+     */
+    public void logWarning(String message) {
+        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
+    }
+    
+    /**
+     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+     * 
+     * @param message A message to log
+     * @param exception A exception to log
+     */
+    public void logWarning(String message, Throwable exception) {
+        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
+    }
+
+    /**
+     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+     * 
+     * @param message A message to log
+     */
+    public void logError(String message) {
+        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
+    }
+    
+    /**
+     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+     * 
+     * @param message A message to log
+     * @param exception A exception to log
+     */
+    public void logError(String message, Throwable exception) {
+        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/TmfCorePlugin.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/TmfCorePlugin.java
deleted file mode 100644 (file)
index 1484e16..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010, 2011 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:
- *   Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.tmf.core;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleContext;
-
-/**
- * <b><u>TmfCorePlugin</u></b>
- * <p>
- * The activator class controls the plug-in life cycle. No more than one such
- * plug-in can exist at any time.
- */
-public class TmfCorePlugin extends Plugin {
-
-       // ------------------------------------------------------------------------
-    // Attributes
-       // ------------------------------------------------------------------------
-
-    /**
-     * The plug-in ID 
-     */
-       public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.core"; //$NON-NLS-1$
-
-       /**
-     * The shared instance
-     */
-       private static TmfCorePlugin fPlugin;
-       
-       // ------------------------------------------------------------------------
-    // Constructors
-       // ------------------------------------------------------------------------
-
-       /**
-     * Constructor
-     */
-       public TmfCorePlugin() {
-               setDefault(this);
-       }
-
-       // ------------------------------------------------------------------------
-    // Accessors
-       // ------------------------------------------------------------------------
-
-       /**
-     * Returns the TMF UI plug-in instance.
-     *
-     * @return the TMF UI plug-in instance.
-     */
-    public static TmfCorePlugin getDefault() {
-        return fPlugin;
-    }
-
-    // Sets plug-in instance
-       private static void setDefault(TmfCorePlugin plugin) {
-               fPlugin = plugin;
-       }
-
-       // ------------------------------------------------------------------------
-    // Plugin
-       // ------------------------------------------------------------------------
-
-       /*
-        * (non-Javadoc)
-        * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
-        */
-       @Override
-       public void start(BundleContext context) throws Exception {
-               super.start(context);
-               setDefault(this);
-               Tracer.init();
-       }
-
-       /*
-        * (non-Javadoc)
-        * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
-        */
-       @Override
-       public void stop(BundleContext context) throws Exception {
-               Tracer.stop();
-               setDefault(null);
-               super.stop(context);
-       }
-
-    /**
-     * Logs a message with severity INFO in the runtime log of the plug-in.
-     * 
-     * @param message A message to log
-     */
-    public void logInfo(String message) {
-        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
-    }
-    
-    /**
-     * Logs a message and exception with severity INFO in the runtime log of the plug-in.
-     * 
-     * @param message A message to log
-     * @param exception A exception to log
-     */
-    public void logInfo(String message, Throwable exception) {
-        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
-    }
-
-    /**
-     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
-     * 
-     * @param message A message to log
-     */
-    public void logWarning(String message) {
-        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
-    }
-    
-    /**
-     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
-     * 
-     * @param message A message to log
-     * @param exception A exception to log
-     */
-    public void logWarning(String message, Throwable exception) {
-        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
-    }
-
-    /**
-     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
-     * 
-     * @param message A message to log
-     */
-    public void logError(String message) {
-        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
-    }
-    
-    /**
-     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
-     * 
-     * @param message A message to log
-     * @param exception A exception to log
-     */
-    public void logError(String message, Throwable exception) {
-        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
-    }
-
-}
index 2517e431721e6d44ad41f76123f0626ed23adb5e..2b48126055dfb2d53cf21e00975efcfd58e173d7 100644 (file)
@@ -15,7 +15,7 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfSignal;
 @SuppressWarnings("nls")\r
 public class Tracer {\r
 \r
-    private static String pluginID = TmfCorePlugin.PLUGIN_ID;\r
+    private static String pluginID = Activator.PLUGIN_ID;\r
 \r
     static Boolean ERROR = Boolean.FALSE;\r
     static Boolean WARNING = Boolean.FALSE;\r
@@ -34,7 +34,7 @@ public class Tracer {
         try {\r
             outfile = new BufferedWriter(new FileWriter(filename));\r
         } catch (IOException e) {\r
-            TmfCorePlugin.getDefault().logError("Error opening log file " + filename, e);\r
+            Activator.getDefault().logError("Error opening log file " + filename, e);\r
         }\r
         return outfile;\r
     }\r
@@ -101,7 +101,7 @@ public class Tracer {
             fTraceLog.close();\r
             fTraceLog = null;\r
         } catch (IOException e) {\r
-            TmfCorePlugin.getDefault().logError("Error closing log file", e);\r
+            Activator.getDefault().logError("Error closing log file", e);\r
         }\r
     }\r
 \r
@@ -147,7 +147,7 @@ public class Tracer {
                 fTraceLog.newLine();\r
                 fTraceLog.flush();\r
             } catch (IOException e) {\r
-                TmfCorePlugin.getDefault().logError("Error writing to log file", e);\r
+                Activator.getDefault().logError("Error writing to log file", e);\r
             }\r
         }\r
     }\r
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/component/TmfProviderManager.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/component/TmfProviderManager.java
new file mode 100644 (file)
index 0000000..ba35f5a
--- /dev/null
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 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:
+ *   Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.tmf.core.component;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.linuxtools.tmf.core.component.TmfDataProvider;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+
+/**
+ * Singleton that keeps track of the event providers.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
+ */
+public class TmfProviderManager {
+
+       // ------------------------------------------------------------------------
+       // No constructor
+       // ------------------------------------------------------------------------
+
+       private TmfProviderManager() {}
+       
+       // ------------------------------------------------------------------------
+       // Keeps track of the providers for each event type
+       // ------------------------------------------------------------------------
+       
+       private static Map<Class<? extends ITmfEvent>, List<TmfDataProvider<? extends ITmfEvent>>> fProviders =
+                  new HashMap<Class<? extends ITmfEvent>, List<TmfDataProvider<? extends ITmfEvent>>>();
+
+       /**
+        * Registers [provider] as a provider of [eventType]
+        * 
+        * @param eventType
+        * @param provider
+        */
+       public static <T extends ITmfEvent> void register(Class<T> eventType, TmfDataProvider<? extends ITmfEvent> provider) {
+               if (fProviders.get(eventType) == null)
+                       fProviders.put(eventType, new ArrayList<TmfDataProvider<? extends ITmfEvent>>());
+               fProviders.get(eventType).add(provider);
+       }
+
+       /**
+        * Re-registers [provider] as a provider of [eventType]
+        * 
+        * @param eventType
+        * @param provider
+        */
+       public static <T extends ITmfEvent> void deregister(Class<T> eventType, TmfDataProvider<? extends ITmfEvent> provider) {
+               List<TmfDataProvider<? extends ITmfEvent>> list = fProviders.get(eventType);
+               if (list != null) {
+                       list.remove(provider);
+                       if (list.size() == 0)
+                               fProviders.remove(eventType);
+               }
+       }
+
+       /**
+        * Returns the list of components that provide [eventType]
+        * 
+        * @param eventType
+        * @return the list of components that provide [eventType]
+        */
+       @SuppressWarnings("unchecked")
+       public static TmfDataProvider<? extends ITmfEvent>[] getProviders(Class<? extends ITmfEvent> eventType) {
+               List<TmfDataProvider<? extends ITmfEvent>> list = fProviders.get(eventType);
+               if (list == null)
+                       list = new ArrayList<TmfDataProvider<? extends ITmfEvent>>(); 
+               TmfDataProvider<? extends ITmfEvent>[] result = new TmfDataProvider[list.size()];
+               return list.toArray(result);
+       }
+
+       /**
+        * Returns the list of components of type [providerType] that provide [eventType]
+        * 
+        * @param eventType
+        * @param providerType
+     * @return the list of components of type [providerType] that provide [eventType]
+        */
+       @SuppressWarnings("unchecked")
+       public static TmfDataProvider<? extends ITmfEvent>[] getProviders(Class<? extends ITmfEvent> eventType, Class<? extends TmfDataProvider<? extends ITmfEvent>> providerType) {
+               if (providerType == null) {
+                       return getProviders(eventType);
+               }
+               TmfDataProvider<? extends ITmfEvent>[] list = getProviders(eventType);
+               List<TmfDataProvider<? extends ITmfEvent>> result = new ArrayList<TmfDataProvider<? extends ITmfEvent>>();
+               if (list != null) {
+                       for (TmfDataProvider<? extends ITmfEvent> provider : list) {
+                               if (provider.getClass() == providerType) {
+                                       result.add(provider);
+                               }
+                       }
+               }
+               TmfDataProvider<? extends ITmfEvent>[] array = new TmfDataProvider[result.size()];
+               return result.toArray(array);
+       }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/component/TmfThread.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/component/TmfThread.java
new file mode 100644 (file)
index 0000000..dd430b6
--- /dev/null
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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:
+ *   Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.tmf.core.component;
+
+import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;
+
+/**
+ * Utility class to add an execution class to a simple Java thread
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
+ */
+public class TmfThread extends Thread {
+
+       private final ExecutionType fExecType;
+       
+       public TmfThread(ExecutionType execType) {
+               fExecType = execType;
+       }
+       
+       public ExecutionType getExecType() {
+               return fExecType;
+       }
+
+       public void cancel() {
+       }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfCoalescedDataRequest.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfCoalescedDataRequest.java
new file mode 100644 (file)
index 0000000..c946cc2
--- /dev/null
@@ -0,0 +1,333 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 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:
+ *   Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.tmf.core.request;
+
+import java.util.Vector;
+
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
+import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
+
+/**
+ * The TMF coalesced data request
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
+ */
+public class TmfCoalescedDataRequest<T extends ITmfEvent> extends TmfDataRequest<T> {
+
+    // ------------------------------------------------------------------------
+    // Attributes
+    // ------------------------------------------------------------------------
+
+       /**
+        * The list of coalesced requests
+        */
+       protected Vector<ITmfDataRequest<T>> fRequests = new Vector<ITmfDataRequest<T>>();
+
+    // ------------------------------------------------------------------------
+    // Constructor
+    // ------------------------------------------------------------------------
+
+    /**
+     * Request all the events of a given type (high priority)
+     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+     * 
+     * @param dataType the requested data type
+     */
+    public TmfCoalescedDataRequest(Class<T> dataType) {
+        this(dataType, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
+    }
+
+    /**
+     * Request all the events of a given type (given priority)
+     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+     * 
+     * @param dataType the requested data type
+     * @param priority the requested execution priority
+     */
+    public TmfCoalescedDataRequest(Class<T> dataType, ExecutionType priority) {
+        this(dataType, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, priority);
+    }
+
+    /**
+     * Request all the events of a given type from the given index (high priority)
+     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+     * 
+     * @param dataType the requested data type
+     * @param index the index of the first event to retrieve
+     */
+    public TmfCoalescedDataRequest(Class<T> dataType, long index) {
+        this(dataType, index, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
+    }
+
+    /**
+     * Request all the events of a given type from the given index (given priority)
+     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+     * 
+     * @param dataType the requested data type
+     * @param index the index of the first event to retrieve
+     * @param priority the requested execution priority
+     */
+    public TmfCoalescedDataRequest(Class<T> dataType, long index, ExecutionType priority) {
+        this(dataType, index, ALL_DATA, DEFAULT_BLOCK_SIZE, priority);
+    }
+
+    /**
+     * Request 'n' events of a given type from the given index (high priority)
+     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+     * 
+     * @param dataType the requested data type
+     * @param index the index of the first event to retrieve
+     * @param nbRequested the number of events requested
+     */
+    public TmfCoalescedDataRequest(Class<T> dataType, long index, int nbRequested) {
+        this(dataType, index, nbRequested, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
+    }
+
+    /**
+     * Request 'n' events of a given type from the given index (given priority)
+     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+     * 
+     * @param dataType the requested data type
+     * @param index the index of the first event to retrieve
+     * @param nbRequested the number of events requested
+     * @param priority the requested execution priority
+     */
+    public TmfCoalescedDataRequest(Class<T> dataType, long index, int nbRequested, ExecutionType priority) {
+        this(dataType, index, nbRequested, DEFAULT_BLOCK_SIZE, priority);
+    }
+
+    /**
+     * Request 'n' events of a given type from the given index (high priority).
+     * Events are returned in blocks of the given size.
+     * 
+     * @param dataType the requested data type
+     * @param index the index of the first event to retrieve
+     * @param nbRequested the number of events requested
+     * @param blockSize the number of events per block
+     */
+    public TmfCoalescedDataRequest(Class<T> dataType, long index, int nbRequested, int blockSize) {
+        super(dataType, index, nbRequested, blockSize, ExecutionType.FOREGROUND);
+    }
+
+    /**
+     * Request 'n' events of a given type from the given index (given priority).
+     * Events are returned in blocks of the given size.
+     * 
+     * @param dataType the requested data type
+     * @param index the index of the first event to retrieve
+     * @param nbRequested the number of events requested
+     * @param blockSize the number of events per block
+     * @param priority the requested execution priority
+     */
+    public TmfCoalescedDataRequest(Class<T> dataType, long index, int nbRequested, int blockSize, ExecutionType priority) {
+        super(dataType, index, nbRequested, blockSize, priority);
+    }
+
+    // ------------------------------------------------------------------------
+    // Management
+    // ------------------------------------------------------------------------
+
+       public void addRequest(ITmfDataRequest<T> request) {
+               fRequests.add(request);
+        merge(request);
+       }
+
+       public boolean isCompatible(ITmfDataRequest<T> request) {
+               if (request.getExecType() == getExecType()) {
+               return overlaps(request);
+               }
+               return false;
+       }
+
+    private boolean overlaps(ITmfDataRequest<T> request) {
+        long start = request.getIndex();
+        long end = start + request.getNbRequested();
+
+        // Return true if either the start or end index falls within
+        // the coalesced request boundaries
+        return (start <= (fIndex + fNbRequested + 1) && (end >= fIndex - 1));
+    }
+
+    private void merge(ITmfDataRequest<T> request) {
+        long start = request.getIndex();
+        long end = Math.min(start + request.getNbRequested(), TmfDataRequest.ALL_DATA);
+        
+        if (start < fIndex) {
+            if (fNbRequested != TmfDataRequest.ALL_DATA) {
+                fNbRequested += (fIndex - start);
+            }
+            fIndex = start;
+        }
+        if ((request.getNbRequested() == TmfDataRequest.ALL_DATA) ||
+             (fNbRequested == TmfDataRequest.ALL_DATA))
+        {
+            fNbRequested = TmfDataRequest.ALL_DATA;
+        } else {
+            fNbRequested = (int) Math.max(end - fIndex, fNbRequested);
+        }
+    }
+
+       @SuppressWarnings("nls")
+    public String getSubRequestIds() {
+           StringBuffer result = new StringBuffer("[");
+           for (int i = 0; i < fRequests.size(); i++) {
+               if (i != 0) result.append(", ");
+               result.append(fRequests.get(i).getRequestId());
+           }
+           result.append("]");
+           return result.toString();
+       }
+
+    // ------------------------------------------------------------------------
+    // ITmfDataRequest
+    // ------------------------------------------------------------------------
+
+    @Override
+       public void handleData(T data) {
+               super.handleData(data);
+       // Don't call sub-requests handleData() unless this is a
+               // TmfCoalescedDataRequest; extended classes should call
+               // the sub-requests handleData().
+               if (getClass() == TmfCoalescedDataRequest.class) {
+                   long index = getNbRead();
+               for (ITmfDataRequest<T> request : fRequests) {
+                   if (!request.isCompleted()) {
+                    if (request.getDataType().isInstance(data)) {
+                        long start = request.getIndex();
+                        long end = start + request.getNbRequested() - 1;
+                        if (index >= start && index < end) {
+                            request.handleData(data);
+                        }
+                    }
+                   }
+               }
+               }
+    }
+
+    @Override
+    public void start() {
+        for (ITmfDataRequest<T> request : fRequests) {
+            if (!request.isCompleted()) {
+                request.start();
+            }
+        }
+        super.start();
+    }
+    
+       @Override
+    public void done() {
+       for (ITmfDataRequest<T> request : fRequests) {
+           if (!request.isCompleted()) {
+               request.done();
+           }
+       }
+       super.done();
+    }
+
+    @Override
+    public void fail() {
+       for (ITmfDataRequest<T> request : fRequests) {
+               request.fail();
+       }
+       super.fail();
+    }
+
+    @Override
+    public void cancel() {
+       for (ITmfDataRequest<T> request : fRequests) {
+           if (!request.isCompleted()) {
+               request.cancel();
+           }
+       }
+       super.cancel();
+    }
+    
+    @Override
+    public boolean isCompleted() {
+        // Firstly, check if coalescing request is completed
+        if (super.isCompleted()) {
+            return true;
+        }
+
+        // Secondly, check if all sub-requests are finished
+        if (fRequests.size() > 0) {
+            // If all sub requests are completed the coalesced request is 
+            // treated as completed, too.
+            for (ITmfDataRequest<T> request : fRequests) {
+                if (!request.isCompleted()) {
+                    return false;
+                }
+            }
+            return true;
+        }
+
+        // Coalescing request is not finished if there are no sub-requests
+        return false;
+    }
+
+    @Override
+    public boolean isCancelled() {
+        // Firstly, check if coalescing request is canceled
+        if (super.isCancelled()) {
+            return true;
+        }
+
+        // Secondly, check if all sub-requests are canceled
+        if (fRequests.size() > 0) {
+            // If all sub requests are canceled the coalesced request is 
+            // treated as completed, too.
+            for (ITmfDataRequest<T> request : fRequests) {
+                if (!request.isCancelled()) {
+                    return false;
+                }
+            }
+            return true;
+        }
+
+        // Coalescing request is not canceled if there are no sub-requests
+        return false;
+
+    }
+
+    
+    // ------------------------------------------------------------------------
+    // Object
+    // ------------------------------------------------------------------------
+
+    @Override
+    // All requests have a unique id
+    public int hashCode() {
+       return super.hashCode();
+    }
+
+    @Override
+    public boolean equals(Object other) {
+       if (other instanceof TmfCoalescedDataRequest<?>) {
+               TmfCoalescedDataRequest<?> request = (TmfCoalescedDataRequest<?>) other;
+                       return  (request.getDataType()    == getDataType())   &&
+                                       (request.getIndex()       == getIndex())      &&
+                                       (request.getNbRequested() == getNbRequested() &&
+                               (request.getExecType()    == getExecType()));
+               }
+               return false;
+    }
+
+    @Override
+    @SuppressWarnings("nls")
+    public String toString() {
+               return "[TmfCoalescedDataRequest(" + getRequestId() + "," + getDataType().getSimpleName() 
+                       + "," + getIndex() + "," + getNbRequested() + "," + getBlockSize() + ")]";
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfCoalescedEventRequest.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfCoalescedEventRequest.java
new file mode 100644 (file)
index 0000000..1cb9c33
--- /dev/null
@@ -0,0 +1,285 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 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:
+ *   Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.tmf.core.request;
+
+import org.eclipse.linuxtools.internal.tmf.core.Tracer;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
+import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
+import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
+import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
+
+/**
+ * The TMF coalesced event request
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
+ */
+public class TmfCoalescedEventRequest<T extends ITmfEvent> extends TmfCoalescedDataRequest<T> implements ITmfEventRequest<T> {
+
+    // ------------------------------------------------------------------------
+    // Attributes
+    // ------------------------------------------------------------------------
+
+       private TmfTimeRange fRange;    // The requested events time range
+
+    // ------------------------------------------------------------------------
+    // Constructor
+    // ------------------------------------------------------------------------
+
+    /**
+     * Request all the events of a given type (high priority)
+     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+     * 
+     * @param dataType the requested data type
+     */
+    public TmfCoalescedEventRequest(Class<T> dataType) {
+        this(dataType, TmfTimeRange.ETERNITY, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
+    }
+
+    /**
+     * Request all the events of a given type (given priority)
+     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+     * 
+     * @param dataType the requested data type
+     * @param priority the requested execution priority
+     */
+    public TmfCoalescedEventRequest(Class<T> dataType, ExecutionType priority) {
+        this(dataType, TmfTimeRange.ETERNITY, ALL_DATA, DEFAULT_BLOCK_SIZE, priority);
+    }
+
+    /**
+     * Request all the events of a given type for the given time range (high priority)
+     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+     * 
+     * @param dataType the requested data type
+     * @param range the time range of the requested events
+     */
+    public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range) {
+        this(dataType, range, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
+    }
+
+    /**
+     * Request all the events of a given type for the given time range (given priority)
+     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+     * 
+     * @param dataType the requested data type
+     * @param range the time range of the requested events
+     * @param priority the requested execution priority
+     */
+    public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, ExecutionType priority) {
+        this(dataType, range, ALL_DATA, DEFAULT_BLOCK_SIZE, priority);
+    }
+
+    /**
+     * Request 'n' events of a given type from the given time range (high priority)
+     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+     * 
+     * @param dataType the requested data type
+     * @param range the time range of the requested events
+     * @param nbRequested the number of events requested
+     */
+    public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested) {
+        this(dataType, range, nbRequested, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
+    }
+
+    /**
+     * Request 'n' events of a given type for the given time range (given priority)
+     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
+     * 
+     * @param dataType the requested data type
+     * @param range the time range of the requested events
+     * @param nbRequested the number of events requested
+     * @param priority the requested execution priority
+     */
+    public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, ExecutionType priority) {
+        this(dataType, range, nbRequested, DEFAULT_BLOCK_SIZE, priority);
+    }
+
+    /**
+     * Request 'n' events of a given type for the given time range (high priority).
+     * Events are returned in blocks of the given size.
+     * 
+     * @param dataType the requested data type
+     * @param range the time range of the requested events
+     * @param nbRequested the number of events requested
+     * @param blockSize the number of events per block
+     */
+    public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, int blockSize) {
+        this(dataType, range, 0, nbRequested, blockSize, ExecutionType.FOREGROUND);
+    }
+
+    /**
+     * Request 'n' events of a given type for the given time range (given priority).
+     * Events are returned in blocks of the given size.
+     * 
+     * @param dataType the requested data type
+     * @param range the time range of the requested events
+     * @param nbRequested the number of events requested
+     * @param blockSize the number of events per block
+     * @param priority the requested execution priority
+     */
+    public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, int blockSize, ExecutionType priority) {
+        this(dataType, range, 0, nbRequested, blockSize, priority);
+    }
+
+    /**
+     * Request 'n' events of a given type for the given time range (given priority).
+     * Events are returned in blocks of the given size.
+     * 
+     * @param dataType the requested data type
+     * @param range the time range of the requested events
+     * @param index the index of the first event to retrieve
+     * @param nbRequested the number of events requested
+     * @param blockSize the number of events per block
+     * @param priority the requested execution priority
+     */
+    public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, long index, int nbRequested, int blockSize, ExecutionType priority) {
+        super(dataType, index, nbRequested, blockSize, priority);
+        fRange = range;
+
+        if (Tracer.isRequestTraced()) {
+            String type = getClass().getName();
+            type = type.substring(type.lastIndexOf('.') + 1);
+            @SuppressWarnings("nls")
+            String message = "CREATED " 
+                    + (getExecType() == ITmfDataRequest.ExecutionType.BACKGROUND ? "(BG)" : "(FG)") 
+                    + " Type=" + type + " Index=" + getIndex() + " NbReq=" + getNbRequested() 
+                    + " Range=" + getRange()
+                    + " DataType=" + getDataType().getSimpleName();
+            Tracer.traceRequest(this, message);
+        }
+    }
+
+    // ------------------------------------------------------------------------
+    // Management
+    // ------------------------------------------------------------------------
+
+    @Override
+    public void addRequest(ITmfDataRequest<T> request) {
+        super.addRequest(request);
+        if (request instanceof ITmfEventRequest<?>) {
+            merge((ITmfEventRequest<T>) request);
+        }
+    }
+
+       @Override
+       public boolean isCompatible(ITmfDataRequest<T> request) {
+           if (request instanceof ITmfEventRequest<?>) {
+               if (super.isCompatible(request)) {
+                   return overlaps((ITmfEventRequest<T>) request);
+               }
+           }
+           return false;
+       }
+
+    private boolean overlaps(ITmfEventRequest<T> request) {
+        ITmfTimestamp startTime = ((ITmfEventRequest<T>) request).getRange().getStartTime();
+        ITmfTimestamp endTime   = ((ITmfEventRequest<T>) request).getRange().getEndTime();
+        return (startTime.compareTo(endTime) <= 0) && (fRange.getStartTime().compareTo(fRange.getEndTime()) <= 0);
+    }
+
+    private void merge(ITmfEventRequest<T> request) {
+        ITmfTimestamp startTime = ((ITmfEventRequest<T>) request).getRange().getStartTime();
+        ITmfTimestamp endTime   = ((ITmfEventRequest<T>) request).getRange().getEndTime();
+        if (!fRange.contains(startTime) && fRange.getStartTime().compareTo(startTime) > 0) {
+            fRange = new TmfTimeRange(startTime, fRange.getEndTime());
+        }
+        if (!fRange.contains(endTime) && fRange.getEndTime().compareTo(endTime) < 0) {
+            fRange = new TmfTimeRange(fRange.getStartTime(), endTime);
+        }
+    }
+
+    // ------------------------------------------------------------------------
+    // ITmfDataRequest
+    // ------------------------------------------------------------------------
+
+    @Override
+    public void handleData(T data) {
+        super.handleData(data);
+        for (ITmfDataRequest<T> request : fRequests) {
+            if (data == null) {
+                request.handleData(null);
+            } else {
+                if (request instanceof TmfEventRequest<?>) {
+                    TmfEventRequest<T> req = (TmfEventRequest<T>) request;
+                    if (!req.isCompleted() && (getNbRead() > request.getIndex())) {
+                        ITmfTimestamp ts = data.getTimestamp();
+                        if (req.getRange().contains(ts)) {
+                            if (req.getDataType().isInstance(data)) {
+                                req.handleData(data);
+                            }
+                        }
+                    }
+                }
+                else {
+                    TmfDataRequest<T> req = (TmfDataRequest<T>) request;
+                    if (!req.isCompleted()) {
+                        if (req.getDataType().isInstance(data)) {
+                            req.handleData(data);
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    // ------------------------------------------------------------------------
+    // ITmfEventRequest
+    // ------------------------------------------------------------------------
+
+       @Override
+       public TmfTimeRange getRange() {
+               return fRange;
+       }
+       
+       @Override
+       public void setStartIndex(int index) {
+               setIndex(index);
+       }
+       
+    // ------------------------------------------------------------------------
+    // Object
+    // ------------------------------------------------------------------------
+
+    @Override
+    // All requests have a unique id
+    public int hashCode() {
+       return super.hashCode();
+    }
+
+    @Override
+    public boolean equals(Object other) {
+       if (other instanceof TmfCoalescedEventRequest<?>) {
+               TmfCoalescedEventRequest<?> request = (TmfCoalescedEventRequest<?>) other;
+                       return  (request.getDataType()    == getDataType()) &&
+                                       (request.getIndex()       == getIndex())    &&
+                                       (request.getNbRequested() == getNbRequested()) &&
+                               (request.getRange().equals(getRange()));
+               }
+       if (other instanceof TmfCoalescedDataRequest<?>) {
+                       return super.equals(other);
+       }
+               return false;
+    }
+
+    @Override
+    @SuppressWarnings("nls")
+    public String toString() {
+               return "[TmfCoalescedEventRequest(" + getRequestId() + "," + getDataType().getSimpleName() 
+                       + "," + getRange() + "," + getIndex() + "," + getNbRequested() + "," + getBlockSize() + ")]";
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfRequestExecutor.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/request/TmfRequestExecutor.java
new file mode 100644 (file)
index 0000000..6bbfd5c
--- /dev/null
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 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:
+ *   Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.tmf.core.request;
+
+import java.util.Comparator;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.PriorityBlockingQueue;
+
+import org.eclipse.linuxtools.internal.tmf.core.Tracer;
+import org.eclipse.linuxtools.internal.tmf.core.component.TmfThread;
+import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;
+
+/**
+ * A simple, straightforward request executor.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
+ */
+public class TmfRequestExecutor implements Executor {
+
+       private final ExecutorService fExecutor;
+       private final String fExecutorName;
+       private final PriorityBlockingQueue<TmfThread> fRequestQueue = new PriorityBlockingQueue<TmfThread>(100, new Comparator<TmfThread>() {
+               @Override
+               public int compare(TmfThread o1, TmfThread o2) {
+                       if (o1.getExecType() == o2.getExecType())
+                               return 0;
+                       if (o1.getExecType() == ExecutionType.BACKGROUND)
+                               return 1;
+                       return -1;
+               }
+       });
+       private TmfThread fCurrentRequest;
+       
+       // ------------------------------------------------------------------------
+       // Constructors
+       // ------------------------------------------------------------------------
+       
+       public TmfRequestExecutor() {
+               this(Executors.newSingleThreadExecutor());
+       }
+
+       public TmfRequestExecutor(ExecutorService executor) {
+               fExecutor = executor;
+               String canonicalName = fExecutor.getClass().getCanonicalName();
+               fExecutorName = canonicalName.substring(canonicalName.lastIndexOf('.') + 1);
+               if (Tracer.isComponentTraced()) Tracer.trace(fExecutor + " created"); //$NON-NLS-1$
+       }
+
+       /**
+        * @return the number of pending requests
+        */
+       public synchronized int getNbPendingRequests() {
+               return fRequestQueue.size();
+       }
+       
+       /**
+        * @return the shutdown state (i.e. if it is accepting new requests)
+        */
+       public synchronized boolean isShutdown() {
+               return fExecutor.isShutdown();
+       }
+       
+       /**
+        * @return the termination state
+        */
+       public synchronized boolean isTerminated() {
+               return fExecutor.isTerminated();
+       }
+       
+       /**
+        * Stops the executor
+        */
+       public synchronized void stop() {
+           if (fCurrentRequest != null) {
+               fCurrentRequest.cancel();
+           }
+           
+           while ((fCurrentRequest = fRequestQueue.poll()) != null) {
+               fCurrentRequest.cancel();
+           }
+
+               fExecutor.shutdown();
+               if (Tracer.isComponentTraced()) Tracer.trace(fExecutor + " terminated"); //$NON-NLS-1$
+       }
+       
+       // ------------------------------------------------------------------------
+       // Operations
+       // ------------------------------------------------------------------------
+       
+       /* (non-Javadoc)
+        * @see java.util.concurrent.Executor#execute(java.lang.Runnable)
+        */
+       @Override
+       public synchronized void execute(final Runnable requestThread) {
+               fRequestQueue.offer(new TmfThread(((TmfThread) requestThread).getExecType()) {
+                       @Override
+                       public void run() {
+                               try {
+                                       requestThread.run();
+                               } finally {
+                                       scheduleNext();
+                               }
+                       }
+            @Override
+            public void cancel() {
+                ((TmfThread) requestThread).cancel();
+            }
+               });
+               if (fCurrentRequest == null) {
+                       scheduleNext();
+               }
+       }
+
+       /**
+        * Executes the next pending request, if applicable.
+        */
+       protected synchronized void scheduleNext() {
+               if ((fCurrentRequest = fRequestQueue.poll()) != null) {
+                       if (!isShutdown())
+                               fExecutor.execute(fCurrentRequest);
+               }
+       }
+
+       // ------------------------------------------------------------------------
+       // Object
+       // ------------------------------------------------------------------------
+
+       @Override
+    @SuppressWarnings("nls")
+       public String toString() {
+               return "[TmfRequestExecutor(" + fExecutorName + ")]";
+       }
+
+}
index b7a4259efad81613c16e9d4e1225779d44f1ca12..285018650dc273aca7909bbb05e5c486f8904b06 100644 (file)
@@ -16,6 +16,7 @@ import org.eclipse.core.runtime.QualifiedName;
 /**
  *  This class provides a common container for TMF constants.
  *  
+ * @version 1.0
  *  @author Bernd Hufmann
  */
 public class TmfCommonConstants {
index 6d7c6e9ca95ada584b5ec864b3e9d826a06f8997..a55bb1a7ccc0705b84b754422786984a794b61da 100644 (file)
@@ -17,20 +17,42 @@ import org.eclipse.core.resources.IProjectNature;
 import org.eclipse.core.runtime.CoreException;
 
 /**
- * <b><u>TmfProjectNature</u></b>
- * <p>
- * This is really a marker for the tracing projects.
+ * The TMF basic tracing project nature.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class TmfProjectNature implements IProjectNature {
 
+    // ------------------------------------------------------------------------
+    // Constants
+    // ------------------------------------------------------------------------
+
+       /**
+        * The nature ID
+        */
        public static final String ID = "org.eclipse.linuxtools.tmf.project.nature"; //$NON-NLS-1$
 
+    // ------------------------------------------------------------------------
+    // Attributes
+    // ------------------------------------------------------------------------
+
        private IProject fProject;
        
+    // ------------------------------------------------------------------------
+    // Operations
+    // ------------------------------------------------------------------------
+
+       /* (non-Javadoc)
+        * @see org.eclipse.core.resources.IProjectNature#configure()
+        */
        @Override
        public void configure() throws CoreException {
        }
 
+       /* (non-Javadoc)
+        * @see org.eclipse.core.resources.IProjectNature#deconfigure()
+        */
        @Override
        public void deconfigure() throws CoreException {
        }
@@ -40,6 +62,9 @@ public class TmfProjectNature implements IProjectNature {
                return fProject;
        }
 
+       /* (non-Javadoc)
+        * @see org.eclipse.core.resources.IProjectNature#setProject(org.eclipse.core.resources.IProject)
+        */
        @Override
        public void setProject(IProject project) {
                fProject = project;
index db092252de3bad50e811488059890de5add10e22..b11bc04b44063f26a84572048c507c7b6ef3ba90 100644 (file)
@@ -15,11 +15,14 @@ package org.eclipse.linuxtools.tmf.core.component;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignal;
 
 /**
- * <b><u>ITmfComponent</u></b>
- * <p>
  * This is the basic interface of all the TMF components.
  * <p>
- *  Currently, it only addresses the inter-component signaling.
+ * Currently, it only addresses the inter-component signalling.
+ *
+ * @version 1.0
+ * @author Francois Chouinard
+ * 
+ * @see TmfComponent
  */
 public interface ITmfComponent {
 
index 5f387127f8c7042a10627f11fc5f3b48ed5de4b0..84e581fd770b19a8136815746b35f5359a7b3a16 100644 (file)
@@ -17,20 +17,24 @@ import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 
 /**
- * <b><u>ITmfDataRequest</u></b>
- * <p>
- * TODO: Implement me. Please.
+ * This is the interface of the data providers in TMF. Data providers have the
+ * capability of handling data requests.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
+ * 
+ * @see TmfDataProvider
+ * @see TmfEventProvider
  */
 public interface ITmfDataProvider<T extends ITmfEvent> extends ITmfComponent {
 
     /**
-     * Queues the request for processing.
-     * 
-     * If the request can't be serviced, it will fail (i.e. isFailed() will be set).
+     * Queue the request for processing.
      * 
      * @param request The request to process
      */
     public void sendRequest(ITmfDataRequest<T> request);
+
     public void fireRequest();
     public void notifyPendingRequest(boolean isIncrement);
 
index 58501a41958d02d0c430cb510f3485f7a5e4d193..31cca5605a0c3abfe57176691846569d22dbee81 100644 (file)
@@ -16,11 +16,12 @@ import org.eclipse.linuxtools.tmf.core.signal.TmfSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager;
 
 /**
- * <b><u>TmfComponent</u></b>
- * <p>
  * This is the base class of the TMF components.
  * <p>
- *  Currently, it only addresses the inter-component signaling.
+ * Currently, it only addresses the inter-component signaling.
+ *
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public abstract class TmfComponent implements ITmfComponent {
 
@@ -34,27 +35,57 @@ public abstract class TmfComponent implements ITmfComponent {
        // Constructor
        // ------------------------------------------------------------------------
 
+    /**
+     * Default constructor. To be used in conjunction with init()
+     */
     public TmfComponent() {
            this(""); //$NON-NLS-1$
     }
 
+    /**
+     * Perform component initialization and register it as a signal listener.
+     * Need to be called when the default constructor was used.
+     * 
+     * @param name the component name
+     */
     public void init(String name) {
         fName = name;
         TmfSignalManager.register(this);
     }
 
+       /**
+        * The standard constructor
+        * 
+        * @param name the component name
+        */
        public TmfComponent(String name) {
                init(name);
        }
        
+       /**
+        * The copy constructor
+        * 
+        * @param other the other component
+        */
        public TmfComponent(TmfComponent other) {
         init(other.fName);
        }
        
     // ------------------------------------------------------------------------
-    // Accessors
+    // Getters/setters
     // ------------------------------------------------------------------------
 
+    /* (non-Javadoc)
+     * @see org.eclipse.linuxtools.tmf.core.component.ITmfComponent#getName()
+     */
+    @Override
+    public String getName() {
+        return fName;
+    }
+
+       /**
+        * @param name the new component name
+        */
        protected void setName(String name) {
                fName = name;
        }
@@ -63,17 +94,18 @@ public abstract class TmfComponent implements ITmfComponent {
        // ITmfComponent
        // ------------------------------------------------------------------------
 
-       @Override
-       public String getName() {
-               return fName;
-       }
-
+       /* (non-Javadoc)
+        * @see org.eclipse.linuxtools.tmf.core.component.ITmfComponent#dispose()
+        */
        @Override
        public void dispose() {
                TmfSignalManager.deregister(this);
 //             if (Tracer.isComponentTraced()) Tracer.traceComponent(this, "terminated");
        }
 
+       /* (non-Javadoc)
+        * @see org.eclipse.linuxtools.tmf.core.component.ITmfComponent#broadcast(org.eclipse.linuxtools.tmf.core.signal.TmfSignal)
+        */
        @Override
        public void broadcast(TmfSignal signal) {
                TmfSignalManager.dispatchSignal(signal);
index 54b37efc06ff5fe53ccc6ce3b3d717471f136ac1..f563f6d8d36d1f1b3d44df3c24e3dc2bef164333 100644 (file)
@@ -18,29 +18,32 @@ import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.SynchronousQueue;
 
 import org.eclipse.linuxtools.internal.tmf.core.Tracer;
+import org.eclipse.linuxtools.internal.tmf.core.component.TmfProviderManager;
+import org.eclipse.linuxtools.internal.tmf.core.component.TmfThread;
+import org.eclipse.linuxtools.internal.tmf.core.request.TmfCoalescedDataRequest;
+import org.eclipse.linuxtools.internal.tmf.core.request.TmfRequestExecutor;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;
-import org.eclipse.linuxtools.tmf.core.request.TmfCoalescedDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfDataRequest;
-import org.eclipse.linuxtools.tmf.core.request.TmfRequestExecutor;
 import org.eclipse.linuxtools.tmf.core.signal.TmfEndSynchSignal;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
 import org.eclipse.linuxtools.tmf.core.signal.TmfStartSynchSignal;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
 
 /**
- * <b><u>TmfProvider</u></b>
+ * An abstract base class that implements ITmfDataProvider.
  * <p>
- * The TmfProvider<T> is a provider for a data of type <T>.
+ * This abstract class implements the housekeeping methods to register/
+ * de-register the event provider and to handle generically the event requests.
  * <p>
- * This abstract class implements the housekeeking methods to register/ deregister the event provider and to handle
- * generically the event requests.
- * <p>
- * The concrete class can either re-implement processRequest() entirely or just implement the hooks (initializeContext()
- * and getNext()).
+ * The concrete class can either re-implement processRequest() entirely or just
+ * implement the hooks (initializeContext() and getNext()).
  * <p>
  * TODO: Add support for providing multiple data types.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public abstract class TmfDataProvider<T extends ITmfEvent> extends TmfComponent implements ITmfDataProvider<T> {
 
index 58aaecd5c679e1f9af5945a663f1d0a55a413be1..a0367725e3f0c16ddf2084d0e0e64a09e5c23ffd 100644 (file)
 package org.eclipse.linuxtools.tmf.core.component;
 
 import org.eclipse.linuxtools.internal.tmf.core.Tracer;
+import org.eclipse.linuxtools.internal.tmf.core.request.TmfCoalescedEventRequest;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;
 import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
-import org.eclipse.linuxtools.tmf.core.request.TmfCoalescedEventRequest;
 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
 
 /**
- * <b><u>TmfEventProvider</u></b>
- * <p>
+ * An extension of TmfDataProvider timestamped events providers.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public abstract class TmfEventProvider<T extends ITmfEvent> extends TmfDataProvider<T> {
 
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfProviderManager.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfProviderManager.java
deleted file mode 100644 (file)
index 7754a14..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 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:
- *   Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.core.component;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-
-/**
- * <b><u>TmfProviderManager.java</u></b>
- * <p>
- * Singleton that keeps track of the event providers.
- */
-public class TmfProviderManager {
-
-       // ------------------------------------------------------------------------
-       // No constructor
-       // ------------------------------------------------------------------------
-
-       private TmfProviderManager() {}
-       
-       // ------------------------------------------------------------------------
-       // Keeps track of the providers for each event type
-       // ------------------------------------------------------------------------
-       
-       private static Map<Class<? extends ITmfEvent>, List<TmfDataProvider<? extends ITmfEvent>>> fProviders =
-                  new HashMap<Class<? extends ITmfEvent>, List<TmfDataProvider<? extends ITmfEvent>>>();
-
-       /**
-        * Registers [provider] as a provider of [eventType]
-        * 
-        * @param eventType
-        * @param provider
-        */
-       public static <T extends ITmfEvent> void register(Class<T> eventType, TmfDataProvider<? extends ITmfEvent> provider) {
-               if (fProviders.get(eventType) == null)
-                       fProviders.put(eventType, new ArrayList<TmfDataProvider<? extends ITmfEvent>>());
-               fProviders.get(eventType).add(provider);
-       }
-
-       /**
-        * Re-registers [provider] as a provider of [eventType]
-        * 
-        * @param eventType
-        * @param provider
-        */
-       public static <T extends ITmfEvent> void deregister(Class<T> eventType, TmfDataProvider<? extends ITmfEvent> provider) {
-               List<TmfDataProvider<? extends ITmfEvent>> list = fProviders.get(eventType);
-               if (list != null) {
-                       list.remove(provider);
-                       if (list.size() == 0)
-                               fProviders.remove(eventType);
-               }
-       }
-
-       /**
-        * Returns the list of components that provide [eventType]
-        * 
-        * @param eventType
-        * @return the list of components that provide [eventType]
-        */
-       @SuppressWarnings("unchecked")
-       public static TmfDataProvider<? extends ITmfEvent>[] getProviders(Class<? extends ITmfEvent> eventType) {
-               List<TmfDataProvider<? extends ITmfEvent>> list = fProviders.get(eventType);
-               if (list == null)
-                       list = new ArrayList<TmfDataProvider<? extends ITmfEvent>>(); 
-               TmfDataProvider<? extends ITmfEvent>[] result = new TmfDataProvider[list.size()];
-               return list.toArray(result);
-       }
-
-       /**
-        * Returns the list of components of type [providerType] that provide [eventType]
-        * 
-        * @param eventType
-        * @param providerType
-     * @return the list of components of type [providerType] that provide [eventType]
-        */
-       @SuppressWarnings("unchecked")
-       public static TmfDataProvider<? extends ITmfEvent>[] getProviders(Class<? extends ITmfEvent> eventType, Class<? extends TmfDataProvider<? extends ITmfEvent>> providerType) {
-               if (providerType == null) {
-                       return getProviders(eventType);
-               }
-               TmfDataProvider<? extends ITmfEvent>[] list = getProviders(eventType);
-               List<TmfDataProvider<? extends ITmfEvent>> result = new ArrayList<TmfDataProvider<? extends ITmfEvent>>();
-               if (list != null) {
-                       for (TmfDataProvider<? extends ITmfEvent> provider : list) {
-                               if (provider.getClass() == providerType) {
-                                       result.add(provider);
-                               }
-                       }
-               }
-               TmfDataProvider<? extends ITmfEvent>[] array = new TmfDataProvider[result.size()];
-               return result.toArray(array);
-       }
-
-}
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfThread.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/component/TmfThread.java
deleted file mode 100644 (file)
index 921b556..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.eclipse.linuxtools.tmf.core.component;
-
-import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;
-
-public class TmfThread extends Thread { // implements Comparator<ITmfDataRequest<?>> {
-
-       private final ExecutionType fExecType;
-       
-       public TmfThread(ExecutionType execType) {
-               fExecType = execType;
-       }
-       
-       public ExecutionType getExecType() {
-               return fExecType;
-       }
-
-       public void cancel() {
-       }
-
-}
index 2fa7d65e1773b4506aa7d9654bbb3008b044c204..1dd0848527ba2c1608921efb9a6bdb76f2327f9c 100644 (file)
@@ -203,7 +203,6 @@ public abstract class CtfTmfEventField implements ITmfEventField {
      * @return String
      * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getFieldName(int)
      */
-    @SuppressWarnings("unused")
     @Override
     public String getFieldName(int index) {
         return null;
@@ -225,7 +224,6 @@ public abstract class CtfTmfEventField implements ITmfEventField {
      * @return ITmfEventField
      * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getField(String)
      */
-    @SuppressWarnings("unused")
     @Override
     public ITmfEventField getField(String fieldName) {
         return null;
@@ -237,7 +235,6 @@ public abstract class CtfTmfEventField implements ITmfEventField {
      * @return ITmfEventField
      * @see org.eclipse.linuxtools.tmf.core.event.ITmfEventField#getField(int)
      */
-    @SuppressWarnings("unused")
     @Override
     public ITmfEventField getField(int index) {
         return null;
index 3587d0e8cb1b16ccd37ccaeb76c7f6355f5d35c0..c5e118e19e5540adf091a90930117d6ec947f451 100644 (file)
@@ -525,7 +525,7 @@ public class CtfTmfTrace extends TmfEventProvider<CtfTmfEvent> implements ITmfTr
      * sub-classes.
      * @throws TmfTraceException
      */
-    @SuppressWarnings({ "static-method", "unused" })
+    @SuppressWarnings("static-method")
     protected void buildStateSystem() throws TmfTraceException {
         /*
          * Nothing is done in the basic implementation, please specify
index b22cb7400e3bde54afef571367a303fb69ca355c..708b128d15d4900e849a74402baa48d1e8ebb084 100644 (file)
@@ -14,6 +14,9 @@ package org.eclipse.linuxtools.tmf.core.exceptions;
 
 /**
  * TMF trace related exception
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public class TmfTraceException extends Exception {
 
index 5f04f6df93d5e5bf2066faf4dd46ef27aca9c5be..e78464172ad9d3de564ff2c518e4cc47cc95269f 100644 (file)
@@ -15,9 +15,10 @@ package org.eclipse.linuxtools.tmf.core.request;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 
 /**
- * <b><u>ITmfDataRequest</u></b>
- * <p>
- * TODO: Implement me. Please.
+ * The TMF data request
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public interface ITmfDataRequest<T extends ITmfEvent> {
 
index 4a192c30d4fec9fc1acfa8f99879d92b612d40ed..b22e03258626e034c4bdfa201ec090a5e94257b7 100644 (file)
@@ -16,9 +16,10 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 
 /**
- * <b><u>ITmfEventRequest</u></b>
- * <p>
- * TODO: Implement me. Please.
+ * The TMF event request
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public interface ITmfEventRequest<T extends ITmfEvent> extends ITmfDataRequest<T> {
 
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedDataRequest.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedDataRequest.java
deleted file mode 100644 (file)
index b5dd136..0000000
+++ /dev/null
@@ -1,329 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 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:
- *   Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.core.request;
-
-import java.util.Vector;
-
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-
-/**
- * <b><u>TmfCoalescedDataRequest</u></b>
- * <p>
- */
-public class TmfCoalescedDataRequest<T extends ITmfEvent> extends TmfDataRequest<T> {
-
-    // ------------------------------------------------------------------------
-    // Attributes
-    // ------------------------------------------------------------------------
-
-       /**
-        * The list of coalesced requests
-        */
-       protected Vector<ITmfDataRequest<T>> fRequests = new Vector<ITmfDataRequest<T>>();
-
-    // ------------------------------------------------------------------------
-    // Constructor
-    // ------------------------------------------------------------------------
-
-    /**
-     * Request all the events of a given type (high priority)
-     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
-     * 
-     * @param dataType the requested data type
-     */
-    public TmfCoalescedDataRequest(Class<T> dataType) {
-        this(dataType, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
-    }
-
-    /**
-     * Request all the events of a given type (given priority)
-     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
-     * 
-     * @param dataType the requested data type
-     * @param priority the requested execution priority
-     */
-    public TmfCoalescedDataRequest(Class<T> dataType, ExecutionType priority) {
-        this(dataType, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, priority);
-    }
-
-    /**
-     * Request all the events of a given type from the given index (high priority)
-     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
-     * 
-     * @param dataType the requested data type
-     * @param index the index of the first event to retrieve
-     */
-    public TmfCoalescedDataRequest(Class<T> dataType, long index) {
-        this(dataType, index, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
-    }
-
-    /**
-     * Request all the events of a given type from the given index (given priority)
-     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
-     * 
-     * @param dataType the requested data type
-     * @param index the index of the first event to retrieve
-     * @param priority the requested execution priority
-     */
-    public TmfCoalescedDataRequest(Class<T> dataType, long index, ExecutionType priority) {
-        this(dataType, index, ALL_DATA, DEFAULT_BLOCK_SIZE, priority);
-    }
-
-    /**
-     * Request 'n' events of a given type from the given index (high priority)
-     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
-     * 
-     * @param dataType the requested data type
-     * @param index the index of the first event to retrieve
-     * @param nbRequested the number of events requested
-     */
-    public TmfCoalescedDataRequest(Class<T> dataType, long index, int nbRequested) {
-        this(dataType, index, nbRequested, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
-    }
-
-    /**
-     * Request 'n' events of a given type from the given index (given priority)
-     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
-     * 
-     * @param dataType the requested data type
-     * @param index the index of the first event to retrieve
-     * @param nbRequested the number of events requested
-     * @param priority the requested execution priority
-     */
-    public TmfCoalescedDataRequest(Class<T> dataType, long index, int nbRequested, ExecutionType priority) {
-        this(dataType, index, nbRequested, DEFAULT_BLOCK_SIZE, priority);
-    }
-
-    /**
-     * Request 'n' events of a given type from the given index (high priority).
-     * Events are returned in blocks of the given size.
-     * 
-     * @param dataType the requested data type
-     * @param index the index of the first event to retrieve
-     * @param nbRequested the number of events requested
-     * @param blockSize the number of events per block
-     */
-    public TmfCoalescedDataRequest(Class<T> dataType, long index, int nbRequested, int blockSize) {
-        super(dataType, index, nbRequested, blockSize, ExecutionType.FOREGROUND);
-    }
-
-    /**
-     * Request 'n' events of a given type from the given index (given priority).
-     * Events are returned in blocks of the given size.
-     * 
-     * @param dataType the requested data type
-     * @param index the index of the first event to retrieve
-     * @param nbRequested the number of events requested
-     * @param blockSize the number of events per block
-     * @param priority the requested execution priority
-     */
-    public TmfCoalescedDataRequest(Class<T> dataType, long index, int nbRequested, int blockSize, ExecutionType priority) {
-        super(dataType, index, nbRequested, blockSize, priority);
-    }
-
-    // ------------------------------------------------------------------------
-    // Management
-    // ------------------------------------------------------------------------
-
-       public void addRequest(ITmfDataRequest<T> request) {
-               fRequests.add(request);
-        merge(request);
-       }
-
-       public boolean isCompatible(ITmfDataRequest<T> request) {
-               if (request.getExecType() == getExecType()) {
-               return overlaps(request);
-               }
-               return false;
-       }
-
-    private boolean overlaps(ITmfDataRequest<T> request) {
-        long start = request.getIndex();
-        long end = start + request.getNbRequested();
-
-        // Return true if either the start or end index falls within
-        // the coalesced request boundaries
-        return (start <= (fIndex + fNbRequested + 1) && (end >= fIndex - 1));
-    }
-
-    private void merge(ITmfDataRequest<T> request) {
-        long start = request.getIndex();
-        long end = Math.min(start + request.getNbRequested(), TmfDataRequest.ALL_DATA);
-        
-        if (start < fIndex) {
-            if (fNbRequested != TmfDataRequest.ALL_DATA) {
-                fNbRequested += (fIndex - start);
-            }
-            fIndex = start;
-        }
-        if ((request.getNbRequested() == TmfDataRequest.ALL_DATA) ||
-             (fNbRequested == TmfDataRequest.ALL_DATA))
-        {
-            fNbRequested = TmfDataRequest.ALL_DATA;
-        } else {
-            fNbRequested = (int) Math.max(end - fIndex, fNbRequested);
-        }
-    }
-
-       @SuppressWarnings("nls")
-    public String getSubRequestIds() {
-           StringBuffer result = new StringBuffer("[");
-           for (int i = 0; i < fRequests.size(); i++) {
-               if (i != 0) result.append(", ");
-               result.append(fRequests.get(i).getRequestId());
-           }
-           result.append("]");
-           return result.toString();
-       }
-
-    // ------------------------------------------------------------------------
-    // ITmfDataRequest
-    // ------------------------------------------------------------------------
-
-    @Override
-       public void handleData(T data) {
-               super.handleData(data);
-       // Don't call sub-requests handleData() unless this is a
-               // TmfCoalescedDataRequest; extended classes should call
-               // the sub-requests handleData().
-               if (getClass() == TmfCoalescedDataRequest.class) {
-                   long index = getNbRead();
-               for (ITmfDataRequest<T> request : fRequests) {
-                   if (!request.isCompleted()) {
-                    if (request.getDataType().isInstance(data)) {
-                        long start = request.getIndex();
-                        long end = start + request.getNbRequested() - 1;
-                        if (index >= start && index < end) {
-                            request.handleData(data);
-                        }
-                    }
-                   }
-               }
-               }
-    }
-
-    @Override
-    public void start() {
-        for (ITmfDataRequest<T> request : fRequests) {
-            if (!request.isCompleted()) {
-                request.start();
-            }
-        }
-        super.start();
-    }
-    
-       @Override
-    public void done() {
-       for (ITmfDataRequest<T> request : fRequests) {
-           if (!request.isCompleted()) {
-               request.done();
-           }
-       }
-       super.done();
-    }
-
-    @Override
-    public void fail() {
-       for (ITmfDataRequest<T> request : fRequests) {
-               request.fail();
-       }
-       super.fail();
-    }
-
-    @Override
-    public void cancel() {
-       for (ITmfDataRequest<T> request : fRequests) {
-           if (!request.isCompleted()) {
-               request.cancel();
-           }
-       }
-       super.cancel();
-    }
-    
-    @Override
-    public boolean isCompleted() {
-        // Firstly, check if coalescing request is completed
-        if (super.isCompleted()) {
-            return true;
-        }
-
-        // Secondly, check if all sub-requests are finished
-        if (fRequests.size() > 0) {
-            // If all sub requests are completed the coalesced request is 
-            // treated as completed, too.
-            for (ITmfDataRequest<T> request : fRequests) {
-                if (!request.isCompleted()) {
-                    return false;
-                }
-            }
-            return true;
-        }
-
-        // Coalescing request is not finished if there are no sub-requests
-        return false;
-    }
-
-    @Override
-    public boolean isCancelled() {
-        // Firstly, check if coalescing request is canceled
-        if (super.isCancelled()) {
-            return true;
-        }
-
-        // Secondly, check if all sub-requests are canceled
-        if (fRequests.size() > 0) {
-            // If all sub requests are canceled the coalesced request is 
-            // treated as completed, too.
-            for (ITmfDataRequest<T> request : fRequests) {
-                if (!request.isCancelled()) {
-                    return false;
-                }
-            }
-            return true;
-        }
-
-        // Coalescing request is not canceled if there are no sub-requests
-        return false;
-
-    }
-
-    
-    // ------------------------------------------------------------------------
-    // Object
-    // ------------------------------------------------------------------------
-
-    @Override
-    // All requests have a unique id
-    public int hashCode() {
-       return super.hashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-       if (other instanceof TmfCoalescedDataRequest<?>) {
-               TmfCoalescedDataRequest<?> request = (TmfCoalescedDataRequest<?>) other;
-                       return  (request.getDataType()    == getDataType())   &&
-                                       (request.getIndex()       == getIndex())      &&
-                                       (request.getNbRequested() == getNbRequested() &&
-                               (request.getExecType()    == getExecType()));
-               }
-               return false;
-    }
-
-    @Override
-    @SuppressWarnings("nls")
-    public String toString() {
-               return "[TmfCoalescedDataRequest(" + getRequestId() + "," + getDataType().getSimpleName() 
-                       + "," + getIndex() + "," + getNbRequested() + "," + getBlockSize() + ")]";
-    }
-}
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedEventRequest.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfCoalescedEventRequest.java
deleted file mode 100644 (file)
index a477295..0000000
+++ /dev/null
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 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:
- *   Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.core.request;
-
-import org.eclipse.linuxtools.internal.tmf.core.Tracer;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-
-/**
- * <b><u>TmfCoalescedEventRequest</u></b>
- * <p>
- */
-public class TmfCoalescedEventRequest<T extends ITmfEvent> extends TmfCoalescedDataRequest<T> implements ITmfEventRequest<T> {
-
-    // ------------------------------------------------------------------------
-    // Attributes
-    // ------------------------------------------------------------------------
-
-       private TmfTimeRange fRange;    // The requested events time range
-
-    // ------------------------------------------------------------------------
-    // Constructor
-    // ------------------------------------------------------------------------
-
-    /**
-     * Request all the events of a given type (high priority)
-     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
-     * 
-     * @param dataType the requested data type
-     */
-    public TmfCoalescedEventRequest(Class<T> dataType) {
-        this(dataType, TmfTimeRange.ETERNITY, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
-    }
-
-    /**
-     * Request all the events of a given type (given priority)
-     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
-     * 
-     * @param dataType the requested data type
-     * @param priority the requested execution priority
-     */
-    public TmfCoalescedEventRequest(Class<T> dataType, ExecutionType priority) {
-        this(dataType, TmfTimeRange.ETERNITY, ALL_DATA, DEFAULT_BLOCK_SIZE, priority);
-    }
-
-    /**
-     * Request all the events of a given type for the given time range (high priority)
-     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
-     * 
-     * @param dataType the requested data type
-     * @param range the time range of the requested events
-     */
-    public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range) {
-        this(dataType, range, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
-    }
-
-    /**
-     * Request all the events of a given type for the given time range (given priority)
-     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
-     * 
-     * @param dataType the requested data type
-     * @param range the time range of the requested events
-     * @param priority the requested execution priority
-     */
-    public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, ExecutionType priority) {
-        this(dataType, range, ALL_DATA, DEFAULT_BLOCK_SIZE, priority);
-    }
-
-    /**
-     * Request 'n' events of a given type from the given time range (high priority)
-     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
-     * 
-     * @param dataType the requested data type
-     * @param range the time range of the requested events
-     * @param nbRequested the number of events requested
-     */
-    public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested) {
-        this(dataType, range, nbRequested, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
-    }
-
-    /**
-     * Request 'n' events of a given type for the given time range (given priority)
-     * Events are returned in blocks of the default size (DEFAULT_BLOCK_SIZE).
-     * 
-     * @param dataType the requested data type
-     * @param range the time range of the requested events
-     * @param nbRequested the number of events requested
-     * @param priority the requested execution priority
-     */
-    public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, ExecutionType priority) {
-        this(dataType, range, nbRequested, DEFAULT_BLOCK_SIZE, priority);
-    }
-
-    /**
-     * Request 'n' events of a given type for the given time range (high priority).
-     * Events are returned in blocks of the given size.
-     * 
-     * @param dataType the requested data type
-     * @param range the time range of the requested events
-     * @param nbRequested the number of events requested
-     * @param blockSize the number of events per block
-     */
-    public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, int blockSize) {
-        this(dataType, range, 0, nbRequested, blockSize, ExecutionType.FOREGROUND);
-    }
-
-    /**
-     * Request 'n' events of a given type for the given time range (given priority).
-     * Events are returned in blocks of the given size.
-     * 
-     * @param dataType the requested data type
-     * @param range the time range of the requested events
-     * @param nbRequested the number of events requested
-     * @param blockSize the number of events per block
-     * @param priority the requested execution priority
-     */
-    public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, int blockSize, ExecutionType priority) {
-        this(dataType, range, 0, nbRequested, blockSize, priority);
-    }
-
-    /**
-     * Request 'n' events of a given type for the given time range (given priority).
-     * Events are returned in blocks of the given size.
-     * 
-     * @param dataType the requested data type
-     * @param range the time range of the requested events
-     * @param index the index of the first event to retrieve
-     * @param nbRequested the number of events requested
-     * @param blockSize the number of events per block
-     * @param priority the requested execution priority
-     */
-    public TmfCoalescedEventRequest(Class<T> dataType, TmfTimeRange range, long index, int nbRequested, int blockSize, ExecutionType priority) {
-        super(dataType, index, nbRequested, blockSize, priority);
-        fRange = range;
-
-        if (Tracer.isRequestTraced()) {
-            String type = getClass().getName();
-            type = type.substring(type.lastIndexOf('.') + 1);
-            @SuppressWarnings("nls")
-            String message = "CREATED " 
-                    + (getExecType() == ITmfDataRequest.ExecutionType.BACKGROUND ? "(BG)" : "(FG)") 
-                    + " Type=" + type + " Index=" + getIndex() + " NbReq=" + getNbRequested() 
-                    + " Range=" + getRange()
-                    + " DataType=" + getDataType().getSimpleName();
-            Tracer.traceRequest(this, message);
-        }
-    }
-
-    // ------------------------------------------------------------------------
-    // Management
-    // ------------------------------------------------------------------------
-
-    @Override
-    public void addRequest(ITmfDataRequest<T> request) {
-        super.addRequest(request);
-        if (request instanceof ITmfEventRequest<?>) {
-            merge((ITmfEventRequest<T>) request);
-        }
-    }
-
-       @Override
-       public boolean isCompatible(ITmfDataRequest<T> request) {
-           if (request instanceof ITmfEventRequest<?>) {
-               if (super.isCompatible(request)) {
-                   return overlaps((ITmfEventRequest<T>) request);
-               }
-           }
-           return false;
-       }
-
-    private boolean overlaps(ITmfEventRequest<T> request) {
-        ITmfTimestamp startTime = ((ITmfEventRequest<T>) request).getRange().getStartTime();
-        ITmfTimestamp endTime   = ((ITmfEventRequest<T>) request).getRange().getEndTime();
-        return (startTime.compareTo(endTime) <= 0) && (fRange.getStartTime().compareTo(fRange.getEndTime()) <= 0);
-    }
-
-    private void merge(ITmfEventRequest<T> request) {
-        ITmfTimestamp startTime = ((ITmfEventRequest<T>) request).getRange().getStartTime();
-        ITmfTimestamp endTime   = ((ITmfEventRequest<T>) request).getRange().getEndTime();
-        if (!fRange.contains(startTime) && fRange.getStartTime().compareTo(startTime) > 0) {
-            fRange = new TmfTimeRange(startTime, fRange.getEndTime());
-        }
-        if (!fRange.contains(endTime) && fRange.getEndTime().compareTo(endTime) < 0) {
-            fRange = new TmfTimeRange(fRange.getStartTime(), endTime);
-        }
-    }
-
-    // ------------------------------------------------------------------------
-    // ITmfDataRequest
-    // ------------------------------------------------------------------------
-
-    @Override
-    public void handleData(T data) {
-        super.handleData(data);
-        for (ITmfDataRequest<T> request : fRequests) {
-            if (data == null) {
-                request.handleData(null);
-            } else {
-                if (request instanceof TmfEventRequest<?>) {
-                    TmfEventRequest<T> req = (TmfEventRequest<T>) request;
-                    if (!req.isCompleted() && (getNbRead() > request.getIndex())) {
-                        ITmfTimestamp ts = data.getTimestamp();
-                        if (req.getRange().contains(ts)) {
-                            if (req.getDataType().isInstance(data)) {
-                                req.handleData(data);
-                            }
-                        }
-                    }
-                }
-                else {
-                    TmfDataRequest<T> req = (TmfDataRequest<T>) request;
-                    if (!req.isCompleted()) {
-                        if (req.getDataType().isInstance(data)) {
-                            req.handleData(data);
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    // ------------------------------------------------------------------------
-    // ITmfEventRequest
-    // ------------------------------------------------------------------------
-
-       @Override
-       public TmfTimeRange getRange() {
-               return fRange;
-       }
-       
-       @Override
-       public void setStartIndex(int index) {
-               setIndex(index);
-       }
-       
-    // ------------------------------------------------------------------------
-    // Object
-    // ------------------------------------------------------------------------
-
-    @Override
-    // All requests have a unique id
-    public int hashCode() {
-       return super.hashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-       if (other instanceof TmfCoalescedEventRequest<?>) {
-               TmfCoalescedEventRequest<?> request = (TmfCoalescedEventRequest<?>) other;
-                       return  (request.getDataType()    == getDataType()) &&
-                                       (request.getIndex()       == getIndex())    &&
-                                       (request.getNbRequested() == getNbRequested()) &&
-                               (request.getRange().equals(getRange()));
-               }
-       if (other instanceof TmfCoalescedDataRequest<?>) {
-                       return super.equals(other);
-       }
-               return false;
-    }
-
-    @Override
-    @SuppressWarnings("nls")
-    public String toString() {
-               return "[TmfCoalescedEventRequest(" + getRequestId() + "," + getDataType().getSimpleName() 
-                       + "," + getRange() + "," + getIndex() + "," + getNbRequested() + "," + getBlockSize() + ")]";
-    }
-
-}
index 6326aaf44ef4fe392a9aeed60348911b3b03dbb1..ec314411bcc22103340fd57de219df5c23a4169c 100644 (file)
@@ -18,8 +18,6 @@ import org.eclipse.linuxtools.internal.tmf.core.Tracer;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 
 /**
- * <b><u>TmfDataRequest</u></b>
- * <p>
  * TmfDataRequests are used to obtain blocks of contiguous data from a data provider. Open ranges can be used,
  * especially for continuous streaming.
  * <p>
@@ -68,6 +66,9 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
  * it would prepare us well for the coming generation of analysis tools.
  * 
  * TODO: Implement request failures (codes, etc...)
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public abstract class TmfDataRequest<T extends ITmfEvent> implements ITmfDataRequest<T> {
 
index cf8a4462642b8319992faf17b4dd8eade9f68dba..859a767f51c0b2ba830810ae9b5785865782c816 100644 (file)
@@ -17,9 +17,10 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
 
 /**
- * <b><u>TmfEventRequest</u></b>
- * <p>
- * Implement me. Please.
+ * An extension of TmfDataRequest for timestamped events.
+ * 
+ * @version 1.0
+ * @author Francois Chouinard
  */
 public abstract class TmfEventRequest<T extends ITmfEvent> extends TmfDataRequest<T> implements ITmfEventRequest<T> {
 
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfRequestExecutor.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/request/TmfRequestExecutor.java
deleted file mode 100644 (file)
index d9e9259..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 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:
- *   Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.core.request;
-
-import java.util.Comparator;
-import java.util.concurrent.Executor;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.PriorityBlockingQueue;
-
-import org.eclipse.linuxtools.internal.tmf.core.Tracer;
-import org.eclipse.linuxtools.tmf.core.component.TmfThread;
-import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest.ExecutionType;
-
-/**
- * <b><u>TmfRequestExecutor</u></b>
- *
- * A simple, straightforward request executor.
- */
-public class TmfRequestExecutor implements Executor {
-
-       private final ExecutorService fExecutor;
-       private final String fExecutorName;
-       private final PriorityBlockingQueue<TmfThread> fRequestQueue = new PriorityBlockingQueue<TmfThread>(100, new Comparator<TmfThread>() {
-               @Override
-               public int compare(TmfThread o1, TmfThread o2) {
-                       if (o1.getExecType() == o2.getExecType())
-                               return 0;
-                       if (o1.getExecType() == ExecutionType.BACKGROUND)
-                               return 1;
-                       return -1;
-               }
-       });
-       private TmfThread fCurrentRequest;
-       
-       // ------------------------------------------------------------------------
-       // Constructors
-       // ------------------------------------------------------------------------
-       
-       public TmfRequestExecutor() {
-               this(Executors.newSingleThreadExecutor());
-       }
-
-       public TmfRequestExecutor(ExecutorService executor) {
-               fExecutor = executor;
-               String canonicalName = fExecutor.getClass().getCanonicalName();
-               fExecutorName = canonicalName.substring(canonicalName.lastIndexOf('.') + 1);
-               if (Tracer.isComponentTraced()) Tracer.trace(fExecutor + " created"); //$NON-NLS-1$
-       }
-
-       /**
-        * @return the number of pending requests
-        */
-       public synchronized int getNbPendingRequests() {
-               return fRequestQueue.size();
-       }
-       
-       /**
-        * @return the shutdown state (i.e. if it is accepting new requests)
-        */
-       public synchronized boolean isShutdown() {
-               return fExecutor.isShutdown();
-       }
-       
-       /**
-        * @return the termination state
-        */
-       public synchronized boolean isTerminated() {
-               return fExecutor.isTerminated();
-       }
-       
-       /**
-        * Stops the executor
-        */
-       public synchronized void stop() {
-           if (fCurrentRequest != null) {
-               fCurrentRequest.cancel();
-           }
-           
-           while ((fCurrentRequest = fRequestQueue.poll()) != null) {
-               fCurrentRequest.cancel();
-           }
-
-               fExecutor.shutdown();
-               if (Tracer.isComponentTraced()) Tracer.trace(fExecutor + " terminated"); //$NON-NLS-1$
-       }
-       
-       // ------------------------------------------------------------------------
-       // Operations
-       // ------------------------------------------------------------------------
-       
-       /* (non-Javadoc)
-        * @see java.util.concurrent.Executor#execute(java.lang.Runnable)
-        */
-       @Override
-       public synchronized void execute(final Runnable requestThread) {
-               fRequestQueue.offer(new TmfThread(((TmfThread) requestThread).getExecType()) {
-                       @Override
-                       public void run() {
-                               try {
-                                       requestThread.run();
-                               } finally {
-                                       scheduleNext();
-                               }
-                       }
-            @Override
-            public void cancel() {
-                ((TmfThread) requestThread).cancel();
-            }
-               });
-               if (fCurrentRequest == null) {
-                       scheduleNext();
-               }
-       }
-
-       /**
-        * Executes the next pending request, if applicable.
-        */
-       protected synchronized void scheduleNext() {
-               if ((fCurrentRequest = fRequestQueue.poll()) != null) {
-                       if (!isShutdown())
-                               fExecutor.execute(fCurrentRequest);
-               }
-       }
-
-       // ------------------------------------------------------------------------
-       // Object
-       // ------------------------------------------------------------------------
-
-       @Override
-    @SuppressWarnings("nls")
-       public String toString() {
-               return "[TmfRequestExecutor(" + fExecutorName + ")]";
-       }
-
-}
index ae0678dfdae9ca66a5683ae16d2223a40708f0be..5018ff89eb186df3578e11850fb1b6603cb528d3 100644 (file)
@@ -126,6 +126,7 @@ public class HistoryBuilder extends TmfComponent {
      * @param signal The signal that triggered the build
      */
     @TmfSignalHandler
+    @SuppressWarnings("unchecked")
     public void startBuilding(final TmfExperimentRangeUpdatedSignal signal) {
         /* Start the construction of the history if it's not started yet */
         if (!this.isRunning) {
@@ -188,6 +189,7 @@ class StateSystemBuildRequest extends TmfEventRequest<CtfTmfEvent> {
     private final HistoryBuilder builder;
     private final IStateChangeInput sci;
 
+    @SuppressWarnings("unchecked")
     StateSystemBuildRequest(HistoryBuilder builder) {
         super((Class<CtfTmfEvent>) builder.getInputPlugin().getExpectedEventType().getClass(),
                 TmfTimeRange.ETERNITY, TmfDataRequest.ALL_DATA, chunkSize,
index f22a639b15b865e87c4b64474b143097fbe6cb3e..89a7a6aa50461714afdd15860cc116538c615547 100644 (file)
@@ -13,7 +13,7 @@ package org.eclipse.linuxtools.tmf.ui.tests.views.uml2sd.load;
 import junit.framework.TestCase;
 
 import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.load.IUml2SDLoader;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.load.LoadersManager;
@@ -170,7 +170,7 @@ public class LoadersManagerTest extends TestCase {
     }
 
     private String getSavedLoader(String viewId) {
-        IPreferenceStore p = TmfUiPlugin.getDefault().getPreferenceStore();
+        IPreferenceStore p = Activator.getDefault().getPreferenceStore();
         return p.getString(LOADER_PREFIX + viewId);
     }
 }
index 6d37bbb8554cde9ebc8b45c368af28dfd0c9a87b..bb8daef957c8350d82ec3104906b592ed691a498 100644 (file)
@@ -5,7 +5,7 @@ Bundle-Vendor: %Bundle-Vendor
 Bundle-Version: 0.5.0.qualifier
 Bundle-Localization: plugin
 Bundle-SymbolicName: org.eclipse.linuxtools.tmf.ui;singleton:=true
-Bundle-Activator: org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin
+Bundle-Activator: org.eclipse.linuxtools.internal.tmf.ui.Activator
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Require-Bundle: org.eclipse.core.expressions,
diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/Activator.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/Activator.java
new file mode 100644 (file)
index 0000000..7045eff
--- /dev/null
@@ -0,0 +1,205 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2012 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:
+ *   Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.tmf.ui;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceElement;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class Activator extends AbstractUIPlugin {
+
+    // ------------------------------------------------------------------------
+    // Attributes
+    // ------------------------------------------------------------------------
+
+       /**
+        * The plug-in ID 
+        */
+       public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.ui"; //$NON-NLS-1$
+
+       /**
+        * The shared instance
+        */
+       private static Activator plugin;
+
+    // ------------------------------------------------------------------------
+    // Constructors
+    // ------------------------------------------------------------------------
+
+       /**
+        * Constructor
+        */
+       public Activator() {
+       }
+
+    // ------------------------------------------------------------------------
+    // Accessors
+    // ------------------------------------------------------------------------
+
+       /**
+        * Returns the TMF UI plug-in instance.
+        *
+        * @return the TMF UI plug-in instance.
+        */
+       public static Activator getDefault() {
+               return plugin;
+       }
+
+    // ------------------------------------------------------------------------
+    // AbstractUIPlugin
+    // ------------------------------------------------------------------------
+
+       /*
+        * (non-Javadoc)
+        * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+        */
+       @Override
+       public void start(BundleContext context) throws Exception {
+               super.start(context);
+               plugin = this;
+               TmfUiTracer.init();
+               TmfTraceElement.init();
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+        */
+       @Override
+       public void stop(BundleContext context) throws Exception {
+           TmfUiTracer.stop();
+               plugin = null;
+               super.stop(context);
+       }
+
+    // ------------------------------------------------------------------------
+    // Operations
+    // ------------------------------------------------------------------------
+
+       /**
+        * Gets an image object using given path within plug-in.
+        *  
+        * @param path path to image file
+        * 
+        * @return image object
+        */
+    public Image getImageFromPath(String path){
+        return getImageDescripterFromPath(path).createImage();
+    }
+    
+    /**
+     * Gets an image descriptor using given path within plug-in.
+     *  
+     * @param path path to image file 
+     * 
+     * @return image descriptor object
+     */
+    public ImageDescriptor getImageDescripterFromPath(String path){
+        return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+    }
+    
+    /**
+     * Gets a image object from the image registry based on the given path.
+     * If the image is not in the registry it will be registered.  
+     *  
+     * @param path to the image file 
+     * @return image object
+     */
+    public Image getImageFromImageRegistry(String path) {
+        Image icon = getImageRegistry().get(path);
+        if (icon == null) {
+            icon = getImageDescripterFromPath(path).createImage();
+            plugin.getImageRegistry().put(path, icon);
+        }
+        return icon;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
+     */
+    @Override
+    protected void initializeImageRegistry(ImageRegistry reg) {
+        reg.put(ITmfImageConstants.IMG_UI_ZOOM, getImageFromPath(ITmfImageConstants.IMG_UI_ZOOM));
+        reg.put(ITmfImageConstants.IMG_UI_ZOOM_IN, getImageFromPath(ITmfImageConstants.IMG_UI_ZOOM_IN));
+        reg.put(ITmfImageConstants.IMG_UI_ZOOM_OUT, getImageFromPath(ITmfImageConstants.IMG_UI_ZOOM_OUT));
+        reg.put(ITmfImageConstants.IMG_UI_SEQ_DIAGRAM_OBJ, getImageFromPath(ITmfImageConstants.IMG_UI_SEQ_DIAGRAM_OBJ));
+        reg.put(ITmfImageConstants.IMG_UI_ARROW_COLLAPSE_OBJ, getImageFromPath(ITmfImageConstants.IMG_UI_ARROW_COLLAPSE_OBJ));
+        reg.put(ITmfImageConstants.IMG_UI_ARROW_UP_OBJ, getImageFromPath(ITmfImageConstants.IMG_UI_ARROW_UP_OBJ));
+    }
+
+    /**
+     * Logs a message with severity INFO in the runtime log of the plug-in.
+     * 
+     * @param message A message to log
+     */
+    public void logInfo(String message) {
+        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
+    }
+    
+    /**
+     * Logs a message and exception with severity INFO in the runtime log of the plug-in.
+     * 
+     * @param message A message to log
+     * @param exception A exception to log
+     */
+    public void logInfo(String message, Throwable exception) {
+        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
+    }
+
+    /**
+     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+     * 
+     * @param message A message to log
+     */
+    public void logWarning(String message) {
+        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
+    }
+    
+    /**
+     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+     * 
+     * @param message A message to log
+     * @param exception A exception to log
+     */
+    public void logWarning(String message, Throwable exception) {
+        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
+    }
+
+    /**
+     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+     * 
+     * @param message A message to log
+     */
+    public void logError(String message) {
+        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
+    }
+    
+    /**
+     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+     * 
+     * @param message A message to log
+     * @param exception A exception to log
+     */
+    public void logError(String message, Throwable exception) {
+        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/TmfUiPlugin.java b/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/TmfUiPlugin.java
deleted file mode 100644 (file)
index b9bacc2..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2012 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:
- *   Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.tmf.ui;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceElement;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle.
- */
-public class TmfUiPlugin extends AbstractUIPlugin {
-
-    // ------------------------------------------------------------------------
-    // Attributes
-    // ------------------------------------------------------------------------
-
-       /**
-        * The plug-in ID 
-        */
-       public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.ui"; //$NON-NLS-1$
-
-       /**
-        * The shared instance
-        */
-       private static TmfUiPlugin plugin;
-
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
-
-       /**
-        * Constructor
-        */
-       public TmfUiPlugin() {
-       }
-
-    // ------------------------------------------------------------------------
-    // Accessors
-    // ------------------------------------------------------------------------
-
-       /**
-        * Returns the TMF UI plug-in instance.
-        *
-        * @return the TMF UI plug-in instance.
-        */
-       public static TmfUiPlugin getDefault() {
-               return plugin;
-       }
-
-    // ------------------------------------------------------------------------
-    // AbstractUIPlugin
-    // ------------------------------------------------------------------------
-
-       /*
-        * (non-Javadoc)
-        * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
-        */
-       @Override
-       public void start(BundleContext context) throws Exception {
-               super.start(context);
-               plugin = this;
-               TmfUiTracer.init();
-               TmfTraceElement.init();
-       }
-
-       /*
-        * (non-Javadoc)
-        * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
-        */
-       @Override
-       public void stop(BundleContext context) throws Exception {
-           TmfUiTracer.stop();
-               plugin = null;
-               super.stop(context);
-       }
-
-    // ------------------------------------------------------------------------
-    // Operations
-    // ------------------------------------------------------------------------
-
-       /**
-        * Gets an image object using given path within plug-in.
-        *  
-        * @param path path to image file
-        * 
-        * @return image object
-        */
-    public Image getImageFromPath(String path){
-        return getImageDescripterFromPath(path).createImage();
-    }
-    
-    /**
-     * Gets an image descriptor using given path within plug-in.
-     *  
-     * @param path path to image file 
-     * 
-     * @return image descriptor object
-     */
-    public ImageDescriptor getImageDescripterFromPath(String path){
-        return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
-    }
-    
-    /**
-     * Gets a image object from the image registry based on the given path.
-     * If the image is not in the registry it will be registered.  
-     *  
-     * @param path to the image file 
-     * @return image object
-     */
-    public Image getImageFromImageRegistry(String path) {
-        Image icon = getImageRegistry().get(path);
-        if (icon == null) {
-            icon = getImageDescripterFromPath(path).createImage();
-            plugin.getImageRegistry().put(path, icon);
-        }
-        return icon;
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
-     */
-    @Override
-    protected void initializeImageRegistry(ImageRegistry reg) {
-        reg.put(ITmfImageConstants.IMG_UI_ZOOM, getImageFromPath(ITmfImageConstants.IMG_UI_ZOOM));
-        reg.put(ITmfImageConstants.IMG_UI_ZOOM_IN, getImageFromPath(ITmfImageConstants.IMG_UI_ZOOM_IN));
-        reg.put(ITmfImageConstants.IMG_UI_ZOOM_OUT, getImageFromPath(ITmfImageConstants.IMG_UI_ZOOM_OUT));
-        reg.put(ITmfImageConstants.IMG_UI_SEQ_DIAGRAM_OBJ, getImageFromPath(ITmfImageConstants.IMG_UI_SEQ_DIAGRAM_OBJ));
-        reg.put(ITmfImageConstants.IMG_UI_ARROW_COLLAPSE_OBJ, getImageFromPath(ITmfImageConstants.IMG_UI_ARROW_COLLAPSE_OBJ));
-        reg.put(ITmfImageConstants.IMG_UI_ARROW_UP_OBJ, getImageFromPath(ITmfImageConstants.IMG_UI_ARROW_UP_OBJ));
-    }
-
-    /**
-     * Logs a message with severity INFO in the runtime log of the plug-in.
-     * 
-     * @param message A message to log
-     */
-    public void logInfo(String message) {
-        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
-    }
-    
-    /**
-     * Logs a message and exception with severity INFO in the runtime log of the plug-in.
-     * 
-     * @param message A message to log
-     * @param exception A exception to log
-     */
-    public void logInfo(String message, Throwable exception) {
-        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
-    }
-
-    /**
-     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
-     * 
-     * @param message A message to log
-     */
-    public void logWarning(String message) {
-        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
-    }
-    
-    /**
-     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
-     * 
-     * @param message A message to log
-     * @param exception A exception to log
-     */
-    public void logWarning(String message, Throwable exception) {
-        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
-    }
-
-    /**
-     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
-     * 
-     * @param message A message to log
-     */
-    public void logError(String message) {
-        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
-    }
-    
-    /**
-     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
-     * 
-     * @param message A message to log
-     * @param exception A exception to log
-     */
-    public void logError(String message, Throwable exception) {
-        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
-    }
-}
index 1e9a180680859ec2a971d2e5013fb84168e96bb0..35ab206ef507e42d6af8d0f904e63bb50ff0582a 100644 (file)
@@ -9,7 +9,7 @@ import org.eclipse.core.runtime.Platform;
 @SuppressWarnings("nls")\r
 public class TmfUiTracer {\r
 \r
-       private static String pluginID = TmfUiPlugin.PLUGIN_ID;\r
+       private static String pluginID = Activator.PLUGIN_ID;\r
 \r
        static Boolean ERROR     = Boolean.FALSE;\r
        static Boolean WARNING   = Boolean.FALSE;\r
@@ -27,7 +27,7 @@ public class TmfUiTracer {
                try {\r
                        outfile = new BufferedWriter(new FileWriter(filename));\r
                } catch (IOException e) {\r
-                   TmfUiPlugin.getDefault().logError("Error creating log file " + LOGNAME, e); //$NON-NLS-1$\r
+                   Activator.getDefault().logError("Error creating log file " + LOGNAME, e); //$NON-NLS-1$\r
                }\r
                return outfile;\r
        }\r
@@ -87,7 +87,7 @@ public class TmfUiTracer {
                        fTraceLog.close();\r
                        fTraceLog = null;\r
                } catch (IOException e) {\r
-                 TmfUiPlugin.getDefault().logError("Error closing log file " + LOGNAME, e); //$NON-NLS-1$\r
+                 Activator.getDefault().logError("Error closing log file " + LOGNAME, e); //$NON-NLS-1$\r
                }\r
        }\r
 \r
@@ -124,7 +124,7 @@ public class TmfUiTracer {
                                fTraceLog.newLine();\r
                                fTraceLog.flush();\r
                        } catch (IOException e) {\r
-                        TmfUiPlugin.getDefault().logError("Error writing to log file " + LOGNAME, e); //$NON-NLS-1$\r
+                        Activator.getDefault().logError("Error writing to log file " + LOGNAME, e); //$NON-NLS-1$\r
                        }\r
                }\r
        }\r
index de800c5bc7db0603ccc635eb5f030ef53a3cf68b..4031257d3892d87c30130e958aa7c10cd7635160 100644 (file)
@@ -17,7 +17,7 @@ import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;\r
 import org.eclipse.jface.wizard.WizardDialog;\r
 import org.eclipse.linuxtools.internal.tmf.ui.Messages;\r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTraceDefinition;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTraceDefinition;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomXmlTraceDefinition;\r
@@ -40,7 +40,7 @@ import org.eclipse.swt.widgets.Shell;
 \r
 public class ManageCustomParsersDialog extends Dialog {\r
 \r
-    private static final Image image = TmfUiPlugin.getDefault().getImageFromPath("/icons/etool16/customparser_wizard.gif"); //$NON-NLS-1$\r
+    private static final Image image = Activator.getDefault().getImageFromPath("/icons/etool16/customparser_wizard.gif"); //$NON-NLS-1$\r
 \r
     Button txtButton;\r
     Button xmlButton;\r
index 4fbbe2ee6e16d4a6d2f4677e8826e4899d1b7bd0..fdbd89a4b7aa4a02e0f287e9ffca6c0768b83973 100644 (file)
@@ -23,7 +23,7 @@ import java.util.regex.Matcher;
 \r
 import org.eclipse.core.resources.IProject;\r
 import org.eclipse.core.resources.IResource;\r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTraceDefinition.InputLine;\r
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;\r
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;\r
@@ -88,10 +88,10 @@ public class CustomTxtTrace extends TmfTrace<CustomTxtEvent> implements ITmfEven
             }\r
             return context;\r
         } catch (final FileNotFoundException e) {\r
-            TmfUiPlugin.getDefault().logError("Error seeking event. File not found: " + getPath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error seeking event. File not found: " + getPath(), e); //$NON-NLS-1$\r
             return context;\r
         } catch (final IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error seeking event. File: " + getPath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error seeking event. File: " + getPath(), e); //$NON-NLS-1$\r
             return context;\r
         }\r
 \r
@@ -115,10 +115,10 @@ public class CustomTxtTrace extends TmfTrace<CustomTxtEvent> implements ITmfEven
             context.setRank(ITmfContext.UNKNOWN_RANK);\r
             return context;\r
         } catch (final FileNotFoundException e) {\r
-            TmfUiPlugin.getDefault().logError("Error seeking event. File not found: " + getPath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error seeking event. File not found: " + getPath(), e); //$NON-NLS-1$\r
             return new CustomTxtTraceContext(NULL_LOCATION, ITmfContext.UNKNOWN_RANK);\r
         } catch (final IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error seeking event. File: " + getPath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error seeking event. File: " + getPath(), e); //$NON-NLS-1$\r
             return new CustomTxtTraceContext(NULL_LOCATION, ITmfContext.UNKNOWN_RANK);\r
         } finally {\r
             if (raFile != null) {\r
@@ -139,9 +139,9 @@ public class CustomTxtTrace extends TmfTrace<CustomTxtEvent> implements ITmfEven
                 return (double) ((Long) location.getLocation()) / raFile.length();\r
             }\r
         } catch (final FileNotFoundException e) {\r
-            TmfUiPlugin.getDefault().logError("Error seeking event. File not found: " + getPath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error seeking event. File not found: " + getPath(), e); //$NON-NLS-1$\r
         } catch (final IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error seeking event. File: " + getPath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error seeking event. File: " + getPath(), e); //$NON-NLS-1$\r
         } finally {\r
             if (raFile != null) {\r
                 try {\r
@@ -297,7 +297,7 @@ public class CustomTxtTrace extends TmfTrace<CustomTxtEvent> implements ITmfEven
                     rawPos = context.raFile.getFilePointer();\r
                 }\r
             } catch (final IOException e) {\r
-                TmfUiPlugin.getDefault().logError("Error seeking event. File: " + getPath(), e); //$NON-NLS-1$\r
+                Activator.getDefault().logError("Error seeking event. File: " + getPath(), e); //$NON-NLS-1$\r
             }\r
         }\r
         for(final Entry<InputLine, Integer> entry : countMap.entrySet())\r
index 4c5353bdc2a7168cce7029199b28db9256bab469..52fdbdcf7b2707091d042ecd17ac56a27f79ef8f 100644 (file)
@@ -36,7 +36,7 @@ import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;\r
 \r
 import org.eclipse.linuxtools.internal.tmf.ui.Messages;\r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.w3c.dom.Document;\r
 import org.w3c.dom.Element;\r
 import org.w3c.dom.Node;\r
@@ -51,7 +51,7 @@ public class CustomTxtTraceDefinition extends CustomTraceDefinition {
 \r
     protected static final String CUSTOM_TXT_TRACE_DEFINITIONS_FILE_NAME = "custom_txt_parsers.xml"; //$NON-NLS-1$\r
     protected static final String CUSTOM_TXT_TRACE_DEFINITIONS_PATH_NAME =\r
-        TmfUiPlugin.getDefault().getStateLocation().addTrailingSeparator().append(CUSTOM_TXT_TRACE_DEFINITIONS_FILE_NAME).toString();\r
+        Activator.getDefault().getStateLocation().addTrailingSeparator().append(CUSTOM_TXT_TRACE_DEFINITIONS_FILE_NAME).toString();\r
 \r
     private static final String CUSTOM_TXT_TRACE_DEFINITION_ROOT_ELEMENT = Messages.CustomTxtTraceDefinition_definitionRootElement;\r
     private static final String DEFINITION_ELEMENT = Messages.CustomTxtTraceDefinition_definition;\r
@@ -365,17 +365,17 @@ public class CustomTxtTraceDefinition extends CustomTraceDefinition {
             writer.write(xmlString);\r
             writer.close();\r
         } catch (ParserConfigurationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         } catch (TransformerConfigurationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         } catch (TransformerFactoryConfigurationError e) {\r
-            TmfUiPlugin.getDefault().logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         } catch (TransformerException e) {\r
-            TmfUiPlugin.getDefault().logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         } catch (IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         } catch (SAXException e) {\r
-            TmfUiPlugin.getDefault().logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error saving CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         }\r
     }\r
 \r
@@ -467,11 +467,11 @@ public class CustomTxtTraceDefinition extends CustomTraceDefinition {
             }\r
             return defList.toArray(new CustomTxtTraceDefinition[0]);\r
         } catch (ParserConfigurationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error loading all in CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error loading all in CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         } catch (SAXException e) {\r
-            TmfUiPlugin.getDefault().logError("Error loading all in CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error loading all in CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         } catch (IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error loading all in CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error loading all in CustomTxtTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         }\r
         return new CustomTxtTraceDefinition[0];\r
     }\r
@@ -521,11 +521,11 @@ public class CustomTxtTraceDefinition extends CustomTraceDefinition {
                 }\r
             }\r
         } catch (ParserConfigurationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error loading CustomTxtTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error loading CustomTxtTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
         } catch (SAXException e) {\r
-            TmfUiPlugin.getDefault().logError("Error loading CustomTxtTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error loading CustomTxtTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
         } catch (IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error loading CustomTxtTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error loading CustomTxtTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
         }\r
         return null;\r
     }\r
@@ -652,17 +652,17 @@ public class CustomTxtTraceDefinition extends CustomTraceDefinition {
             writer.write(xmlString);\r
             writer.close();\r
         } catch (ParserConfigurationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error deleting CustomTxtTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error deleting CustomTxtTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
         } catch (SAXException e) {\r
-            TmfUiPlugin.getDefault().logError("Error deleting CustomTxtTraceDefinition: definitionName= " + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error deleting CustomTxtTraceDefinition: definitionName= " + definitionName, e); //$NON-NLS-1$\r
         } catch (IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error deleting CustomTxtTraceDefinition: definitionName= " + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error deleting CustomTxtTraceDefinition: definitionName= " + definitionName, e); //$NON-NLS-1$\r
         } catch (TransformerConfigurationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error deleting CustomTxtTraceDefinition: definitionName= " + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error deleting CustomTxtTraceDefinition: definitionName= " + definitionName, e); //$NON-NLS-1$\r
         } catch (TransformerFactoryConfigurationError e) {\r
-            TmfUiPlugin.getDefault().logError("Error deleting CustomTxtTraceDefinition: definitionName= " + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error deleting CustomTxtTraceDefinition: definitionName= " + definitionName, e); //$NON-NLS-1$\r
         } catch (TransformerException e) {\r
-            TmfUiPlugin.getDefault().logError("Error deleting CustomTxtTraceDefinition: definitionName= " + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error deleting CustomTxtTraceDefinition: definitionName= " + definitionName, e); //$NON-NLS-1$\r
         }\r
     }\r
 }\r
index 7bbe5bb4177c132413c4c3e994eace272cb7fc5f..4c0c0d8c827f540bec06c977998fd4d657a07526 100644 (file)
@@ -24,7 +24,7 @@ import javax.xml.parsers.ParserConfigurationException;
 \r
 import org.eclipse.core.resources.IProject;\r
 import org.eclipse.core.resources.IResource;\r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomXmlTraceDefinition.InputAttribute;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomXmlTraceDefinition.InputElement;\r
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;\r
@@ -98,10 +98,10 @@ public class CustomXmlTrace extends TmfTrace<CustomXmlEvent> implements ITmfEven
             }\r
             return context;\r
         } catch (final FileNotFoundException e) {\r
-            TmfUiPlugin.getDefault().logError("Error seeking event. File not found: " + getPath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error seeking event. File not found: " + getPath(), e); //$NON-NLS-1$\r
             return context;\r
         } catch (final IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error seeking event. File: " + getPath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error seeking event. File: " + getPath(), e); //$NON-NLS-1$\r
             return context;\r
         }\r
 \r
@@ -125,10 +125,10 @@ public class CustomXmlTrace extends TmfTrace<CustomXmlEvent> implements ITmfEven
             context.setRank(ITmfContext.UNKNOWN_RANK);\r
             return context;\r
         } catch (final FileNotFoundException e) {\r
-            TmfUiPlugin.getDefault().logError("Error seeking event. File not found: " + getPath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error seeking event. File not found: " + getPath(), e); //$NON-NLS-1$\r
             return new CustomXmlTraceContext(NULL_LOCATION, ITmfContext.UNKNOWN_RANK);\r
         } catch (final IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error seeking event. File: " + getPath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error seeking event. File: " + getPath(), e); //$NON-NLS-1$\r
             return new CustomXmlTraceContext(NULL_LOCATION, ITmfContext.UNKNOWN_RANK);\r
         } finally {\r
             if (raFile != null) {\r
@@ -149,9 +149,9 @@ public class CustomXmlTrace extends TmfTrace<CustomXmlEvent> implements ITmfEven
                 return (double) ((Long) location.getLocation()) / raFile.length();\r
             }\r
         } catch (final FileNotFoundException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting location ration. File not found: " + getPath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting location ration. File not found: " + getPath(), e); //$NON-NLS-1$\r
         } catch (final IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting location ration. File: " + getPath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting location ration. File: " + getPath(), e); //$NON-NLS-1$\r
         } finally {\r
             if (raFile != null) {\r
                 try {\r
@@ -216,7 +216,7 @@ public class CustomXmlTrace extends TmfTrace<CustomXmlEvent> implements ITmfEven
                     rawPos = context.raFile.getFilePointer();\r
                 }\r
             } catch (final IOException e) {\r
-                TmfUiPlugin.getDefault().logError("Error pasing event. File: " + getPath(), e); //$NON-NLS-1$\r
+                Activator.getDefault().logError("Error pasing event. File: " + getPath(), e); //$NON-NLS-1$\r
                 \r
             }\r
             context.setLocation(NULL_LOCATION);\r
@@ -254,11 +254,11 @@ public class CustomXmlTrace extends TmfTrace<CustomXmlEvent> implements ITmfEven
             final Document doc = db.parse(new ByteArrayInputStream(elementBuffer.toString().getBytes()));\r
             return doc.getDocumentElement();\r
         } catch (final ParserConfigurationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error parsing element buffer. File:" + getPath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error parsing element buffer. File:" + getPath(), e); //$NON-NLS-1$\r
         } catch (final SAXException e) {\r
-            TmfUiPlugin.getDefault().logError("Error parsing element buffer. File:" + getPath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error parsing element buffer. File:" + getPath(), e); //$NON-NLS-1$\r
         } catch (final IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error parsing element buffer. File: " + getPath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error parsing element buffer. File: " + getPath(), e); //$NON-NLS-1$\r
         }\r
         return null;\r
     }\r
index 2b2a0d952d851686242ebefdaf6bf16976fbdb43..6e3dd5f05006f38e20fdfdbc23373c1798226e23 100644 (file)
@@ -33,7 +33,7 @@ import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;\r
 \r
 import org.eclipse.linuxtools.internal.tmf.ui.Messages;\r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.w3c.dom.Document;\r
 import org.w3c.dom.Element;\r
 import org.w3c.dom.Node;\r
@@ -48,7 +48,7 @@ public class CustomXmlTraceDefinition extends CustomTraceDefinition {
 \r
     protected static final String CUSTOM_XML_TRACE_DEFINITIONS_FILE_NAME = "custom_xml_parsers.xml"; //$NON-NLS-1$\r
     protected static final String CUSTOM_XML_TRACE_DEFINITIONS_PATH_NAME =\r
-        TmfUiPlugin.getDefault().getStateLocation().addTrailingSeparator().append(CUSTOM_XML_TRACE_DEFINITIONS_FILE_NAME).toString();\r
+        Activator.getDefault().getStateLocation().addTrailingSeparator().append(CUSTOM_XML_TRACE_DEFINITIONS_FILE_NAME).toString();\r
 \r
     public static final String TAG_IGNORE = Messages.CustomXmlTraceDefinition_ignoreTag;\r
 \r
@@ -258,17 +258,17 @@ public class CustomXmlTraceDefinition extends CustomTraceDefinition {
             writer.write(xmlString);\r
             writer.close();\r
         } catch (ParserConfigurationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error saving CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error saving CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         } catch (TransformerConfigurationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error saving CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error saving CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         } catch (TransformerFactoryConfigurationError e) {\r
-            TmfUiPlugin.getDefault().logError("Error saving CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error saving CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         } catch (TransformerException e) {\r
-            TmfUiPlugin.getDefault().logError("Error saving CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error saving CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         } catch (IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error saving CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error saving CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         } catch (SAXException e) {\r
-            TmfUiPlugin.getDefault().logError("Error saving CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error saving CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         }\r
     }\r
     \r
@@ -369,11 +369,11 @@ public class CustomXmlTraceDefinition extends CustomTraceDefinition {
             }\r
             return defList.toArray(new CustomXmlTraceDefinition[0]);\r
         } catch (ParserConfigurationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error loading all in CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error loading all in CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         } catch (SAXException e) {\r
-            TmfUiPlugin.getDefault().logError("Error loading all in CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error loading all in CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         } catch (IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error loading all in CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error loading all in CustomXmlTraceDefinition: path=" + path, e); //$NON-NLS-1$\r
         }\r
         return new CustomXmlTraceDefinition[0];\r
     }\r
@@ -423,11 +423,11 @@ public class CustomXmlTraceDefinition extends CustomTraceDefinition {
                 }\r
             }\r
         } catch (ParserConfigurationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error loading CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error loading CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
         } catch (SAXException e) {\r
-            TmfUiPlugin.getDefault().logError("Error loading CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error loading CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
         } catch (IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error loading CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error loading CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
         }\r
         return null;\r
     }\r
@@ -562,17 +562,17 @@ public class CustomXmlTraceDefinition extends CustomTraceDefinition {
             writer.write(xmlString);\r
             writer.close();\r
         } catch (ParserConfigurationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error deleteing CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error deleteing CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
         } catch (SAXException e) {\r
-            TmfUiPlugin.getDefault().logError("Error deleteing CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error deleteing CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
         } catch (IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error deleteing CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error deleteing CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
         } catch (TransformerConfigurationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error deleteing CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error deleteing CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
         } catch (TransformerFactoryConfigurationError e) {\r
-            TmfUiPlugin.getDefault().logError("Error deleteing CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error deleteing CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
         } catch (TransformerException e) {\r
-            TmfUiPlugin.getDefault().logError("Error deleteing CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error deleteing CustomXmlTraceDefinition: definitionName=" + definitionName, e); //$NON-NLS-1$\r
         }\r
     }\r
 }\r
index f62d2e14aabaf5af9a21fd047480134a803761fa..636255ce3536fdb38f050fa10a4b9e31277acab7 100644 (file)
@@ -30,7 +30,7 @@ import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.viewers.Viewer;\r
 import org.eclipse.jface.wizard.WizardPage;\r
 import org.eclipse.linuxtools.internal.tmf.ui.Messages;\r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTraceDefinition;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTraceDefinition.Cardinality;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTraceDefinition.InputData;\r
@@ -72,14 +72,14 @@ public class CustomTxtParserInputWizardPage extends WizardPage {
     private static final String DEFAULT_TIMESTAMP_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS"; //$NON-NLS-1$\r
     private static final String SIMPLE_DATE_FORMAT_URL = "http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html#skip-navbar_top"; //$NON-NLS-1$\r
     private static final String PATTERN_URL = "http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html#sum"; //$NON-NLS-1$\r
-    private static final Image lineImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/line_icon.gif"); //$NON-NLS-1$\r
-    private static final Image addImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/add_button.gif"); //$NON-NLS-1$\r
-    private static final Image addNextImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/addnext_button.gif"); //$NON-NLS-1$\r
-    private static final Image addChildImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/addchild_button.gif"); //$NON-NLS-1$\r
-    private static final Image deleteImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/delete_button.gif"); //$NON-NLS-1$\r
-    private static final Image moveUpImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/moveup_button.gif"); //$NON-NLS-1$\r
-    private static final Image moveDownImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/movedown_button.gif"); //$NON-NLS-1$\r
-    private static final Image helpImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/help_button.gif"); //$NON-NLS-1$\r
+    private static final Image lineImage = Activator.getDefault().getImageFromPath("/icons/elcl16/line_icon.gif"); //$NON-NLS-1$\r
+    private static final Image addImage = Activator.getDefault().getImageFromPath("/icons/elcl16/add_button.gif"); //$NON-NLS-1$\r
+    private static final Image addNextImage = Activator.getDefault().getImageFromPath("/icons/elcl16/addnext_button.gif"); //$NON-NLS-1$\r
+    private static final Image addChildImage = Activator.getDefault().getImageFromPath("/icons/elcl16/addchild_button.gif"); //$NON-NLS-1$\r
+    private static final Image deleteImage = Activator.getDefault().getImageFromPath("/icons/elcl16/delete_button.gif"); //$NON-NLS-1$\r
+    private static final Image moveUpImage = Activator.getDefault().getImageFromPath("/icons/elcl16/moveup_button.gif"); //$NON-NLS-1$\r
+    private static final Image moveDownImage = Activator.getDefault().getImageFromPath("/icons/elcl16/movedown_button.gif"); //$NON-NLS-1$\r
+    private static final Image helpImage = Activator.getDefault().getImageFromPath("/icons/elcl16/help_button.gif"); //$NON-NLS-1$\r
     private static final Color COLOR_BLACK = Display.getCurrent().getSystemColor(SWT.COLOR_BLACK);\r
     private static final Color COLOR_LIGHT_GREEN = new Color(Display.getDefault(), 192, 255, 192);\r
     private static final Color COLOR_GREEN = Display.getCurrent().getSystemColor(SWT.COLOR_GREEN);\r
index 4ed351098e1db7eb042db88e671109e64f52ec8c..ed3f3fa46eea8094ba573970e2fe1673c262e70f 100644 (file)
@@ -9,7 +9,7 @@ import java.util.List;
 \r
 import org.eclipse.jface.wizard.WizardPage;\r
 import org.eclipse.linuxtools.internal.tmf.ui.Messages;\r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomEventsTable;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTraceDefinition.OutputColumn;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTrace;\r
@@ -30,8 +30,8 @@ import org.eclipse.swt.widgets.Text;
 \r
 public class CustomTxtParserOutputWizardPage extends WizardPage {\r
 \r
-    private static final Image upImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/up_button.gif"); //$NON-NLS-1$\r
-    private static final Image downImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/down_button.gif"); //$NON-NLS-1$\r
+    private static final Image upImage = Activator.getDefault().getImageFromPath("/icons/elcl16/up_button.gif"); //$NON-NLS-1$\r
+    private static final Image downImage = Activator.getDefault().getImageFromPath("/icons/elcl16/down_button.gif"); //$NON-NLS-1$\r
     private final CustomTxtParserWizard wizard;\r
     private CustomTxtTraceDefinition definition;\r
     List<Output> outputs = new ArrayList<Output>();\r
@@ -193,7 +193,7 @@ public class CustomTxtParserOutputWizardPage extends WizardPage {
         definition.outputs = extractOutputs();\r
 \r
         try {\r
-            tmpFile = TmfUiPlugin.getDefault().getStateLocation().addTrailingSeparator().append("customwizard.tmp").toFile(); //$NON-NLS-1$\r
+            tmpFile = Activator.getDefault().getStateLocation().addTrailingSeparator().append("customwizard.tmp").toFile(); //$NON-NLS-1$\r
             final FileWriter writer = new FileWriter(tmpFile);\r
             writer.write(wizard.inputPage.getInputText());\r
             writer.close();\r
@@ -204,9 +204,9 @@ public class CustomTxtParserOutputWizardPage extends WizardPage {
             previewTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\r
             previewTable.setTrace(trace, true);\r
         } catch (final TmfTraceException e) {\r
-            TmfUiPlugin.getDefault().logError("Error creating CustomTxtTrace. File:" + tmpFile.getAbsolutePath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error creating CustomTxtTrace. File:" + tmpFile.getAbsolutePath(), e); //$NON-NLS-1$\r
         } catch (final IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error creating CustomTxtTrace. File:" + tmpFile.getAbsolutePath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error creating CustomTxtTrace. File:" + tmpFile.getAbsolutePath(), e); //$NON-NLS-1$\r
         }\r
 \r
         tableContainer.layout();\r
index d48515950ecf11ff222d72b56ebdfa3c8a7b64a5..57f1da4090ac2f316efb1d2d008dc0077639ed87 100644 (file)
@@ -28,7 +28,7 @@ import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.viewers.Viewer;\r
 import org.eclipse.jface.wizard.WizardPage;\r
 import org.eclipse.linuxtools.internal.tmf.ui.Messages;\r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomXmlTrace;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomXmlTraceDefinition;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomXmlTraceDefinition.InputAttribute;\r
@@ -76,15 +76,15 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
 \r
     private static final String DEFAULT_TIMESTAMP_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS"; //$NON-NLS-1$\r
     private static final String SIMPLE_DATE_FORMAT_URL = "http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html#skip-navbar_top"; //$NON-NLS-1$\r
-    private static final Image elementImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/element_icon.gif"); //$NON-NLS-1$\r
-    private static final Image addImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/add_button.gif"); //$NON-NLS-1$\r
-    private static final Image addNextImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/addnext_button.gif"); //$NON-NLS-1$\r
-    private static final Image addChildImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/addchild_button.gif"); //$NON-NLS-1$\r
-    private static final Image addManyImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/addmany_button.gif"); //$NON-NLS-1$\r
-    private static final Image deleteImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/delete_button.gif"); //$NON-NLS-1$\r
-    private static final Image moveUpImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/moveup_button.gif"); //$NON-NLS-1$\r
-    private static final Image moveDownImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/movedown_button.gif"); //$NON-NLS-1$\r
-    private static final Image helpImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/help_button.gif"); //$NON-NLS-1$\r
+    private static final Image elementImage = Activator.getDefault().getImageFromPath("/icons/elcl16/element_icon.gif"); //$NON-NLS-1$\r
+    private static final Image addImage = Activator.getDefault().getImageFromPath("/icons/elcl16/add_button.gif"); //$NON-NLS-1$\r
+    private static final Image addNextImage = Activator.getDefault().getImageFromPath("/icons/elcl16/addnext_button.gif"); //$NON-NLS-1$\r
+    private static final Image addChildImage = Activator.getDefault().getImageFromPath("/icons/elcl16/addchild_button.gif"); //$NON-NLS-1$\r
+    private static final Image addManyImage = Activator.getDefault().getImageFromPath("/icons/elcl16/addmany_button.gif"); //$NON-NLS-1$\r
+    private static final Image deleteImage = Activator.getDefault().getImageFromPath("/icons/elcl16/delete_button.gif"); //$NON-NLS-1$\r
+    private static final Image moveUpImage = Activator.getDefault().getImageFromPath("/icons/elcl16/moveup_button.gif"); //$NON-NLS-1$\r
+    private static final Image moveDownImage = Activator.getDefault().getImageFromPath("/icons/elcl16/movedown_button.gif"); //$NON-NLS-1$\r
+    private static final Image helpImage = Activator.getDefault().getImageFromPath("/icons/elcl16/help_button.gif"); //$NON-NLS-1$\r
     private static final Color COLOR_LIGHT_RED = new Color(Display.getDefault(), 255, 192, 192);\r
     private static final Color COLOR_TEXT_BACKGROUND = Display.getCurrent().getSystemColor(SWT.COLOR_WHITE);\r
     private static final Color COLOR_WIDGET_BACKGROUND = Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);\r
@@ -726,12 +726,12 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
             doc = db.parse(new ByteArrayInputStream(string.getBytes()));\r
             documentElement = doc.getDocumentElement();\r
         } catch (ParserConfigurationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error pasing XML input string: " + string, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error pasing XML input string: " + string, e); //$NON-NLS-1$\r
             documentElement = null;\r
         } catch (SAXException e) {\r
             documentElement = null;\r
         } catch (IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error pasing XML input string: " + string, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error pasing XML input string: " + string, e); //$NON-NLS-1$\r
             documentElement = null;\r
         }\r
     }\r
index dc0ec62a2db222e89262cb358b20fd0c930298d5..c17e4f099ea8ff4dd264676080fcd2da30deac50 100644 (file)
@@ -9,7 +9,7 @@ import java.util.List;
 \r
 import org.eclipse.jface.wizard.WizardPage;\r
 import org.eclipse.linuxtools.internal.tmf.ui.Messages;\r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomEventsTable;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTraceDefinition;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTraceDefinition.OutputColumn;\r
@@ -31,8 +31,8 @@ import org.eclipse.swt.widgets.Text;
 \r
 public class CustomXmlParserOutputWizardPage extends WizardPage {\r
 \r
-    private static final Image upImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/up_button.gif"); //$NON-NLS-1$\r
-    private static final Image downImage = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/down_button.gif"); //$NON-NLS-1$\r
+    private static final Image upImage = Activator.getDefault().getImageFromPath("/icons/elcl16/up_button.gif"); //$NON-NLS-1$\r
+    private static final Image downImage = Activator.getDefault().getImageFromPath("/icons/elcl16/down_button.gif"); //$NON-NLS-1$\r
     private final CustomXmlParserWizard wizard;\r
     private CustomXmlTraceDefinition definition;\r
     List<Output> outputs = new ArrayList<Output>();\r
@@ -194,7 +194,7 @@ public class CustomXmlParserOutputWizardPage extends WizardPage {
         definition.outputs = extractOutputs();\r
 \r
         try {\r
-            tmpFile = TmfUiPlugin.getDefault().getStateLocation().addTrailingSeparator().append("customwizard.tmp").toFile(); //$NON-NLS-1$\r
+            tmpFile = Activator.getDefault().getStateLocation().addTrailingSeparator().append("customwizard.tmp").toFile(); //$NON-NLS-1$\r
             final FileWriter writer = new FileWriter(tmpFile);\r
             writer.write(wizard.inputPage.getInputText());\r
             writer.close();\r
@@ -205,9 +205,9 @@ public class CustomXmlParserOutputWizardPage extends WizardPage {
             previewTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\r
             previewTable.setTrace(trace, true);\r
         } catch (final TmfTraceException e) {\r
-            TmfUiPlugin.getDefault().logError("Error creating CustomXmlTrace. File:" + tmpFile.getAbsolutePath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error creating CustomXmlTrace. File:" + tmpFile.getAbsolutePath(), e); //$NON-NLS-1$\r
         } catch (final IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error creating CustomXmlTrace. File:" + tmpFile.getAbsolutePath(), e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error creating CustomXmlTrace. File:" + tmpFile.getAbsolutePath(), e); //$NON-NLS-1$\r
         }\r
 \r
         tableContainer.layout();\r
index 3778e3d2cde4d27930fb476bea5fbf2d72160f86..3183776441c7adfe4634a706fb225fd11743f962 100644 (file)
@@ -20,7 +20,7 @@ import org.eclipse.jface.action.Action;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentElement;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceElement;
 import org.eclipse.ui.IWorkbenchPage;
@@ -87,13 +87,13 @@ public class DeleteAction extends Action {
                 handlerService.executeCommand(DELETE_EXPERIMENT_COMMAND_ID, null);
             }
         } catch (ExecutionException e) {
-            TmfUiPlugin.getDefault().logError("Error deleting resources", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error deleting resources", e); //$NON-NLS-1$
         } catch (NotDefinedException e) {
-            TmfUiPlugin.getDefault().logError("Error deleting resources", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error deleting resources", e); //$NON-NLS-1$
         } catch (NotEnabledException e) {
-            TmfUiPlugin.getDefault().logError("Error deleting resources", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error deleting resources", e); //$NON-NLS-1$
         } catch (NotHandledException e) {
-            TmfUiPlugin.getDefault().logError("Error deleting resources", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error deleting resources", e); //$NON-NLS-1$
         }
     }
 
index 549310cad46d0698445ffe97d75bb701dcf9ddf0..268061bdc485bc8ea35081948b77c3fb4167de64 100644 (file)
@@ -21,7 +21,7 @@ import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentElement;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.MessageBox;
@@ -75,7 +75,7 @@ public class DeleteExperimentHandler extends AbstractHandler {
                         resource.delete(true, null);
                         experiment.getProject().refresh();
                     } catch (CoreException e) {
-                        TmfUiPlugin.getDefault().logError("Error deleting experiment: " + experiment.getName(), e); //$NON-NLS-1$
+                        Activator.getDefault().logError("Error deleting experiment: " + experiment.getName(), e); //$NON-NLS-1$
                     }
                 }
             }
index aeb2179e2144aa326b2bf3796e3cb8ebeba46e88..245aa07e004eba4f90e098e5cc532d4087b23da5 100644 (file)
@@ -26,7 +26,7 @@ import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.TreeSelection;
 import org.eclipse.jface.window.Window;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.internal.tmf.ui.project.dialogs.SelectSupplementaryResourcesDialog;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentElement;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceElement;
@@ -98,7 +98,7 @@ public class DeleteExperimentSupplementaryFilesHandler extends AbstractHandler {
                     try {
                         resourcesToDelete[i].delete(true, new NullProgressMonitor());
                     } catch (CoreException e) {
-                        TmfUiPlugin.getDefault().logError("Error deleting supplementary resource " + resourcesToDelete[i], e); //$NON-NLS-1$
+                        Activator.getDefault().logError("Error deleting supplementary resource " + resourcesToDelete[i], e); //$NON-NLS-1$
                     }
                 }
 
@@ -109,7 +109,7 @@ public class DeleteExperimentSupplementaryFilesHandler extends AbstractHandler {
                             resource.refreshLocal(IResource.DEPTH_INFINITE, null);
                         }
                     } catch (CoreException e) {
-                        TmfUiPlugin.getDefault().logError("Error refreshing resource " + resource, e); //$NON-NLS-1$
+                        Activator.getDefault().logError("Error refreshing resource " + resource, e); //$NON-NLS-1$
                     }
                 }
             }
index 9dbaebac66ac950a74bbf4d82cb10008a9538661..656565b088cf6e2715480239baf6c8959846eb8c 100644 (file)
@@ -27,7 +27,7 @@ import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentFolder;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceElement;
@@ -144,9 +144,9 @@ public class DeleteTraceHandler extends AbstractHandler {
                     trace.getProject().refresh();
 
                 } catch (IOException e) {
-                    TmfUiPlugin.getDefault().logError("Error deleting trace: " + trace.getName(), e); //$NON-NLS-1$
+                    Activator.getDefault().logError("Error deleting trace: " + trace.getName(), e); //$NON-NLS-1$
                 } catch (CoreException e) {
-                    TmfUiPlugin.getDefault().logError("Error deleting trace: " + trace.getName(), e); //$NON-NLS-1$
+                    Activator.getDefault().logError("Error deleting trace: " + trace.getName(), e); //$NON-NLS-1$
                 }
             }
         }
index 3eb5b9a6cae7da8c240221bd944ee70908bceaab..b18b6dc14a42bd20176f0982aa1921b0d913c338 100644 (file)
@@ -21,7 +21,7 @@ import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.TreeSelection;
 import org.eclipse.jface.window.Window;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.internal.tmf.ui.project.dialogs.SelectSupplementaryResourcesDialog;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceElement;
 import org.eclipse.ui.IWorkbenchPage;
@@ -87,7 +87,7 @@ public class DeleteTraceSupplementaryFilesHandler extends AbstractHandler {
                             resource.refreshLocal(IResource.DEPTH_INFINITE, null);
                         }
                     } catch (CoreException e) {
-                        TmfUiPlugin.getDefault().logError("Error refreshing resource " + resource, e); //$NON-NLS-1$
+                        Activator.getDefault().logError("Error refreshing resource " + resource, e); //$NON-NLS-1$
                     }
                 }
             }
index 9c107950334866f33f339a23585703cc877be805..3eca229f02382640ac7277d66d47c8bf895ef5aa 100644 (file)
@@ -32,7 +32,7 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.QualifiedName;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
 import org.eclipse.linuxtools.tmf.core.trace.TmfTrace;
 import org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement;
@@ -439,7 +439,7 @@ public class DropAdapterAssistant extends CommonDropAdapterAssistant {
                     setProperties(folder, bundleName, traceType, iconUrl, supplFolder);
 
                 } else {
-                    TmfUiPlugin.getDefault().logError("Invalid Trace Location"); //$NON-NLS-1$
+                    Activator.getDefault().logError("Invalid Trace Location"); //$NON-NLS-1$
                 }
             } else {
                 IFile file = parentFolder.getFile(resource.getName());
@@ -448,7 +448,7 @@ public class DropAdapterAssistant extends CommonDropAdapterAssistant {
                     file.createLink(location, IResource.REPLACE, null);
                     setProperties(file, bundleName, traceType, iconUrl, supplFolder);
                 } else {
-                    TmfUiPlugin.getDefault().logError("Invalid Trace Location"); //$NON-NLS-1$
+                    Activator.getDefault().logError("Invalid Trace Location"); //$NON-NLS-1$
                 }
             }
         } catch (CoreException e) {
index 0e764fe66d246252cab8e00013906c5482abee68..cb7fbbacc11540502e81696d4d7aa22f5dfc2493 100644 (file)
@@ -20,7 +20,7 @@ import org.eclipse.jface.action.Action;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentElement;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceElement;
@@ -80,13 +80,13 @@ public class OpenAction extends Action {
                 handlerService.executeCommand(OPEN_EXPERIMENT_COMMAND_ID, null);
             }
         } catch (ExecutionException e) {
-            TmfUiPlugin.getDefault().logError("Error opening resource " + element.getName(), e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error opening resource " + element.getName(), e); //$NON-NLS-1$
         } catch (NotDefinedException e) {
-            TmfUiPlugin.getDefault().logError("Error opening resource " + element.getName(), e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error opening resource " + element.getName(), e); //$NON-NLS-1$
         } catch (NotEnabledException e) {
-            TmfUiPlugin.getDefault().logError("Error opening resource " + element.getName(), e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error opening resource " + element.getName(), e); //$NON-NLS-1$
         } catch (NotHandledException e) {
-            TmfUiPlugin.getDefault().logError("Error opening resource " + element.getName(), e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error opening resource " + element.getName(), e); //$NON-NLS-1$
         }
     }
 
index 9a573359402038ff2b0cd246ed07002e2a2ae5ab..d5c26bd89a671e2e77c9ad0f238ad35d850bd943 100644 (file)
@@ -25,7 +25,7 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
@@ -160,7 +160,7 @@ public class OpenTraceHandler extends AbstractHandler {
                 else
                     file.setPersistentProperty(TmfCommonConstants.TRACETYPE, TmfTrace.class.getCanonicalName());
             } catch (final CoreException e) {
-                TmfUiPlugin.getDefault().logError("Error opening trace " + fTrace.getName(), e); //$NON-NLS-1$
+                Activator.getDefault().logError("Error opening trace " + fTrace.getName(), e); //$NON-NLS-1$
             }
 
         if (usesEditor)
@@ -179,7 +179,7 @@ public class OpenTraceHandler extends AbstractHandler {
                         IDE.setDefaultEditor((IFile) resource, editorId);
                 }
             } catch (final PartInitException e) {
-                TmfUiPlugin.getDefault().logError("Error opening trace " + fTrace.getName(), e); //$NON-NLS-1$
+                Activator.getDefault().logError("Error opening trace " + fTrace.getName(), e); //$NON-NLS-1$
             }
         else {
             // Create the experiment
index bee975f815f8799594dd6dda1911d777dc6da5ed..26cf0d6efbe19c3a6a96c2dcffb1468476135767 100644 (file)
@@ -20,7 +20,7 @@ import org.eclipse.jface.action.Action;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentElement;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentFolder;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectModelElement;
@@ -85,13 +85,13 @@ public class RefreshAction extends Action {
                 handlerService.executeCommand(REFRESH_EXPERIMENT_COMMAND_ID, null);
             }
         } catch (ExecutionException e) {
-            TmfUiPlugin.getDefault().logError("Error refreshing resource " + element.getName(), e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error refreshing resource " + element.getName(), e); //$NON-NLS-1$
         } catch (NotDefinedException e) {
-            TmfUiPlugin.getDefault().logError("Error refreshing resource " + element.getName(), e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error refreshing resource " + element.getName(), e); //$NON-NLS-1$
         } catch (NotEnabledException e) {
-            TmfUiPlugin.getDefault().logError("Error refreshing resource " + element.getName(), e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error refreshing resource " + element.getName(), e); //$NON-NLS-1$
         } catch (NotHandledException e) {
-            TmfUiPlugin.getDefault().logError("Error refreshing resource " + element.getName(), e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error refreshing resource " + element.getName(), e); //$NON-NLS-1$
         }
     }
 
index 2c0cfe0b6f65ac31c0173d06548f72e95385c730..2ce27229db831fa5313316c89b4ed8040ff2eb4d 100644 (file)
@@ -19,7 +19,7 @@ import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentElement;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentFolder;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceFolder;
@@ -72,7 +72,7 @@ public class RefreshHandler extends AbstractHandler {
                     resource.refreshLocal(IResource.DEPTH_INFINITE, null);
                 }
             } catch (CoreException e) {
-                TmfUiPlugin.getDefault().logError("Error refreshing projects", e); //$NON-NLS-1$
+                Activator.getDefault().logError("Error refreshing projects", e); //$NON-NLS-1$
             }
         }
 
index 65fdc84596575e0d5da0b8a693a9ebbb2e33e6b7..cfcafe0d97020ba1504b9c1d321411608c22e23b 100644 (file)
@@ -30,7 +30,7 @@ import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.TreeSelection;
 import org.eclipse.jface.window.Window;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
 import org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentFolder;
@@ -175,7 +175,7 @@ public class RenameTraceHandler extends AbstractHandler {
                     folder.setPersistentProperty(TmfCommonConstants.TRACEICON, traceIcon);
                 }
                 else {
-                    TmfUiPlugin.getDefault().logError("RenamaeTraceHandler: Invalid Trace Location: " + location); //$NON-NLS-1$
+                    Activator.getDefault().logError("RenamaeTraceHandler: Invalid Trace Location: " + location); //$NON-NLS-1$
                 }
             }
             else {
@@ -187,12 +187,12 @@ public class RenameTraceHandler extends AbstractHandler {
                     file.setPersistentProperty(TmfCommonConstants.TRACEICON, traceIcon);
                 }
                 else {
-                    TmfUiPlugin.getDefault().logError("RenamaeTraceHandler: Invalid Trace Location: " + location); //$NON-NLS-1$
+                    Activator.getDefault().logError("RenamaeTraceHandler: Invalid Trace Location: " + location); //$NON-NLS-1$
                 }
             }
             experiment.refresh();
         } catch (CoreException e) {
-            TmfUiPlugin.getDefault().logError("Error renaming trace" + trace.getName(), e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error renaming trace" + trace.getName(), e); //$NON-NLS-1$
         }
     }
 
index 7358d110282c21a84b53c805312277a61fc83c77..e8095698bcfba202bf5837a7d187deaae210f8d7 100644 (file)
@@ -26,7 +26,7 @@ import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTrace;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTraceDefinition;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomXmlTrace;
@@ -43,7 +43,7 @@ import org.eclipse.ui.menus.CommandContributionItemParameter;
 public class SelectTraceTypeContributionItem extends CompoundContributionItem {
 
     //private static final ImageDescriptor SELECTED_ICON = ImageDescriptor.createFromImage(TmfUiPlugin.getDefault().getImageFromPath("icons/elcl16/bullet.gif")); //$NON-NLS-1$
-    private static final ImageDescriptor SELECTED_ICON = TmfUiPlugin.getDefault().getImageDescripterFromPath(
+    private static final ImageDescriptor SELECTED_ICON = Activator.getDefault().getImageDescripterFromPath(
             "icons/elcl16/bullet.gif"); //$NON-NLS-1$
     private static final String BUNDLE_PARAMETER = "org.eclipse.linuxtools.tmf.ui.commandparameter.project.trace.select_trace_type.bundle"; //$NON-NLS-1$
     private static final String TYPE_PARAMETER = "org.eclipse.linuxtools.tmf.ui.commandparameter.project.trace.select_trace_type.type"; //$NON-NLS-1$
@@ -106,7 +106,7 @@ public class SelectTraceTypeContributionItem extends CompoundContributionItem {
 
         // add the custom trace types
         for (CustomTxtTraceDefinition def : CustomTxtTraceDefinition.loadAll()) {
-            String traceBundle = TmfUiPlugin.getDefault().getBundle().getSymbolicName();
+            String traceBundle = Activator.getDefault().getBundle().getSymbolicName();
             String traceTypeId = CustomTxtTrace.class.getCanonicalName() + ":" + def.definitionName; //$NON-NLS-1$
             String traceIcon = DEFAULT_TRACE_ICON_PATH;
             String label = def.definitionName;
@@ -116,7 +116,7 @@ public class SelectTraceTypeContributionItem extends CompoundContributionItem {
             addContributionItem(list, traceBundle, traceTypeId, traceIcon, label, selected, subMenu);
         }
         for (CustomXmlTraceDefinition def : CustomXmlTraceDefinition.loadAll()) {
-            String traceBundle = TmfUiPlugin.getDefault().getBundle().getSymbolicName();
+            String traceBundle = Activator.getDefault().getBundle().getSymbolicName();
             String traceTypeId = CustomXmlTrace.class.getCanonicalName() + ":" + def.definitionName; //$NON-NLS-1$
             String traceIcon = DEFAULT_TRACE_ICON_PATH;
             String label = def.definitionName;
index 9d2c40d52a36312c65dcc3145012701c617fd3b0..b77f207e8333534abd840235c508665c208996e9 100644 (file)
@@ -23,7 +23,7 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 import org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement;
@@ -120,7 +120,7 @@ public class SelectTraceTypeHandler extends AbstractHandler {
                     String iconUrl = event.getParameter(ICON_PARAMETER);
                     ok &= propagateProperties(trace, bundleName, traceType, iconUrl);
                 } catch (CoreException e) {
-                    TmfUiPlugin.getDefault().logError("Error selecting trace type for trace" + trace.getName(), e); //$NON-NLS-1$
+                    Activator.getDefault().logError("Error selecting trace type for trace" + trace.getName(), e); //$NON-NLS-1$
                 }
             }
         }
index 0d666b3e53322ba6418d09cd13e02138703772a3..c747dc1bb96cf5680b0fd7cc18871de4eb0895c2 100644 (file)
@@ -19,7 +19,7 @@ import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.InvalidRegistryObjectException;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.internal.tmf.ui.project.handlers.Messages;
 import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
@@ -201,9 +201,9 @@ public class EventsViewEditor extends TmfEditor {
                         }
                 }
             } catch (final InvalidRegistryObjectException e) {
-                TmfUiPlugin.getDefault().logError("Error initializing EventsViewEditor", e); //$NON-NLS-1$
+                Activator.getDefault().logError("Error initializing EventsViewEditor", e); //$NON-NLS-1$
             } catch (final CoreException e) {
-                TmfUiPlugin.getDefault().logError("Error initializing EventsViewEditor", e); //$NON-NLS-1$
+                Activator.getDefault().logError("Error initializing EventsViewEditor", e); //$NON-NLS-1$
             }
             input = new TmfEditorInput(fFile, fTrace);
         } else
@@ -263,7 +263,7 @@ public class EventsViewEditor extends TmfEditor {
                             adapter.gotoMarker(fGotoMarker);
                     }
                 } catch (final PartInitException e) {
-                    TmfUiPlugin.getDefault().logError("Error setting focus", e); //$NON-NLS-1$
+                    Activator.getDefault().logError("Error setting focus", e); //$NON-NLS-1$
                 }
             }
         });
index 224b3cf1e15867f121f325b58082e184313597ca..529c0ee49d0efdc4c027e2e8f771fe16b138f4c7 100644 (file)
@@ -29,7 +29,7 @@ import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IProgressMonitor;\r
 import org.eclipse.core.runtime.InvalidRegistryObjectException;\r
 import org.eclipse.core.runtime.Platform;\r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomEventsTable;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTrace;\r
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomXmlTrace;\r
@@ -185,9 +185,9 @@ public class TmfEventsEditor extends TmfEditor implements ITmfTraceEditor, IReus
                         }\r
                 }\r
             } catch (final InvalidRegistryObjectException e) {\r
-                TmfUiPlugin.getDefault().logError("Error initializing TmfEventsEditor", e); //$NON-NLS-1$\r
+                Activator.getDefault().logError("Error initializing TmfEventsEditor", e); //$NON-NLS-1$\r
             } catch (final CoreException e) {\r
-                TmfUiPlugin.getDefault().logError("Error initializing TmfEventsEditor", e); //$NON-NLS-1$\r
+                Activator.getDefault().logError("Error initializing TmfEventsEditor", e); //$NON-NLS-1$\r
             }\r
         } else\r
             throw new PartInitException("Invalid IEditorInput: " + input.getClass()); //$NON-NLS-1$\r
@@ -298,23 +298,23 @@ public class TmfEventsEditor extends TmfEditor implements ITmfTraceEditor, IReus
                     break;\r
                 }\r
         } catch (final InvalidRegistryObjectException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
         } catch (final CoreException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
         } catch (final ClassNotFoundException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
         } catch (final SecurityException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
         } catch (final NoSuchMethodException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
         } catch (final IllegalArgumentException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
         } catch (final InstantiationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
         } catch (final IllegalAccessException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
         } catch (final InvocationTargetException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable", e); //$NON-NLS-1$\r
         }\r
         return eventsTable;\r
     }\r
@@ -364,23 +364,23 @@ public class TmfEventsEditor extends TmfEditor implements ITmfTraceEditor, IReus
                     break;\r
                 }\r
         } catch (final CoreException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
         } catch (final InvalidRegistryObjectException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
         } catch (final SecurityException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
         } catch (final IllegalArgumentException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
         } catch (final ClassNotFoundException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
         } catch (final NoSuchMethodException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
         } catch (final InstantiationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
         } catch (final IllegalAccessException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
         } catch (final InvocationTargetException e) {\r
-            TmfUiPlugin.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error getting TmfEventsTable for experiment", e); //$NON-NLS-1$\r
         }\r
         return eventsTable;\r
     }\r
@@ -463,11 +463,11 @@ public class TmfEventsEditor extends TmfEditor implements ITmfTraceEditor, IReus
                             break;\r
                         }\r
             } catch (final InvalidRegistryObjectException e) {\r
-                TmfUiPlugin.getDefault().logError("Error handling signal TmfTraceParserUpdatedSignal", e); //$NON-NLS-1$\r
+                Activator.getDefault().logError("Error handling signal TmfTraceParserUpdatedSignal", e); //$NON-NLS-1$\r
             } catch (final TmfTraceException e) {\r
-                TmfUiPlugin.getDefault().logError("Error handling signal TmfTraceParserUpdatedSignal", e); //$NON-NLS-1$\r
+                Activator.getDefault().logError("Error handling signal TmfTraceParserUpdatedSignal", e); //$NON-NLS-1$\r
             } catch (final CoreException e) {\r
-                TmfUiPlugin.getDefault().logError("Error handling signal TmfTraceParserUpdatedSignal", e); //$NON-NLS-1$\r
+                Activator.getDefault().logError("Error handling signal TmfTraceParserUpdatedSignal", e); //$NON-NLS-1$\r
             }\r
             fEventsTable.dispose();\r
             if (fTrace != null) {\r
index 3ba20291892159bb4551a0f7c77e5f99a332fceb..60222c08189143d125529df9351cbeedd7421a32 100644 (file)
@@ -18,7 +18,7 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.ui.IMemento;
@@ -57,13 +57,13 @@ public class TmfNavigatorLabelProvider implements ICommonLabelProvider {
     // ------------------------------------------------------------------------
 
     public TmfNavigatorLabelProvider() {
-        Bundle bundle = TmfUiPlugin.getDefault().getBundle();
+        Bundle bundle = Activator.getDefault().getBundle();
         fDefaultTraceIcon = loadIcon(bundle, fTraceIconFile);
         fExperimentIcon = loadIcon(bundle, fExperimentIconFile);
     }
 
     private Image loadIcon(Bundle bundle, String url) {
-        TmfUiPlugin plugin = TmfUiPlugin.getDefault();
+        Activator plugin = Activator.getDefault();
         String key = bundle.getSymbolicName() + "/" + url; //$NON-NLS-1$
         Image icon = plugin.getImageRegistry().get(key);
         if (icon == null) {
index d6b97af4160c1675159b8eab6e055ef5918ddbc2..ab626f95b4f04c57bc8ff24454515b8efb92f056 100644 (file)
@@ -25,7 +25,7 @@ import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
 
 /**
@@ -178,7 +178,7 @@ public abstract class TmfProjectModelElement implements ITmfProjectModelElement,
             try {
                 supplFolderParent.create(true, true, new NullProgressMonitor());
             } catch (CoreException e) {
-                TmfUiPlugin.getDefault().logError("Error creating project specific supplementary folder " + supplFolderParent, e); //$NON-NLS-1$
+                Activator.getDefault().logError("Error creating project specific supplementary folder " + supplFolderParent, e); //$NON-NLS-1$
             }
         }
         return supplFolderParent;
index eeab3c037c446f1fe97c9bd2bd18234d6c600821..70fcbc4be89f6223fc2c4d9beed8412780badb16 100644 (file)
@@ -22,7 +22,7 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Platform;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtEvent;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTrace;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTraceDefinition;
@@ -137,7 +137,7 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
         try {
             fTraceTypeId = getResource().getPersistentProperty(TmfCommonConstants.TRACETYPE);
         } catch (CoreException e) {
-            TmfUiPlugin.getDefault().logError("Error refreshing trace type pesistent property for trace " + getName(), e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error refreshing trace type pesistent property for trace " + getName(), e); //$NON-NLS-1$
         }
     }
 
@@ -167,7 +167,7 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
                 return trace;
             }
         } catch (CoreException e) {
-            TmfUiPlugin.getDefault().logError("Error instantiating ITmfTrace object for trace " + getName(), e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error instantiating ITmfTrace object for trace " + getName(), e); //$NON-NLS-1$
         }
         return null;
     }
@@ -194,7 +194,7 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
                 return event;
             }
         } catch (CoreException e) {
-            TmfUiPlugin.getDefault().logError("Error instantiating ITmfEvent object for trace " + getName(), e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error instantiating ITmfEvent object for trace " + getName(), e); //$NON-NLS-1$
         }
         return null;
     }
@@ -245,7 +245,7 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
             try {
                 supplFolder.delete(true, new NullProgressMonitor());
             } catch (CoreException e) {
-                TmfUiPlugin.getDefault().logError("Error deleting supplementary folder " + supplFolder, e); //$NON-NLS-1$
+                Activator.getDefault().logError("Error deleting supplementary folder " + supplFolder, e); //$NON-NLS-1$
             }
         }
     }
@@ -264,7 +264,7 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
             try {
                 oldSupplFolder.move(newSupplFolder.getFullPath(), true, new NullProgressMonitor());
             } catch (CoreException e) {
-                TmfUiPlugin.getDefault().logError("Error renaming supplementary folder " + oldSupplFolder, e); //$NON-NLS-1$
+                Activator.getDefault().logError("Error renaming supplementary folder " + oldSupplFolder, e); //$NON-NLS-1$
             }
         }
     }
@@ -283,7 +283,7 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
             try {
                 oldSupplFolder.copy(newSupplFolder.getFullPath(), true, new NullProgressMonitor());
             } catch (CoreException e) {
-                TmfUiPlugin.getDefault().logError("Error renaming supplementary folder " + oldSupplFolder, e); //$NON-NLS-1$
+                Activator.getDefault().logError("Error renaming supplementary folder " + oldSupplFolder, e); //$NON-NLS-1$
             }
         }
     }
@@ -301,7 +301,7 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
             try {
                 oldSupplFolder.copy(destination.getFullPath(), true, new NullProgressMonitor());
             } catch (CoreException e) {
-                TmfUiPlugin.getDefault().logError("Error copying supplementary folder " + oldSupplFolder, e); //$NON-NLS-1$
+                Activator.getDefault().logError("Error copying supplementary folder " + oldSupplFolder, e); //$NON-NLS-1$
             }
         }
     }
@@ -336,7 +336,7 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
             try {
                 return supplFolder.members();
             } catch (CoreException e) {
-                TmfUiPlugin.getDefault().logError("Error deleting supplementary folder " + supplFolder, e); //$NON-NLS-1$
+                Activator.getDefault().logError("Error deleting supplementary folder " + supplFolder, e); //$NON-NLS-1$
             }
         }
         return new IResource[0];
@@ -353,7 +353,7 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
             try {
                 resources[i].delete(true, new NullProgressMonitor());
             } catch (CoreException e) {
-                TmfUiPlugin.getDefault().logError("Error deleting supplementary resource " + resources[i], e); //$NON-NLS-1$
+                Activator.getDefault().logError("Error deleting supplementary resource " + resources[i], e); //$NON-NLS-1$
             }
         }
     }
@@ -364,14 +364,14 @@ public class TmfTraceElement extends TmfProjectModelElement implements IActionFi
             try {
                 supplFolder.create(true, true, new NullProgressMonitor());
             } catch (CoreException e) {
-                TmfUiPlugin.getDefault().logError("Error creating resource supplementary file " + supplFolder, e); //$NON-NLS-1$
+                Activator.getDefault().logError("Error creating resource supplementary file " + supplFolder, e); //$NON-NLS-1$
             }
         }
 
         try {
             fResource.setPersistentProperty(TmfCommonConstants.TRACE_SUPPLEMENTARY_FOLDER, supplFolder.getLocationURI().getPath());
         } catch (CoreException e) {
-            TmfUiPlugin.getDefault().logError("Error setting persistant property " + TmfCommonConstants.TRACE_SUPPLEMENTARY_FOLDER, e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error setting persistant property " + TmfCommonConstants.TRACE_SUPPLEMENTARY_FOLDER, e); //$NON-NLS-1$
         }
         
     }
index 30f0ed4d482e46516a447ae50624c2e1ccd2320b..4db3bf2cb58a6abd96726b9258d941434c380a3d 100644 (file)
@@ -26,7 +26,7 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
 import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentElement;
@@ -139,7 +139,7 @@ public class CopyExperimentDialog extends SelectionStatusDialog {
         IStatus nameStatus = workspace.validateName(name, IResource.FOLDER);
 
         if ("".equals(name)) { //$NON-NLS-1$
-               updateStatus(new Status(IStatus.ERROR, TmfUiPlugin.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_EmptyNameError, null));
+               updateStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_EmptyNameError, null));
                return;
         }
         
@@ -150,11 +150,11 @@ public class CopyExperimentDialog extends SelectionStatusDialog {
         
         IPath path = new Path(name);
         if (fExperimentFolder.getFolder(path).exists() || fExperimentFolder.getFile(path).exists()) {
-            updateStatus(new Status(IStatus.ERROR, TmfUiPlugin.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_ExistingNameError, null));
+            updateStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_ExistingNameError, null));
             return;
         }
 
-        updateStatus(new Status(IStatus.OK, TmfUiPlugin.PLUGIN_ID, "")); //$NON-NLS-1$
+        updateStatus(new Status(IStatus.OK, Activator.PLUGIN_ID, "")); //$NON-NLS-1$
     }
 
     // ------------------------------------------------------------------------
index fd09f9d41c1a7d8aae175bc3bd65795bdf061d13..133c788b4f5c0e576b4649ac6cc894b6513bcd13 100644 (file)
@@ -26,7 +26,7 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
 import org.eclipse.linuxtools.tmf.core.trace.TmfTrace;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectElement;
@@ -139,7 +139,7 @@ public class CopyTraceDialog extends SelectionStatusDialog {
         IStatus nameStatus = workspace.validateName(name, IResource.FOLDER);
 
         if ("".equals(name)) { //$NON-NLS-1$
-            updateStatus(new Status(IStatus.ERROR, TmfUiPlugin.PLUGIN_ID, IStatus.ERROR,
+            updateStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR,
                     Messages.Dialog_EmptyNameError, null));
             return;
         }
@@ -151,12 +151,12 @@ public class CopyTraceDialog extends SelectionStatusDialog {
 
         IPath path = new Path(name);
         if (fTraceFolder.getFolder(path).exists() || fTraceFolder.getFile(path).exists()) {
-            updateStatus(new Status(IStatus.ERROR, TmfUiPlugin.PLUGIN_ID, IStatus.ERROR,
+            updateStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR,
                     Messages.Dialog_ExistingNameError, null));
             return;
         }
 
-        updateStatus(new Status(IStatus.OK, TmfUiPlugin.PLUGIN_ID, "")); //$NON-NLS-1$
+        updateStatus(new Status(IStatus.OK, Activator.PLUGIN_ID, "")); //$NON-NLS-1$
     }
 
     // ------------------------------------------------------------------------
index 5e2923eb0b818d768c7ef734348963156b21bd34..f8624d5745d1b3a65ee687dfe8d823631393fb74 100644 (file)
@@ -18,7 +18,7 @@ import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.ui.IImportWizard;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.ide.IDE;
@@ -33,7 +33,7 @@ public class ImportTraceWizard extends Wizard implements IImportWizard {
     // Constants
     // ------------------------------------------------------------------------
 
-    static private final String PLUGIN_ID = TmfUiPlugin.PLUGIN_ID;
+    static private final String PLUGIN_ID = Activator.PLUGIN_ID;
     static private final String IMPORT_WIZARD = "ImportTraceWizard"; //$NON-NLS-1$
     static private final String ICON_PATH = "icons/wizban/trace_import_wiz.png"; //$NON-NLS-1$
 
@@ -50,7 +50,7 @@ public class ImportTraceWizard extends Wizard implements IImportWizard {
     // ------------------------------------------------------------------------
 
     public ImportTraceWizard() {
-        IDialogSettings workbenchSettings = TmfUiPlugin.getDefault().getDialogSettings();
+        IDialogSettings workbenchSettings = Activator.getDefault().getDialogSettings();
         IDialogSettings section = workbenchSettings.getSection(IMPORT_WIZARD);
         if (section == null) {
             section = workbenchSettings.addNewSection(IMPORT_WIZARD);
@@ -73,7 +73,7 @@ public class ImportTraceWizard extends Wizard implements IImportWizard {
         }
 
         setWindowTitle(Messages.ImportTraceWizard_DialogTitle);
-        setDefaultPageImageDescriptor(TmfUiPlugin.imageDescriptorFromPlugin(PLUGIN_ID, ICON_PATH));
+        setDefaultPageImageDescriptor(Activator.imageDescriptorFromPlugin(PLUGIN_ID, ICON_PATH));
         setNeedsProgressMonitor(true);
     }
 
index bfa6a03fc6f4228b5055d05c53b816d600930743..bef267086d7821bd69f66c278e85c2cdcf24e863 100644 (file)
@@ -44,7 +44,7 @@ import org.eclipse.jface.viewers.CheckboxTreeViewer;
 import org.eclipse.jface.viewers.ICheckStateListener;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTrace;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTraceDefinition;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomXmlTrace;
@@ -656,7 +656,7 @@ public class ImportTraceWizardPage extends WizardResourceImportPage implements L
 
         IContainer container = getSpecifiedContainer();
         if (container != null && container.isVirtual()) {
-            if (Platform.getPreferencesService().getBoolean(TmfUiPlugin.PLUGIN_ID, ResourcesPlugin.PREF_DISABLE_LINKING, false, null)) {
+            if (Platform.getPreferencesService().getBoolean(Activator.PLUGIN_ID, ResourcesPlugin.PREF_DISABLE_LINKING, false, null)) {
                 setMessage(null);
                 setErrorMessage(Messages.ImportTraceWizard_CannotImportFilesUnderAVirtualFolder);
                 return false;
@@ -775,7 +775,7 @@ public class ImportTraceWizardPage extends WizardResourceImportPage implements L
                 for (CustomTxtTraceDefinition def : CustomTxtTraceDefinition.loadAll()) {
                     if (traceType.equals(CUSTOM_TXT_CATEGORY + " : " + def.definitionName)) { //$NON-NLS-1$
                         traceTypeOK = true;
-                        traceBundle = TmfUiPlugin.getDefault().getBundle().getSymbolicName();
+                        traceBundle = Activator.getDefault().getBundle().getSymbolicName();
                         traceTypeId = CustomTxtTrace.class.getCanonicalName() + ":" + def.definitionName; //$NON-NLS-1$
                         traceIcon = DEFAULT_TRACE_ICON_PATH;
                         break;
@@ -785,7 +785,7 @@ public class ImportTraceWizardPage extends WizardResourceImportPage implements L
                 for (CustomXmlTraceDefinition def : CustomXmlTraceDefinition.loadAll()) {
                     if (traceType.equals(CUSTOM_XML_CATEGORY + " : " + def.definitionName)) { //$NON-NLS-1$
                         traceTypeOK = true;
-                        traceBundle = TmfUiPlugin.getDefault().getBundle().getSymbolicName();
+                        traceBundle = Activator.getDefault().getBundle().getSymbolicName();
                         traceTypeId = CustomXmlTrace.class.getCanonicalName() + ":" + def.definitionName; //$NON-NLS-1$
                         traceIcon = DEFAULT_TRACE_ICON_PATH;
                         break;
@@ -825,7 +825,7 @@ public class ImportTraceWizardPage extends WizardResourceImportPage implements L
                                     }
                                 }
                             } catch (CoreException e) {
-                                TmfUiPlugin.getDefault().logError("Error importing trace resource " + resource.getName(), e); //$NON-NLS-1$
+                                Activator.getDefault().logError("Error importing trace resource " + resource.getName(), e); //$NON-NLS-1$
                             }
                         }
                     }
index 889908673fbc939b150dedf1eb0588766a7ccea0..6d1819e1399bfdff755652b5ae233522554c041e 100644 (file)
@@ -28,7 +28,7 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentFolder;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectElement;
 import org.eclipse.osgi.util.NLS;
@@ -121,7 +121,7 @@ public class NewExperimentDialog extends SelectionStatusDialog {
         IStatus nameStatus = workspace.validateName(name, IResource.FOLDER);
 
         if ("".equals(name)) { //$NON-NLS-1$
-               updateStatus(new Status(IStatus.ERROR, TmfUiPlugin.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_EmptyNameError, null));
+               updateStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_EmptyNameError, null));
                return;
         }
         
@@ -132,11 +132,11 @@ public class NewExperimentDialog extends SelectionStatusDialog {
         
         IPath path = new Path(name);
         if (fExperimentFolder.getFolder(path).exists() || fExperimentFolder.getFile(path).exists()) {
-            updateStatus(new Status(IStatus.ERROR, TmfUiPlugin.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_ExistingNameError, null));
+            updateStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_ExistingNameError, null));
             return;
         }
 
-        updateStatus(new Status(IStatus.OK, TmfUiPlugin.PLUGIN_ID, "")); //$NON-NLS-1$
+        updateStatus(new Status(IStatus.OK, Activator.PLUGIN_ID, "")); //$NON-NLS-1$
     }
 
     // ------------------------------------------------------------------------
index bb2dad5a1f27852c67ea2b9adae9e91fc98539bc..4a46cb3cbc862fd2bbb156bb9ffe3532ae7f8c4f 100644 (file)
@@ -27,7 +27,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
 import org.eclipse.linuxtools.tmf.core.TmfProjectNature;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentFolder;
@@ -65,7 +65,7 @@ public class NewTmfProjectWizard extends Wizard implements INewWizard, IExecutab
      */
     public NewTmfProjectWizard(String title, String desc) {
         super();
-        setDialogSettings(TmfUiPlugin.getDefault().getDialogSettings());
+        setDialogSettings(Activator.getDefault().getDialogSettings());
         setNeedsProgressMonitor(true);
         setForcePreviousAndNextButtons(true);
         setWindowTitle(title);
@@ -153,7 +153,7 @@ public class NewTmfProjectWizard extends Wizard implements INewWizard, IExecutab
 
             return project;
         } catch (CoreException e) {
-            TmfUiPlugin.getDefault().logError("Error creating TMF project " + project.getName(), e); //$NON-NLS-1$            
+            Activator.getDefault().logError("Error creating TMF project " + project.getName(), e); //$NON-NLS-1$            
         }
         return null;
     }
index 0ab0b8057f686d71a1c76b2dd1d45f4f0f8eb572..ff639aa7aa9d6399d08e074bd581c87733739c2b 100644 (file)
@@ -28,7 +28,7 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentElement;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentFolder;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectElement;
@@ -139,7 +139,7 @@ public class RenameExperimentDialog extends SelectionStatusDialog {
         IStatus nameStatus = workspace.validateName(name, IResource.FOLDER);
 
         if ("".equals(name)) { //$NON-NLS-1$
-               updateStatus(new Status(IStatus.ERROR, TmfUiPlugin.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_EmptyNameError, null));
+               updateStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_EmptyNameError, null));
                return;
         }
         
@@ -150,11 +150,11 @@ public class RenameExperimentDialog extends SelectionStatusDialog {
         
         IPath path = new Path(name);
         if (fExperimentFolder.getFolder(path).exists() || fExperimentFolder.getFile(path).exists()) {
-            updateStatus(new Status(IStatus.ERROR, TmfUiPlugin.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_ExistingNameError, null));
+            updateStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.Dialog_ExistingNameError, null));
             return;
         }
 
-        updateStatus(new Status(IStatus.OK, TmfUiPlugin.PLUGIN_ID, "")); //$NON-NLS-1$
+        updateStatus(new Status(IStatus.OK, Activator.PLUGIN_ID, "")); //$NON-NLS-1$
     }
 
     // ------------------------------------------------------------------------
index 86c5aa53f881ab043c2db1aa1d9416d03f654158..fae0aea1ec5cf3a056e0b7fcdd88c19e8d5fc7af 100644 (file)
@@ -28,7 +28,7 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectElement;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceElement;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceFolder;
@@ -144,7 +144,7 @@ public class RenameTraceDialog extends SelectionStatusDialog {
         IStatus nameStatus = workspace.validateName(fNewTraceName, IResource.FOLDER);
 
         if ("".equals(fNewTraceName)) { //$NON-NLS-1$
-            updateStatus(new Status(IStatus.ERROR, TmfUiPlugin.PLUGIN_ID, IStatus.ERROR,
+            updateStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR,
                     Messages.Dialog_EmptyNameError, null));
             return;
         }
@@ -156,12 +156,12 @@ public class RenameTraceDialog extends SelectionStatusDialog {
 
         IPath path = new Path(fNewTraceName);
         if (fTraceFolder.getFolder(path).exists() || fTraceFolder.getFile(path).exists()) {
-            updateStatus(new Status(IStatus.ERROR, TmfUiPlugin.PLUGIN_ID, IStatus.ERROR,
+            updateStatus(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR,
                     Messages.Dialog_ExistingNameError, null));
             return;
         }
 
-        updateStatus(new Status(IStatus.OK, TmfUiPlugin.PLUGIN_ID, "")); //$NON-NLS-1$
+        updateStatus(new Status(IStatus.OK, Activator.PLUGIN_ID, "")); //$NON-NLS-1$
     }
 
     // ------------------------------------------------------------------------
index 8994bc796673996ead02d920a4d84a2e7dd9a39c..92415c4542c445753ea6e34178786c219dfc59ca 100644 (file)
@@ -27,7 +27,7 @@ import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.QualifiedName;
 import org.eclipse.jface.viewers.CheckboxTableViewer;
 import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
 import org.eclipse.linuxtools.tmf.ui.project.model.ITmfProjectModelElement;
 import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentElement;
@@ -153,7 +153,7 @@ public class SelectTracesWizardPage extends WizardPage {
             try {
                 resource.delete(true, null);
             } catch (CoreException e) {
-                TmfUiPlugin.getDefault().logError("Error selecting traces for experiment " + experiment.getName(), e); //$NON-NLS-1$
+                Activator.getDefault().logError("Error selecting traces for experiment " + experiment.getName(), e); //$NON-NLS-1$
             }
         }
         fProject.refresh();
@@ -179,7 +179,7 @@ public class SelectTracesWizardPage extends WizardPage {
                     setProperties(folder, bundleName, traceType, iconUrl);
 
                 } else {
-                    TmfUiPlugin.getDefault().logError("Error creating link. Invalid trace location " + location); //$NON-NLS-1$
+                    Activator.getDefault().logError("Error creating link. Invalid trace location " + location); //$NON-NLS-1$
                 }
             } else {
                 IFile file = experiment.getFile(trace.getName());
@@ -187,11 +187,11 @@ public class SelectTracesWizardPage extends WizardPage {
                     file.createLink(location, IResource.REPLACE, null);
                     setProperties(file, bundleName, traceType, iconUrl);
                 } else {
-                    TmfUiPlugin.getDefault().logError("Error creating link. Invalid trace location " + location); //$NON-NLS-1$
+                    Activator.getDefault().logError("Error creating link. Invalid trace location " + location); //$NON-NLS-1$
                 }
             }
         } catch (CoreException e) {
-            TmfUiPlugin.getDefault().logError("Error creating link to location " + location, e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error creating link to location " + location, e); //$NON-NLS-1$
         }
     }
 
index 5382ae09112ec7d0e1279645f2337a0836c0fda8..8a55d4fbeade0d930d132c2d04aba5eb2b241728 100644 (file)
@@ -19,7 +19,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;\r
 import org.eclipse.core.runtime.Status;\r
 import org.eclipse.core.runtime.jobs.Job;\r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.tmf.core.component.ITmfDataProvider;\r
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;\r
 import org.eclipse.linuxtools.tmf.core.filter.ITmfFilter;\r
@@ -184,7 +184,7 @@ public class TmfEventsCache {
                        request.waitForCompletion();\r
                        return ((DataRequest<ITmfEvent>) request).getFilteredIndex();\r
                } catch (InterruptedException e) {\r
-                   TmfUiPlugin.getDefault().logError("Filter request interrupted!", e); //$NON-NLS-1$\r
+                   Activator.getDefault().logError("Filter request interrupted!", e); //$NON-NLS-1$\r
                }\r
        return 0;\r
     }\r
@@ -275,7 +275,7 @@ public class TmfEventsCache {
                 try {\r
                     request.waitForCompletion();\r
                 } catch (InterruptedException e) {\r
-                    TmfUiPlugin.getDefault().logError("Wait for completion interrupted for populateCache ", e); //$NON-NLS-1$\r
+                    Activator.getDefault().logError("Wait for completion interrupted for populateCache ", e); //$NON-NLS-1$\r
                 }\r
 \r
                 fTable.cacheUpdated(true);\r
index e9dbf387beb1546137dd195bde56d685bca38df4..9c094ecb0c1ee8c397eb7ba643ebcab3da3fbc85 100644 (file)
@@ -45,7 +45,7 @@ import org.eclipse.jface.resource.FontDescriptor;
 import org.eclipse.jface.resource.JFaceResources;\r
 import org.eclipse.jface.resource.LocalResourceManager;\r
 import org.eclipse.linuxtools.internal.tmf.ui.Messages;\r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.tmf.core.component.ITmfDataProvider;\r
 import org.eclipse.linuxtools.tmf.core.component.TmfComponent;\r
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;\r
@@ -117,16 +117,16 @@ import org.eclipse.ui.themes.ColorUtil;
 public class TmfEventsTable extends TmfComponent implements IGotoMarker, IColorSettingsListener,\r
 ITmfEventsFilterProvider {\r
 \r
-    private static final Image BOOKMARK_IMAGE = TmfUiPlugin.getDefault().getImageFromPath(\r
+    private static final Image BOOKMARK_IMAGE = Activator.getDefault().getImageFromPath(\r
             "icons/elcl16/bookmark_obj.gif"); //$NON-NLS-1$\r
-    private static final Image SEARCH_IMAGE = TmfUiPlugin.getDefault().getImageFromPath("icons/elcl16/search.gif"); //$NON-NLS-1$\r
-    private static final Image SEARCH_MATCH_IMAGE = TmfUiPlugin.getDefault().getImageFromPath(\r
+    private static final Image SEARCH_IMAGE = Activator.getDefault().getImageFromPath("icons/elcl16/search.gif"); //$NON-NLS-1$\r
+    private static final Image SEARCH_MATCH_IMAGE = Activator.getDefault().getImageFromPath(\r
             "icons/elcl16/search_match.gif"); //$NON-NLS-1$\r
-    private static final Image SEARCH_MATCH_BOOKMARK_IMAGE = TmfUiPlugin.getDefault().getImageFromPath(\r
+    private static final Image SEARCH_MATCH_BOOKMARK_IMAGE = Activator.getDefault().getImageFromPath(\r
             "icons/elcl16/search_match_bookmark.gif"); //$NON-NLS-1$\r
-    private static final Image FILTER_IMAGE = TmfUiPlugin.getDefault()\r
+    private static final Image FILTER_IMAGE = Activator.getDefault()\r
             .getImageFromPath("icons/elcl16/filter_items.gif"); //$NON-NLS-1$\r
-    private static final Image STOP_IMAGE = TmfUiPlugin.getDefault().getImageFromPath("icons/elcl16/stop.gif"); //$NON-NLS-1$\r
+    private static final Image STOP_IMAGE = Activator.getDefault().getImageFromPath("icons/elcl16/stop.gif"); //$NON-NLS-1$\r
     private static final String SEARCH_HINT = Messages.TmfEventsTable_SearchHint;\r
     private static final String FILTER_HINT = Messages.TmfEventsTable_FilterHint;\r
     private static final int MAX_CACHE_SIZE = 1000;\r
index 1017d317155df2cab90d7ef8ae71a8fcc0d45447..be836a56bb5f59d75725827ae50ec369b9441d28 100644 (file)
@@ -16,7 +16,7 @@ import java.util.ArrayList;
 import java.util.Arrays;\r
 import java.util.List;\r
 \r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;\r
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.TimeGraphColorScheme;\r
 import org.eclipse.swt.SWT;\r
@@ -26,7 +26,7 @@ public class ColorSettingsManager {
 \r
        private static final String COLOR_SETTINGS_FILE_NAME = "color_settings.xml"; //$NON-NLS-1$\r
        private static final String COLOR_SETTINGS_PATH_NAME =\r
-        TmfUiPlugin.getDefault().getStateLocation().addTrailingSeparator().append(COLOR_SETTINGS_FILE_NAME).toString();\r
+        Activator.getDefault().getStateLocation().addTrailingSeparator().append(COLOR_SETTINGS_FILE_NAME).toString();\r
        private static final ColorSetting DEFAULT_COLOR_SETTING = new ColorSetting(\r
                        Display.getDefault().getSystemColor(SWT.COLOR_LIST_FOREGROUND).getRGB(),\r
                        Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB(),\r
index 858ea166a5bb2b88fdcef76304d63a84d0e1e965..7fac647805d5af743172e8b664d43af54b2a9c78 100644 (file)
@@ -28,7 +28,7 @@ import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.dom.DOMSource;\r
 import javax.xml.transform.stream.StreamResult;\r
 \r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.tmf.core.filter.model.ITmfFilterTreeNode;\r
 import org.eclipse.linuxtools.tmf.core.filter.xml.TmfFilterContentHandler;\r
 import org.eclipse.linuxtools.tmf.core.filter.xml.TmfFilterXMLWriter;\r
@@ -99,11 +99,11 @@ public class ColorSettingsXML {
                StreamResult result =  new StreamResult(new File(pathName));\r
                        transformer.transform(source, result);\r
                } catch (ParserConfigurationException e) {\r
-                   TmfUiPlugin.getDefault().logError("Error saving color xml file: " + pathName, e); //$NON-NLS-1$\r
+                   Activator.getDefault().logError("Error saving color xml file: " + pathName, e); //$NON-NLS-1$\r
                } catch (TransformerConfigurationException e) {\r
-                   TmfUiPlugin.getDefault().logError("Error saving color xml file: " + pathName, e); //$NON-NLS-1$\r
+                   Activator.getDefault().logError("Error saving color xml file: " + pathName, e); //$NON-NLS-1$\r
                } catch (TransformerException e) {\r
-                   TmfUiPlugin.getDefault().logError("Error saving color xml file: " + pathName, e); //$NON-NLS-1$\r
+                   Activator.getDefault().logError("Error saving color xml file: " + pathName, e); //$NON-NLS-1$\r
                }\r
        }\r
        \r
@@ -121,11 +121,11 @@ public class ColorSettingsXML {
                saxReader.parse(pathName);\r
                return handler.colorSettings.toArray(new ColorSetting[0]);\r
                } catch (ParserConfigurationException e) {\r
-                   TmfUiPlugin.getDefault().logError("Error loading color xml file: " + pathName, e); //$NON-NLS-1$\r
+                   Activator.getDefault().logError("Error loading color xml file: " + pathName, e); //$NON-NLS-1$\r
                } catch (SAXException e) {\r
-                   TmfUiPlugin.getDefault().logError("Error loading color xml file: " + pathName, e); //$NON-NLS-1$\r
+                   Activator.getDefault().logError("Error loading color xml file: " + pathName, e); //$NON-NLS-1$\r
                } catch (IOException e) {\r
-                   TmfUiPlugin.getDefault().logError("Error loading color xml file: " + pathName, e); //$NON-NLS-1$\r
+                   Activator.getDefault().logError("Error loading color xml file: " + pathName, e); //$NON-NLS-1$\r
                }\r
                // In case of error, dispose the partial list of color settings\r
                for (ColorSetting colorSetting : handler.colorSettings) {\r
index 1592de784afc4c5a0bf300edbf7742a4d5948910..f3a46666433f1169f252c61a28e069288ac7ecb9 100644 (file)
@@ -23,7 +23,7 @@ import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.MessageDialog;\r
 import org.eclipse.jface.resource.ImageDescriptor;\r
 import org.eclipse.linuxtools.internal.tmf.ui.Messages;\r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.tmf.ui.views.TmfView;\r
 import org.eclipse.linuxtools.tmf.ui.views.filter.FilterDialog;\r
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.TimeGraphColorScheme;\r
@@ -58,12 +58,12 @@ public class ColorsView extends TmfView {
 \r
     public static final String ID = "org.eclipse.linuxtools.tmf.ui.views.colors"; //$NON-NLS-1$\r
 \r
-    private static final Image ADD_IMAGE = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/add_button.gif"); //$NON-NLS-1$\r
-    private static final Image DELETE_IMAGE = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/delete_button.gif"); //$NON-NLS-1$\r
-    private static final Image MOVE_UP_IMAGE = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/moveup_button.gif"); //$NON-NLS-1$\r
-    private static final Image MOVE_DOWN_IMAGE = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/movedown_button.gif"); //$NON-NLS-1$\r
-    private static final Image IMPORT_IMAGE = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/import_button.gif"); //$NON-NLS-1$\r
-    private static final Image EXPORT_IMAGE = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/export_button.gif"); //$NON-NLS-1$\r
+    private static final Image ADD_IMAGE = Activator.getDefault().getImageFromPath("/icons/elcl16/add_button.gif"); //$NON-NLS-1$\r
+    private static final Image DELETE_IMAGE = Activator.getDefault().getImageFromPath("/icons/elcl16/delete_button.gif"); //$NON-NLS-1$\r
+    private static final Image MOVE_UP_IMAGE = Activator.getDefault().getImageFromPath("/icons/elcl16/moveup_button.gif"); //$NON-NLS-1$\r
+    private static final Image MOVE_DOWN_IMAGE = Activator.getDefault().getImageFromPath("/icons/elcl16/movedown_button.gif"); //$NON-NLS-1$\r
+    private static final Image IMPORT_IMAGE = Activator.getDefault().getImageFromPath("/icons/elcl16/import_button.gif"); //$NON-NLS-1$\r
+    private static final Image EXPORT_IMAGE = Activator.getDefault().getImageFromPath("/icons/elcl16/export_button.gif"); //$NON-NLS-1$\r
 \r
     // ------------------------------------------------------------------------\r
     // Main data structures\r
index 21e5465391d8502b7c3f5feb4e8271d445d82647..b549e03e94977360831a885c76fdddc1de57c6fa 100644 (file)
@@ -21,12 +21,12 @@ public class TmfEnvironmentView extends TmfView {
     public static final String ID = "org.eclipse.linuxtools.tmf.ui.views.environment"; //$NON-NLS-1$
     private TmfExperiment<?> fExperiment;
     private Table fTable;
-    final private String fTitlePrefix;
+//    final private String fTitlePrefix;
     private Composite fParent;
 
     public TmfEnvironmentView() {
         super("EnvironmentVariables"); //$NON-NLS-1$
-        fTitlePrefix = getTitle();
+//        fTitlePrefix = getTitle();
     }
 
     // ------------------------------------------------------------------------
@@ -42,7 +42,7 @@ public class TmfEnvironmentView extends TmfView {
     }
 
     @Override
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public void createPartControl(Composite parent) {
         fParent = parent;
         TableItem ti[];
index 84ea0c83c0db685cd4ca4a1c51111443d1ee9091..14c9346737f1cff00fc041a700b83ee55407922d 100644 (file)
@@ -27,7 +27,7 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.InvalidRegistryObjectException;
 import org.eclipse.core.runtime.Platform;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomEventsTable;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomTxtTrace;
 import org.eclipse.linuxtools.internal.tmf.ui.parsers.custom.CustomXmlTrace;
@@ -157,23 +157,23 @@ public class TmfEventsView extends TmfView implements IResourceChangeListener {
                 }
             }
         } catch (CoreException e) {
-            TmfUiPlugin.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
         } catch (InvalidRegistryObjectException e) {
-            TmfUiPlugin.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
         } catch (SecurityException e) {
-            TmfUiPlugin.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
         } catch (IllegalArgumentException e) {
-            TmfUiPlugin.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
         } catch (ClassNotFoundException e) {
-            TmfUiPlugin.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
         } catch (NoSuchMethodException e) {
-            TmfUiPlugin.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
         } catch (InstantiationException e) {
-            TmfUiPlugin.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
         } catch (IllegalAccessException e) {
-            TmfUiPlugin.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
         } catch (InvocationTargetException e) {
-            TmfUiPlugin.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error creating events table", e); //$NON-NLS-1$
         }
         return new TmfEventsTable(parent, cacheSize);
     }
@@ -240,7 +240,7 @@ public class TmfEventsView extends TmfView implements IResourceChangeListener {
                if (experiment.equals(fExperiment)) {
                        fEventsTable.setTrace(null, false);
 
-            TmfUiPlugin.getDefault().getWorkbench().getWorkbenchWindows()[0].getShell().getDisplay().syncExec(new Runnable() {
+            Activator.getDefault().getWorkbench().getWorkbenchWindows()[0].getShell().getDisplay().syncExec(new Runnable() {
                 @Override
                 public void run() {
                     setPartName(fTitlePrefix);
index 30cdbc8ce337f0d4d3c58ca6f4f3b3033890faf8..45e56d78c7de8213e4acc98c3051daf229c6b7e1 100644 (file)
@@ -17,7 +17,7 @@ import java.io.IOException;
 \r
 import javax.xml.parsers.ParserConfigurationException;\r
 \r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.tmf.core.filter.model.ITmfFilterTreeNode;\r
 import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterRootNode;\r
 import org.eclipse.linuxtools.tmf.core.filter.xml.TmfFilterXMLParser;\r
@@ -28,7 +28,7 @@ public class FilterManager {
 \r
        private static final String SAVED_FILTERS_FILE_NAME = "saved_filters.xml"; //$NON-NLS-1$\r
        private static final String SAVED_FILTERS_PATH_NAME =\r
-        TmfUiPlugin.getDefault().getStateLocation().addTrailingSeparator().append(SAVED_FILTERS_FILE_NAME).toString();\r
+        Activator.getDefault().getStateLocation().addTrailingSeparator().append(SAVED_FILTERS_FILE_NAME).toString();\r
        \r
     private static ITmfFilterTreeNode fRoot = new TmfFilterRootNode();\r
     static {\r
@@ -36,9 +36,9 @@ public class FilterManager {
                fRoot = new TmfFilterXMLParser(SAVED_FILTERS_PATH_NAME).getTree();\r
         } catch (FileNotFoundException e) {\r
         } catch (SAXException e) {\r
-            TmfUiPlugin.getDefault().logError("Error parsing saved filter xml file: " + SAVED_FILTERS_PATH_NAME, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error parsing saved filter xml file: " + SAVED_FILTERS_PATH_NAME, e); //$NON-NLS-1$\r
         } catch (IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error parsing saved filter xml file: " + SAVED_FILTERS_PATH_NAME, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error parsing saved filter xml file: " + SAVED_FILTERS_PATH_NAME, e); //$NON-NLS-1$\r
         }\r
     }\r
     \r
@@ -55,9 +55,9 @@ public class FilterManager {
                TmfFilterXMLWriter writerXML = new TmfFilterXMLWriter(fRoot);\r
                writerXML.saveTree(SAVED_FILTERS_PATH_NAME);\r
         } catch (IOException e) {\r
-            TmfUiPlugin.getDefault().logError("Error saving filter xml file: " + SAVED_FILTERS_PATH_NAME, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error saving filter xml file: " + SAVED_FILTERS_PATH_NAME, e); //$NON-NLS-1$\r
         } catch (ParserConfigurationException e) {\r
-            TmfUiPlugin.getDefault().logError("Error saving filter xml file: " + SAVED_FILTERS_PATH_NAME, e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error saving filter xml file: " + SAVED_FILTERS_PATH_NAME, e); //$NON-NLS-1$\r
         }\r
     }\r
 }\r
index 8cc1ef4b2dbf36f9e4eec144a91cbea4a8b9e6ee..070f14eb0ae18768a8a025da88ce266e12ff73bb 100644 (file)
@@ -29,7 +29,7 @@ import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.IStructuredSelection;\r
 import org.eclipse.jface.viewers.SelectionChangedEvent;\r
 import org.eclipse.linuxtools.internal.tmf.ui.Messages;\r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.tmf.core.filter.model.ITmfFilterTreeNode;\r
 import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterNode;\r
 import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterRootNode;\r
@@ -53,11 +53,11 @@ public class FilterView extends TmfView {
 \r
        public static final String ID = "org.eclipse.linuxtools.tmf.ui.views.filter"; //$NON-NLS-1$\r
 \r
-       private static final Image SAVE_IMAGE = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/save_button.gif"); //$NON-NLS-1$\r
-    private static final Image ADD_IMAGE = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/add_button.gif"); //$NON-NLS-1$\r
-    private static final Image DELETE_IMAGE = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/delete_button.gif"); //$NON-NLS-1$\r
-    private static final Image IMPORT_IMAGE = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/import_button.gif"); //$NON-NLS-1$\r
-    private static final Image EXPORT_IMAGE = TmfUiPlugin.getDefault().getImageFromPath("/icons/elcl16/export_button.gif"); //$NON-NLS-1$\r
+       private static final Image SAVE_IMAGE = Activator.getDefault().getImageFromPath("/icons/elcl16/save_button.gif"); //$NON-NLS-1$\r
+    private static final Image ADD_IMAGE = Activator.getDefault().getImageFromPath("/icons/elcl16/add_button.gif"); //$NON-NLS-1$\r
+    private static final Image DELETE_IMAGE = Activator.getDefault().getImageFromPath("/icons/elcl16/delete_button.gif"); //$NON-NLS-1$\r
+    private static final Image IMPORT_IMAGE = Activator.getDefault().getImageFromPath("/icons/elcl16/import_button.gif"); //$NON-NLS-1$\r
+    private static final Image EXPORT_IMAGE = Activator.getDefault().getImageFromPath("/icons/elcl16/export_button.gif"); //$NON-NLS-1$\r
     \r
     // ------------------------------------------------------------------------\r
     // Main data structures\r
@@ -98,7 +98,7 @@ public class FilterView extends TmfView {
                try {\r
             fWorkspace.getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);\r
         } catch (CoreException e) {\r
-            TmfUiPlugin.getDefault().logError("Error refreshing workspace", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error refreshing workspace", e); //$NON-NLS-1$\r
         }\r
         \r
         fRoot = new TmfFilterRootNode();\r
@@ -261,9 +261,9 @@ public class FilterView extends TmfView {
                        }\r
                                \r
                        } catch (ParserConfigurationException e) {\r
-                           TmfUiPlugin.getDefault().logError("Error parsing filter xml file", e); //$NON-NLS-1$\r
+                           Activator.getDefault().logError("Error parsing filter xml file", e); //$NON-NLS-1$\r
                        } catch (IOException e) {\r
-                           TmfUiPlugin.getDefault().logError("Error parsing filter xml file", e); //$NON-NLS-1$\r
+                           Activator.getDefault().logError("Error parsing filter xml file", e); //$NON-NLS-1$\r
                        }\r
                }\r
        }\r
@@ -286,9 +286,9 @@ public class FilterView extends TmfView {
                                }\r
                                        \r
                                } catch (SAXException e) {\r
-                                   TmfUiPlugin.getDefault().logError("Error importing filter xml file", e); //$NON-NLS-1$\r
+                                   Activator.getDefault().logError("Error importing filter xml file", e); //$NON-NLS-1$\r
                                } catch (IOException e) {\r
-                                   TmfUiPlugin.getDefault().logError("Error importing filter xml file", e); //$NON-NLS-1$\r
+                                   Activator.getDefault().logError("Error importing filter xml file", e); //$NON-NLS-1$\r
                                }\r
 \r
                                if (root != null) {\r
index 510a12ed8ea4e9d0f5142515b202234efdec833c..a9ed55b23be06d2bec426dc8ef778fec786f87ff 100644 (file)
@@ -19,7 +19,7 @@ import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarker;\r
 import org.eclipse.core.resources.IResource;\r
 import org.eclipse.core.runtime.CoreException;\r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;\r
 import org.eclipse.linuxtools.tmf.core.filter.ITmfFilter;\r
 \r
@@ -54,7 +54,7 @@ public class TimeChartDecorationProvider {
                        }\r
                }\r
         } catch (CoreException e) {\r
-            TmfUiPlugin.getDefault().logError("Error refreshing bookmarks", e); //$NON-NLS-1$\r
+            Activator.getDefault().logError("Error refreshing bookmarks", e); //$NON-NLS-1$\r
         }\r
     }\r
 \r
index 5c2fe3fc7cf885a6ce025c4e3ab32d37b8aa0b3c..d89d3c81f19cad8077ab506cbd4060248a9afea3 100755 (executable)
@@ -28,7 +28,7 @@ import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.Frame;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode;
@@ -606,7 +606,7 @@ public class SDView extends ViewPart {
                 if (action.getId() == null)
                     action.setId("org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.extendedFilter"); //$NON-NLS-1$
                 if (action.getImageDescriptor() == null)
-                    action.setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_FILTERS));
+                    action.setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_FILTERS));
                 if (action.getText() == null || action.getText().length() == 0)
                     action.setText(SDMessages._42);
                 bar.getMenuManager().prependToGroup("UML2SD_FILTERING", action); //$NON-NLS-1$
@@ -636,7 +636,7 @@ public class SDView extends ViewPart {
                     action.setId("org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.extendedFind"); //$NON-NLS-1$
                 }
                 if (action.getImageDescriptor() == null) {
-                    action.setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_SEARCH_SEQ));
+                    action.setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_SEARCH_SEQ));
                 }
                 if (action.getText() == null) {
                     action.setText(SDMessages._41);
index 227264b26367813b3aa481f0123f633f41ab41e7..d297c0726286bc3578f0ec7a966a48e196df4368 100755 (executable)
@@ -19,15 +19,13 @@ import java.util.List;
 import java.util.Timer;
 import java.util.TimerTask;
 
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.contexts.IContextIds;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
 import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage;
@@ -379,8 +377,8 @@ public class SDWidget extends ScrollView implements SelectionListener, IProperty
         fInsertionCartet = new Caret((Canvas) getViewControl(), SWT.NONE);
         fInsertionCartet.setVisible(false);
 
-        fCollapaseCaretImg = TmfUiPlugin.getDefault().getImageFromPath(ITmfImageConstants.IMG_UI_ARROW_COLLAPSE_OBJ);
-        fArrowUpCaretImg = TmfUiPlugin.getDefault().getImageFromPath(ITmfImageConstants.IMG_UI_ARROW_UP_OBJ);
+        fCollapaseCaretImg = Activator.getDefault().getImageFromPath(ITmfImageConstants.IMG_UI_ARROW_COLLAPSE_OBJ);
+        fArrowUpCaretImg = Activator.getDefault().getImageFromPath(ITmfImageConstants.IMG_UI_ARROW_UP_OBJ);
 
         fReorderList = new ArrayList<Lifeline[]>();
         getViewControl().addTraverseListener(new LocalTraverseListener());
@@ -1081,7 +1079,7 @@ public class SDWidget extends ScrollView implements SelectionListener, IProperty
                 return;
             }
         } catch (Exception e) {
-            TmfUiPlugin.getDefault().logError("Error creating image", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error creating image", e); //$NON-NLS-1$
             return;
         }
         printUI(sdPrinter.getDialogUI());
@@ -1296,7 +1294,7 @@ public class SDWidget extends ScrollView implements SelectionListener, IProperty
         try {
             dbuffer = new Image(getDisplay(), area.width, area.height);
         } catch (Exception e) {
-            TmfUiPlugin.getDefault().logError("Error creating image", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error creating image", e); //$NON-NLS-1$
         }
 
         gcim = new GC(dbuffer);
@@ -1884,7 +1882,7 @@ public class SDWidget extends ScrollView implements SelectionListener, IProperty
         try {
             gc.drawImage(dbuffer, 0, 0, area.width, area.height, 0, 0, area.width, area.height);
         } catch (Exception e) {
-            TmfUiPlugin.getDefault().logError("Error drawin content", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error drawin content", e); //$NON-NLS-1$
         }
         dbuffer.dispose();
         setHScrollBarIncrement(Math.round(SDViewPref.getInstance().getLifelineWidth() / (float) 2 * fZoomValue));
index 96bcc8a494436323ea15db3099c41fb5a76d8a5d..e5aa1194ba74f321f192f1d3c56c0b27352d1f4c 100755 (executable)
@@ -18,9 +18,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.AsyncMessage;
@@ -391,7 +389,7 @@ public class TimeCompressionBar extends ScrollView implements DisposeListener {
         try {
             dbuffer = new Image(getDisplay(), getClientArea().width, getClientArea().height);
         } catch (Exception e) {
-            TmfUiPlugin.getDefault().logError("Error creating image", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error creating image", e); //$NON-NLS-1$
         }
         gcim = new GC(dbuffer);
         for (int i = 0; i < fNodeList.size() - 1; i++) {
@@ -475,7 +473,7 @@ public class TimeCompressionBar extends ScrollView implements DisposeListener {
         try {
             gc.drawImage(dbuffer, 0, 0, getClientArea().width, getClientArea().height, 0, 0, getClientArea().width, getClientArea().height);
         } catch (Exception e) {
-            TmfUiPlugin.getDefault().logError("Error drawing image", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error drawing image", e); //$NON-NLS-1$
         }
         gcim.dispose();
         if (dbuffer != null) {
index cd3958f5facb93d56120f82c470cac470833e85c..376a3ce6405b76f6305dad5a178a7edcb6049722 100755 (executable)
@@ -19,7 +19,7 @@ import java.util.List;
 
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.DialogSettings;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDFilterProvider;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.SDMessages;
@@ -387,7 +387,7 @@ public class FilterListDialog extends Dialog {
      * @return the saved global filters
      */
     public static List<FilterCriteria> getGlobalFilters() {
-        DialogSettings settings = (DialogSettings) TmfUiPlugin.getDefault().getDialogSettings().getSection(FILTERS_LIST_CRITERIA);
+        DialogSettings settings = (DialogSettings) Activator.getDefault().getDialogSettings().getSection(FILTERS_LIST_CRITERIA);
         int i = 0;
         DialogSettings section = null;
         int size = 0;
@@ -420,7 +420,7 @@ public class FilterListDialog extends Dialog {
      * @param globalFilters A list of filters to save.
      */
     public static void saveFiltersCriteria(List<FilterCriteria> globalFilters) {
-        DialogSettings settings = (DialogSettings) TmfUiPlugin.getDefault().getDialogSettings();
+        DialogSettings settings = (DialogSettings) Activator.getDefault().getDialogSettings();
         DialogSettings section = (DialogSettings) settings.getSection(FILTERS_LIST_CRITERIA);
         if (section == null) {
             section = (DialogSettings) settings.addNewSection(FILTERS_LIST_CRITERIA);
index 870f145b080e5bb498a906168d9958fff64424b0..0007b05d4f2e6afafa71abb4242d2f687e75a800 100755 (executable)
@@ -19,7 +19,7 @@ import java.util.List;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.DialogSettings;
 import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.AsyncMessage;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.AsyncMessageReturn;
@@ -144,9 +144,9 @@ public class SearchFilterDialog extends Dialog {
     @Override
     public Control createDialogArea(Composite arg0) {
         if (fIsFind) {
-            fExpressionList = TmfUiPlugin.getDefault().getDialogSettings().getArray(FIND_EXPRESSION_LIST);
+            fExpressionList = Activator.getDefault().getDialogSettings().getArray(FIND_EXPRESSION_LIST);
         } else {
-            fExpressionList = TmfUiPlugin.getDefault().getDialogSettings().getArray(FILTER_EXPRESSION_LIST);
+            fExpressionList = Activator.getDefault().getDialogSettings().getArray(FILTER_EXPRESSION_LIST);
         }
         if (fExpressionList == null) {
             fExpressionList = new String[0];
@@ -217,7 +217,7 @@ public class SearchFilterDialog extends Dialog {
             CRITERIA = FILTER_CRITERIA;
         }
 
-        DialogSettings section = (DialogSettings) TmfUiPlugin.getDefault().getDialogSettings().getSection(CRITERIA);
+        DialogSettings section = (DialogSettings) Activator.getDefault().getDialogSettings().getSection(CRITERIA);
         List selection = fSdView.getSDWidget().getSelection();
         if ((selection == null || selection.size() != 1) || (!fIsFind)) {
             if (section != null) {
@@ -291,7 +291,7 @@ public class SearchFilterDialog extends Dialog {
             CRITERIA = FILTER_CRITERIA;
             EXPRESSION_LIST = FILTER_EXPRESSION_LIST;
         }
-        DialogSettings settings = (DialogSettings) TmfUiPlugin.getDefault().getDialogSettings();
+        DialogSettings settings = (DialogSettings) Activator.getDefault().getDialogSettings();
         DialogSettings section = (DialogSettings) settings.getSection(CRITERIA);
         if (section == null) {
             section = (DialogSettings) settings.addNewSection(CRITERIA);
index 5a4ec5f55350451553cf6c3f945082a5ecc07cb2..b132808834b6cc0150bddf675caf09c93e45dfd4 100755 (executable)
@@ -16,10 +16,8 @@ package org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.impl;
 import java.net.MalformedURLException;
 import java.net.URL;
 
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IImage;
 import org.eclipse.swt.graphics.Image;
 
@@ -108,7 +106,7 @@ public class ImageImpl implements IImage {
             ImageDescriptor img = ImageDescriptor.createFromURL(url);
             return img.createImage();
         } catch (MalformedURLException e) {
-            TmfUiPlugin.getDefault().logError("Error opening image file", e);  //$NON-NLS-1$
+            Activator.getDefault().logError("Error opening image file", e);  //$NON-NLS-1$
         }
         return null;
     }
index d52fd8f62d9cdf4ab5c9bef5beaae5d66578b250..6f9a6ffc690569cb9c08c9dbcd78f187e1cf3ba5 100644 (file)
@@ -13,7 +13,7 @@ package org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers;
 
 import org.eclipse.jface.action.Action;
 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.SDMessages;
 
@@ -55,7 +55,7 @@ public class FirstPage extends Action {
         setText(SDMessages._139);
         setToolTipText(SDMessages._140);
         setId(ID);
-        setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_FIRST_PAGE));
+        setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_FIRST_PAGE));
     }
 
     // ------------------------------------------------------------------------
index ace40b5611f28bf2850ddf13775a3bc3e8073dd4..5f3e184c309f6fb2ff9da029f31bd6cfce24b05c 100644 (file)
@@ -13,7 +13,7 @@ package org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers;
 
 import org.eclipse.jface.action.Action;
 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.SDMessages;
 
@@ -55,7 +55,7 @@ public class LastPage extends Action {
         setText(SDMessages._141);
         setToolTipText(SDMessages._142);
         setId(ID);
-        setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_LAST_PAGE));
+        setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_LAST_PAGE));
     }
 
     // ------------------------------------------------------------------------
index 8351d8b632e429ebc9a970b0bfd7083c793c71f1..5c0ccea71faf6f71170301d81cbf39d9c220e786 100755 (executable)
@@ -20,7 +20,7 @@ import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDWidget;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage;
@@ -72,7 +72,7 @@ public class MoveToMessage extends Action {
         super();
         setId(ID);
         setActionDefinitionId(ID);
-        setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_SEARCH_MATCH));
+        setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_SEARCH_MATCH));
         fView = view;
     }
 
index fce9ca584976407bdeaa5a27add1dd84f22970dc..58a6216e69cf250f95d209bb530b7b7a9bd2dc54 100755 (executable)
@@ -15,7 +15,7 @@ package org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers;
 
 import org.eclipse.jface.action.Action;
 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.SDMessages;
 
@@ -58,7 +58,7 @@ public class NextPage extends Action {
         setText(SDMessages._36);
         setToolTipText(SDMessages._38);
         setId(ID); 
-        setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_NEXT_PAGE));
+        setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_NEXT_PAGE));
     }
 
     // ------------------------------------------------------------------------
index 891339776e87cc4282de5e88b8709bc8ea452be4..5ecf3e731b259352b06c85ef0b483b6d80c6f788 100755 (executable)
@@ -15,7 +15,7 @@ package org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers;
 
 import org.eclipse.jface.action.Action;
 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.dialogs.FilterListDialog;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDFilterProvider;
@@ -60,7 +60,7 @@ public class OpenSDFiltersDialog extends Action {
      */
     public OpenSDFiltersDialog(SDView view, ISDFilterProvider provider) {
         super(SDMessages._43);
-        setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_FILTERS));
+        setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_FILTERS));
         setId(ID);
         setToolTipText(SDMessages._43);
         fView = view;
index 2d575b6152a69f6f9552f8f6cd7b094850b720ef..213270186d3552a857e782c2f0ce202a52f19df1 100755 (executable)
@@ -15,7 +15,7 @@ package org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers;
 
 import org.eclipse.jface.action.Action;
 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.dialogs.SearchFilterDialog;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.SDMessages;
@@ -67,7 +67,7 @@ public class OpenSDFindDialog extends Action {
      */
     public OpenSDFindDialog(SDView view) {
         super(SDMessages._41);
-        setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_SEARCH_SEQ));
+        setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_SEARCH_SEQ));
         setId(ID);
         setActionDefinitionId(ACTION_DEFINITION_ID);
         setToolTipText(SDMessages._41);
index 43725cd68a92c1ec889f6b4e7b55f9b7d1696f9a..b93ff5f49c842460c15ff80e5be9cc1f9884be68 100755 (executable)
@@ -15,7 +15,7 @@ package org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers;
 
 import org.eclipse.jface.action.Action;
 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.dialogs.PagesDialog;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers.provider.ISDAdvancedPagingProvider;
@@ -56,7 +56,7 @@ public class OpenSDPagesDialog extends Action {
      */
     public OpenSDPagesDialog(SDView view, ISDAdvancedPagingProvider provider) {
         super(SDMessages._44);
-        setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_GOTO_PAGE));
+        setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_GOTO_PAGE));
         setId(ID);
         fView = view;
         fProvider = provider;
index f2b2849ea3a3360581a5993473556af0512afc45..d218683dfbe79f09bf8358d300c827c972a188f0 100755 (executable)
@@ -15,7 +15,7 @@ package org.eclipse.linuxtools.tmf.ui.views.uml2sd.handlers;
 
 import org.eclipse.jface.action.Action;
 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.SDMessages;
 
@@ -61,7 +61,7 @@ public class PrevPage extends Action {
         setText(SDMessages._35);
         setToolTipText(SDMessages._37);
         setId(ID); 
-        setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_PREV_PAGE));
+        setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_PREV_PAGE));
     }
 
     // ------------------------------------------------------------------------
index 6a3068c708e1011703d8355c4f9af8002f429edc..db5b65664fdc779566cd527a5f1b8617a2b44a65 100755 (executable)
@@ -20,7 +20,7 @@ import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDWidget;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode;
@@ -62,7 +62,7 @@ public class ShowNodeEnd extends Action {
         if (view instanceof SDView) {
             fView = (SDView)view;
         }
-        setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_NODE_END));
+        setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_NODE_END));
     }
 
     // ------------------------------------------------------------------------
index 353ae5a5f3ca185885a8412fd2b8156311b01f14..e1d9bb303358c8049564616f9697298c6b952384 100755 (executable)
@@ -20,7 +20,7 @@ import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDWidget;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.GraphNode;
@@ -62,7 +62,7 @@ public class ShowNodeStart extends Action {
         if (view instanceof SDView) {
             fView = (SDView)view;
         }
-        setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_NODE_START));
+        setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_NODE_START));
     }
 
     // ------------------------------------------------------------------------
index b1d5596a2c83eeb24babb230bc97d72e695b7d60..ac3797055c9e11ba87e91643a267a51ce9426ab7 100755 (executable)
@@ -19,7 +19,7 @@ import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IContributionItem;
 import org.eclipse.jface.action.IToolBarManager;
 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDWidget;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.SDMessages;
@@ -105,33 +105,33 @@ public class Zoom extends Action {
 
         // Pre-create zooming cursors
         fZoomInCursor = new Cursor(Display.getCurrent(), 
-                TmfUiPlugin.getDefault().getImageFromImageRegistry(ITmfImageConstants.IMG_UI_ZOOM_IN).getImageData(), 
-                TmfUiPlugin.getDefault().getImageFromImageRegistry(ITmfImageConstants.IMG_UI_ZOOM).getImageData(), 0, 0);
+                Activator.getDefault().getImageFromImageRegistry(ITmfImageConstants.IMG_UI_ZOOM_IN).getImageData(), 
+                Activator.getDefault().getImageFromImageRegistry(ITmfImageConstants.IMG_UI_ZOOM).getImageData(), 0, 0);
 
         fZoomOutCursor = new Cursor(Display.getCurrent(), 
-                TmfUiPlugin.getDefault().getImageFromImageRegistry(ITmfImageConstants.IMG_UI_ZOOM_OUT).getImageData(),
-                TmfUiPlugin.getDefault().getImageFromImageRegistry(ITmfImageConstants.IMG_UI_ZOOM).getImageData(), 0, 0);
+                Activator.getDefault().getImageFromImageRegistry(ITmfImageConstants.IMG_UI_ZOOM_OUT).getImageData(),
+                Activator.getDefault().getImageFromImageRegistry(ITmfImageConstants.IMG_UI_ZOOM).getImageData(), 0, 0);
 
         switch (type) {
         case ZOOM_IN:
             setText(SDMessages._47);
             setToolTipText(SDMessages._48);
             setId(ZOOM_IN_ID);
-            setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_ZOOM_IN_MENU));
+            setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_ZOOM_IN_MENU));
             break;
 
         case ZOOM_OUT:
             setText(SDMessages._51);
             setToolTipText(SDMessages._52);
             setId(ZOOM_OUT_ID);
-            setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_ZOOM_OUT_MENU));
+            setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_ZOOM_OUT_MENU));
             break;
 
         case ZOOM_RESET:
             setText(SDMessages._49);
             setToolTipText(SDMessages._50);
             setId(RESET_ZOOM_ID);
-            setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_HOME_MENU));
+            setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_HOME_MENU));
             break;
 
         default:
@@ -139,7 +139,7 @@ public class Zoom extends Action {
             setText(SDMessages._53);
             setToolTipText(SDMessages._54);
             setId(NO_ZOOM_ID); 
-            setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_SELECT_MENU));
+            setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_SELECT_MENU));
             break;
         }
     }
index e19a13d16edbb6b6436380dd34f3d1405b8eadd0..4764e13d39168d940d8756627a35ca0cd9497450 100755 (executable)
@@ -23,11 +23,9 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtension;
 import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.SDView;
 import org.eclipse.ui.IViewReference;
 import org.eclipse.ui.IWorkbenchPage;
@@ -163,7 +161,7 @@ public class LoadersManager {
             return null;
         }
 
-        IWorkbenchPage persp = TmfUiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
+        IWorkbenchPage persp = Activator.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
 
         SDView sdView = view;
 
@@ -190,7 +188,7 @@ public class LoadersManager {
 
             return loader;
         } catch (Exception e) {
-            TmfUiPlugin.getDefault().logError("Error getting loader class", e); //$NON-NLS-1$
+            Activator.getDefault().logError("Error getting loader class", e); //$NON-NLS-1$
         }
         return null;
     }
@@ -202,7 +200,7 @@ public class LoadersManager {
      * @return the class name of the saved loader
      */
     public String getSavedLoader(String viewId) {
-        IPreferenceStore p = TmfUiPlugin.getDefault().getPreferenceStore();
+        IPreferenceStore p = Activator.getDefault().getPreferenceStore();
         return p.getString(LOADER_PREFIX + viewId);
     }
 
@@ -210,7 +208,7 @@ public class LoadersManager {
      * Saves the last loader in order to reload it on next session.
      */
     public void saveLastLoader(String id, String id2) {
-        IPreferenceStore p = TmfUiPlugin.getDefault().getPreferenceStore();
+        IPreferenceStore p = Activator.getDefault().getPreferenceStore();
         p.setValue(LOADER_PREFIX + id2, id);
     }
 
@@ -230,7 +228,7 @@ public class LoadersManager {
 
         if ((currentLoader != null) && (currentLoader != loader)) {
             if (loader != null) {
-                IWorkbenchPage persp = TmfUiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
+                IWorkbenchPage persp = Activator.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
                 try {
                     // Search view corresponding to the viewId
                     SDView sdview = null;
@@ -245,7 +243,7 @@ public class LoadersManager {
                     }
 
                 } catch (Exception e) {
-                    TmfUiPlugin.getDefault().logError("Error setting current loader class", e); //$NON-NLS-1$
+                    Activator.getDefault().logError("Error setting current loader class", e); //$NON-NLS-1$
                 }
             }
             // The old loader is going to be kicked
@@ -296,7 +294,7 @@ public class LoadersManager {
         }
 
         ArrayList<IConfigurationElement> ret = new ArrayList<IConfigurationElement>();
-        IExtensionPoint iep = Platform.getExtensionRegistry().getExtensionPoint(TmfUiPlugin.PLUGIN_ID, LOADER_TAG);
+        IExtensionPoint iep = Platform.getExtensionRegistry().getExtensionPoint(Activator.PLUGIN_ID, LOADER_TAG);
         if (iep == null) {
             return ret;
         }
@@ -372,9 +370,9 @@ public class LoadersManager {
                 setCurrentLoader(l, viewId);
             }
         } catch (CoreException e4) {
-            TmfUiPlugin.getDefault().logError("Error 'uml2SDLoader' Extension point", e4); //$NON-NLS-1$
+            Activator.getDefault().logError("Error 'uml2SDLoader' Extension point", e4); //$NON-NLS-1$
         } catch (Exception e5) {
-            TmfUiPlugin.getDefault().logError("Error 'uml2SDLoader' Extension point", e5); //$NON-NLS-1$
+            Activator.getDefault().logError("Error 'uml2SDLoader' Extension point", e5); //$NON-NLS-1$
         }
     }
 }
index 21201c40a1595d65ec0e3e212443939f89e2b77b..72dd15ba69a534a554fb6237f62bb9636ff475ea 100644 (file)
@@ -24,7 +24,7 @@ import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.core.component.TmfComponent;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
@@ -1278,7 +1278,7 @@ public class TmfUml2SDSyncLoader extends TmfComponent implements IUml2SDLoader,
             try {
                 fSearchRequest.waitForCompletion();
             } catch (InterruptedException e) {
-                TmfUiPlugin.getDefault().logError("Search request interrupted!", e); //$NON-NLS-1$
+                Activator.getDefault().logError("Search request interrupted!", e); //$NON-NLS-1$
             }
 
             IStatus status = Status.OK_STATUS;
@@ -1304,7 +1304,7 @@ public class TmfUml2SDSyncLoader extends TmfComponent implements IUml2SDLoader,
                 }
                 else {
                     // String was not found
-                    status = new Status(Status.WARNING, TmfUiPlugin.PLUGIN_ID, Messages.TmfUml2SDSyncLoader_SearchNotFound);
+                    status = new Status(Status.WARNING, Activator.PLUGIN_ID, Messages.TmfUml2SDSyncLoader_SearchNotFound);
                 }
                 setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
             }
index 70791266b193af878cbf95e73da990a905a7332c..2b184303e6aaa64e07ee3b83d5d069a74de2b3f4 100755 (executable)
@@ -21,7 +21,7 @@ import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PreferenceConverter;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IColor;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IFont;
 import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.impl.ColorImpl;
@@ -128,7 +128,7 @@ public class SDViewPref implements ISDPreferences, IPropertyChangeListener {
      * preferences setting
      */
     protected SDViewPref() {
-        fPrefStore = TmfUiPlugin.getDefault().getPreferenceStore();
+        fPrefStore = Activator.getDefault().getPreferenceStore();
 
         fPrefStore.setDefault(PREF_LINK_FONT, true);
         fPrefStore.setDefault(PREF_EXCLUDE_EXTERNAL_TIME, true);
index f7d8171820bb1d3aff30cb613f6bf67b62c71352..568405b17ab4bd5bf66a683d86a36a15e40d0d45 100644 (file)
@@ -22,7 +22,7 @@ import org.eclipse.jface.action.Action;
 import org.eclipse.jface.viewers.ISelectionProvider;\r
 import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;\r
 import org.eclipse.linuxtools.internal.tmf.ui.Messages;\r
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;\r
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;\r
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.dialogs.TimeGraphLegend;\r
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;\r
 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;\r
@@ -864,7 +864,7 @@ public class TimeGraphViewer implements ITimeDataProvider, SelectionListener {
             };\r
             resetScale.setText(Messages.TmfTimeGraphViewer_ResetScaleActionNameText);\r
             resetScale.setToolTipText(Messages.TmfTimeGraphViewer_ResetScaleActionToolTipText);\r
-            resetScale.setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_HOME_MENU));\r
+            resetScale.setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_HOME_MENU));\r
         } \r
         return resetScale;\r
     }\r
@@ -880,7 +880,7 @@ public class TimeGraphViewer implements ITimeDataProvider, SelectionListener {
             };\r
             showLegendAction.setText(Messages.TmfTimeGraphViewer_LegendActionNameText);\r
             showLegendAction.setToolTipText(Messages.TmfTimeGraphViewer_LegendActionToolTipText);\r
-            showLegendAction.setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_SHOW_LEGEND));\r
+            showLegendAction.setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_SHOW_LEGEND));\r
         }\r
 \r
         return showLegendAction;\r
@@ -897,7 +897,7 @@ public class TimeGraphViewer implements ITimeDataProvider, SelectionListener {
 \r
             nextEventAction.setText(Messages.TmfTimeGraphViewer_NextEventActionNameText);\r
             nextEventAction.setToolTipText(Messages.TmfTimeGraphViewer_NextEventActionToolTipText);\r
-            nextEventAction.setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_NEXT_EVENT));\r
+            nextEventAction.setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_NEXT_EVENT));\r
         } \r
 \r
         return nextEventAction;\r
@@ -914,7 +914,7 @@ public class TimeGraphViewer implements ITimeDataProvider, SelectionListener {
 \r
             prevEventAction.setText(Messages.TmfTimeGraphViewer_PreviousEventActionNameText);\r
             prevEventAction.setToolTipText(Messages.TmfTimeGraphViewer_PreviousEventActionToolTipText);\r
-            prevEventAction.setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_PREV_EVENT));\r
+            prevEventAction.setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_PREV_EVENT));\r
         } \r
 \r
         return prevEventAction;\r
@@ -931,7 +931,7 @@ public class TimeGraphViewer implements ITimeDataProvider, SelectionListener {
             };\r
             nextItemAction.setText(Messages.TmfTimeGraphViewer_NextItemActionNameText);\r
             nextItemAction.setToolTipText(Messages.TmfTimeGraphViewer_NextItemActionToolTipText);\r
-            nextItemAction.setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_NEXT_ITEM));\r
+            nextItemAction.setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_NEXT_ITEM));\r
         }\r
         return nextItemAction;\r
     }\r
@@ -947,7 +947,7 @@ public class TimeGraphViewer implements ITimeDataProvider, SelectionListener {
             };\r
             previousItemAction.setText(Messages.TmfTimeGraphViewer_PreviousItemActionNameText);\r
             previousItemAction.setToolTipText(Messages.TmfTimeGraphViewer_PreviousItemActionToolTipText);\r
-            previousItemAction.setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_PREV_ITEM));\r
+            previousItemAction.setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_PREV_ITEM));\r
         }\r
         return previousItemAction;\r
     }\r
@@ -962,7 +962,7 @@ public class TimeGraphViewer implements ITimeDataProvider, SelectionListener {
             };\r
             zoomInAction.setText(Messages.TmfTimeGraphViewer_ZoomInActionNameText);\r
             zoomInAction.setToolTipText(Messages.TmfTimeGraphViewer_ZoomInActionToolTipText);\r
-            zoomInAction.setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_ZOOM_IN_MENU));\r
+            zoomInAction.setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_ZOOM_IN_MENU));\r
         }\r
         return zoomInAction;\r
     }\r
@@ -977,7 +977,7 @@ public class TimeGraphViewer implements ITimeDataProvider, SelectionListener {
             };\r
             zoomOutAction.setText(Messages.TmfTimeGraphViewer_ZoomOutActionNameText);\r
             zoomOutAction.setToolTipText(Messages.TmfTimeGraphViewer_ZoomOutActionToolTipText);\r
-            zoomOutAction.setImageDescriptor(TmfUiPlugin.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_ZOOM_OUT_MENU));\r
+            zoomOutAction.setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_ZOOM_OUT_MENU));\r
         }\r
         return zoomOutAction;\r
     }\r
index f3a3d1a282960ebd1ad166373d2f8d9fcb05d374..64f3b87357655dd6699e59439292d38509974274 100644 (file)
@@ -15,7 +15,7 @@
 
 package org.eclipse.linuxtools.tmf.ui.widgets.virtualtable;
 
-import org.eclipse.linuxtools.internal.tmf.ui.TmfUiPlugin;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.TableEditor;
 import org.eclipse.swt.events.ControlAdapter;
@@ -778,7 +778,7 @@ public class TmfVirtualTable extends Composite {
                try {
                        return (Control) control.getConstructor(Composite.class, int.class).newInstance(new Object[] {fTable, SWT.NONE});
                } catch (Exception e) {
-                   TmfUiPlugin.getDefault().logError("Error creating table editor control", e); //$NON-NLS-1$
+                   Activator.getDefault().logError("Error creating table editor control", e); //$NON-NLS-1$
                }
                return null;
        }
This page took 0.14802 seconds and 5 git commands to generate.