TMF: Add XML state provider analysis module and XML utilities
authorFlorian Wininger <florian.wininger@polymtl.ca>
Tue, 14 Jan 2014 02:36:50 +0000 (21:36 -0500)
committerGenevieve Bastien <gbastien+lttng@versatic.net>
Thu, 23 Jan 2014 15:22:48 +0000 (10:22 -0500)
This patch adds an analysis module for an XML-defined state system. It does not
actually build the state system, the details will come in another patch.

It also contains the [stripped-down] XML schema definition and the methods to
read an XML file and validate it.

Change-Id: I2a3d322f96742d995912700d223e2ecb9e07d8f5
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Signed-off-by: Florian Wininger <florian.wininger@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/19914
Tested-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
27 files changed:
org.eclipse.linuxtools.tmf.analysis.xml.core.tests/.classpath
org.eclipse.linuxtools.tmf.analysis.xml.core.tests/META-INF/MANIFEST.MF
org.eclipse.linuxtools.tmf.analysis.xml.core.tests/build.properties
org.eclipse.linuxtools.tmf.analysis.xml.core.tests/plugin.properties
org.eclipse.linuxtools.tmf.analysis.xml.core.tests/src/org/eclipse/linuxtools/tmf/analysis/xml/core/tests/Activator.java
org.eclipse.linuxtools.tmf.analysis.xml.core.tests/src/org/eclipse/linuxtools/tmf/analysis/xml/core/tests/AllAnalysisXmlCoreTests.java
org.eclipse.linuxtools.tmf.analysis.xml.core.tests/src/org/eclipse/linuxtools/tmf/analysis/xml/core/tests/XmlAnalysisCorePluginTest.java
org.eclipse.linuxtools.tmf.analysis.xml.core.tests/src/org/eclipse/linuxtools/tmf/analysis/xml/core/tests/module/AllTests.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.analysis.xml.core.tests/src/org/eclipse/linuxtools/tmf/analysis/xml/core/tests/module/XmlUtilsTest.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.analysis.xml.core.tests/stubs/org/eclipse/linuxtools/tmf/analysis/xml/core/tests/common/TmfXmlTestFiles.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.analysis.xml.core.tests/test_xml_files/test_invalid.xml [new file with mode: 0644]
org.eclipse.linuxtools.tmf.analysis.xml.core.tests/test_xml_files/test_valid.xml [new file with mode: 0644]
org.eclipse.linuxtools.tmf.analysis.xml.core/META-INF/MANIFEST.MF
org.eclipse.linuxtools.tmf.analysis.xml.core/plugin.properties
org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/internal/tmf/analysis/xml/core/Activator.java
org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/IXmlModuleMetadata.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/Messages.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/XmlHeadInfo.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/XmlUtils.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/messages.properties [new file with mode: 0644]
org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmldefinition.xsd [new file with mode: 0644]
org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/TmfXmlStrings.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/XmlStateProvider.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/XmlStateSystemModule.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.analysis.xml.ui.tests/src/org/eclipse/linuxtools/tmf/analysis/xml/ui/tests/Activator.java
org.eclipse.linuxtools.tmf.analysis.xml.ui.tests/src/org/eclipse/linuxtools/tmf/analysis/xml/ui/tests/AllAnalysisXmlUiTests.java
org.eclipse.linuxtools.tmf.analysis.xml.ui.tests/src/org/eclipse/linuxtools/tmf/analysis/xml/ui/tests/XmlAnalysisUiPluginTest.java

index 098194ca4b7d8f45177f94e735506ae3a26b5c94..f1d3296b72d0ee03de7520d7cf140734e5afc570 100644 (file)
@@ -3,5 +3,6 @@
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry kind="src" path="src"/>
+       <classpathentry kind="src" path="stubs"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>
index cdcc097778d1c398d7f51d0ca3b4c1aba1f63b4d..b7463bde72bf533783074c6c9d79a322163b7b7f 100644 (file)
@@ -5,12 +5,13 @@ Bundle-SymbolicName: org.eclipse.linuxtools.tmf.analysis.xml.core.tests
 Bundle-Version: 1.0.0.qualifier
 Bundle-Activator: org.eclipse.linuxtools.tmf.analysis.xml.core.tests.Activator
 Bundle-Vendor: %Bundle-Vendor
-Require-Bundle: org.eclipse.ui,
+Require-Bundle: org.junit,
  org.eclipse.core.runtime,
- org.junit,
- org.eclipse.linuxtools.tmf.analysis.xml.core,
  org.eclipse.core.resources,
