Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--pom.xml2
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.feature/feature.xml12
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/feature.xml14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/META-INF/MANIFEST.MF12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/build.properties5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/plugin.properties12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/src/org/eclipse/tcf/te/tcf/debug/core/activator/CoreBundleActivator.java70
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/META-INF/MANIFEST.MF14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/build.properties5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/plugin.properties12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/src/org/eclipse/tcf/te/tcf/debug/ui/activator/UIPlugin.java112
22 files changed, 396 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index b55979fa0..18a654035 100644
--- a/.gitignore
+++ b/.gitignore
@@ -89,6 +89,10 @@ tests/plugins/org.eclipse.tcf.debug.test/bin
/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/bin
/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/target
/target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/bin
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/target
+/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/bin
/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/target
/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/bin
/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/target
diff --git a/pom.xml b/pom.xml
index 5c58f0e3a..0bedf9ff3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -71,6 +71,8 @@
<module>target_explorer/plugins/org.eclipse.tcf.te.ui.views</module>
<module>target_explorer/plugins/org.eclipse.tcf.te.tcf.core</module>
<module>target_explorer/plugins/org.eclipse.tcf.te.tcf.core.scripting</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui</module>
<module>target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem</module>
<module>target_explorer/plugins/org.eclipse.tcf.te.tcf.locator</module>
<module>target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core</module>
diff --git a/target_explorer/features/org.eclipse.tcf.te.tcf.feature/feature.xml b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/feature.xml
index cc15b8612..647310789 100644
--- a/target_explorer/features/org.eclipse.tcf.te.tcf.feature/feature.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.feature/feature.xml
@@ -116,4 +116,16 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.tcf.te.tcf.debug.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.tcf.debug.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
</feature>
diff --git a/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/feature.xml b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/feature.xml
index 70ccad166..d570e9623 100644
--- a/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/feature.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.tcf.sdk.feature/feature.xml
@@ -37,6 +37,20 @@
unpack="false"/>
<plugin
+ id="org.eclipse.tcf.te.tcf.debug.core.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tcf.te.tcf.debug.ui.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
id="org.eclipse.tcf.te.tcf.filesystem.source"
download-size="0"
install-size="0"
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/.options b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/.options
new file mode 100644
index 000000000..67b5d8c0b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.tcf.debug.core/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/.project
new file mode 100644
index 000000000..9eba2cdca
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.tcf.debug.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..60c8e3f41
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Dec 19 15:53:10 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..9976269bb
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.debug.core;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.debug.core.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/build.properties
new file mode 100644
index 000000000..f4ae97015
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/plugin.properties
new file mode 100644
index 000000000..1389dea33
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/plugin.properties
@@ -0,0 +1,12 @@
+##################################################################################
+# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License v1.0 which accompanies this distribution, and is
+# available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+##################################################################################
+
+pluginName = Target Explorer, TCF Debugger Integration, Core
+providerName = Eclipse.org
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/pom.xml
new file mode 100644
index 000000000..6535dafda
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.debug.core</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/src/org/eclipse/tcf/te/tcf/debug/core/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/src/org/eclipse/tcf/te/tcf/debug/core/activator/CoreBundleActivator.java
new file mode 100644
index 000000000..320794b23
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.core/src/org/eclipse/tcf/te/tcf/debug/core/activator/CoreBundleActivator.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.debug.core.activator;
+
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class CoreBundleActivator implements BundleActivator {
+ // The bundle context
+ private static BundleContext context;
+ // The trace handler instance
+ private static TraceHandler traceHandler;
+
+ /**
+ * Returns the bundle context
+ *
+ * @return the bundle context
+ */
+ public static BundleContext getContext() {
+ return context;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getContext() != null && getContext().getBundle() != null) {
+ return getContext().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the bundles trace handler.
+ *
+ * @return The bundles trace handler.
+ */
+ public static TraceHandler getTraceHandler() {
+ if (traceHandler == null) {
+ traceHandler = new TraceHandler(getUniqueIdentifier());
+ }
+ return traceHandler;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = bundleContext;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = null;
+ traceHandler = null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/.options b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/.options
new file mode 100644
index 000000000..56bb7a6de
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.tcf.debug.ui/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/.project
new file mode 100644
index 000000000..098fc23bd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.tcf.debug.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..d2625e4a3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Dec 19 15:58:29 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..b4af43e0b
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.debug.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.debug.ui.activator.UIPlugin
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/build.properties
new file mode 100644
index 000000000..f4ae97015
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/plugin.properties
new file mode 100644
index 000000000..bd3852ab3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/plugin.properties
@@ -0,0 +1,12 @@
+##################################################################################
+# Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License v1.0 which accompanies this distribution, and is
+# available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+##################################################################################
+
+pluginName = Target Explorer, TCF Debugger Integration, UI
+providerName = Eclipse.org
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/pom.xml
new file mode 100644
index 000000000..0dfb4e7a3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.tcf.debug.ui</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/src/org/eclipse/tcf/te/tcf/debug/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/src/org/eclipse/tcf/te/tcf/debug/ui/activator/UIPlugin.java
new file mode 100644
index 000000000..4dda1352d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.debug.ui/src/org/eclipse/tcf/te/tcf/debug/ui/activator/UIPlugin.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.debug.ui.activator;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class UIPlugin extends AbstractUIPlugin {
+ // The shared instance
+ private static UIPlugin plugin;
+ // The trace handler instance
+ private static TraceHandler traceHandler;
+
+ /**
+ * The constructor
+ */
+ public UIPlugin() {
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static UIPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getDefault() != null && getDefault().getBundle() != null) {
+ return getDefault().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the bundles trace handler.
+ *
+ * @return The bundles trace handler.
+ */
+ public static TraceHandler getTraceHandler() {
+ if (traceHandler == null) {
+ traceHandler = new TraceHandler(getUniqueIdentifier());
+ }
+ return traceHandler;
+ }
+
+ /* (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;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ traceHandler = null;
+ super.stop(context);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
+ */
+ @Override
+ protected void initializeImageRegistry(ImageRegistry registry) {
+ }
+
+ /**
+ * Loads the image registered under the specified key from the image
+ * registry and returns the <code>Image</code> object instance.
+ *
+ * @param key The key the image is registered with.
+ * @return The <code>Image</code> object instance or <code>null</code>.
+ */
+ public static Image getImage(String key) {
+ return getDefault().getImageRegistry().get(key);
+ }
+
+ /**
+ * Loads the image registered under the specified key from the image
+ * registry and returns the <code>ImageDescriptor</code> object instance.
+ *
+ * @param key The key the image is registered with.
+ * @return The <code>ImageDescriptor</code> object instance or <code>null</code>.
+ */
+ public static ImageDescriptor getImageDescriptor(String key) {
+ return getDefault().getImageRegistry().getDescriptor(key);
+ }
+}

Back to the top