aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2012-05-03 09:23:49 (EDT)
committerUwe Stieber2012-05-03 09:23:49 (EDT)
commitd930952f21025f2419902f4b3057939e8143b722 (patch)
tree56bfab596a48ffe423375d1d00139cae17e69e33
parent5665488cddb6ec8b3303f0b97077789fea3f49ff (diff)
downloadorg.eclipse.tcf-d930952f21025f2419902f4b3057939e8143b722.zip
org.eclipse.tcf-d930952f21025f2419902f4b3057939e8143b722.tar.gz
org.eclipse.tcf-d930952f21025f2419902f4b3057939e8143b722.tar.bz2
Target Explorer: ADD toolbar and double-click actions
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.xml2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/PropertyTester.java10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/delegates/DefaultLaunchManagerDelegate.java5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchManagerDelegate.java7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/icons/obj16/launches_root.gif (renamed from target_explorer/plugins/org.eclipse.tcf.te.launch.ui/icons/obj16/root.gif)bin577 -> 577 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.xml464
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/activator/UIPlugin.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/LaunchNodePropertyTester.java8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/DebugHandler.java25
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/DeleteHandler.java38
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/LaunchDialogHandler.java85
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/LaunchHandler.java50
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/RefreshHandler.java42
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/RunHandler.java25
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/DescriptionColumnLabelProvider.java37
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/LastLaunchedColumnLabelProvider.java44
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/LaunchNavigatorContentProvider.java70
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/LaunchTreeContentProvider.java55
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.properties3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/RemoteAppLaunchManagerDelegate.java11
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/icons/obj16/launches_root.gif (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/icons/obj16/root.gif)bin577 -> 577 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/plugin.xml22
25 files changed, 622 insertions, 397 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.xml
index 8a1b0d5..3298d7e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/plugin.xml
@@ -29,7 +29,7 @@
class="org.eclipse.tcf.te.launch.core.bindings.internal.PropertyTester"
id="org.eclipse.tcf.te.launch.core.PropertyTester"
namespace="org.eclipse.tcf.te.launch.core"
- properties="launchMode,launchConfigTypeId"
+ properties="launchMode"
type="org.eclipse.debug.core.ILaunch">
</propertyTester>
<propertyTester
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/PropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/PropertyTester.java
index 24c364e..a27ca43 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/PropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/internal/PropertyTester.java
@@ -10,7 +10,6 @@
package org.eclipse.tcf.te.launch.core.bindings.internal;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.tcf.te.launch.core.bindings.LaunchConfigTypeBindingsManager;
@@ -37,15 +36,6 @@ public class PropertyTester extends org.eclipse.core.expressions.PropertyTester
return ((ILaunch)receiver).getLaunchMode().equalsIgnoreCase((String)expectedValue);
}
}
- else if ("launchConfigTypeid".equals(property) && expectedValue instanceof String) { //$NON-NLS-1$
- if (receiver instanceof ILaunch) {
- try {
- return ((ILaunch)receiver).getLaunchConfiguration().getType().getIdentifier().equalsIgnoreCase((String)expectedValue);
- }
- catch (CoreException e) {
- }
- }
- }
else if ("isValidLaunchConfigType".equals(property) && expectedValue instanceof String) { //$NON-NLS-1$
ISelectionContext selContext = null;
if (receiver instanceof IModelNodeProvider) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/delegates/DefaultLaunchManagerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/delegates/DefaultLaunchManagerDelegate.java
index 4fd39ee..05ce493 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/delegates/DefaultLaunchManagerDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/delegates/DefaultLaunchManagerDelegate.java
@@ -779,4 +779,9 @@ public class DefaultLaunchManagerDelegate extends ExecutableExtension implements
public boolean useDefaultConnection() {
return true;
}
+
+ @Override
+ public String getDescription(ILaunchConfiguration config) {
+ return config.getName();
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchManagerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchManagerDelegate.java
index 658adb1..5767955 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchManagerDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/interfaces/ILaunchManagerDelegate.java
@@ -174,4 +174,11 @@ public interface ILaunchManagerDelegate extends IExecutableExtension {
* Return <code>true</code> if a default connection should be used when the connection selection is empty.
*/
public boolean useDefaultConnection();
+
+ /**
+ * Get a short description for the given launch configuration.
+ * @param config The launch configuration.
+ * @return The description.
+ */
+ public String getDescription(ILaunchConfiguration config);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/icons/obj16/root.gif b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/icons/obj16/launches_root.gif
index 6b3911b..6b3911b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/icons/obj16/root.gif
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/icons/obj16/launches_root.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties
index 3466881..c7933be 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.properties
@@ -30,6 +30,8 @@ command.detach.description=Detach from the selected Context
LauchEditorPage.name=Launches
LauchEditorPage.column.name=Launch Configurations
+LauchEditorPage.column.description=Description
+LauchEditorPage.column.lastLaunched=Last Launched
ReferencedProjects.propertyTab.name=Referenced Projects
FileTransfers.propertyTab.name=File Transfers
@@ -46,6 +48,8 @@ Refresh.menu.name=Refresh
Refresh.menu.mnemonic=f
ShowIn.menu.name=Show In
Properties.menu.name=Properties
+Run.menu.name=Run
+Debug.menu.name=Debug
command.delete.label=Delete
command.delete.description=Delete the selected node
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
index 5c61d38..44b2306 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/plugin.xml
@@ -17,7 +17,7 @@
class="org.eclipse.tcf.te.launch.ui.internal.LaunchNodePropertyTester"
id="org.eclipse.tcf.te.launch.ui.propertytester.launchNode"
namespace="org.eclipse.tcf.te.launch.ui.model"
- properties="isLaunchConfig,isLaunchConfigType,canDelete,canRefresh"
+ properties="isLaunchConfig,isLaunchConfigType,canDelete,canRefresh,hasLaunchMode,isValidLaunchConfig"
type="org.eclipse.tcf.te.launch.ui.model.LaunchNode">
</propertyTester>
</extension>
@@ -27,6 +27,7 @@
<editorPage
class="org.eclipse.tcf.te.ui.views.editor.pages.TreeViewerExplorerEditorPage:org.eclipse.tcf.te.launch.ui.viewer.launches:Launches"
name="%LauchEditorPage.name"
+ icon="icons/obj16/launches_root.gif"
id="org.eclipse.tcf.te.launch.ui.LaunchEditorPage">
</editorPage>
</extension>
@@ -47,7 +48,7 @@
<navigatorContent
id="org.eclipse.tcf.te.launch.ui.navigator.project.content"
name="%LauchTree.name"
- icon="icons/obj16/root.gif"
+ icon="icons/obj16/launches_root.gif"
activeByDefault="false"
contentProvider="org.eclipse.tcf.te.launch.ui.internal.viewer.LaunchNavigatorContentProvider"
labelProvider="org.eclipse.tcf.te.launch.ui.internal.viewer.LaunchTreeLabelProvider"
@@ -70,6 +71,7 @@
id="org.eclipse.tcf.te.launch.ui.viewer.launches"
autoExpandLevel="2"
contentProvider="org.eclipse.tcf.te.launch.ui.internal.viewer.LaunchTreeContentProvider"
+ doubleClickCommand="org.eclipse.ui.navigator.Open"
helpId="org.eclipse.tcf.te.launch.ui.LaunchEditorPage"
menuId="org.eclipse.tcf.te.launch.ui.editor.menu.launches">
<creation>
@@ -84,6 +86,18 @@
name="%LauchEditorPage.column.name"
width="400">
</column>
+ <column
+ id="description"
+ labelProvider="org.eclipse.tcf.te.launch.ui.internal.viewer.DescriptionColumnLabelProvider"
+ name="%LauchEditorPage.column.description"
+ width="400">
+ </column>
+ <column
+ id="lastLaunched"
+ labelProvider="org.eclipse.tcf.te.launch.ui.internal.viewer.LastLaunchedColumnLabelProvider"
+ name="%LauchEditorPage.column.lastLaunched"
+ width="100">
+ </column>
</columnContribution>
</extension>
@@ -94,8 +108,7 @@
<menuContribution locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu">
<separator
name="group.new"
- visible="true">
- </separator>
+ visible="true"/>
<menu
id="org.eclipse.tcf.te.launch.ui.views.project.menu.new"
label="%New.menu.name">
@@ -103,24 +116,13 @@
id="org.eclipse.tcf.te.launch.ui.views.project.dynamic.new"
class="org.eclipse.tcf.te.launch.ui.internal.handler.NewLaunchConfigurationContributionItem">
<visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <or>
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfigType"/>
- </or>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchConfigOrType"/>
</visibleWhen>
</dynamic>
</menu>
<separator
name="group.showIn"
- visible="true">
- </separator>
+ visible="true"/>
<menu
id="org.eclipse.tcf.te.launch.ui.views.project.menu.showIn"
label="%ShowIn.menu.name">
@@ -131,62 +133,37 @@
label="%Properties.menu.name"
style="push">
<visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchConfig"/>
</visibleWhen>
</command>
<visibleWhen checkEnabled="true"/>
</menu>
<separator
name="group.launch"
- visible="true">
- </separator>
+ visible="true"/>
<dynamic
id="org.eclipse.tcf.te.launch.ui.views.project.dynamic.launch"
class="org.eclipse.tcf.te.launch.ui.internal.handler.LaunchLaunchConfigurationContributionItem">
<visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchConfig"/>
</visibleWhen>
</dynamic>
<separator
name="group.open"
- visible="true">
- </separator>
+ visible="true"/>
<menu
id="org.eclipse.tcf.te.launch.ui.views.project.menu.open"
label="%Open.menu.name">
<dynamic
id="org.eclipse.tcf.te.launch.ui.views.project.dynamic.open"
- class="org.eclipse.tcf.te.launch.ui.internal.handler.OpenLaunchConfigurationContributionItem">
- </dynamic>
+ class="org.eclipse.tcf.te.launch.ui.internal.handler.OpenLaunchConfigurationContributionItem"/>
<visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfigType"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchConfigType"/>
</visibleWhen>
</menu>
<separator
name="group.openAs"
- visible="true">
- </separator>
+ visible="true"/>
<menu
id="org.eclipse.tcf.te.launch.ui.views.project.menu.openAs"
label="%OpenAs.menu.name">
@@ -195,20 +172,12 @@
class="org.eclipse.tcf.te.launch.ui.internal.handler.OpenLaunchConfigurationContributionItem">
</dynamic>
<visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchConfig"/>
</visibleWhen>
</menu>
<separator
name="group.delete"
- visible="false">
- </separator>
+ visible="false"/>
<command
commandId="org.eclipse.ui.edit.delete"
id="org.eclipse.tcf.te.launch.ui.views.project.commands.delete"
@@ -216,14 +185,7 @@
mnemonic="%Delete.menu.mnemonic"
style="push">
<visibleWhen checkEnabled="false">
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isMultiLaunchConfig"/>
</visibleWhen>
</command>
<separator
@@ -237,14 +199,7 @@
mnemonic="%Refresh.menu.mnemonic"
style="push">
<visibleWhen checkEnabled="false">
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <instanceof value="org.eclipse.tcf.te.launch.ui.model.LaunchNode"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchNode"/>
</visibleWhen>
</command>
</menuContribution>
@@ -258,17 +213,7 @@
id="org.eclipse.tcf.te.launch.ui.views.target.dynamic.new"
class="org.eclipse.tcf.te.launch.ui.internal.handler.NewLaunchConfigurationContributionItem">
<visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <or>
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfigType"/>
- </or>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchConfigOrType"/>
</visibleWhen>
</dynamic>
</menu>
@@ -278,14 +223,7 @@
id="org.eclipse.tcf.te.launch.ui.views.target.dynamic.launch"
class="org.eclipse.tcf.te.launch.ui.internal.handler.LaunchLaunchConfigurationContributionItem">
<visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchConfig"/>
</visibleWhen>
</dynamic>
</menuContribution>
@@ -295,17 +233,9 @@
label="%Open.menu.name">
<dynamic
id="org.eclipse.tcf.te.launch.ui.views.target.dynamic.open"
- class="org.eclipse.tcf.te.launch.ui.internal.handler.OpenLaunchConfigurationContributionItem">
- </dynamic>
+ class="org.eclipse.tcf.te.launch.ui.internal.handler.OpenLaunchConfigurationContributionItem"/>
<visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfigType"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchConfigType"/>
</visibleWhen>
</menu>
<menu
@@ -313,17 +243,9 @@
label="%OpenAs.menu.name">
<dynamic
id="org.eclipse.tcf.te.launch.ui.views.target.dynamic.openAs"
- class="org.eclipse.tcf.te.launch.ui.internal.handler.OpenLaunchConfigurationContributionItem">
- </dynamic>
+ class="org.eclipse.tcf.te.launch.ui.internal.handler.OpenLaunchConfigurationContributionItem"/>
<visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchConfig"/>
</visibleWhen>
</menu>
</menuContribution>
@@ -339,12 +261,7 @@
style="push"
tooltip="%command.delete.description">
<visibleWhen checkEnabled="false">
- <with variable="selection">
- <count value="+"/>
- <iterate operator="and" ifEmpty="false">
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isMultiLaunchConfig"/>
</visibleWhen>
</command>
</menuContribution>
@@ -356,14 +273,7 @@
mnemonic="%Refresh.menu.mnemonic"
style="push">
<visibleWhen checkEnabled="false">
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <instanceof value="org.eclipse.tcf.te.launch.ui.model.LaunchNode"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchNode"/>
</visibleWhen>
</command>
</menuContribution>
@@ -372,8 +282,7 @@
<menuContribution locationURI="popup:org.eclipse.tcf.te.launch.ui.editor.menu.launches">
<separator
name="group.new"
- visible="true">
- </separator>
+ visible="true"/>
<menu
id="org.eclipse.tcf.te.launch.ui.editor.menu.new"
label="%New.menu.name">
@@ -381,24 +290,13 @@
id="org.eclipse.tcf.te.launch.ui.editor.dynamic.new"
class="org.eclipse.tcf.te.launch.ui.internal.handler.NewLaunchConfigurationContributionItem">
<visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <or>
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfigType"/>
- </or>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchConfigOrType"/>
</visibleWhen>
</dynamic>
</menu>
<separator
name="group.showIn"
- visible="true">
- </separator>
+ visible="true"/>
<menu
id="org.eclipse.tcf.te.launch.ui.editor.menu.showIn"
label="%ShowIn.menu.name">
@@ -409,56 +307,32 @@
label="%Properties.menu.name"
style="push">
<visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchConfig"/>
</visibleWhen>
</command>
<visibleWhen checkEnabled="true"/>
</menu>
<separator
name="group.launch"
- visible="true">
- </separator>
+ visible="true"/>
<dynamic
id="org.eclipse.tcf.te.launch.ui.editor.dynamic.launch"
class="org.eclipse.tcf.te.launch.ui.internal.handler.LaunchLaunchConfigurationContributionItem">
<visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchConfig"/>
</visibleWhen>
</dynamic>
<separator
name="group.edit"
- visible="true">
- </separator>
+ visible="true"/>
<menu
id="org.eclipse.tcf.te.launch.ui.editor.menu.open"
label="%Open.menu.name">
<dynamic
id="org.eclipse.tcf.te.launch.ui.editor.dynamic.open"
- class="org.eclipse.tcf.te.launch.ui.internal.handler.OpenLaunchConfigurationContributionItem">
- </dynamic>
+ class="org.eclipse.tcf.te.launch.ui.internal.handler.OpenLaunchConfigurationContributionItem"/>
<visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfigType"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchConfigType"/>
</visibleWhen>
</menu>
<menu
@@ -469,20 +343,12 @@
class="org.eclipse.tcf.te.launch.ui.internal.handler.OpenLaunchConfigurationContributionItem">
</dynamic>
<visibleWhen>
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchConfig"/>
</visibleWhen>
</menu>
<separator
name="group.delete"
- visible="true">
- </separator>
+ visible="true"/>
<command
commandId="org.eclipse.ui.edit.delete"
id="org.eclipse.tcf.te.launch.ui.editor.commands.delete"
@@ -490,20 +356,12 @@
mnemonic="%Delete.menu.mnemonic"
style="push">
<visibleWhen checkEnabled="false">
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isMultiLaunchConfig"/>
</visibleWhen>
</command>
<separator
name="group.refresh"
- visible="true">
- </separator>
+ visible="true"/>
<command
commandId="org.eclipse.tcf.te.ui.command.refresh"
id="org.eclipse.tcf.te.launch.ui.editor.commands.refresh"
@@ -511,17 +369,50 @@
mnemonic="%Refresh.menu.mnemonic"
style="push">
<visibleWhen checkEnabled="false">
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <instanceof value="org.eclipse.tcf.te.launch.ui.model.LaunchNode"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchNode"/>
</visibleWhen>
</command>
</menuContribution>
+
+ <!-- Launches editor page toolbar contributions -->
+ <menuContribution locationURI="toolbar:org.eclipse.tcf.te.launch.ui.editor.menu.launches">
+ <separator
+ name="group.run"
+ visible="false"/>
+ <command
+ commandId="org.eclipse.tcf.te.ui.launch.command.run"
+ id="org.eclipse.tcf.te.launch.ui.editor.toolbar.commands.run"
+ label="%Run.menu.name"
+ style="push"/>
+ <separator
+ name="group.debug"
+ visible="false"/>
+ <command
+ commandId="org.eclipse.tcf.te.ui.launch.command.debug"
+ id="org.eclipse.tcf.te.launch.ui.editor.toolbar.commands.debug"
+ label="%Debug.menu.name"
+ style="push"/>
+ <separator
+ name="group.launch"
+ visible="false"/>
+ <separator
+ name="group.delete"
+ visible="true"/>
+ <command
+ commandId="org.eclipse.ui.edit.delete"
+ id="org.eclipse.tcf.te.launch.ui.editor.toolbar.commands.delete"
+ label="%Delete.menu.name"
+ style="push"/>
+ <separator
+ name="group.refresh"
+ visible="false"/>
+ <command
+ commandId="org.eclipse.tcf.te.ui.command.refresh"
+ id="org.eclipse.tcf.te.launch.ui.editor.toolbar.commands.refresh"
+ label="%Refresh.menu.name"
+ style="push"/>
+ </menuContribution>
+
</extension>
<!-- Command contributions -->
@@ -544,11 +435,27 @@
helpContextId="org.eclipse.tcf.te.launch.command_Detach"
id="org.eclipse.tcf.te.launch.command.detach"
name="%command.detach.name"/>
+ <command
+ helpContextId="org.eclipse.tcf.te.ui.launch.command_Run"
+ id="org.eclipse.tcf.te.ui.launch.command.run"
+ name="%Run.menu.name"/>
+ <command
+ helpContextId="org.eclipse.tcf.te.ui.launch.command_Debug"
+ id="org.eclipse.tcf.te.ui.launch.command.debug"
+ name="%Debug.menu.name"/>
</extension>
<!-- Command image contributions -->
<extension point="org.eclipse.ui.commandImages">
<image
+ commandId="org.eclipse.tcf.te.ui.launch.command.run"
+ icon="platform:/plugin/org.eclipse.debug.ui/icons/full/etool16/run_exc.gif"
+ disabledIcon="platform:/plugin/org.eclipse.debug.ui/icons/full/dtool16/run_exc.gif"/>
+ <image
+ commandId="org.eclipse.tcf.te.ui.launch.command.debug"
+ icon="platform:/plugin/org.eclipse.debug.ui/icons/full/etool16/debug_exc.gif"
+ disabledIcon="platform:/plugin/org.eclipse.debug.ui/icons/full/dtool16/debug_exc.gif"/>
+ <image
commandId="org.eclipse.tcf.te.launch.command.showInDebugView"
icon="platform:/plugin/org.eclipse.debug.ui/icons/full/eview16/debug_view.gif"/>
<image
@@ -564,6 +471,31 @@
<!-- Handler contributions -->
<extension point="org.eclipse.ui.handlers">
<handler
+ commandId="org.eclipse.ui.navigator.Open"
+ class="org.eclipse.tcf.te.launch.ui.internal.handler.LaunchDialogHandler">
+ <activeWhen>
+ <and>
+ <with variable="activePartId">
+ <or>
+ <equals value="org.eclipse.tcf.te.ui.views.View"/>
+ <equals value="org.eclipse.tcf.te.ui.views.Editor"/>
+ <equals value="org.eclipse.ui.navigator.ProjectExplorer"/>
+ </or>
+ </with>
+ <reference definitionId="launch.expressions.isSingleLaunchConfig"/>
+ </and>
+ </activeWhen>
+ <enabledWhen>
+ <with variable="selection">
+ <iterate
+ operator="and"
+ ifEmpty="false">
+ <test property="org.eclipse.tcf.te.launch.ui.model.isValidLaunchConfig"/>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
commandId="org.eclipse.ui.edit.delete"
class="org.eclipse.tcf.te.launch.ui.internal.handler.DeleteHandler">
<activeWhen>
@@ -575,13 +507,7 @@
<equals value="org.eclipse.ui.navigator.ProjectExplorer"/>
</or>
</with>
- <with variable="selection">
- <iterate
- operator="and"
- ifEmpty="false">
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isMultiLaunchConfig"/>
</and>
</activeWhen>
<enabledWhen>
@@ -606,14 +532,7 @@
<equals value="org.eclipse.ui.navigator.ProjectExplorer"/>
</or>
</with>
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <instanceof value="org.eclipse.tcf.te.launch.ui.model.LaunchNode"/>
- </iterate>
- </with>
+ <reference definitionId="launch.expressions.isSingleLaunchNode"/>
</and>
</activeWhen>
<enabledWhen>
@@ -637,19 +556,55 @@
<equals value="org.eclipse.ui.navigator.ProjectExplorer"/>
</or>
</with>
- <with variable="selection">
- <count value="1"/>
- <iterate
- ifEmpty="false"
- operator="and">
- <or>
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfigType"/>
- <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
- </or>
- </iterate>
+ <reference definitionId="launch.expressions.isSingleLaunchConfigOrType"/>
+ </and>
+ </activeWhen>
+ </handler>
+ <handler
+ commandId="org.eclipse.tcf.te.ui.launch.command.run"
+ class="org.eclipse.tcf.te.launch.ui.internal.handler.RunHandler">
+ <activeWhen>
+ <and>
+ <with variable="activePartId">
+ <equals value="org.eclipse.tcf.te.ui.views.Editor"/>
+ </with>
+ </and>
+ </activeWhen>
+ <enabledWhen>
+ <with variable="selection">
+ <iterate
+ operator="and"
+ ifEmpty="false">
+ <and>
+ <test property="org.eclipse.tcf.te.launch.ui.model.hasLaunchMode" value="run"/>
+ <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
+ </and>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+ <handler
+ commandId="org.eclipse.tcf.te.ui.launch.command.debug"
+ class="org.eclipse.tcf.te.launch.ui.internal.handler.DebugHandler">
+ <activeWhen>
+ <and>
+ <with variable="activePartId">
+ <equals value="org.eclipse.tcf.te.ui.views.Editor"/>
</with>
</and>
</activeWhen>
+ <enabledWhen>
+ <with variable="selection">
+ <iterate
+ operator="and"
+ ifEmpty="false">
+ <and>
+ <test property="org.eclipse.tcf.te.launch.ui.model.hasLaunchMode" value="debug"/>
+ <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
+ </and>
+ </iterate>
+ </with>
+ </enabledWhen>
</handler>
</extension>
@@ -746,4 +701,61 @@
tab="org.eclipse.tcf.te.launch.ui.project.propertytab.filetransfers"/>
</propertySections>
</extension>
+
+<!-- Reusable core expression fragments -->
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="launch.expressions.isSingleLaunchConfigOrType">
+ <with variable="selection">
+ <count value="1"/>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <or>
+ <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
+ <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfigType"/>
+ </or>
+ </iterate>
+ </with>
+ </definition>
+ <definition id="launch.expressions.isSingleLaunchConfig">
+ <with variable="selection">
+ <count value="1"/>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
+ </iterate>
+ </with>
+ </definition>
+ <definition id="launch.expressions.isMultiLaunchConfig">
+ <with variable="selection">
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfig"/>
+ </iterate>
+ </with>
+ </definition>
+ <definition id="launch.expressions.isSingleLaunchConfigType">
+ <with variable="selection">
+ <count value="1"/>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <test property="org.eclipse.tcf.te.launch.ui.model.isLaunchConfigType"/>
+ </iterate>
+ </with>
+ </definition>
+ <definition id="launch.expressions.isSingleLaunchNode">
+ <with variable="selection">
+ <count value="1"/>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <instanceof value="org.eclipse.tcf.te.launch.ui.model.LaunchNode"/>
+ </iterate>
+ </with>
+ </definition>
+ </extension>
+
</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/activator/UIPlugin.java
index db814f4..68f8ce6 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/activator/UIPlugin.java
@@ -99,9 +99,9 @@ public class UIPlugin extends AbstractUIPlugin {
url = bundle.getEntry(ImageConsts.IMAGE_DIR_ROOT + "full/" + ImageConsts.IMAGE_DIR_DLCL + "refresh_nav.gif"); //$NON-NLS-1$ //$NON-NLS-2$
registry.put(ImageConsts.ACTION_Refresh_Disabled, ImageDescriptor.createFromURL(url));
}
- URL url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ + "root.gif"); //$NON-NLS-1$
+ URL url = getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OBJ + "launches_root.gif"); //$NON-NLS-1$
registry.put(ImageConsts.OBJ_Launches_Root, ImageDescriptor.createFromURL(url));
- url = UIPlugin.getDefault().getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OVR + "redX_ovr.gif"); //$NON-NLS-1$
+ url = getBundle().getEntry(ImageConsts.IMAGE_DIR_ROOT + ImageConsts.IMAGE_DIR_OVR + "redX_ovr.gif"); //$NON-NLS-1$
registry.put(ImageConsts.RED_X_OVR, ImageDescriptor.createFromURL(url));
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/LaunchNodePropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/LaunchNodePropertyTester.java
index 78210ad..079f75b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/LaunchNodePropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/LaunchNodePropertyTester.java
@@ -44,6 +44,14 @@ public class LaunchNodePropertyTester extends PropertyTester {
else if (property.equals("canRefresh")) { //$NON-NLS-1$
return refreshHandler.canRefresh(receiver);
}
+ else if (property.equals("hasLaunchMode")) { //$NON-NLS-1$
+ if (expectedValue != null && LaunchNode.TYPE_LAUNCH_CONFIG.equals(node.getType())) {
+ return node.getLaunchConfigurationType().supportsMode(expectedValue.toString());
+ }
+ }
+ else if (property.equals("isValidLaunchConfig")) { //$NON-NLS-1$
+ return true;
+ }
}
return false;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/DebugHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/DebugHandler.java
new file mode 100644
index 0000000..d40b7ff
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/DebugHandler.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * 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.launch.ui.internal.handler;
+
+import org.eclipse.debug.core.ILaunchManager;
+
+/**
+ * Run launch handler implementation.
+ */
+public class DebugHandler extends LaunchHandler {
+
+ /**
+ * Constructor.
+ */
+ public DebugHandler() {
+ super(ILaunchManager.DEBUG_MODE);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/DeleteHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/DeleteHandler.java
index 1ead882..5acb14b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/DeleteHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/DeleteHandler.java
@@ -18,15 +18,11 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.osgi.util.NLS;
import org.eclipse.tcf.te.launch.ui.activator.UIPlugin;
import org.eclipse.tcf.te.launch.ui.model.LaunchNode;
import org.eclipse.tcf.te.launch.ui.nls.Messages;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.ui.navigator.CommonViewer;
/**
* Delete handler implementation.
@@ -41,9 +37,6 @@ public class DeleteHandler extends AbstractHandler {
// Get the current selection
ISelection selection = HandlerUtil.getCurrentSelection(event);
if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
- // Determine the active part
- final IWorkbenchPart part = HandlerUtil.getActivePart(event);
-
// Loop over the selection and delete the elements providing
Iterator<?> iterator = ((IStructuredSelection)selection).iterator();
while (iterator.hasNext()) {
@@ -51,31 +44,8 @@ public class DeleteHandler extends AbstractHandler {
// Delete the element if there is a valid delegate
if (canDelete(element)) {
- // Determine the elements parent element
- Object parentElement = null;
- CommonViewer viewer = (CommonViewer)part.getAdapter(CommonViewer.class);
- if (viewer != null && viewer.getContentProvider() instanceof ITreeContentProvider) {
- ITreeContentProvider cp = (ITreeContentProvider)viewer.getContentProvider();
- parentElement = cp.getParent(element);
- }
- final Object finParentElement = parentElement;
-
// Delete the element and refresh the tree
- if (delete(element)) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- @Override
- public void run() {
- CommonViewer viewer = (CommonViewer)part.getAdapter(CommonViewer.class);
- if (viewer != null) {
- if (finParentElement != null) {
- viewer.refresh(finParentElement, true);
- } else {
- viewer.refresh(true);
- }
- }
- }
- });
- }
+ delete(element);
}
}
}
@@ -96,22 +66,20 @@ public class DeleteHandler extends AbstractHandler {
return false;
}
- private boolean delete(Object element) {
+ private void delete(Object element) {
Assert.isNotNull(element);
if (element instanceof LaunchNode) {
- final LaunchNode node = (LaunchNode)element;
+ LaunchNode node = (LaunchNode)element;
if (MessageDialog.openQuestion(
UIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(),
Messages.DeleteHandlerDelegate_question_title, NLS.bind(Messages.DeleteHandlerDelegate_question_message, node.getLaunchConfiguration().getName()))) {
try {
node.getLaunchConfiguration().delete();
- return true;
}
catch (Exception e) {
}
}
}
- return false;
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/LaunchDialogHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/LaunchDialogHandler.java
new file mode 100644
index 0000000..7215c0d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/LaunchDialogHandler.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * 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.launch.ui.internal.handler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.ILaunchMode;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.launch.core.lm.LaunchConfigHelper;
+import org.eclipse.tcf.te.launch.core.lm.LaunchManager;
+import org.eclipse.tcf.te.launch.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.launch.ui.model.LaunchNode;
+import org.eclipse.tcf.te.launch.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.jface.dialogs.OptionalMessageDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Launch dialog handler implementation.
+ */
+public class LaunchDialogHandler extends AbstractHandler {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ // Get the current selection
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() == 1) {
+ Object element = ((IStructuredSelection)selection).getFirstElement();
+ if (element instanceof LaunchNode) {
+ LaunchNode node = (LaunchNode)element;
+ if (node.getLaunchConfiguration() != null) {
+ final String[] modes = LaunchConfigHelper.getLaunchConfigTypeModes(node.getLaunchConfigurationType(), false);
+ List<String> modeLabels = new ArrayList<String>();
+ int defaultIndex = 0;
+ for (String mode : modes) {
+ if (LaunchManager.getInstance().validate(node.getLaunchConfiguration(), mode)) {
+ ILaunchMode launchMode = DebugPlugin.getDefault().getLaunchManager().getLaunchMode(mode);
+ modeLabels.add(launchMode.getLabel());
+ if (mode.equals(ILaunchManager.DEBUG_MODE)) {
+ defaultIndex = modeLabels.size()-1;
+ }
+ }
+ }
+ if (modeLabels.size() >= 1) {
+ modeLabels.add(IDialogConstants.CANCEL_LABEL);
+ OptionalMessageDialog dialog = new OptionalMessageDialog(
+ UIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(),
+ Messages.LaunchDialogHandler_dialog_title,
+ null,
+ NLS.bind(Messages.LaunchDialogHandler_dialog_message, node.getLaunchConfigurationType().getName(), node.getLaunchConfiguration().getName()),
+ MessageDialog.QUESTION,
+ modeLabels.toArray(new String[modeLabels.size()]),
+ defaultIndex,
+ null, null);
+ int result = dialog.open();
+ if (result >= IDialogConstants.INTERNAL_ID) {
+ DebugUITools.launch(node.getLaunchConfiguration(), modes[result - IDialogConstants.INTERNAL_ID]);
+ }
+ }
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/LaunchHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/LaunchHandler.java
new file mode 100644
index 0000000..1a13c38
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/LaunchHandler.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * 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.launch.ui.internal.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.tcf.te.launch.ui.model.LaunchNode;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Launch handler implementation.
+ */
+public class LaunchHandler extends AbstractHandler {
+
+ private String mode;
+
+ public LaunchHandler(String mode) {
+ this.mode = mode;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ // Get the current selection
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() == 1) {
+ Object element = ((IStructuredSelection)selection).getFirstElement();
+ if (element instanceof LaunchNode) {
+ LaunchNode node = (LaunchNode)element;
+ if (node.getLaunchConfiguration() != null) {
+ DebugUITools.launch(node.getLaunchConfiguration(), mode);
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/RefreshHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/RefreshHandler.java
index e09c474..22d0806 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/RefreshHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/RefreshHandler.java
@@ -17,13 +17,9 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.tcf.te.launch.ui.model.LaunchModel;
import org.eclipse.tcf.te.launch.ui.model.LaunchNode;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.ui.navigator.CommonViewer;
/**
* Refresh handler implementation.
@@ -38,9 +34,6 @@ public class RefreshHandler extends AbstractHandler {
// Get the current selection
ISelection selection = HandlerUtil.getCurrentSelection(event);
if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
- // Determine the active part
- final IWorkbenchPart part = HandlerUtil.getActivePart(event);
-
// Loop over the selection and refresh the elements
Iterator<?> iterator = ((IStructuredSelection)selection).iterator();
while (iterator.hasNext()) {
@@ -48,31 +41,8 @@ public class RefreshHandler extends AbstractHandler {
// Refresh the element if there is a valid delegate
if (canRefresh(element)) {
- // Determine the elements parent element
- Object parentElement = null;
- CommonViewer viewer = (CommonViewer)part.getAdapter(CommonViewer.class);
- if (viewer != null && viewer.getContentProvider() instanceof ITreeContentProvider) {
- ITreeContentProvider cp = (ITreeContentProvider)viewer.getContentProvider();
- parentElement = cp.getParent(element);
- }
- final Object finParentElement = parentElement;
-
// Refresh the element and the tree
- if (refresh(element)) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- @Override
- public void run() {
- CommonViewer viewer = (CommonViewer)part.getAdapter(CommonViewer.class);
- if (viewer != null) {
- if (finParentElement != null) {
- viewer.refresh(finParentElement, true);
- } else {
- viewer.refresh(true);
- }
- }
- }
- });
- }
+ refresh(element);
}
}
}
@@ -92,11 +62,13 @@ public class RefreshHandler extends AbstractHandler {
return false;
}
- private boolean refresh(Object element) {
+ private void refresh(Object element) {
Assert.isNotNull(element);
- LaunchNode node = (LaunchNode) element;
- LaunchModel model = node.getModel();
- return model.refresh();
+ if (element instanceof LaunchNode) {
+ LaunchNode node = (LaunchNode)element;
+ LaunchModel model = node.getModel();
+ model.refresh();
+ }
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/RunHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/RunHandler.java
new file mode 100644
index 0000000..e65d0ac
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/handler/RunHandler.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * 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.launch.ui.internal.handler;
+
+import org.eclipse.debug.core.ILaunchManager;
+
+/**
+ * Run launch handler implementation.
+ */
+public class RunHandler extends LaunchHandler {
+
+ /**
+ * Constructor.
+ */
+ public RunHandler() {
+ super(ILaunchManager.RUN_MODE);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/DescriptionColumnLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/DescriptionColumnLabelProvider.java
new file mode 100644
index 0000000..bd8151f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/DescriptionColumnLabelProvider.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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.launch.ui.internal.viewer;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.tcf.te.launch.core.lm.LaunchConfigHelper;
+import org.eclipse.tcf.te.launch.core.lm.LaunchManager;
+import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchManagerDelegate;
+import org.eclipse.tcf.te.launch.ui.model.LaunchNode;
+
+/**
+ * The label provider for the tree column "description".
+ */
+public class DescriptionColumnLabelProvider extends LabelProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof LaunchNode && (LaunchNode.TYPE_LAUNCH_CONFIG.equals(((LaunchNode)element).getType()))) {
+ String[] modes = LaunchConfigHelper.getLaunchConfigTypeModes(((LaunchNode)element).getLaunchConfigurationType(), false);
+ if (modes != null && modes.length > 0) {
+ ILaunchManagerDelegate delegate = LaunchManager.getInstance().getLaunchManagerDelegate(((LaunchNode)element).getLaunchConfigurationType(), modes[0]);
+ return delegate.getDescription(((LaunchNode)element).getLaunchConfiguration());
+ }
+ }
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/LastLaunchedColumnLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/LastLaunchedColumnLabelProvider.java
new file mode 100644
index 0000000..7804304
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/LastLaunchedColumnLabelProvider.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.launch.ui.internal.viewer;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.tcf.te.launch.core.lm.interfaces.ICommonLaunchAttributes;
+import org.eclipse.tcf.te.launch.core.persistence.DefaultPersistenceDelegate;
+import org.eclipse.tcf.te.launch.ui.model.LaunchNode;
+
+/**
+ * The label provider for the tree column "lastLaunched".
+ */
+public class LastLaunchedColumnLabelProvider extends LabelProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof LaunchNode && (LaunchNode.TYPE_LAUNCH_CONFIG.equals(((LaunchNode)element).getType()))) {
+ try {
+ String lastLaunched = DefaultPersistenceDelegate.getAttribute(((LaunchNode)element).getLaunchConfiguration(), ICommonLaunchAttributes.ATTR_LAST_LAUNCHED, (String)null);
+ if (lastLaunched != null) {
+ DateFormat format = new SimpleDateFormat();
+ return format.format(new Date(Long.parseLong(lastLaunched)));
+ }
+ }
+ catch (Exception e) {
+ }
+ }
+ return ""; //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/LaunchNavigatorContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/LaunchNavigatorContentProvider.java
index 2892baf..dc62136 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/LaunchNavigatorContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/LaunchNavigatorContentProvider.java
@@ -11,9 +11,7 @@ package org.eclipse.tcf.te.launch.ui.internal.viewer;
import java.util.EventObject;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.viewers.ITreeViewerListener;
-import org.eclipse.jface.viewers.TreeExpansionEvent;
+import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.tcf.te.launch.ui.model.LaunchModel;
import org.eclipse.tcf.te.launch.ui.model.LaunchNode;
@@ -21,14 +19,20 @@ import org.eclipse.tcf.te.runtime.events.ChangeEvent;
import org.eclipse.tcf.te.runtime.events.EventManager;
import org.eclipse.tcf.te.runtime.interfaces.events.IEventListener;
import org.eclipse.tcf.te.ui.trees.TreeContentProvider;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.navigator.ICommonContentExtensionSite;
-import org.eclipse.ui.navigator.ICommonContentProvider;
+import org.eclipse.ui.PlatformUI;
/**
* Launches content provider for the common navigator of Target Explorer.
*/
-public class LaunchNavigatorContentProvider extends TreeContentProvider implements ICommonContentProvider, ITreeViewerListener, IEventListener {
+public class LaunchNavigatorContentProvider extends TreeContentProvider implements IEventListener {
+
+ /**
+ * Constructor.
+ */
+ public LaunchNavigatorContentProvider() {
+ super();
+ EventManager.getInstance().addEventListener(this, ChangeEvent.class);
+ }
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
@@ -56,8 +60,6 @@ public class LaunchNavigatorContentProvider extends TreeContentProvider implemen
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
super.inputChanged(viewer, oldInput, newInput);
- EventManager.getInstance().addEventListener(this, ChangeEvent.class);
- this.viewer.addTreeListener(this);
}
/*
@@ -68,7 +70,6 @@ public class LaunchNavigatorContentProvider extends TreeContentProvider implemen
public void dispose() {
super.dispose();
EventManager.getInstance().removeEventListener(this);
- this.viewer.removeTreeListener(this);
}
/*
@@ -109,44 +110,6 @@ public class LaunchNavigatorContentProvider extends TreeContentProvider implemen
return false;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.ICommonContentProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
- */
- @Override
- public void init(ICommonContentExtensionSite config) {
- Assert.isNotNull(config);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
- */
- @Override
- public void restoreState(IMemento aMemento) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IMementoAware#saveState(org.eclipse.ui.IMemento)
- */
- @Override
- public void saveState(IMemento aMemento) {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeViewerListener#treeCollapsed(org.eclipse.jface.viewers.TreeExpansionEvent)
- */
- @Override
- public void treeCollapsed(TreeExpansionEvent event) {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeViewerListener#treeExpanded(org.eclipse.jface.viewers.TreeExpansionEvent)
- */
- @Override
- public void treeExpanded(TreeExpansionEvent event) {
- }
-
/**
* If the root node of the tree is visible.
*
@@ -156,10 +119,19 @@ public class LaunchNavigatorContentProvider extends TreeContentProvider implemen
return true;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.runtime.interfaces.events.IEventListener#eventFired(java.util.EventObject)
+ */
@Override
public void eventFired(EventObject event) {
+ final TreeViewer viewer = this.viewer;
if (event.getSource() instanceof LaunchModel) {
- this.viewer.refresh(true);
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ viewer.refresh(true);
+ }
+ });
}
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/LaunchTreeContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/LaunchTreeContentProvider.java
index d808b0e..7922249 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/LaunchTreeContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/internal/viewer/LaunchTreeContentProvider.java
@@ -1,25 +1,32 @@
-/*******************************************************************************
- * 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.launch.ui.internal.viewer;
-
-
-/**
- * Launch tree content provider implementation.
- */
-public class LaunchTreeContentProvider extends LaunchNavigatorContentProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.launch.ui.controls.LaunchNavigatorContentProvider#isRootNodeVisible()
- */
- @Override
- protected boolean isRootNodeVisible() {
- return false;
- }
+/*******************************************************************************
+ * 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.launch.ui.internal.viewer;
+
+
+/**
+ * Launch tree content provider implementation.
+ */
+public class LaunchTreeContentProvider extends LaunchNavigatorContentProvider {
+
+ /**
+ * Constructor.
+ */
+ public LaunchTreeContentProvider() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.launch.ui.controls.LaunchNavigatorContentProvider#isRootNodeVisible()
+ */
+ @Override
+ protected boolean isRootNodeVisible() {
+ return false;
+ }
} \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.java
index ffbecc2..9159f4f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.java
@@ -116,4 +116,7 @@ public class Messages extends NLS {
public static String DeleteHandlerDelegate_question_title;
public static String DeleteHandlerDelegate_question_message;
+
+ public static String LaunchDialogHandler_dialog_title;
+ public static String LaunchDialogHandler_dialog_message;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.properties
index 927fd46..041cf98 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipse/tcf/te/launch/ui/nls/Messages.properties
@@ -50,3 +50,6 @@ LaunchEditorPage_title = Launches
DeleteHandlerDelegate_question_title = Question
DeleteHandlerDelegate_question_message = Are you sure you want to delete ''{0}''?
+
+LaunchDialogHandler_dialog_title = Choose launch mode
+LaunchDialogHandler_dialog_message = Please choose a launch mode for {0} launch ''{1}''.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/RemoteAppLaunchManagerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/RemoteAppLaunchManagerDelegate.java
index 8359fb6..9772277 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/RemoteAppLaunchManagerDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.core/src/org/eclipse/tcf/te/tcf/launch/core/lm/delegates/RemoteAppLaunchManagerDelegate.java
@@ -26,6 +26,7 @@ import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchContextLaunchAttribut
import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchSpecification;
import org.eclipse.tcf.te.launch.core.lm.interfaces.IReferencedProjectLaunchAttributes;
import org.eclipse.tcf.te.launch.core.nls.Messages;
+import org.eclipse.tcf.te.launch.core.persistence.DefaultPersistenceDelegate;
import org.eclipse.tcf.te.launch.core.persistence.filetransfer.FileTransfersPersistenceDelegate;
import org.eclipse.tcf.te.launch.core.persistence.launchcontext.LaunchContextsPersistenceDelegate;
import org.eclipse.tcf.te.launch.core.persistence.projects.ReferencedProjectItem;
@@ -235,4 +236,14 @@ public class RemoteAppLaunchManagerDelegate extends DefaultLaunchManagerDelegate
protected int getFullMatchRanking() {
return 1;
}
+
+ @Override
+ public String getDescription(ILaunchConfiguration config) {
+ String image = DefaultPersistenceDelegate.getAttribute(config, IRemoteAppLaunchAttributes.ATTR_PROCESS_IMAGE, (String)null);
+ String args = DefaultPersistenceDelegate.getAttribute(config, IRemoteAppLaunchAttributes.ATTR_PROCESS_ARGUMENTS, ""); //$NON-NLS-1$
+ if (image != null) {
+ return new Path(image).toPortableString() + " " + args; //$NON-NLS-1$
+ }
+ return ""; //$NON-NLS-1$
+ }
}
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 ce4723a..861b7a8 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
@@ -33,5 +33,8 @@ Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Export-Package: org.eclipse.tcf.te.tcf.launch.ui.activator;x-internal:=true,
org.eclipse.tcf.te.tcf.launch.ui.help,
+ org.eclipse.tcf.te.tcf.launch.ui.internal.adapters,
org.eclipse.tcf.te.tcf.launch.ui.nls;x-internal:=true,
- org.eclipse.tcf.te.tcf.launch.ui.remote.app
+ org.eclipse.tcf.te.tcf.launch.ui.remote.app,
+ org.eclipse.tcf.te.tcf.launch.ui.remote.app.filetransfer,
+ org.eclipse.tcf.te.tcf.launch.ui.remote.app.launchcontext
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/launches_root.gif
index 6b3911b..6b3911b 100644
--- 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/launches_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 01bf04f..db4d925 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
@@ -16,8 +16,7 @@
<launchConfigurationTypeImage
configTypeID="org.eclipse.tcf.te.tcf.launch.type.remote.app"
icon="icons/obj16/remote_app.gif"
- id="org.eclipse.tcf.te.tcf.launch.type.remote.app.image">
- </launchConfigurationTypeImage>
+ id="org.eclipse.tcf.te.tcf.launch.type.remote.app.image"/>
</extension>
<!-- Launch configuration tab group contributions -->
@@ -25,8 +24,7 @@
<launchConfigurationTabGroup
class="org.eclipse.tcf.te.tcf.launch.ui.remote.app.LaunchConfigurationTabGroup"
id="org.eclipse.tcf.te.tcf.launch.type.remote.app.tabgroup"
- type="org.eclipse.tcf.te.tcf.launch.type.remote.app">
- </launchConfigurationTabGroup>
+ type="org.eclipse.tcf.te.tcf.launch.type.remote.app"/>
</extension>
<!-- Launch shortcut contributions -->
@@ -109,20 +107,18 @@
<navigatorContent
id="org.eclipse.tcf.te.tcf.launch.ui.navigator.content"
name="%LauchTree.name"
- icon="icons/obj16/root.gif"
+ icon="icons/obj16/launches_root.gif"
activeByDefault="false"
contentProvider="org.eclipse.tcf.te.launch.ui.internal.viewer.LaunchNavigatorContentProvider"
labelProvider="org.eclipse.tcf.te.launch.ui.internal.viewer.LaunchTreeLabelProvider"
priority="normal">
<triggerPoints>
- <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
+ <instanceof value="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"/>
</triggerPoints>
<possibleChildren>
- <instanceof value="org.eclipse.tcf.te.launch.ui.model.LaunchNode"/>
+ <instanceof value="org.eclipse.tcf.te.launch.ui.model.LaunchNode"/>
</possibleChildren>
- <commonSorter
- class="org.eclipse.tcf.te.launch.ui.internal.viewer.LaunchTreeViewerSorter">
- </commonSorter>
+ <commonSorter class="org.eclipse.tcf.te.launch.ui.internal.viewer.LaunchTreeViewerSorter"/>
</navigatorContent>
</extension>
@@ -135,8 +131,7 @@
enablesFor="1"
afterSection="org.eclipse.tcf.te.launch.ui.launchcontext"
filter="org.eclipse.tcf.te.tcf.launch.ui.remote.app.RemoteAppFilter"
- tab="org.eclipse.tcf.te.launch.ui.propertytab.general">
- </propertySection>
+ tab="org.eclipse.tcf.te.launch.ui.propertytab.general"/>
</propertySections>
</extension>
@@ -148,8 +143,7 @@
enablesFor="1"
afterSection="org.eclipse.tcf.te.launch.ui.project.launchcontext"
filter="org.eclipse.tcf.te.tcf.launch.ui.remote.app.RemoteAppFilter"
- tab="org.eclipse.tcf.te.launch.ui.project.propertytab.general">
- </propertySection>
+ tab="org.eclipse.tcf.te.launch.ui.project.propertytab.general"/>
</propertySections>
</extension>
</plugin>