- org.eclipse.linuxtools.tmf.core
+ org.eclipse.linuxtools.tmf.analysis.xml.core,
+ org.eclipse.linuxtools.tmf.core,
+ org.eclipse.linuxtools.tmf.core.tests
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-ActivationPolicy: lazy
 Import-Package: org.junit.runners
+Export-Package: org.eclipse.linuxtools.tmf.analysis.xml.core.tests.common;x-friends:="org.eclipse.linuxtools.tmf.analysis.xml.ui.tests"
index 9cbab3c135e1758c0722e798d528b9babeaa7b36..73ce20d487d9c9a96e09b652d858ad0ab9feecb7 100644 (file)
@@ -1,4 +1,5 @@
-source.. = src/
+source.. = src/,\
+           stubs/
 output.. = bin/
 bin.includes = META-INF/,\
                .,\
index b061a7537d4b00397eaf1455d350b3491b635532..9b58acf43e76877498e2d482b6790f3b18004410 100644 (file)
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2013 École Polytechnique de Montréal
+# Copyright (c) 2013, 2014 École Polytechnique de Montréal
 #
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
@@ -12,4 +12,4 @@
 
 #Properties file for org.eclipse.linuxtools.tmf.core
 Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools TMF Xml Analysis Tests Plug-in
+Bundle-Name = Linux Tools TMF XML Analysis Tests Plug-in
index 08231ec1059cc2fc30f7799e1f6822c1d36c7c6c..4f5cda4cfaee24e2c06726ee6fcdacd0db1d0663 100644 (file)
 
 package org.eclipse.linuxtools.tmf.analysis.xml.core.tests;
 
-import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.core.runtime.Plugin;
 import org.osgi.framework.BundleContext;
 
 /**
  * The activator class controls the plug-in life cycle
  */
