Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2012-05-02 07:12:33 +0000
committerUwe Stieber2012-05-02 07:12:33 +0000
commitc5788b1da92746ede39c09345d1907b5469e9304 (patch)
tree9f14f044753b187e0c2f99eeb5b8e3bcf5ec33dd /target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui
parent138f869c6581ea43e9b8831b3b2e6ff0c8f2e9ee (diff)
downloadorg.eclipse.tcf-c5788b1da92746ede39c09345d1907b5469e9304.tar.gz
org.eclipse.tcf-c5788b1da92746ede39c09345d1907b5469e9304.tar.xz
org.eclipse.tcf-c5788b1da92746ede39c09345d1907b5469e9304.zip
Target Explorer: ADD Launches to project explorer
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/icons/obj16/root.gifbin0 -> 577 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.xml3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/adapters/AdapterFactory.java44
3 files changed, 46 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/icons/obj16/root.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/icons/obj16/root.gif
new file mode 100644
index 000000000..6b3911b24
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/icons/obj16/root.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.xml
index 313dc3002..d56ca4593 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.xml
@@ -5,7 +5,7 @@
<!-- Adapter factory contributions -->
<extension point="org.eclipse.core.runtime.adapters">
<factory
- class=""
+ class="org.eclipse.tcf.te.tcf.launch.ui.internal.adapters.AdapterFactory"
adaptableType="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
<adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
</factory>
@@ -109,6 +109,7 @@
<navigatorContent
id="org.eclipse.tcf.te.tcf.launch.ui.navigator.content"
name="%LauchTree.name"
+ icon="icons/obj16/root.gif"
activeByDefault="false"
contentProvider="org.eclipse.tcf.te.launch.ui.internal.viewer.LaunchNavigatorContentProvider"
labelProvider="org.eclipse.tcf.te.launch.ui.internal.viewer.LaunchTreeLabelProvider"
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/adapters/AdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/adapters/AdapterFactory.java
new file mode 100644
index 000000000..99cd90fb7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/adapters/AdapterFactory.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.launch.ui.internal.adapters;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.debug.ui.actions.ILaunchable;
+import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
+
+/**
+ * Adapter factory implementation.
+ */
+public class AdapterFactory implements IAdapterFactory {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
+ */
+ @Override
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if (adaptableObject instanceof IPeerModel) {
+ if (ILaunchable.class.equals(adapterType)) {
+ return new ILaunchable() {};
+ }
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
+ */
+ @Override
+ public Class[] getAdapterList() {
+ return new Class<?>[] {
+ ILaunchable.class
+ };
+ }
+
+}

Back to the top