Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/META-INF/MANIFEST.MF2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/build.properties3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.xml23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/services/DebugService.java33
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.properties5
6 files changed, 66 insertions, 3 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/META-INF/MANIFEST.MF
index e4b97dc46..5ec3e1481 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/META-INF/MANIFEST.MF
@@ -7,6 +7,8 @@ Bundle-Activator: org.eclipe.tcf.te.launch.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.debug.core;bundle-version="3.7.0",
+ org.eclipse.debug.ui;bundle-version="3.7.101",
org.eclipse.tcf.te.runtime;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/build.properties
index f4ae97015..73a5119ed 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/build.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/build.properties
@@ -2,4 +2,5 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
- plugin.properties
+ plugin.properties,\
+ plugin.xml
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.xml
new file mode 100644
index 000000000..17f57fb7f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+<!-- Command contributions -->
+ <extension point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.tcf.te.ui.commands.category"
+ description="%Command.showInDebugView.description"
+ helpContextId="org.eclipse.tcf.te.launch.command_ShowInDebugView"
+ id="org.eclipse.tcf.te.launch.command.showInDebugView"
+ name="%Command.showInDebugView.name">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commandImages">
+ <image
+ commandId="org.eclipse.tcf.te.launch.command.showInDebugView"
+ icon="platform:/plugin/org.eclipse.debug.ui/icons/full/eview16/debug_view.gif">
+ </image>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/services/DebugService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/services/DebugService.java
index 01a7519e6..cec53b9e2 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/services/DebugService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/services/DebugService.java
@@ -25,6 +25,7 @@ import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
+import org.eclipse.tcf.internal.debug.model.TCFLaunch;
import org.eclipse.tcf.protocol.IPeer;
import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.te.runtime.concurrent.util.ExecutorsUtil;
@@ -84,7 +85,7 @@ public class DebugService extends AbstractService implements IDebugService {
* @param data The data properties to parameterize the attach. Must not be <code>null</code>.
* @param callback The callback to invoke once the operation completed. Must not be <code>null</code>.
*/
- protected void attachPeer(IPeer peer, IPropertiesContainer data, ICallback callback) {
+ protected void attachPeer(final IPeer peer, final IPropertiesContainer data, final ICallback callback) {
Assert.isNotNull(peer);
Assert.isNotNull(data);
Assert.isNotNull(callback);
@@ -117,13 +118,41 @@ public class DebugService extends AbstractService implements IDebugService {
if (lc != null && l == null) {
try {
+ // Attach the launch listener to wait firing the callback until
+ // the TCFLaunch got connect
+ TCFLaunch.addListener(new TCFLaunch.LaunchListener() {
+ @Override
+ public void onProcessStreamError(TCFLaunch launch, String process_id, int stream_id, Exception error, int lost_size) {}
+ @Override
+ public void onProcessOutput(TCFLaunch launch, String process_id, int stream_id, byte[] data) {}
+ @Override
+ public void onDisconnected(TCFLaunch launch) {}
+ @Override
+ public void onCreated(TCFLaunch launch) {}
+
+ @Override
+ public void onConnected(TCFLaunch launch) {
+ // If "our" launch got connected, fire the callback
+ ILaunch l = (ILaunch)callback.getProperty("launch"); //$NON-NLS-1$
+ if (launch == l) {
+ TCFLaunch.removeListener(this);
+ callback.done(DebugService.this, Status.OK_STATUS);
+ }
+ }
+ });
+
+ // Execute the launch configuration
l = lc.launch(ILaunchManager.DEBUG_MODE, new NullProgressMonitor(), false, true);
+ // And remember the launch returned. Will be needed outside
+ // to set the selection to the debug view correctly
callback.setProperty("launch", l); //$NON-NLS-1$
- callback.done(this, Status.OK_STATUS);
+
} catch (CoreException e) {
callback.done(this, e.getStatus());
}
} else {
+ // Remember the launch found. Will be needed outside
+ // to set the selection to the debug view correctly
callback.setProperty("launch", l); //$NON-NLS-1$
callback.done(this, Status.OK_STATUS);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF
index 668fd3724..d4db28ee4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF
@@ -7,7 +7,10 @@ Bundle-Activator: org.eclipse.tcf.te.tcf.launch.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.core;bundle-version="1.0.0",
org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.0.0",
org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.properties
index 6715a99ef..d96b8774f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.properties
@@ -10,3 +10,8 @@
pluginName = Target Explorer, TCF Launching, UI
providerName = Eclipse.org
+
+# ***** Command contributions *****
+
+Command.showInDebugView.name=Show In Debug View Command
+Command.showInDebugView.description=Show the selection in the Debug View.

Back to the top