-public class Activator extends AbstractUIPlugin {
+public class Activator extends Plugin {
 
     /**
      * The plug-in ID
index ce4f1d84623ec971a2e1de9c6e5e0c12322f56e5..7d2b6ec61f1045f3fdf5f8ecd69a7b02a65bdff9 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013 École Polytechnique de Montréal
+ * Copyright (c) 2013, 2014 École Polytechnique de Montréal
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -16,11 +16,12 @@ import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 
 /**
- * Master test suite for TMF Xml Core Analysis plug-in.
+ * Master test suite for TMF XML Core Analysis plug-in.
  */
 @RunWith(Suite.class)
 @Suite.SuiteClasses({
-        XmlAnalysisCorePluginTest.class
+        XmlAnalysisCorePluginTest.class,
+        org.eclipse.linuxtools.tmf.analysis.xml.core.tests.module.AllTests.class
 })
 public class AllAnalysisXmlCoreTests {
 
index 3509a674827cf6f7648c7584cd540edf10e11272..993b11843a6501766e050aed889204279dc101e1 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013 École Polytechnique de Montréal
+ * Copyright (c) 2013, 2014 École Polytechnique de Montréal
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -18,7 +18,7 @@ import org.eclipse.linuxtools.internal.tmf.analysis.xml.core.Activator;
 import org.junit.Test;
 
 /**
- * Test the Xml Analysis Core plug-in activator
+ * Test the XML Analysis Core plug-in activator
  */
 public class XmlAnalysisCorePluginTest {
     // ------------------------------------------------------------------------
diff --git a/org.eclipse.linuxtools.tmf.analysis.xml.core.tests/src/org/eclipse/linuxtools/tmf/analysis/xml/core/tests/module/AllTests.java b/org.eclipse.linuxtools.tmf.analysis.xml.core.tests/src/org/eclipse/linuxtools/tmf/analysis/xml/core/tests/module/AllTests.java
new file mode 100644 (file)
index 0000000..ca0aa28
--- /dev/null
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.analysis.xml.core.tests.module;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Test suite for org.eclipse.linuxtools.tmf.analysis.xml.core.module package
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        XmlUtilsTest.class
+})
+public class AllTests {
+
+}
diff --git a/org.eclipse.linuxtools.tmf.analysis.xml.core.tests/src/org/eclipse/linuxtools/tmf/analysis/xml/core/tests/module/XmlUtilsTest.java b/org.eclipse.linuxtools.tmf.analysis.xml.core.tests/src/org/eclipse/linuxtools/tmf/analysis/xml/core/tests/module/XmlUtilsTest.java
new file mode 100644 (file)
index 0000000..1dd8200
--- /dev/null
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.analysis.xml.core.tests.module;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.linuxtools.tmf.analysis.xml.core.module.XmlUtils;
+import org.eclipse.linuxtools.tmf.analysis.xml.core.tests.common.TmfXmlTestFiles;
+import org.junit.After;
+import org.junit.Test;
+
+/**
+ * Tests for the {@link XmlUtils} class
+ *
+ * @author Geneviève Bastien
+ */
+public class XmlUtilsTest {
+
+    /**
+     * Empty the XML directory after the test
+     */
+    @After
+    public void emptyXmlFolder() {
+        File fFolder = XmlUtils.getXmlFilesPath().toFile();
+        if (!(fFolder.isDirectory() && fFolder.exists())) {
+            return;
+        }
+        for (File xmlFile : fFolder.listFiles()) {
+            xmlFile.delete();
+        }
+    }
+
+    /**
+     * Test the {@link XmlUtils#getXmlFilesPath()} method
+     */
+    @Test
+    public void testXmlPath() {
+        IPath xmlPath = XmlUtils.getXmlFilesPath();
+
+        IWorkspace workspace = ResourcesPlugin.getWorkspace();
+        IPath workspacePath = workspace.getRoot().getRawLocation();
+        workspacePath = workspacePath.addTrailingSeparator()
+                .append(".metadata").addTrailingSeparator().append(".plugins")
+                .addTrailingSeparator()
+                .append("org.eclipse.linuxtools.tmf.analysis.xml.core")
+                .addTrailingSeparator().append("xml_files");
+
+        assertEquals(xmlPath, workspacePath);
+    }
+
+    /**
+     * test the {@link XmlUtils#xmlValidate(File)} method
+     */
+    @Test
+    public void testXmlValidate() {
+        File testXmlFile = TmfXmlTestFiles.VALID_FILE.getFile();
+        if ((testXmlFile == null) || !testXmlFile.exists()) {
+            fail("XML test file does not exist");
+        }
+        assertTrue(XmlUtils.xmlValidate(testXmlFile).isOK());
+
+        testXmlFile = TmfXmlTestFiles.INVALID_FILE.getFile();
+        if ((testXmlFile == null) || !testXmlFile.exists()) {
+            fail("XML test file does not exist");
+        }
+        assertFalse(XmlUtils.xmlValidate(testXmlFile).isOK());
+    }
+
+    /**
+     * test the {@link XmlUtils#addXmlFile(File)} method
+     */
+    @Test
+    public void testXmlAddFile() {
+        /* Check the file does not exist */
+        IPath xmlPath = XmlUtils.getXmlFilesPath().addTrailingSeparator().append("test_valid.xml");
+        File destFile = xmlPath.toFile();
+        assertFalse(destFile.exists());
+
+        /* Add test_valid.xml file */
+        File testXmlFile = TmfXmlTestFiles.VALID_FILE.getFile();
+        if ((testXmlFile == null) || !testXmlFile.exists()) {
+            fail("XML test file does not exist");
+        }
+
+        XmlUtils.addXmlFile(testXmlFile);
+        assertTrue(destFile.exists());
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.analysis.xml.core.tests/stubs/org/eclipse/linuxtools/tmf/analysis/xml/core/tests/common/TmfXmlTestFiles.java b/org.eclipse.linuxtools.tmf.analysis.xml.core.tests/stubs/org/eclipse/linuxtools/tmf/analysis/xml/core/tests/common/TmfXmlTestFiles.java
new file mode 100644 (file)
index 0000000..2274bd8
--- /dev/null
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.analysis.xml.core.tests.common;
+
+import java.io.File;
+
+/**
+ * Provides some test XML files to use
+ *
+ * @author Geneviève Bastien
+ */
+public enum TmfXmlTestFiles {
+    /** A valid XML test file */
+    VALID_FILE("../org.eclipse.linuxtools.tmf.analysis.xml.core.tests/test_xml_files/test_valid.xml"),
+    /** An invalid test file */
+    INVALID_FILE("../org.eclipse.linuxtools.tmf.analysis.xml.core.tests/test_xml_files/test_invalid.xml");
+
+    private final String fPath;
+
+    private TmfXmlTestFiles(String file) {
+        fPath = file;
+    }
+
+    /**
+     * Get the file name part of the file
+     *
+     * @return The path of this test file
+     */
+    public String getPath() {
+        return fPath;
+    }
+
+    /**
+     * Returns the file object corresponding to the test XML file
+     *
+     * @return The file object for this test file
+     */
+    public File getFile() {
+        return new File(fPath);
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.analysis.xml.core.tests/test_xml_files/test_invalid.xml b/org.eclipse.linuxtools.tmf.analysis.xml.core.tests/test_xml_files/test_invalid.xml
new file mode 100644 (file)
index 0000000..dcd5512
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tmfxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:noNamespaceSchemaLocation="stateprovider.xsd">
+
+       <!-- This element does not belong to the schema -->
+       <element id="fail"></element>
+</tmfxml>
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tmf.analysis.xml.core.tests/test_xml_files/test_valid.xml b/org.eclipse.linuxtools.tmf.analysis.xml.core.tests/test_xml_files/test_valid.xml
new file mode 100644 (file)
index 0000000..e8895dd
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ***************************************************************************
+ * Copyright (c) 2013 École Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Florian Wininger - Initial API and implementation
+ *************************************************************************** -->
+<tmfxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:noNamespaceSchemaLocation="stateprovider.xsd">
+
+       <stateProvider analysisId="polymtl.kernel.sp" version="1">
+               <head>
+                       <traceType id="org.eclipse.linuxtools.lttng2.kernel.tracetype" />
+                       <label value="Xml kernel State System" />
+               </head>
+       </stateProvider>
+</tmfxml>
\ No newline at end of file
index 40cc526231ad32a047de98f4e24bcbdd113d37d9..46034f2c7b01d1566bf9e794bd92795c2ad67631 100644 (file)
@@ -8,7 +8,9 @@ Bundle-SymbolicName: org.eclipse.linuxtools.tmf.analysis.xml.core;singleton:=tru
 Bundle-Activator: org.eclipse.linuxtools.internal.tmf.analysis.xml.core.Activator
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
+Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.linuxtools.tmf.core
-Export-Package: org.eclipse.linuxtools.internal.tmf.analysis.xml.core;x-friends:="org.eclipse.linuxtools.tmf.analysis.xml.core.tests"
+Export-Package: org.eclipse.linuxtools.internal.tmf.analysis.xml.core;x-friends:="org.eclipse.linuxtools.tmf.analysis.xml.core.tests",
+ org.eclipse.linuxtools.tmf.analysis.xml.core.module,
+ org.eclipse.linuxtools.tmf.analysis.xml.core.stateprovider
+
index 8703303bebfbcb5fe6b2b33ea2fda94834432294..eeb5439ba5b7a84a847f3b984197e996ff5979d9 100644 (file)
@@ -12,5 +12,5 @@
 
 #Properties file for org.eclipse.linuxtools.tmf.core
 Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools TMF Xml Analysis Core Plug-in
+Bundle-Name = Linux Tools TMF XML Analysis Core Plug-in
 
index 5c8ae8da11f1a51f89d557edbb9e28a142dabb4c..dd9cc1d1f9de88d86d4700d0ad28ea859c39f551 100644 (file)
@@ -13,8 +13,8 @@
 package org.eclipse.linuxtools.internal.tmf.analysis.xml.core;
 
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.BundleContext;
 
 /**
@@ -22,7 +22,7 @@ import org.osgi.framework.BundleContext;
  *
  * @author Geneviève Bastien
  */
-public class Activator extends AbstractUIPlugin {
+public class Activator extends Plugin {
 
     /** The plug-in ID */
     public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.analysis.xml.core"; //$NON-NLS-1$
diff --git a/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/IXmlModuleMetadata.java b/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/IXmlModuleMetadata.java
new file mode 100644 (file)
index 0000000..079910e
--- /dev/null
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.analysis.xml.core.module;
+
+/**
+ * Interface that XML analysis modules may implement to interpret the extra
+ * metadata they may get for example from the header element in the XML file.
+ *
+ * @author Geneviève Bastien
+ */
+public interface IXmlModuleMetadata {
+
+    /**
+     * Set the header information node associated with this module
+     *
+     * @param headInfo
+     *            The header information
+     */
+    void setHeadInfo(XmlHeadInfo headInfo);
+
+}
diff --git a/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/Messages.java b/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/Messages.java
new file mode 100644 (file)
index 0000000..b8ac122
--- /dev/null
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.analysis.xml.core.module;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Externalized messages for the XML analysis module package
+ *
+ * @author Geneviève Bastien
+ */
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "org.eclipse.linuxtools.tmf.analysis.xml.core.module.messages"; //$NON-NLS-1$
+
+    /** Error copying XML file to workspace folder */
+    public static String XmlUtils_ErrorCopyingFile;
+    /** XML parse error */
+    public static String XmlUtils_XmlParseError;
+    /** Error occurred while validating XML */
+    public static String XmlUtils_XmlValidateError;
+    /** XML validation error */
+    public static String XmlUtils_XmlValidationError;
+
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/XmlHeadInfo.java b/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/XmlHeadInfo.java
new file mode 100644 (file)
index 0000000..58d827e
--- /dev/null
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.analysis.xml.core.module;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.linuxtools.tmf.analysis.xml.core.stateprovider.TmfXmlStrings;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Class to store and interpret the header information of XML-defined components
+ *
+ * @author Geneviève Bastien
+ */
+public class XmlHeadInfo {
+
+    private final Node fHeadInfo;
+
+    /**
+     * Constructor
+     *
+     * @param item
+     *            The XML node corresponding to this header
+     */
+    public XmlHeadInfo(Node item) {
+        fHeadInfo = item;
+    }
+
+    /**
+     * Get a list of child elements with the requested name
+     *
+     * @param nodeName
+     *            The name of the nodes to get
+     * @return List of child elements
+     */
+    public List<Element> getElements(String nodeName) {
+        List<Element> list = new ArrayList<>();
+        NodeList nodes = fHeadInfo.getChildNodes();
+        for (int i = 0; i < nodes.getLength(); i++) {
+            Node node = nodes.item(i);
+            if (node instanceof Element) {
+                Element element = (Element) node;
+                if (element.getNodeName().equals(nodeName)) {
+                    list.add(element);
+                }
+            }
+        }
+        return list;
+    }
+
+    /**
+     * Check whether, if this header information has trace types defined, this
+     * component applies to a given trace type.
+     *
+     * @param traceClass
+     *            The trace type to check for
+     * @return True if there is no trace type information in header or if the
+     *         trace type applies
+     */
+    public boolean checkTraceType(Class<? extends ITmfTrace> traceClass) {
+        /*
+         * By default this returns true, child implementation who have access to
+         * trace types will override this
+         *
+         * TODO: actually check the trace type here when trace types are moved
+         * to o.e.l.tmf.core instead of o.e.l.tmf.ui
+         */
+        return true;
+    }
+
+    /**
+     * Get the name of this component from the header information
+     *
+     * @return The name of the component
+     */
+    public String getName() {
+        List<Element> elements = getElements(TmfXmlStrings.LABEL);
+        if (elements.isEmpty()) {
+            return null;
+        }
+
+        Element element = elements.get(0);
+        return element.getAttribute(TmfXmlStrings.VALUE);
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/XmlUtils.java b/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/XmlUtils.java
new file mode 100644 (file)
index 0000000..79294ea
--- /dev/null
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.analysis.xml.core.module;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.nio.channels.FileChannel;
+
+import javax.xml.XMLConstants;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.internal.tmf.analysis.xml.core.Activator;
+import org.eclipse.osgi.util.NLS;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+/**
+ * Class containing some utilities for the XML plug-in packages: for example, it
+ * manages the XML files and validates them
+ *
+ * @author Geneviève Bastien
+ */
+public class XmlUtils {
+
+    /** Sub-directory of the plug-in where XML files are stored */
+    private static final String XML_DIRECTORY = "xml_files"; //$NON-NLS-1$
+
+    /** Name of the XSD schema file */
+    private static final String XSD = "xmldefinition.xsd"; //$NON-NLS-1$
+
+    /** Make this class non-instantiable */
+    private XmlUtils() {
+
+    }
+
+    /**
+     * Get the path where the XML files are stored. Create it if it does not
+     * exist
+     *
+     * @return path to XML files
+     */
+    public static IPath getXmlFilesPath() {
+        IPath path = Activator.getDefault().getStateLocation();
+        path = path.addTrailingSeparator().append(XML_DIRECTORY);
+
+        /* Check if directory exists, otherwise create it */
+        File dir = path.toFile();
+        if (!dir.exists() || !dir.isDirectory()) {
+            dir.mkdirs();
+        }
+
+        return path;
+    }
+
+    /**
+     * Validate the XML file input with the XSD schema
+     *
+     * @param xmlFile
+     *            XML file to validate
+     * @return True if the XML validates
+     */
+    public static IStatus xmlValidate(File xmlFile) {
+        URL url = XmlUtils.class.getResource(XSD);
+        SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+        Source xmlSource = new StreamSource(xmlFile);
+        try {
+            Schema schema = schemaFactory.newSchema(url);
+            Validator validator = schema.newValidator();
+            validator.validate(xmlSource);
+        } catch (SAXParseException e) {
+            String error = NLS.bind(Messages.XmlUtils_XmlParseError, e.getLineNumber(), e.getLocalizedMessage());
+            Activator.logError(error);
+            return new Status(IStatus.ERROR,  Activator.PLUGIN_ID, error, e);
+        } catch (SAXException e) {
+            String error = NLS.bind(Messages.XmlUtils_XmlValidationError, e.getLocalizedMessage());
+            Activator.logError(error);
+            return new Status(IStatus.ERROR,  Activator.PLUGIN_ID, error, e);
+        } catch (IOException e) {
+            String error = Messages.XmlUtils_XmlValidateError;
+            Activator.logError("IO exception occurred", e); //$NON-NLS-1$
+            return new Status(IStatus.ERROR,  Activator.PLUGIN_ID, error, e);
+        }
+        return Status.OK_STATUS;
+    }
+
+    /**
+     * Adds an XML file to the plugin's path. The XML file should have been
+     * validated using the {@link XmlUtils#xmlValidate(File)} method before
+     * calling this method.
+     *
+     * @param fromFile
+     *            The XML file to add
+     * @return Whether the file was successfully added
+     */
+    public static IStatus addXmlFile(File fromFile) {
+
+        /* Copy file to path */
+        File toFile = getXmlFilesPath().addTrailingSeparator().append(fromFile.getName()).toFile();
+
+        try {
+            if (!toFile.exists()) {
+                toFile.createNewFile();
+            }
+        } catch (IOException e) {
+            String error = Messages.XmlUtils_ErrorCopyingFile;
+            Activator.logError(error, e);
+            return new Status(IStatus.ERROR,  Activator.PLUGIN_ID, error, e);
+        }
+
+        try (FileInputStream fis = new FileInputStream(fromFile);
+                FileOutputStream fos = new FileOutputStream(toFile);
+                FileChannel source = fis.getChannel();
+                FileChannel destination = fos.getChannel();) {
+            destination.transferFrom(source, 0, source.size());
+        } catch (IOException e) {
+            String error = Messages.XmlUtils_ErrorCopyingFile;
+            Activator.logError(error, e);
+            return new Status(IStatus.ERROR,  Activator.PLUGIN_ID, error, e);
+        }
+        return Status.OK_STATUS;
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/messages.properties b/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/messages.properties
new file mode 100644 (file)
index 0000000..7ec73d7
--- /dev/null
@@ -0,0 +1,4 @@
+XmlUtils_ErrorCopyingFile=An error occurred while copying the XML file to the TMF directory. The file was not imported.
+XmlUtils_XmlParseError=XML Parsing error at line {0}: {1}
+XmlUtils_XmlValidateError=An error occurred while validating the XML file.
+XmlUtils_XmlValidationError=Error validating XML file {0}
diff --git a/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmldefinition.xsd b/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmldefinition.xsd
new file mode 100644 (file)
index 0000000..281ec6d
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- ***************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Florian Wininger - Initial API and implementation
+ *************************************************************************** -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       attributeFormDefault="unqualified" elementFormDefault="qualified">
+
+       <xs:element name="tmfxml">
+               <xs:complexType>
+                       <xs:sequence>
+                               <xs:element maxOccurs="unbounded" minOccurs="0" name="stateProvider" type="stateProvider" />
+                       </xs:sequence>
+               </xs:complexType>
+       </xs:element>
+
+       <xs:complexType name="stateProvider">
+               <xs:sequence maxOccurs="1" minOccurs="1">
+                       <xs:element maxOccurs="1" minOccurs="0" name="head"
+                               type="headProvider" />
+               </xs:sequence>
+               <xs:attribute name="analysisId" type="xs:string" use="required" />
+               <xs:attribute name="version" type="xs:integer" use="required" />
+       </xs:complexType>
+
+       <xs:complexType name="headProvider">
+               <xs:sequence>
+                       <xs:element maxOccurs="unbounded" minOccurs="0" name="traceType">
+                               <xs:complexType>
+                                       <xs:attribute name="id" />
+                               </xs:complexType>
+                       </xs:element>
+                       <xs:element maxOccurs="1" minOccurs="0" name="label">
+                               <xs:complexType>
+                                       <xs:attribute name="value" />
+                               </xs:complexType>
+                       </xs:element>
+               </xs:sequence>
+       </xs:complexType>
+
+</xs:schema>
diff --git a/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/TmfXmlStrings.java b/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/TmfXmlStrings.java
new file mode 100644 (file)
index 0000000..ede1402
--- /dev/null
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Ecole Polytechnique
+ *
+ * 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:
+ *   Florian Wininger - Initial implementation
+ ******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.analysis.xml.core.stateprovider;
+
+/**
+ * This file defines all name in the XML Structure for the State Provider
+ *
+ * @author Florian Wininger
+ */
+@SuppressWarnings({ "javadoc", "nls" })
+public interface TmfXmlStrings {
+
+    /* XML Node Name */
+    static final String STATE_PROVIDER = "stateProvider";
+    static final String VALUE = "value";
+    static final String LABEL = "label";
+
+    /* XML Node Attribute */
+    static final String ANALYSIS_ID = "analysisId";
+    static final String NAME = "name";
+    static final String VERSION = "version";
+
+}
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/XmlStateProvider.java b/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/XmlStateProvider.java
new file mode 100644 (file)
index 0000000..64340e4
--- /dev/null
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Florian Wininger - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.analysis.xml.core.stateprovider;
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.linuxtools.internal.tmf.analysis.xml.core.Activator;
+import org.eclipse.linuxtools.tmf.analysis.xml.core.module.Messages;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+import org.eclipse.linuxtools.tmf.core.statesystem.AbstractTmfStateProvider;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.osgi.util.NLS;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ * This is the state change input plug-in for TMF's state system which handles
+ * the XML Format
+ *
+ * @author Florian Wininger
+ */
+public class XmlStateProvider extends AbstractTmfStateProvider {
+
+    private final IPath fFilePath;
+    private final String fStateId;
+
+    // ------------------------------------------------------------------------
+    // Constructor
+    // ------------------------------------------------------------------------
+
+    /**
+     * Instantiate a new state provider plug-in.
+     *
+     * @param trace
+     *            The trace
+     * @param stateid
+     *            The state system id, corresponding to the analysis_id
+     *            attribute of the state provider element of the XML file
+     * @param file
+     *            Path to the XML file containing the state provider definition
+     */
+    public XmlStateProvider(ITmfTrace trace, String stateid, IPath file) {
+        super(trace, ITmfEvent.class, stateid);
+        fStateId = stateid;
+        fFilePath = file;
+    }
+
+    /**
+     * Get the state id of the state provider
+     *
+     * @return The state id of the state provider
+     */
+    public String getStateId() {
+        return fStateId;
+    }
+
+    // ------------------------------------------------------------------------
+    // IStateChangeInput
+    // ------------------------------------------------------------------------
+
+    @Override
+    public int getVersion() {
+        Node ssNode = loadXMLNode();
+        if (ssNode instanceof Element) {
+            Element element = (Element) ssNode;
+            return Integer.valueOf(element.getAttribute(TmfXmlStrings.VERSION));
+        }
+        /*
+         * The version attribute is mandatory and XML files that don't validate
+         * with the XSD are ignored, so this should never happen
+         */
+        throw new IllegalStateException("The state provider XML node should have a version attribute"); //$NON-NLS-1$
+    }
+
+    @Override
+    public XmlStateProvider getNewInstance() {
+        return new XmlStateProvider(this.getTrace(), getStateId(), fFilePath);
+    }
+
+    @Override
+    protected void eventHandle(ITmfEvent event) {
+        /* TODO: This method will be filled a few patches later */
+    }
+
+    // ------------------------------------------------------------------------
+    // Operations
+    // ------------------------------------------------------------------------
+
+    /**
+     * Loads the XML file and returns the element at the root of the current
+     * state provider.
+     *
+     * @return The XML node at the root of the state provider
+     */
+    protected Node loadXMLNode() {
+
+        try {
+            File XMLFile = fFilePath.toFile();
+            if (XMLFile == null || !XMLFile.exists() || !XMLFile.isFile()) {
+                return null;
+            }
+
+            /* Load the XML File */
+            DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
+            DocumentBuilder dBuilder;
+
+            dBuilder = dbFactory.newDocumentBuilder();
+            Document doc = dBuilder.parse(XMLFile);
+            doc.getDocumentElement().normalize();
+
+            /* get the state providers and find the corresponding one */
+            NodeList stateproviderNodes = doc.getElementsByTagName(TmfXmlStrings.STATE_PROVIDER);
+            Element stateproviderNode = null;
+
+            for (int i = 0; i < stateproviderNodes.getLength(); i++) {
+                Element node = (Element) stateproviderNodes.item(i);
+                String analysisid = node.getAttribute(TmfXmlStrings.ANALYSIS_ID);
+                if (analysisid.equals(fStateId)) {
+                    stateproviderNode = node;
+                }
+            }
+
+            return stateproviderNode;
+        } catch (ParserConfigurationException | IOException e) {
+            Activator.logError("Error loading XML file", e); //$NON-NLS-1$
+        } catch (SAXException e) {
+            Activator.logError(NLS.bind(Messages.XmlUtils_XmlValidationError, e.getLocalizedMessage()), e);
+        }
+
+        return null;
+    }
+
+    /**
+     * Function to load the XML file structure
+     */
+    protected void loadXML() {
+        Element doc = (Element) loadXMLNode();
+        if (doc == null) {
+            return;
+        }
+
+        /* TODO: This method will be filled a few patches later */
+    }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/XmlStateSystemModule.java b/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/XmlStateSystemModule.java
new file mode 100644 (file)
index 0000000..1e284e3
--- /dev/null
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.analysis.xml.core.stateprovider;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.linuxtools.tmf.analysis.xml.core.module.IXmlModuleMetadata;
+import org.eclipse.linuxtools.tmf.analysis.xml.core.module.XmlHeadInfo;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+
+/**
+ * Analysis module for the data-driven state systems, defined in XML.
+ *
+ * @author Geneviève Bastien
+ * @since 3.0
+ */
+public class XmlStateSystemModule extends TmfStateSystemAnalysisModule
+        implements IXmlModuleMetadata {
+
+    private IPath fXmlFile;
+    private XmlHeadInfo fHeadInfo = null;
+
+    @Override
+    protected StateSystemBackendType getBackendType() {
+        return StateSystemBackendType.FULL;
+    }
+
+    @Override
+    @NonNull
+    protected ITmfStateProvider createStateProvider() {
+        return new XmlStateProvider(getTrace(), getId(), fXmlFile);
+    }
+
+    @Override
+    public String getName() {
+        String name = fHeadInfo.getName();
+        if (name == null) {
+            name = getId();
+        }
+        return name;
+    }
+
+    /**
+     * Sets the file path of the XML file containing the state provider
+     *
+     * @param file
+     *            The full path to the XML file
+     */
+    public void setXmlFile(IPath file) {
+        fXmlFile = file;
+    }
+
+    @Override
+    public void setHeadInfo(XmlHeadInfo headInfo) {
+        fHeadInfo = headInfo;
+    }
+
+    /**
+     * Get the path to the XML file containing this state provider definition.
+     *
+     * @return XML file path
+     */
+    public IPath getXmlFile() {
+        return fXmlFile;
+    }
+
+}
index 2e036421b48dac2c6d553c580c977245f6dab1fb..8d5988172ec0043a72a75b557afdf3dfec07ace0 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013 École Polytechnique de Montréal
+ * Copyright (c) 2013, 2014 École Polytechnique de Montréal
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -23,7 +23,7 @@ public class Activator extends AbstractUIPlugin {
     /**
      * The plug-in ID
      */
-    public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.analysis.xml.tests"; //$NON-NLS-1$
+    public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.analysis.xml.ui.tests"; //$NON-NLS-1$
 
     // The shared instance
     private static Activator plugin;
index 581446969a77a41127fc398559e1307acd437562..2b0dd54b5f7d466fc4cbfc8c123299e27c78a28e 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013 École Polytechnique de Montréal
+ * Copyright (c) 2013, 2014 École Polytechnique de Montréal
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -16,7 +16,7 @@ import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 
 /**
- * Master test suite for TMF Xml Analysis UI plug-in.
+ * Master test suite for TMF XML Analysis UI plug-in.
  */
 @RunWith(Suite.class)
 @Suite.SuiteClasses({
index a673bb92c55ebd3718e2aa0a4270e28cbdec8640..4fdef052948224581f740d1c5a195a547ccd7a69 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2013 École Polytechnique de Montréal
+ * Copyright (c) 2013, 2014 École Polytechnique de Montréal
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -18,7 +18,7 @@ import org.eclipse.linuxtools.internal.tmf.analysis.xml.ui.Activator;
 import org.junit.Test;
 
 /**
- * Test the Xml Analysis UI plug-in activator
+ * Test the XML Analysis UI plug-in activator
  *
  * @author Geneviève Bastien
  */
This page took 0.043419 seconds and 5 git commands to generate.