Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJared Burns2002-08-05 18:14:16 +0000
committerJared Burns2002-08-05 18:14:16 +0000
commitfe6dcd2945361ddd1cf8014753bf0d04f2a8ea1c (patch)
tree3c351c292e0c5a5b5c483a89c9f31adb64e5ca38 /org.eclipse.debug.ui
parent19dde7bbedba3a357349ab300ced8148b63fc4af (diff)
downloadeclipse.platform.debug-fe6dcd2945361ddd1cf8014753bf0d04f2a8ea1c.tar.gz
eclipse.platform.debug-fe6dcd2945361ddd1cf8014753bf0d04f2a8ea1c.tar.xz
eclipse.platform.debug-fe6dcd2945361ddd1cf8014753bf0d04f2a8ea1c.zip
*** keyword substitution change ***
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/.project46
-rw-r--r--org.eclipse.debug.ui/build.properties18
-rw-r--r--org.eclipse.debug.ui/doc/org_eclipse_debug_ui.html72
-rw-r--r--org.eclipse.debug.ui/doc/org_eclipse_debug_ui_debugActionGroups.html130
-rw-r--r--org.eclipse.debug.ui/doc/org_eclipse_debug_ui_debugModelPresentations.html126
-rw-r--r--org.eclipse.debug.ui/doc/org_eclipse_debug_ui_launchConfigurationTabGroups.html128
-rw-r--r--org.eclipse.debug.ui/doc/org_eclipse_debug_ui_launchConfigurationTypeImages.html102
-rw-r--r--org.eclipse.debug.ui/plugin.properties162
-rw-r--r--org.eclipse.debug.ui/plugin.xml1410
-rw-r--r--org.eclipse.debug.ui/scripts/exportplugin.xml70
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java102
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspectiveFactory.java118
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java482
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java54
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java1070
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPropertiesAdapterFactory.java164
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java584
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java104
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java72
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java396
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java646
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractListenerActionDelegate.java32
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveAllActionDelegate.java132
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java54
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties212
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ChangeVariableValueAction.java284
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ClearOutputAction.java88
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConsoleTerminateActionDelegate.java168
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CopyToClipboardActionDelegate.java400
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CopyVariablesToClipboardActionDelegate.java68
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugDropDownAction.java118
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugHistoryMenuAction.java180
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DisableBreakpointsAction.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DisconnectActionDelegate.java116
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/EnableBreakpointsAction.java492
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ExecutionAction.java92
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchDropDownAction.java674
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenBreakpointMarkerAction.java170
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java194
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchHistoryLaunchAction.java126
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java230
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllBreakpointsAction.java196
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllExpressionsAction.java58
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java292
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveBreakpointAction.java160
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveExpressionAction.java120
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ResumeActionDelegate.java120
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunDropDownAction.java114
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunHistoryMenuAction.java178
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ShowTypesAction.java162
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepActionDelegate.java100
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepIntoActionDelegate.java92
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepOverActionDelegate.java92
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepReturnActionDelegate.java92
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SuspendActionDelegate.java120
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TerminateActionDelegate.java120
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TerminateAllAction.java186
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TerminateAndRemoveActionDelegate.java150
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TextViewerAction.java112
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TextViewerGotoLineAction.java214
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleFilterAction.java166
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java6118
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationHistoryElement.java220
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java224
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java56
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties174
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java562
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/AbstractDebugEventHandler.java380
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/AbstractDebugEventHandlerView.java96
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugUIViewsMessages.java68
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugUIViewsMessages.properties74
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/IDebugExceptionHandler.java44
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java1492
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java1476
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java554
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugModelPresentation.java266
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java1284
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugView.java338
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationDialog.java182
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationTab.java404
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ISourcePresentation.java126
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IValueDetailListener.java50
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugAction.java66
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunAction.java68
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/package.html144
85 files changed, 13602 insertions, 13602 deletions
diff --git a/org.eclipse.debug.ui/.project b/org.eclipse.debug.ui/.project
index e9700f1d2..05c20cbbc 100644
--- a/org.eclipse.debug.ui/.project
+++ b/org.eclipse.debug.ui/.project
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.debug.ui</name>
- <comment></comment>
- <projects>
- <project>org.apache.xerces</project>
- <project>org.eclipse.core.boot</project>
- <project>org.eclipse.core.resources</project>
- <project>org.eclipse.core.runtime</project>
- <project>org.eclipse.debug.core</project>
- <project>org.eclipse.ui</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.debug.ui</name>
+ <comment></comment>
+ <projects>
+ <project>org.apache.xerces</project>
+ <project>org.eclipse.core.boot</project>
+ <project>org.eclipse.core.resources</project>
+ <project>org.eclipse.core.runtime</project>
+ <project>org.eclipse.debug.core</project>
+ <project>org.eclipse.ui</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.debug.ui/build.properties b/org.eclipse.debug.ui/build.properties
index f3399369c..8a1b9051f 100644
--- a/org.eclipse.debug.ui/build.properties
+++ b/org.eclipse.debug.ui/build.properties
@@ -1,9 +1,9 @@
-bin.includes = icons/,\
- .options,\
- plugin.xml,\
- plugin.properties,\
- *.jar,\
- about.html
-
-source.dtui.jar = ui/
-src.includes=about.html
+bin.includes = icons/,\
+ .options,\
+ plugin.xml,\
+ plugin.properties,\
+ *.jar,\
+ about.html
+
+source.dtui.jar = ui/
+src.includes=about.html
diff --git a/org.eclipse.debug.ui/doc/org_eclipse_debug_ui.html b/org.eclipse.debug.ui/doc/org_eclipse_debug_ui.html
index 6085ed2eb..064a39477 100644
--- a/org.eclipse.debug.ui/doc/org_eclipse_debug_ui.html
+++ b/org.eclipse.debug.ui/doc/org_eclipse_debug_ui.html
@@ -1,36 +1,36 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>README Debug User Interface Extension Points</title>
-</head>
-
-<body link="#0000FF" vlink="#800080">
-
-<h1 align="center">Debug Platform User-Interface</h1>
-
-<p>The platform debug UI plug-in, <b>org.eclipse.debug.ui</b>, implements a
-debug user-interface, allowing the user to view and manipulate debug targets, processes,
-threads, stack frames and variables. It provides standard debug actions such as
-stepping, terminating, etc. <br>
-</p>
-
-<hr>
-
-<h1>Extension Points</h1>
-
-<p>The following extension points are used to support and extend the debug UI.:
-
-<ul>
- <li><a href="org_eclipse_debug_ui_debugActionGroups.html">org.eclipse.debug.ui.debugActionGroups</a></li>
- <li><a href="org_eclipse_debug_ui_debugModelPresentations.html">org.eclipse.debug.ui.debugModelPresentations</a></li>
- <li><a href="org_eclipse_debug_ui_launchConfigurationTabGroups.html">org.eclipse.debug.ui.launchConfigurationTabGroups</a></li>
- <li><a href="org_eclipse_debug_ui_launchConfigurationTypeImages.html">org.eclipse.debug.ui.launchConfigurationTypeImages</a></li>
- <li><a href="org_eclipse_debug_ui_launchShortcuts.html">org.eclipse.debug.ui.launchShortcuts</a></li>
-</ul>
-
-<p><a href="hglegal.htm"><img src="ngibmcpy.gif" alt="Copyright IBM Corp. 2000, 2001. All Rights Reserved."
-border="0" width="195" height="12"></a></p>
-</body>
-</html>
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>README Debug User Interface Extension Points</title>
+</head>
+
+<body link="#0000FF" vlink="#800080">
+
+<h1 align="center">Debug Platform User-Interface</h1>
+
+<p>The platform debug UI plug-in, <b>org.eclipse.debug.ui</b>, implements a
+debug user-interface, allowing the user to view and manipulate debug targets, processes,
+threads, stack frames and variables. It provides standard debug actions such as
+stepping, terminating, etc. <br>
+</p>
+
+<hr>
+
+<h1>Extension Points</h1>
+
+<p>The following extension points are used to support and extend the debug UI.:
+
+<ul>
+ <li><a href="org_eclipse_debug_ui_debugActionGroups.html">org.eclipse.debug.ui.debugActionGroups</a></li>
+ <li><a href="org_eclipse_debug_ui_debugModelPresentations.html">org.eclipse.debug.ui.debugModelPresentations</a></li>
+ <li><a href="org_eclipse_debug_ui_launchConfigurationTabGroups.html">org.eclipse.debug.ui.launchConfigurationTabGroups</a></li>
+ <li><a href="org_eclipse_debug_ui_launchConfigurationTypeImages.html">org.eclipse.debug.ui.launchConfigurationTypeImages</a></li>
+ <li><a href="org_eclipse_debug_ui_launchShortcuts.html">org.eclipse.debug.ui.launchShortcuts</a></li>
+</ul>
+
+<p><a href="hglegal.htm"><img src="ngibmcpy.gif" alt="Copyright IBM Corp. 2000, 2001. All Rights Reserved."
+border="0" width="195" height="12"></a></p>
+</body>
+</html>
diff --git a/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_debugActionGroups.html b/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_debugActionGroups.html
index 876b4291d..17670ea0f 100644
--- a/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_debugActionGroups.html
+++ b/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_debugActionGroups.html
@@ -1,65 +1,65 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>README Debug Action Groups</title>
-</head>
-
-<body link="#0000FF" vlink="#800080">
-
-<h1 align="center">Debug Action Groups</h1>
-
-<p><b><i>Identifier: </i></b>org.eclipse.debug.ui.debugActionGroups </p>
-
-<p><b><i>Description: </i></b>This extension point provides a mechanism to specify the visibility of action
-groups. Any view that returns an instance of IDebugView when queried with #getAdapter(IDebugView.class) will
- have its context menu and toolbar affected by the visibility of the action groups.
-
-<p><b><i>Configuration Markup:</i></b> </p>
-
-<pre>
-<tt>&nbsp;&nbsp; &lt;!ELEMENT debugActionGroup (action)*</tt>&gt;
-<tt>&nbsp;&nbsp; &lt;!ATTLIST debugActionGroup</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; visible&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #IMPLIED</tt>&gt;
-</pre>
-
-<ul>
- <li><code>id</code> - specifies a unique identifier for this debug action group.</li>
- <li><code>name</code> - a translatable name that will be used for the debug action group label.</li>
- <li><code>visible</code> - an optional attribute indicating the visibility of the group. If omitted the group is set to be visible</li>
-</ul>
-
-<pre>
-<tt>&nbsp;&nbsp; &lt;!ELEMENT action</tt>&gt;
-<tt>&nbsp;&nbsp; &lt;!ATTLIST action</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>&gt;
-</pre>
-
-<ul>
- <li><code>id</code> - the unique identifier of an action that will be added to the debug action group</li>
-</ul>
-
-<p><b><i>Examples:</i></b> </p>
-
-<p>The following is an example of a debug action group extension point. In all
-debug views (views that return an instance of IDebugView when queried with #getAdapter(IDebugView.class)), the actions listed will not be visible in the toolbar or context menu of the view. </p>
-
-<pre>
-&lt;extension point = "org.eclipse.debug.ui.debugActionGroups"&gt;
- &lt;debugActionGroup
- id = "org.eclipse.jdt.debug.ui.javaDebugActionGroup"
- visible="false"
- name="Java Debug"&gt;
- &lt;action id="org.eclipse.jdt.ui.actions.RunToLineToolbar"/&gt;
- &lt;action id="org.eclipse.jdt.ui.breakpointViewActions.ShowQualified"/&gt;
- &lt;/debugActionGroup&gt;
-&lt;/extension&gt;
-</pre>
-
-<p><a href="hglegal.htm"><img src="ngibmcpy.gif" alt="Copyright IBM Corp. 2000, 2001. All Rights Reserved."
-border="0" width="195" height="12"></a></p>
-</body>
-</html>
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>README Debug Action Groups</title>
+</head>
+
+<body link="#0000FF" vlink="#800080">
+
+<h1 align="center">Debug Action Groups</h1>
+
+<p><b><i>Identifier: </i></b>org.eclipse.debug.ui.debugActionGroups </p>
+
+<p><b><i>Description: </i></b>This extension point provides a mechanism to specify the visibility of action
+groups. Any view that returns an instance of IDebugView when queried with #getAdapter(IDebugView.class) will
+ have its context menu and toolbar affected by the visibility of the action groups.
+
+<p><b><i>Configuration Markup:</i></b> </p>
+
+<pre>
+<tt>&nbsp;&nbsp; &lt;!ELEMENT debugActionGroup (action)*</tt>&gt;
+<tt>&nbsp;&nbsp; &lt;!ATTLIST debugActionGroup</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; visible&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #IMPLIED</tt>&gt;
+</pre>
+
+<ul>
+ <li><code>id</code> - specifies a unique identifier for this debug action group.</li>
+ <li><code>name</code> - a translatable name that will be used for the debug action group label.</li>
+ <li><code>visible</code> - an optional attribute indicating the visibility of the group. If omitted the group is set to be visible</li>
+</ul>
+
+<pre>
+<tt>&nbsp;&nbsp; &lt;!ELEMENT action</tt>&gt;
+<tt>&nbsp;&nbsp; &lt;!ATTLIST action</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>&gt;
+</pre>
+
+<ul>
+ <li><code>id</code> - the unique identifier of an action that will be added to the debug action group</li>
+</ul>
+
+<p><b><i>Examples:</i></b> </p>
+
+<p>The following is an example of a debug action group extension point. In all
+debug views (views that return an instance of IDebugView when queried with #getAdapter(IDebugView.class)), the actions listed will not be visible in the toolbar or context menu of the view. </p>
+
+<pre>
+&lt;extension point = "org.eclipse.debug.ui.debugActionGroups"&gt;
+ &lt;debugActionGroup
+ id = "org.eclipse.jdt.debug.ui.javaDebugActionGroup"
+ visible="false"
+ name="Java Debug"&gt;
+ &lt;action id="org.eclipse.jdt.ui.actions.RunToLineToolbar"/&gt;
+ &lt;action id="org.eclipse.jdt.ui.breakpointViewActions.ShowQualified"/&gt;
+ &lt;/debugActionGroup&gt;
+&lt;/extension&gt;
+</pre>
+
+<p><a href="hglegal.htm"><img src="ngibmcpy.gif" alt="Copyright IBM Corp. 2000, 2001. All Rights Reserved."
+border="0" width="195" height="12"></a></p>
+</body>
+</html>
diff --git a/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_debugModelPresentations.html b/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_debugModelPresentations.html
index 8690dbdd4..2d5e86a09 100644
--- a/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_debugModelPresentations.html
+++ b/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_debugModelPresentations.html
@@ -1,63 +1,63 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>README Viewer Label Provider Extension Points</title>
-</head>
-
-<body link="#0000FF" vlink="#800080">
-
-<h1 align="center">Debug Model Presentation</h1>
-
-<p><b><i>Identifier: </i></b>org.eclipse.debug.ui.debugModelPresentations</p>
-
-<p><b><i>Description: </i></b>This extension point allows tools to handle the presentation
-aspects of a debug model. A debug model presentation is responsible for providing labels,
-images and editors for elements in a specific debug model.</p>
-
-<p><b><i>Configuration Markup:</i></b> </p>
-
-<p><tt>&nbsp;&nbsp; &lt;!ATTLIST debugModelPresentation</tt> <br>
-<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp; &nbsp;&nbsp;CDATA #REQUIRED</tt> <tt>
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id &nbsp; &nbsp; &nbsp;&nbsp; CDATA #REQUIRED</tt> <tt>
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; detailsViewerConfiguration &nbsp; &nbsp; &nbsp;&nbsp; CDATA #IMPLIED</tt>&gt;
-<ul>
- <li><b>class</b> - fully qualifed name of a Java class that implements the <b>
- org.eclipse.debug.ui.IDebugModelPresentation</b></li>
- <li><strong>id</strong> - the identifier of the debug model this presentation is
- responsible for</li>
- <li><strong>detailsViewerConfiguration</strong> optionally specifies the fully qualified name of the Java class
- that is an instance of <b>org.eclipse.jface.text.source.SourceViewerConfiguration</b>.
- When specified, the source viewer configuration will be used in the "details" area of the
- variables and expressions view when displaying the details of an element from the
- debug model associated with this debug model presentation. When unspecified,
- a default configuration is used.</li>
-</ul>
-
-<p><b><i>Examples:</i></b> </p>
-
-<p>The following is an example of a view filter extension point: </p>
-
-<pre><tt>&nbsp;&nbsp; &lt;extension</tt>
-<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; point = &quot;org.eclipse.debug.ui.debugModelPresentations&quot;&gt;</tt>
-<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;debugModelPresentation</tt>
-<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class = &quot;com.example.JavaModelPresentation&quot;&gt;</tt>
-<tt> id = &quot;com.example.JavaDebugModel&quot;&gt;
- &lt;/debugModelPresentation&gt;</tt>
-<tt>&nbsp;&nbsp; &lt;/extension&gt;</tt></pre>
-
-<p>In the example above, the class <tt>com.example.JavaModelPresentation</tt> will be used
-to render and present debug elements originating from the debug model identified by <b>
-com.example.JavaDebugModel</b>.</p>
-
-<p><b><i>API Information: </i></b>Value of the action attribute <b>class</b> must be a
-fully qualified class name of a Java class that implements <b>
-org.eclipse.debug.ui.IDebugModelPresentation.</b></p>
-
-<p><a href="hglegal.htm"><img src="ngibmcpy.gif" alt="Copyright IBM Corp. 2000, 2001. All Rights Reserved."
-border="0" width="195" height="12"></a></p>
-</body>
-</html>
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>README Viewer Label Provider Extension Points</title>
+</head>
+
+<body link="#0000FF" vlink="#800080">
+
+<h1 align="center">Debug Model Presentation</h1>
+
+<p><b><i>Identifier: </i></b>org.eclipse.debug.ui.debugModelPresentations</p>
+
+<p><b><i>Description: </i></b>This extension point allows tools to handle the presentation
+aspects of a debug model. A debug model presentation is responsible for providing labels,
+images and editors for elements in a specific debug model.</p>
+
+<p><b><i>Configuration Markup:</i></b> </p>
+
+<p><tt>&nbsp;&nbsp; &lt;!ATTLIST debugModelPresentation</tt> <br>
+<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp; &nbsp;&nbsp;CDATA #REQUIRED</tt> <tt>
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id &nbsp; &nbsp; &nbsp;&nbsp; CDATA #REQUIRED</tt> <tt>
+<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; detailsViewerConfiguration &nbsp; &nbsp; &nbsp;&nbsp; CDATA #IMPLIED</tt>&gt;
+<ul>
+ <li><b>class</b> - fully qualifed name of a Java class that implements the <b>
+ org.eclipse.debug.ui.IDebugModelPresentation</b></li>
+ <li><strong>id</strong> - the identifier of the debug model this presentation is
+ responsible for</li>
+ <li><strong>detailsViewerConfiguration</strong> optionally specifies the fully qualified name of the Java class
+ that is an instance of <b>org.eclipse.jface.text.source.SourceViewerConfiguration</b>.
+ When specified, the source viewer configuration will be used in the "details" area of the
+ variables and expressions view when displaying the details of an element from the
+ debug model associated with this debug model presentation. When unspecified,
+ a default configuration is used.</li>
+</ul>
+
+<p><b><i>Examples:</i></b> </p>
+
+<p>The following is an example of a view filter extension point: </p>
+
+<pre><tt>&nbsp;&nbsp; &lt;extension</tt>
+<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; point = &quot;org.eclipse.debug.ui.debugModelPresentations&quot;&gt;</tt>
+<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;debugModelPresentation</tt>
+<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class = &quot;com.example.JavaModelPresentation&quot;&gt;</tt>
+<tt> id = &quot;com.example.JavaDebugModel&quot;&gt;
+ &lt;/debugModelPresentation&gt;</tt>
+<tt>&nbsp;&nbsp; &lt;/extension&gt;</tt></pre>
+
+<p>In the example above, the class <tt>com.example.JavaModelPresentation</tt> will be used
+to render and present debug elements originating from the debug model identified by <b>
+com.example.JavaDebugModel</b>.</p>
+
+<p><b><i>API Information: </i></b>Value of the action attribute <b>class</b> must be a
+fully qualified class name of a Java class that implements <b>
+org.eclipse.debug.ui.IDebugModelPresentation.</b></p>
+
+<p><a href="hglegal.htm"><img src="ngibmcpy.gif" alt="Copyright IBM Corp. 2000, 2001. All Rights Reserved."
+border="0" width="195" height="12"></a></p>
+</body>
+</html>
diff --git a/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_launchConfigurationTabGroups.html b/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_launchConfigurationTabGroups.html
index 720e091db..05c37e2ba 100644
--- a/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_launchConfigurationTabGroups.html
+++ b/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_launchConfigurationTabGroups.html
@@ -1,64 +1,64 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>README Launch Configuration Tab Groups Extension Point</title>
-</head>
-
-<body link="#0000FF" vlink="#800080">
-
-<h1 align="center">Launch Configuration Tab Groups</h1>
-
-<p><b><i>Identifier: </i></b>org.eclipse.debug.ui.launchConfigurationTabGroups</p>
-
-<p><b><i>Description: </i></b>This extension point provides a
-mechanism for contributing a group of tabs to the launch configuration dialog
-for a type of launch configuration.</p>
-
-<p><b><i>Configuration Markup:</i></b> </p>
-
-<pre>
-<tt>&nbsp;&nbsp; &lt;!ELEMENT launchConfigurationTabGroup</tt>&gt;
-<tt>&nbsp;&nbsp; &lt;!ATTLIST launchConfigurationTabGroup</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>
-</pre>
-
-<ul>
-<li><code>id</code> specifies a unique identifier for this launch configuration
- tab group.</li>
-<li><code>type</code> specifies launch configuration type that this tab
- group is applicable to (corresponds to the id of a launch configuration type
- extension).</li>
-<li><code>class</code> specifies a fully qualified name of a Java class
- that implements <code>ILaunchConfigurationTabGroup</code>.</li>
-</ul>
-
-<p><b><i>Examples:</i></b> </p>
-
-<p>The following is an example of a launch configuration tab group extension point: </p>
-
-<pre>
-&lt;extension point="org.eclipse.debug.ui.launchConfigurationTabGroups"&gt;
- &lt;launchConfigurationTabGroup
- id="com.example.ExampleTabGroup"
- type="com.example.ExampleLaunchConfigurationTypeIdentifier"
- class="com.example.ExampleLaunchConfigurationTabGroupClass"&gt;
- &lt;/launchConfigurationTabGroup&gt;
-&lt;/extension&gt;
-</pre>
-<p>In the above example, the contributed tab group will be shown in the launch configuration dialog for the launch configuration type
-with identifier <code>com.example.ExampleLaunchConfigurationTypeIdentifier</code>.
-</p>
-
-<p><b><i>API Information: </i></b>Value of the attribute <b>class</b> must be a fully
-qualified name of a Java class that implements the interface <b>
-org.eclipse.debug.ui.ILaunchConfigurationTabGroup</b>.
-</p>
-
-<p><a href="hglegal.htm"><img src="ngibmcpy.gif" alt="Copyright IBM Corp. 2000, 2001. All Rights Reserved."
-border="0" width="195" height="12"></a></p>
-</body>
-</html>
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>README Launch Configuration Tab Groups Extension Point</title>
+</head>
+
+<body link="#0000FF" vlink="#800080">
+
+<h1 align="center">Launch Configuration Tab Groups</h1>
+
+<p><b><i>Identifier: </i></b>org.eclipse.debug.ui.launchConfigurationTabGroups</p>
+
+<p><b><i>Description: </i></b>This extension point provides a
+mechanism for contributing a group of tabs to the launch configuration dialog
+for a type of launch configuration.</p>
+
+<p><b><i>Configuration Markup:</i></b> </p>
+
+<pre>
+<tt>&nbsp;&nbsp; &lt;!ELEMENT launchConfigurationTabGroup</tt>&gt;
+<tt>&nbsp;&nbsp; &lt;!ATTLIST launchConfigurationTabGroup</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>
+</pre>
+
+<ul>
+<li><code>id</code> specifies a unique identifier for this launch configuration
+ tab group.</li>
+<li><code>type</code> specifies launch configuration type that this tab
+ group is applicable to (corresponds to the id of a launch configuration type
+ extension).</li>
+<li><code>class</code> specifies a fully qualified name of a Java class
+ that implements <code>ILaunchConfigurationTabGroup</code>.</li>
+</ul>
+
+<p><b><i>Examples:</i></b> </p>
+
+<p>The following is an example of a launch configuration tab group extension point: </p>
+
+<pre>
+&lt;extension point="org.eclipse.debug.ui.launchConfigurationTabGroups"&gt;
+ &lt;launchConfigurationTabGroup
+ id="com.example.ExampleTabGroup"
+ type="com.example.ExampleLaunchConfigurationTypeIdentifier"
+ class="com.example.ExampleLaunchConfigurationTabGroupClass"&gt;
+ &lt;/launchConfigurationTabGroup&gt;
+&lt;/extension&gt;
+</pre>
+<p>In the above example, the contributed tab group will be shown in the launch configuration dialog for the launch configuration type
+with identifier <code>com.example.ExampleLaunchConfigurationTypeIdentifier</code>.
+</p>
+
+<p><b><i>API Information: </i></b>Value of the attribute <b>class</b> must be a fully
+qualified name of a Java class that implements the interface <b>
+org.eclipse.debug.ui.ILaunchConfigurationTabGroup</b>.
+</p>
+
+<p><a href="hglegal.htm"><img src="ngibmcpy.gif" alt="Copyright IBM Corp. 2000, 2001. All Rights Reserved."
+border="0" width="195" height="12"></a></p>
+</body>
+</html>
diff --git a/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_launchConfigurationTypeImages.html b/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_launchConfigurationTypeImages.html
index ef0166731..036e29ef9 100644
--- a/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_launchConfigurationTypeImages.html
+++ b/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_launchConfigurationTypeImages.html
@@ -1,51 +1,51 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>README Launch Configuration Type Images</title>
-</head>
-
-<body link="#0000FF" vlink="#800080">
-
-<h1 align="center">Launch Configuration Type Images</h1>
-
-<p><b><i>Identifier: </i></b>org.eclipse.debug.ui.launchConfigurationTypeImages </p>
-
-<p><b><i>Description: </i></b>This extension point provides a way to associate an image with
-a launch configuration type.</p>
-
-<p><b><i>Configuration Markup:</i></b> </p>
-
-<pre>
-<tt>&nbsp;&nbsp; &lt;!ELEMENT launchConfigurationTypeImage</tt>&gt;
-<tt>&nbsp;&nbsp; &lt;!ATTLIST launchConfigurationTypeImage</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; configTypeID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>
-<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>&gt;
-</pre>
-
-<ul>
- <li><code>id</code> specifies a unique identifier for this launch configuration type image.</li>
- <li><code>configTypeID</code> specifies the fully qualified ID of a launch configuration type.</li>
- <li><code>icon</code> specifies the plugin-relative path of an image file.</li>
-</ul>
-
-<p><b><i>Examples:</i></b> </p>
-
-<p>The following is an example of a launch configuration type image extension point: </p>
-
-<pre>
-&lt;extension point="org.eclipse.debug.ui.launchConfigurationTypeImages"&gt;
- &lt;launchConfigurationTypeImage
- id="com.example.FirstLaunchConfigurationTypeImage"
- configTypeID="com.example.FirstLaunchConfigurationType"
- icon="icons/FirstLaunchConfigurationType.gif"&gt;
- &lt;/launchConfigurationTypeImage&gt;
-&lt;/extension&gt;
-</pre>
-
-<p><a href="hglegal.htm"><img src="ngibmcpy.gif" alt="Copyright IBM Corp. 2000, 2001. All Rights Reserved."
-border="0" width="195" height="12"></a></p>
-</body>
-</html>
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>README Launch Configuration Type Images</title>
+</head>
+
+<body link="#0000FF" vlink="#800080">
+
+<h1 align="center">Launch Configuration Type Images</h1>
+
+<p><b><i>Identifier: </i></b>org.eclipse.debug.ui.launchConfigurationTypeImages </p>
+
+<p><b><i>Description: </i></b>This extension point provides a way to associate an image with
+a launch configuration type.</p>
+
+<p><b><i>Configuration Markup:</i></b> </p>
+
+<pre>
+<tt>&nbsp;&nbsp; &lt;!ELEMENT launchConfigurationTypeImage</tt>&gt;
+<tt>&nbsp;&nbsp; &lt;!ATTLIST launchConfigurationTypeImage</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; configTypeID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>
+<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>&gt;
+</pre>
+
+<ul>
+ <li><code>id</code> specifies a unique identifier for this launch configuration type image.</li>
+ <li><code>configTypeID</code> specifies the fully qualified ID of a launch configuration type.</li>
+ <li><code>icon</code> specifies the plugin-relative path of an image file.</li>
+</ul>
+
+<p><b><i>Examples:</i></b> </p>
+
+<p>The following is an example of a launch configuration type image extension point: </p>
+
+<pre>
+&lt;extension point="org.eclipse.debug.ui.launchConfigurationTypeImages"&gt;
+ &lt;launchConfigurationTypeImage
+ id="com.example.FirstLaunchConfigurationTypeImage"
+ configTypeID="com.example.FirstLaunchConfigurationType"
+ icon="icons/FirstLaunchConfigurationType.gif"&gt;
+ &lt;/launchConfigurationTypeImage&gt;
+&lt;/extension&gt;
+</pre>
+
+<p><a href="hglegal.htm"><img src="ngibmcpy.gif" alt="Copyright IBM Corp. 2000, 2001. All Rights Reserved."
+border="0" width="195" height="12"></a></p>
+</body>
+</html>
diff --git a/org.eclipse.debug.ui/plugin.properties b/org.eclipse.debug.ui/plugin.properties
index 7381b4302..9668947f9 100644
--- a/org.eclipse.debug.ui/plugin.properties
+++ b/org.eclipse.debug.ui/plugin.properties
@@ -1,82 +1,82 @@
-######################################################################
-# Copyright (c) 2000, 2002 IBM Corp. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v0.5
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v05.html
-#
-# Contributors:
-# IBM Corporation - Initial implementation
-######################################################################
-
-pluginName=Debug UI
-
-BreakpointsView.name=Breakpoints
-commonTabName=&Common
-ConsolePreferencePage.name=Console
-ConsoleView.name=Console
-CopyToClipboardAction.label=&Copy Stack
-CopyVariablesToClipboardAction.label=Copy &Variables
-DebugActionGroupsExtensionName= Debug Action Groups
-DebugActionGroupsPreferencePage.name=Debug Action Groups
-DebugActionSet.label=Debug
-DebugConfigurations.label=D&ebug...
-DebugDropDownAction.label=Debug
-DebugHistoryMenuAction.label=Debug &History
-DebugLastAction.label=&Debug Last Launched@F11
-DebugModelPresentationExtensionName=Debug Model Presentation
-DebugPerspective.name=Debug
-DebugPreferencePage.name=Debug
-DebugView.name=Debug
-DebugViewsCategory.name=Debug
-DebugWithConfigurationAction.label=Debug &As
-DisableBreakpointsAction.label=&Disable
-DisconnectAction.label=Disconn&ect
-DisconnectAction.tooltip=Disconnect
-EnableBreakpointsAction.label=&Enable
-ExpressionView.name=Expressions
-LaunchActionSet.label=Launch
-LaunchConfigurationTabGroupExtensionName=Launch Configuration Tab Group
-LaunchShortcutsName=Launch Shortcut
-LaunchConfigurationTypeImageExtensionName=Launch Configuration Type Image
-LaunchConfigurationTypePropertyPage.name=Launch Configuration Type
-LaunchConfigurationTypesPreferencePage.name=Launch Configuration Types
-LauncherPropertyPage.name=Launcher
-LaunchHistoryPreferencePage.name=Launch History
-OpenDebugConfigurations.label=De&bug...
-OpenRunConfigurations.label=Ru&n...
-ProcessesView.name=Processes
-RelaunchAction.label=Re&launch
-RemoveAction.label=Rem&ove
-RemoveAllAction.label=Remove A&ll
-RemoveAllBreakpointsAction.tooltip=Remove All Breakpoints
-RemoveAllExpressionsAction.tooltip=Remove All Expressions
-RemoveAllTerminatedAction.label=Remove &All Terminated
-RemoveAllTerminatedAction.tooltip=Remove All Terminated Launches
-RemoveBreakpointAction.tooltip=Remove Selected Breakpoints
-RemoveExpressionAction.tooltip=Remove Selected Expressions
-ResumeAction.label=Resu&me@F8
-ResumeAction.tooltip=Resume
-RunDropDownAction.label=&Run
-RunMenu.label=&Run
-RunLastAction.label=&Run Last Launched@Ctrl+F11
-RunConfigurations.label=R&un Configurations...
-RunHistoryMenuAction.label=R&un History
-RunWithConfigurationAction.label=Run A&s
-SelectAll.label=Select &All
-StepIntoAction.label=Step &Into@F5
-StepIntoAction.tooltip=Step Into
-StepOverAction.label=Step &Over@F6
-StepOverAction.tooltip=Step Over
-StepReturnAction.label=Step Ret&urn@F7
-StepReturnAction.tooltip=Step Return
-SuspendAction.label=&Suspend
-SuspendAction.tooltip=Suspend
-TerminateAction.label=&Terminate
-TerminateAction.tooltip=Terminate
-TerminateAllAction.label=Termi&nate All
-TerminateAndRemoveAction.label=Terminate and Remo&ve
-VariablesView.name=Variables
-VariableViewsPreferencePage.name=Variable Views
-
+######################################################################
+# Copyright (c) 2000, 2002 IBM Corp. and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Common Public License v0.5
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/cpl-v05.html
+#
+# Contributors:
+# IBM Corporation - Initial implementation
+######################################################################
+
+pluginName=Debug UI
+
+BreakpointsView.name=Breakpoints
+commonTabName=&Common
+ConsolePreferencePage.name=Console
+ConsoleView.name=Console
+CopyToClipboardAction.label=&Copy Stack
+CopyVariablesToClipboardAction.label=Copy &Variables
+DebugActionGroupsExtensionName= Debug Action Groups
+DebugActionGroupsPreferencePage.name=Debug Action Groups
+DebugActionSet.label=Debug
+DebugConfigurations.label=D&ebug...
+DebugDropDownAction.label=Debug
+DebugHistoryMenuAction.label=Debug &History
+DebugLastAction.label=&Debug Last Launched@F11
+DebugModelPresentationExtensionName=Debug Model Presentation
+DebugPerspective.name=Debug
+DebugPreferencePage.name=Debug
+DebugView.name=Debug
+DebugViewsCategory.name=Debug
+DebugWithConfigurationAction.label=Debug &As
+DisableBreakpointsAction.label=&Disable
+DisconnectAction.label=Disconn&ect
+DisconnectAction.tooltip=Disconnect
+EnableBreakpointsAction.label=&Enable
+ExpressionView.name=Expressions
+LaunchActionSet.label=Launch
+LaunchConfigurationTabGroupExtensionName=Launch Configuration Tab Group
+LaunchShortcutsName=Launch Shortcut
+LaunchConfigurationTypeImageExtensionName=Launch Configuration Type Image
+LaunchConfigurationTypePropertyPage.name=Launch Configuration Type
+LaunchConfigurationTypesPreferencePage.name=Launch Configuration Types
+LauncherPropertyPage.name=Launcher
+LaunchHistoryPreferencePage.name=Launch History
+OpenDebugConfigurations.label=De&bug...
+OpenRunConfigurations.label=Ru&n...
+ProcessesView.name=Processes
+RelaunchAction.label=Re&launch
+RemoveAction.label=Rem&ove
+RemoveAllAction.label=Remove A&ll
+RemoveAllBreakpointsAction.tooltip=Remove All Breakpoints
+RemoveAllExpressionsAction.tooltip=Remove All Expressions
+RemoveAllTerminatedAction.label=Remove &All Terminated
+RemoveAllTerminatedAction.tooltip=Remove All Terminated Launches
+RemoveBreakpointAction.tooltip=Remove Selected Breakpoints
+RemoveExpressionAction.tooltip=Remove Selected Expressions
+ResumeAction.label=Resu&me@F8
+ResumeAction.tooltip=Resume
+RunDropDownAction.label=&Run
+RunMenu.label=&Run
+RunLastAction.label=&Run Last Launched@Ctrl+F11
+RunConfigurations.label=R&un Configurations...
+RunHistoryMenuAction.label=R&un History
+RunWithConfigurationAction.label=Run A&s
+SelectAll.label=Select &All
+StepIntoAction.label=Step &Into@F5
+StepIntoAction.tooltip=Step Into
+StepOverAction.label=Step &Over@F6
+StepOverAction.tooltip=Step Over
+StepReturnAction.label=Step Ret&urn@F7
+StepReturnAction.tooltip=Step Return
+SuspendAction.label=&Suspend
+SuspendAction.tooltip=Suspend
+TerminateAction.label=&Terminate
+TerminateAction.tooltip=Terminate
+TerminateAllAction.label=Termi&nate All
+TerminateAndRemoveAction.label=Terminate and Remo&ve
+VariablesView.name=Variables
+VariableViewsPreferencePage.name=Variable Views
+
providerName=Eclipse.org \ No newline at end of file
diff --git a/org.eclipse.debug.ui/plugin.xml b/org.eclipse.debug.ui/plugin.xml
index 9bf65bbf0..4459f65f0 100644
--- a/org.eclipse.debug.ui/plugin.xml
+++ b/org.eclipse.debug.ui/plugin.xml
@@ -1,705 +1,705 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- File written by PDE 1.0 -->
-<plugin
- id="org.eclipse.debug.ui"
- name="%pluginName"
- version="2.0.0"
- provider-name="%providerName"
- class="org.eclipse.debug.internal.ui.DebugUIPlugin">
-<!-- Required plugins -->
-<requires>
- <import plugin="org.apache.xerces"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.debug.core"/>
-</requires>
-
-<!-- Runtime -->
-<runtime>
- <library name="dtui.jar">
- <export name="*"/>
- </library>
-</runtime>
-
-<!-- Extension points -->
-<extension-point id="debugModelPresentations" name="%DebugModelPresentationExtensionName"/>
-<extension-point id="launchShortcuts" name="%LaunchShortcutsName"/>
-<extension-point id="launchConfigurationTabGroups" name="%LaunchConfigurationTabGroupExtensionName"/>
-<extension-point id="launchConfigurationTypeImages" name="%LaunchConfigurationTypeImageExtensionName"/>
-<extension-point id="debugActionGroups" name="%DebugActionGroupsExtensionName"/>
-
-<!-- Extensions -->
-<extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="%DebugPerspective.name"
- icon="icons/full/cview16/debug_persp.gif"
- class="org.eclipse.debug.internal.ui.DebugPerspectiveFactory"
- id="org.eclipse.debug.ui.DebugPerspective">
- </perspective>
-</extension>
-<extension
- point="org.eclipse.ui.views">
- <category
- name="%DebugViewsCategory.name"
- id="org.eclipse.debug.ui">
- </category>
- <view
- name="%DebugView.name"
- icon="icons/full/cview16/debug_view.gif"
- category="org.eclipse.debug.ui"
- class="org.eclipse.debug.internal.ui.views.launch.LaunchView"
- id="org.eclipse.debug.ui.DebugView">
- </view>
- <view
- name="%BreakpointsView.name"
- icon="icons/full/cview16/breakpoint_view.gif"
- category="org.eclipse.debug.ui"
- class="org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView"
- id="org.eclipse.debug.ui.BreakpointView">
- </view>
- <view
- name="%VariablesView.name"
- icon="icons/full/cview16/variable_view.gif"
- category="org.eclipse.debug.ui"
- class="org.eclipse.debug.internal.ui.views.variables.VariablesView"
- id="org.eclipse.debug.ui.VariableView">
- </view>
- <view
- name="%ExpressionView.name"
- icon="icons/full/cview16/watchlist_view.gif"
- category="org.eclipse.debug.ui"
- class="org.eclipse.debug.internal.ui.views.expression.ExpressionView"
- id="org.eclipse.debug.ui.ExpressionView">
- </view>
- <view
- name="%ConsoleView.name"
- icon="icons/full/cview16/console_view.gif"
- category="org.eclipse.debug.ui"
- class="org.eclipse.debug.internal.ui.views.console.ConsoleView"
- id="org.eclipse.debug.ui.ConsoleView">
- </view>
-</extension>
-<extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%DebugPreferencePage.name"
- class="org.eclipse.debug.internal.ui.preferences.DebugPreferencePage"
- id="org.eclipse.debug.ui.DebugPreferencePage">
- </page>
- <page
- name="%ConsolePreferencePage.name"
- category="org.eclipse.debug.ui.DebugPreferencePage"
- class="org.eclipse.debug.internal.ui.preferences.ConsolePreferencePage"
- id="org.eclipse.debug.ui.ConsolePreferencePage">
- </page>
- <page
- name="%VariableViewsPreferencePage.name"
- category="org.eclipse.debug.ui.DebugPreferencePage"
- class="org.eclipse.debug.internal.ui.preferences.VariableViewsPreferencePage"
- id="org.eclipse.debug.ui.VariableViewsPreferencePage">
- </page>
- <page
- name="%LaunchHistoryPreferencePage.name"
- category="org.eclipse.debug.ui.DebugPreferencePage"
- class="org.eclipse.debug.internal.ui.preferences.LaunchHistoryPreferencePage"
- id="org.eclipse.debug.ui.LaunchHistoryPreferencePage">
- </page>
- <page
- name="%DebugActionGroupsPreferencePage.name"
- category="org.eclipse.debug.ui.DebugPreferencePage"
- class="org.eclipse.debug.internal.ui.preferences.DebugActionGroupsPreferencePage"
- id="org.eclipse.debug.ui.DebugActionGroupsPreferencePage">
- </page>
-</extension>
-<extension
- point="org.eclipse.ui.actionSets">
- <actionSet
- label="%DebugActionSet.label"
- visible="false"
- id="org.eclipse.debug.ui.debugActionSet">
- <menu
- label="%RunMenu.label"
- id="org.eclipse.ui.run"
- path="additions">
- <separator name="stepGroup"/>
- <groupMarker name="stepIntoGroup"/>
- <groupMarker name="stepOverGroup"/>
- <groupMarker name="stepReturnGroup"/>
- <groupMarker name="emptyStepGroup"/>
- </menu>
- <action
- label="%StepReturnAction.label"
- icon="icons/full/elcl16/stepreturn_co.gif"
- disabledIcon="icons/full/dlcl16/stepreturn_co.gif"
- hoverIcon="icons/full/clcl16/stepreturn_co.gif"
- helpContextId="step_return_action_context"
- class="org.eclipse.debug.internal.ui.actions.StepReturnActionDelegate"
- menubarPath="org.eclipse.ui.run/stepReturnGroup"
- id="org.eclipse.debug.internal.ui.actions.StepReturnActionDelegate">
- </action>
- <action
- label="%StepOverAction.label"
- icon="icons/full/elcl16/stepover_co.gif"
- disabledIcon="icons/full/dlcl16/stepover_co.gif"
- hoverIcon="icons/full/clcl16/stepover_co.gif"
- helpContextId="step_over_action_context"
- class="org.eclipse.debug.internal.ui.actions.StepOverActionDelegate"
- menubarPath="org.eclipse.ui.run/stepOverGroup"
- id="org.eclipse.debug.internal.ui.actions.StepOverActionDelegate">
- </action>
- <action
- label="%StepIntoAction.label"
- icon="icons/full/elcl16/stepinto_co.gif"
- disabledIcon="icons/full/dlcl16/stepinto_co.gif"
- hoverIcon="icons/full/clcl16/stepinto_co.gif"
- helpContextId="step_into_action_context"
- class="org.eclipse.debug.internal.ui.actions.StepIntoActionDelegate"
- menubarPath="org.eclipse.ui.run/stepIntoGroup"
- id="org.eclipse.debug.internal.ui.actions.StepIntoActionDelegate">
- </action>
- <action
- label="%TerminateAction.label"
- icon="icons/full/elcl16/terminate_co.gif"
- disabledIcon="icons/full/dlcl16/terminate_co.gif"
- hoverIcon="icons/full/clcl16/terminate_co.gif"
- helpContextId="terminate_action_context"
- class="org.eclipse.debug.internal.ui.actions.TerminateActionDelegate"
- menubarPath="org.eclipse.ui.run/stepGroup"
- id="org.eclipse.debug.internal.ui.actions.TerminateActionDelegate">
- </action>
- <action
- label="%SuspendAction.label"
- icon="icons/full/elcl16/suspend_co.gif"
- disabledIcon="icons/full/dlcl16/suspend_co.gif"
- hoverIcon="icons/full/clcl16/suspend_co.gif"
- helpContextId="suspend_action_context"
- class="org.eclipse.debug.internal.ui.actions.SuspendActionDelegate"
- menubarPath="org.eclipse.ui.run/stepGroup"
- id="org.eclipse.debug.internal.ui.actions.SuspendActionDelegate">
- </action>
- <action
- label="%ResumeAction.label"
- icon="icons/full/elcl16/resume_co.gif"
- disabledIcon="icons/full/dlcl16/resume_co.gif"
- hoverIcon="icons/full/clcl16/resume_co.gif"
- helpContextId="resume_action_context"
- class="org.eclipse.debug.internal.ui.actions.ResumeActionDelegate"
- menubarPath="org.eclipse.ui.run/stepGroup"
- id="org.eclipse.debug.internal.ui.actions.ResumeActionDelegate">
- </action>
- </actionSet>
-</extension>
-<extension
- point="org.eclipse.ui.actionSets">
- <actionSet
- label="%LaunchActionSet.label"
- visible="false"
- id="org.eclipse.debug.ui.launchActionSet">
- <menu
- label="%RunMenu.label"
- id="org.eclipse.ui.run"
- path="additions">
- <separator name="relaunchGroup"/>
- <separator name="runGroup"/>
- <separator name="debugGroup"/>
- <separator name="emptyLaunchGroup"/>
- </menu>
- <action
- label="%OpenRunConfigurations.label"
- class="org.eclipse.debug.internal.ui.actions.OpenRunConfigurations"
- menubarPath="org.eclipse.ui.run/runGroup"
- helpContextId="open_run_configurations_action_context"
- id="org.eclipse.debug.internal.ui.actions.OpenRunConfigurations">
- </action>
- <action
- label="%RunWithConfigurationAction.label"
- class="org.eclipse.debug.internal.ui.actions.RunWithConfigurationAction"
- menubarPath="org.eclipse.ui.run/runGroup"
- helpContextId="run_with_configuration_action_context"
- id="org.eclipse.debug.internal.ui.actions.RunWithConfigurationAction">
- </action>
- <action
- label="%RunHistoryMenuAction.label"
- class="org.eclipse.debug.internal.ui.actions.RunHistoryMenuAction"
- menubarPath="org.eclipse.ui.run/runGroup"
- helpContextId="run_history_menu_action_context"
- id="org.eclipse.debug.internal.ui.actions.RunHistoryMenuAction">
- </action>
- <action
- label="%DebugLastAction.label"
- icon="icons/full/elcl16/debuglast_co.gif"
- disabledIcon="icons/full/dlcl16/debuglast_co.gif"
- hoverIcon="icons/full/clcl16/debuglast_co.gif"
- class="org.eclipse.debug.internal.ui.actions.DebugLastAction"
- menubarPath="org.eclipse.ui.run/relaunchGroup"
- helpContextId="debug_last_action_context"
- id="org.eclipse.debug.internal.ui.actions.DebugLastAction">
- </action>
- <action
- label="%RunLastAction.label"
- icon="icons/full/elcl16/runlast_co.gif"
- disabledIcon="icons/full/dlcl16/runlast_co.gif"
- hoverIcon="icons/full/clcl16/runlast_co.gif"
- helpContextId="run_last_action_context"
- class="org.eclipse.debug.internal.ui.actions.RunLastAction"
- menubarPath="org.eclipse.ui.run/relaunchGroup"
- id="org.eclipse.debug.internal.ui.actions.RunLastAction">
- </action>
- <action
- label="%RunDropDownAction.label"
- pulldown="true"
- icon="icons/full/etool16/run_exc.gif"
- disabledIcon="icons/full/dtool16/run_exc.gif"
- hoverIcon="icons/full/ctool16/run_exc.gif"
- helpContextId="run_action_context"
- class="org.eclipse.debug.internal.ui.actions.RunDropDownAction"
- toolbarPath="debug"
- id="org.eclipse.debug.internal.ui.actions.RunDropDownAction">
- </action>
- <action
- label="%OpenDebugConfigurations.label"
- class="org.eclipse.debug.internal.ui.actions.OpenDebugConfigurations"
- menubarPath="org.eclipse.ui.run/debugGroup"
- helpContextId="open_debug_configurations_action_context"
- id="org.eclipse.debug.internal.ui.actions.OpenDebugConfigurations">
- </action>
- <action
- label="%DebugWithConfigurationAction.label"
- class="org.eclipse.debug.internal.ui.actions.DebugWithConfigurationAction"
- menubarPath="org.eclipse.ui.run/debugGroup"
- helpContextId="debug_with_configuration_action_context"
- id="org.eclipse.debug.internal.ui.actions.DebugWithConfigurationAction">
- </action>
- <action
- label="%DebugHistoryMenuAction.label"
- class="org.eclipse.debug.internal.ui.actions.DebugHistoryMenuAction"
- menubarPath="org.eclipse.ui.run/debugGroup"
- helpContextId="debug_history_menu_action_context"
- id="org.eclipse.debug.internal.ui.actions.DebugHistoryMenuAction">
- </action>
- <action
- label="%DebugDropDownAction.label"
- pulldown="true"
- icon="icons/full/etool16/debug_exc.gif"
- disabledIcon="icons/full/dtool16/debug_exc.gif"
- hoverIcon="icons/full/ctool16/debug_exc.gif"
- helpContextId="debug_action_context"
- class="org.eclipse.debug.internal.ui.actions.DebugDropDownAction"
- toolbarPath="debug"
- id="org.eclipse.debug.internal.ui.actions.DebugDropDownAction">
- </action>
- </actionSet>
-</extension>
-
-<extension point = "org.eclipse.ui.viewActions">
-<!-- Contributions to Debug View Toolbar -->
- <viewContribution
- id = "org.eclipse.debug.ui.debugview.toolbar"
- targetID = "org.eclipse.debug.ui.DebugView">
-<!-- Thread Group -->
- <action
- id = "org.eclipse.debug.ui.debugview.toolbar.removeAllTerminated"
- toolbarPath = "threadGroup"
- icon = "icons/full/elcl16/rem_all_co.gif"
- disabledIcon="icons/full/dlcl16/rem_all_co.gif"
- hoverIcon="icons/full/clcl16/rem_all_co.gif"
- helpContextId = "remove_all_terminated_action_context"
- class = "org.eclipse.debug.internal.ui.actions.RemoveAllTerminatedAction"
- tooltip="%RemoveAllTerminatedAction.tooltip"
- label="%RemoveAllTerminatedAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.debugview.toolbar.disconnect"
- toolbarPath = "threadGroup"
- icon = "icons/full/elcl16/disconnect_co.gif"
- disabledIcon="icons/full/dlcl16/disconnect_co.gif"
- hoverIcon="icons/full/clcl16/disconnect_co.gif"
- helpContextId = "disconnect_action_context"
- class = "org.eclipse.debug.internal.ui.actions.DisconnectActionDelegate"
- tooltip="%DisconnectAction.tooltip"
- label="%DisconnectAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.debugview.toolbar.terminate"
- toolbarPath = "threadGroup"
- icon = "icons/full/elcl16/terminate_co.gif"
- disabledIcon= "icons/full/dlcl16/terminate_co.gif"
- hoverIcon= "icons/full/clcl16/terminate_co.gif"
- helpContextId = "terminate_action_context"
- class = "org.eclipse.debug.internal.ui.actions.TerminateActionDelegate"
- tooltip="%TerminateAction.tooltip"
- label="%TerminateAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.debugview.toolbar.suspend"
- toolbarPath = "threadGroup"
- icon = "icons/full/elcl16/suspend_co.gif"
- disabledIcon= "icons/full/dlcl16/suspend_co.gif"
- hoverIcon= "icons/full/clcl16/suspend_co.gif"
- helpContextId = "suspend_action_context"
- class = "org.eclipse.debug.internal.ui.actions.SuspendActionDelegate"
- tooltip="%SuspendAction.tooltip"
- label="%SuspendAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.debugview.toolbar.resume"
- toolbarPath = "threadGroup"
- icon = "icons/full/elcl16/resume_co.gif"
- disabledIcon= "icons/full/dlcl16/resume_co.gif"
- hoverIcon= "icons/full/clcl16/resume_co.gif"
- helpContextId = "resume_action_context"
- class = "org.eclipse.debug.internal.ui.actions.ResumeActionDelegate"
- tooltip="%ResumeAction.tooltip"
- label="%ResumeAction.label">
- </action>
-<!-- Step Group -->
- <action
- id = "org.eclipse.debug.ui.debugview.toolbar.stepReturn"
- toolbarPath = "stepReturnGroup"
- icon = "icons/full/elcl16/stepreturn_co.gif"
- disabledIcon= "icons/full/dlcl16/stepreturn_co.gif"
- hoverIcon= "icons/full/clcl16/stepreturn_co.gif"
- helpContextId = "step_return_action_context"
- class = "org.eclipse.debug.internal.ui.actions.StepReturnActionDelegate"
- tooltip="%StepReturnAction.tooltip"
- label="%StepReturnAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.debugview.toolbar.stepOver"
- toolbarPath = "stepOverGroup"
- icon = "icons/full/elcl16/stepover_co.gif"
- disabledIcon= "icons/full/dlcl16/stepover_co.gif"
- hoverIcon= "icons/full/clcl16/stepover_co.gif"
- helpContextId = "step_over_action_context"
- class = "org.eclipse.debug.internal.ui.actions.StepOverActionDelegate"
- tooltip="%StepOverAction.tooltip"
- label="%StepOverAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.debugview.toolbar.stepInto"
- toolbarPath = "stepIntoGroup"
- icon = "icons/full/elcl16/stepinto_co.gif"
- disabledIcon= "icons/full/dlcl16/stepinto_co.gif"
- hoverIcon= "icons/full/clcl16/stepinto_co.gif"
- helpContextId = "step_into_action_context"
- class = "org.eclipse.debug.internal.ui.actions.StepIntoActionDelegate"
- tooltip="%StepIntoAction.tooltip"
- label="%StepIntoAction.label">
- </action>
- </viewContribution>
-<!-- Contributions to Console View Toolbar -->
- <viewContribution
- id = "org.eclipse.debug.ui.consoleview.toolbar"
- targetID = "org.eclipse.debug.ui.ConsoleView">
- <action
- id = "org.eclipse.debug.ui.consoleView.toolbar.terminate"
- icon = "icons/full/elcl16/terminate_co.gif"
- disabledIcon= "icons/full/dlcl16/terminate_co.gif"
- hoverIcon= "icons/full/clcl16/terminate_co.gif"
- helpContextId = "console_terminate_action_context"
- toolbarPath = "launchGroup"
- class = "org.eclipse.debug.internal.ui.actions.ConsoleTerminateActionDelegate"
- tooltip="%TerminateAction.tooltip"
- label="%TerminateAction.label">
- </action>
- </viewContribution>
-<!-- Contributions to Breakpoints View Toolbar -->
- <viewContribution
- id = "org.eclipse.debug.ui.breakpointsview.toolbar"
- targetID = "org.eclipse.debug.ui.BreakpointView">
- <action
- id = "org.eclipse.debug.ui.breakpointsView.toolbar.removeAll"
- icon = "icons/full/elcl16/rem_all_co.gif"
- disabledIcon= "icons/full/dlcl16/rem_all_co.gif"
- hoverIcon= "icons/full/clcl16/rem_all_co.gif"
- helpContextId = "remove_all_breakpoints_action_context"
- toolbarPath = "breakpointGroup"
- class = "org.eclipse.debug.internal.ui.actions.RemoveAllBreakpointsAction"
- tooltip="%RemoveAllBreakpointsAction.tooltip"
- label="%RemoveAllAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.breakpointsView.toolbar.remove"
- icon = "icons/full/elcl16/rem_co.gif"
- disabledIcon= "icons/full/dlcl16/rem_co.gif"
- hoverIcon= "icons/full/clcl16/rem_co.gif"
- helpContextId = "remove_breakpoint_action_context"
- toolbarPath = "breakpointGroup"
- class = "org.eclipse.debug.internal.ui.actions.RemoveBreakpointAction"
- tooltip="%RemoveBreakpointAction.tooltip"
- label="%RemoveAction.label">
- </action>
- </viewContribution>
-<!-- Contributions to Expression View Toolbar -->
- <viewContribution
- id = "org.eclipse.debug.ui.expressionsView.toolbar"
- targetID = "org.eclipse.debug.ui.ExpressionView">
- <action
- id = "org.eclipse.debug.ui.expresssionsView.toolbar.removeAll"
- icon = "icons/full/elcl16/rem_all_co.gif"
- disabledIcon= "icons/full/dlcl16/rem_all_co.gif"
- hoverIcon= "icons/full/clcl16/rem_all_co.gif"
- helpContextId = "remove_all_expressions_action_context"
- toolbarPath = "expressionGroup"
- class = "org.eclipse.debug.internal.ui.actions.RemoveAllExpressionsAction"
- tooltip="%RemoveAllExpressionsAction.tooltip"
- label="%RemoveAllAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.expresssionsView.toolbar.remove"
- icon = "icons/full/elcl16/rem_co.gif"
- disabledIcon= "icons/full/dlcl16/rem_co.gif"
- hoverIcon= "icons/full/clcl16/rem_co.gif"
- helpContextId = "remove_expression_action_context"
- toolbarPath = "expressionGroup"
- class = "org.eclipse.debug.internal.ui.actions.RemoveExpressionAction"
- tooltip="%RemoveExpressionAction.tooltip"
- label="%RemoveAction.label">
- </action>
- </viewContribution>
-</extension>
-
-<extension point = "org.eclipse.ui.popupMenus">
-<!-- Contributions to Debug View Popup Menu -->
- <viewerContribution
- id = "org.eclipse.debug.ui.debugview.popupMenu"
- targetID = "org.eclipse.debug.ui.DebugView">
-<!-- Edit Group -->
- <action
- id = "org.eclipse.debug.ui.debugview.popupMenu.copyToClipboard"
- menubarPath = "editGroup"
- icon = "icons/full/clcl16/copy_edit_co.gif"
- helpContextId = "copy_to_clipboard_action_context"
- class = "org.eclipse.debug.internal.ui.actions.CopyToClipboardActionDelegate"
- label="%CopyToClipboardAction.label">
- </action>
-<!-- Launch Group -->
- <action
- id = "org.eclipse.debug.ui.debugview.popupMenu.terminateAll"
- menubarPath = "launchGroup"
- helpContextId = "terminate_all_action_context"
- icon = "icons/full/clcl16/terminate_all_co.gif"
- class = "org.eclipse.debug.internal.ui.actions.TerminateAllAction"
- label="%TerminateAllAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.debugview.popupMenu.relaunch"
- menubarPath = "launchGroup"
- icon = "icons/full/clcl16/runlast_co.gif"
- helpContextId = "relaunch_action_context"
- class = "org.eclipse.debug.internal.ui.actions.RelaunchActionDelegate"
- label="%RelaunchAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.debugview.popupMenu.terminateAndRemove"
- menubarPath = "launchGroup"
- helpContextId = "terminate_and_remove_action_context"
- icon = "icons/full/clcl16/terminate_rem_co.gif"
- class = "org.eclipse.debug.internal.ui.actions.TerminateAndRemoveActionDelegate"
- label="%TerminateAndRemoveAction.label">
- </action>
-<!-- Thread Group -->
- <action
- id = "org.eclipse.debug.ui.debugview.popupMenu.removeAllTerminated"
- menubarPath = "launchGroup"
- icon = "icons/full/clcl16/rem_all_co.gif"
- helpContextId = "remove_all_terminated_action_context"
- class = "org.eclipse.debug.internal.ui.actions.RemoveAllTerminatedAction"
- label="%RemoveAllTerminatedAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.debugview.popupMenu.disconnect"
- menubarPath = "threadGroup"
- icon = "icons/full/clcl16/disconnect_co.gif"
- helpContextId = "disconnect_action_context"
- class = "org.eclipse.debug.internal.ui.actions.DisconnectActionDelegate"
- label="%DisconnectAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.debugview.popupMenu.terminate"
- menubarPath = "threadGroup"
- icon = "icons/full/clcl16/terminate_co.gif"
- helpContextId = "terminate_action_context"
- class = "org.eclipse.debug.internal.ui.actions.TerminateActionDelegate"
- label="%TerminateAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.debugview.popupMenu.suspend"
- menubarPath = "threadGroup"
- icon = "icons/full/clcl16/suspend_co.gif"
- helpContextId = "suspend_action_context"
- class = "org.eclipse.debug.internal.ui.actions.SuspendActionDelegate"
- label="%SuspendAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.debugview.popupMenu.resume"
- menubarPath = "threadGroup"
- icon = "icons/full/clcl16/resume_co.gif"
- helpContextId = "resume_action_context"
- class = "org.eclipse.debug.internal.ui.actions.ResumeActionDelegate"
- label="%ResumeAction.label">
- </action>
-<!-- Step Group -->
- <action
- id = "org.eclipse.debug.ui.debugview.popupMenu.stepReturn"
- menubarPath = "stepReturnGroup"
- icon = "icons/full/clcl16/stepreturn_co.gif"
- helpContextId = "step_return_action_context"
- class = "org.eclipse.debug.internal.ui.actions.StepReturnActionDelegate"
- label="%StepReturnAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.debugview.popupMenu.stepOver"
- menubarPath = "stepOverGroup"
- icon = "icons/full/clcl16/stepover_co.gif"
- helpContextId = "step_over_action_context"
- class = "org.eclipse.debug.internal.ui.actions.StepOverActionDelegate"
- label="%StepOverAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.debugview.popupMenu.stepInto"
- menubarPath = "stepIntoGroup"
- icon = "icons/full/clcl16/stepinto_co.gif"
- helpContextId = "step_into_action_context"
- class = "org.eclipse.debug.internal.ui.actions.StepIntoActionDelegate"
- label="%StepIntoAction.label">
- </action>
- </viewerContribution>
- <!-- Contributions to Breakpoints View Popup Menu -->
- <viewerContribution
- id = "org.eclipse.debug.ui.breakpointview.popupMenu"
- targetID = "org.eclipse.debug.ui.BreakpointView">
- <action
- id="org.eclipse.debug.ui.actions.RemoveAllBreakpoints"
- icon = "icons/full/clcl16/rem_all_co.gif"
- label="%RemoveAllAction.label"
- menubarPath="breakpointGroup"
- helpContextId = "remove_all_breakpoints_action_context"
- class="org.eclipse.debug.internal.ui.actions.RemoveAllBreakpointsAction">
- </action>
- <action
- id="org.eclipse.debug.ui.actions.RemoveBreakpoint"
- label="%RemoveAction.label"
- icon = "icons/full/clcl16/rem_co.gif"
- menubarPath="breakpointGroup"
- helpContextId = "remove_breakpoint_action_context"
- class="org.eclipse.debug.internal.ui.actions.RemoveBreakpointAction">
- </action>
- <action
- id="org.eclipse.debug.ui.actions.DisableBreakpoint"
- label="%DisableBreakpointsAction.label"
- icon="icons/full/clcl16/disabled_co.gif"
- menubarPath="breakpointGroup"
- helpContextId = "disable_breakpoint_action_context"
- class="org.eclipse.debug.internal.ui.actions.DisableBreakpointsAction"
- enablesFor="2+">
- </action>
- <action
- id="org.eclipse.debug.ui.actions.EnableBreakpoint"
- label="%EnableBreakpointsAction.label"
- icon="icons/full/clcl16/enabled_co.gif"
- menubarPath="breakpointGroup"
- helpContextId = "enable_breakpoint_action_context"
- class="org.eclipse.debug.internal.ui.actions.EnableBreakpointsAction"
- enablesFor="2+">
- </action>
- <action
- id="org.eclipse.debug.ui.actions.SelectAllBreakpointsAction"
- label="%SelectAll.label"
- menubarPath="breakpointGroup"
- helpContextId = "select_all_breakpoints_action_context"
- class="org.eclipse.debug.internal.ui.actions.SelectAllBreakpointsAction">
- </action>
- </viewerContribution>
-<!-- Contributions to Variables View Popup Menu -->
- <viewerContribution
- id = "org.eclipse.debug.ui.variablesView.popupMenu"
- targetID = "org.eclipse.debug.ui.VariableView">
- <!-- Variable Group -->
- <action
- id = "org.eclipse.debug.ui.debugview.popupMenu.copyVariablesToClipboard"
- menubarPath = "variableGroup"
- icon = "icons/full/clcl16/copy_edit_co.gif"
- helpContextId = "copy_variables_to_clipboard_action_context"
- class = "org.eclipse.debug.internal.ui.actions.CopyVariablesToClipboardActionDelegate"
- label="%CopyVariablesToClipboardAction.label">
- </action>
- <action
- id="org.eclipse.debug.ui.actions.SelectAllVariablesAction"
- label="%SelectAll.label"
- menubarPath="variableGroup"
- helpContextId = "select_all_variables_action_context"
- class="org.eclipse.debug.internal.ui.actions.SelectAllVariablesAction">
- </action>
- </viewerContribution>
-<!-- Contributions to Expression View Popup Menu -->
- <viewerContribution
- id = "org.eclipse.debug.ui.expressionView.popupMenu"
- targetID = "org.eclipse.debug.ui.ExpressionView">
- <!-- Expression Group -->
- <action
- id = "org.eclipse.debug.ui.debugview.popupMenu.removeAllExpressionsAction"
- menubarPath = "expressionGroup"
- class = "org.eclipse.debug.internal.ui.actions.RemoveAllExpressionsAction"
- icon = "icons/full/clcl16/rem_all_co.gif"
- helpContextId = "remove_all_expressions_action_context"
- label="%RemoveAllAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.debugview.popupMenu.removeExpressionAction"
- menubarPath = "expressionGroup"
- class = "org.eclipse.debug.internal.ui.actions.RemoveExpressionAction"
- icon = "icons/full/clcl16/rem_co.gif"
- helpContextId = "remove_expression_action_context"
- label="%RemoveAction.label">
- </action>
- <action
- id = "org.eclipse.debug.ui.debugview.popupMenu.copyVariablesToClipboard"
- menubarPath = "expressionGroup"
- icon = "icons/full/clcl16/copy_edit_co.gif"
- helpContextId = "copy_variables_to_clipboard_action_context"
- class = "org.eclipse.debug.internal.ui.actions.CopyVariablesToClipboardActionDelegate"
- label="%CopyVariablesToClipboardAction.label">
- </action>
- <action
- id="org.eclipse.debug.ui.actions.SelectAllExpressionsAction"
- label="%SelectAll.label"
- menubarPath="expressionGroup"
- helpContextId = "select_all_expressions_action_context"
- class="org.eclipse.debug.internal.ui.actions.SelectAllExpressionsAction">
- </action>
- </viewerContribution>
-<!-- Contributions to Console View popup menu -->
- <viewerContribution
- id = "org.eclipse.debug.ui.consoleview.popupMenu"
- targetID = "org.eclipse.debug.ui.ConsoleView">
- <action
- id = "org.eclipse.debug.ui.consoleView.popupMenu.terminate"
- icon = "icons/full/clcl16/terminate_co.gif"
- menubarPath = "additions"
- helpContextId = "console_terminate_action_context"
- class = "org.eclipse.debug.internal.ui.actions.ConsoleTerminateActionDelegate"
- label="%TerminateAction.label">
- </action>
- </viewerContribution>
-</extension>
-
-<extension
- id="instructionPointer"
- point="org.eclipse.core.resources.markers">
- <super
- type="org.eclipse.core.resources.textmarker">
- </super>
- <persistent
- value="false">
- </persistent>
-</extension>
-
-<extension point="org.eclipse.ui.actionSetPartAssociations">
- <actionSetPartAssociation
- targetID="org.eclipse.debug.ui.debugActionSet">
- <part id="org.eclipse.debug.ui.DebugView"/>
- </actionSetPartAssociation>
-</extension>
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- File written by PDE 1.0 -->
+<plugin
+ id="org.eclipse.debug.ui"
+ name="%pluginName"
+ version="2.0.0"
+ provider-name="%providerName"
+ class="org.eclipse.debug.internal.ui.DebugUIPlugin">
+<!-- Required plugins -->
+<requires>
+ <import plugin="org.apache.xerces"/>
+ <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.debug.core"/>
+</requires>
+
+<!-- Runtime -->
+<runtime>
+ <library name="dtui.jar">
+ <export name="*"/>
+ </library>
+</runtime>
+
+<!-- Extension points -->
+<extension-point id="debugModelPresentations" name="%DebugModelPresentationExtensionName"/>
+<extension-point id="launchShortcuts" name="%LaunchShortcutsName"/>
+<extension-point id="launchConfigurationTabGroups" name="%LaunchConfigurationTabGroupExtensionName"/>
+<extension-point id="launchConfigurationTypeImages" name="%LaunchConfigurationTypeImageExtensionName"/>
+<extension-point id="debugActionGroups" name="%DebugActionGroupsExtensionName"/>
+
+<!-- Extensions -->
+<extension
+ point="org.eclipse.ui.perspectives">
+ <perspective
+ name="%DebugPerspective.name"
+ icon="icons/full/cview16/debug_persp.gif"
+ class="org.eclipse.debug.internal.ui.DebugPerspectiveFactory"
+ id="org.eclipse.debug.ui.DebugPerspective">
+ </perspective>
+</extension>
+<extension
+ point="org.eclipse.ui.views">
+ <category
+ name="%DebugViewsCategory.name"
+ id="org.eclipse.debug.ui">
+ </category>
+ <view
+ name="%DebugView.name"
+ icon="icons/full/cview16/debug_view.gif"
+ category="org.eclipse.debug.ui"
+ class="org.eclipse.debug.internal.ui.views.launch.LaunchView"
+ id="org.eclipse.debug.ui.DebugView">
+ </view>
+ <view
+ name="%BreakpointsView.name"
+ icon="icons/full/cview16/breakpoint_view.gif"
+ category="org.eclipse.debug.ui"
+ class="org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView"
+ id="org.eclipse.debug.ui.BreakpointView">
+ </view>
+ <view
+ name="%VariablesView.name"
+ icon="icons/full/cview16/variable_view.gif"
+ category="org.eclipse.debug.ui"
+ class="org.eclipse.debug.internal.ui.views.variables.VariablesView"
+ id="org.eclipse.debug.ui.VariableView">
+ </view>
+ <view
+ name="%ExpressionView.name"
+ icon="icons/full/cview16/watchlist_view.gif"
+ category="org.eclipse.debug.ui"
+ class="org.eclipse.debug.internal.ui.views.expression.ExpressionView"
+ id="org.eclipse.debug.ui.ExpressionView">
+ </view>
+ <view
+ name="%ConsoleView.name"
+ icon="icons/full/cview16/console_view.gif"
+ category="org.eclipse.debug.ui"
+ class="org.eclipse.debug.internal.ui.views.console.ConsoleView"
+ id="org.eclipse.debug.ui.ConsoleView">
+ </view>
+</extension>
+<extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ name="%DebugPreferencePage.name"
+ class="org.eclipse.debug.internal.ui.preferences.DebugPreferencePage"
+ id="org.eclipse.debug.ui.DebugPreferencePage">
+ </page>
+ <page
+ name="%ConsolePreferencePage.name"
+ category="org.eclipse.debug.ui.DebugPreferencePage"
+ class="org.eclipse.debug.internal.ui.preferences.ConsolePreferencePage"
+ id="org.eclipse.debug.ui.ConsolePreferencePage">
+ </page>
+ <page
+ name="%VariableViewsPreferencePage.name"
+ category="org.eclipse.debug.ui.DebugPreferencePage"
+ class="org.eclipse.debug.internal.ui.preferences.VariableViewsPreferencePage"
+ id="org.eclipse.debug.ui.VariableViewsPreferencePage">
+ </page>
+ <page
+ name="%LaunchHistoryPreferencePage.name"
+ category="org.eclipse.debug.ui.DebugPreferencePage"
+ class="org.eclipse.debug.internal.ui.preferences.LaunchHistoryPreferencePage"
+ id="org.eclipse.debug.ui.LaunchHistoryPreferencePage">
+ </page>
+ <page
+ name="%DebugActionGroupsPreferencePage.name"
+ category="org.eclipse.debug.ui.DebugPreferencePage"
+ class="org.eclipse.debug.internal.ui.preferences.DebugActionGroupsPreferencePage"
+ id="org.eclipse.debug.ui.DebugActionGroupsPreferencePage">
+ </page>
+</extension>
+<extension
+ point="org.eclipse.ui.actionSets">
+ <actionSet
+ label="%DebugActionSet.label"
+ visible="false"
+ id="org.eclipse.debug.ui.debugActionSet">
+ <menu
+ label="%RunMenu.label"
+ id="org.eclipse.ui.run"
+ path="additions">
+ <separator name="stepGroup"/>
+ <groupMarker name="stepIntoGroup"/>
+ <groupMarker name="stepOverGroup"/>
+ <groupMarker name="stepReturnGroup"/>
+ <groupMarker name="emptyStepGroup"/>
+ </menu>
+ <action
+ label="%StepReturnAction.label"
+ icon="icons/full/elcl16/stepreturn_co.gif"
+ disabledIcon="icons/full/dlcl16/stepreturn_co.gif"
+ hoverIcon="icons/full/clcl16/stepreturn_co.gif"
+ helpContextId="step_return_action_context"
+ class="org.eclipse.debug.internal.ui.actions.StepReturnActionDelegate"
+ menubarPath="org.eclipse.ui.run/stepReturnGroup"
+ id="org.eclipse.debug.internal.ui.actions.StepReturnActionDelegate">
+ </action>
+ <action
+ label="%StepOverAction.label"
+ icon="icons/full/elcl16/stepover_co.gif"
+ disabledIcon="icons/full/dlcl16/stepover_co.gif"
+ hoverIcon="icons/full/clcl16/stepover_co.gif"
+ helpContextId="step_over_action_context"
+ class="org.eclipse.debug.internal.ui.actions.StepOverActionDelegate"
+ menubarPath="org.eclipse.ui.run/stepOverGroup"
+ id="org.eclipse.debug.internal.ui.actions.StepOverActionDelegate">
+ </action>
+ <action
+ label="%StepIntoAction.label"
+ icon="icons/full/elcl16/stepinto_co.gif"
+ disabledIcon="icons/full/dlcl16/stepinto_co.gif"
+ hoverIcon="icons/full/clcl16/stepinto_co.gif"
+ helpContextId="step_into_action_context"
+ class="org.eclipse.debug.internal.ui.actions.StepIntoActionDelegate"
+ menubarPath="org.eclipse.ui.run/stepIntoGroup"
+ id="org.eclipse.debug.internal.ui.actions.StepIntoActionDelegate">
+ </action>
+ <action
+ label="%TerminateAction.label"
+ icon="icons/full/elcl16/terminate_co.gif"
+ disabledIcon="icons/full/dlcl16/terminate_co.gif"
+ hoverIcon="icons/full/clcl16/terminate_co.gif"
+ helpContextId="terminate_action_context"
+ class="org.eclipse.debug.internal.ui.actions.TerminateActionDelegate"
+ menubarPath="org.eclipse.ui.run/stepGroup"
+ id="org.eclipse.debug.internal.ui.actions.TerminateActionDelegate">
+ </action>
+ <action
+ label="%SuspendAction.label"
+ icon="icons/full/elcl16/suspend_co.gif"
+ disabledIcon="icons/full/dlcl16/suspend_co.gif"
+ hoverIcon="icons/full/clcl16/suspend_co.gif"
+ helpContextId="suspend_action_context"
+ class="org.eclipse.debug.internal.ui.actions.SuspendActionDelegate"
+ menubarPath="org.eclipse.ui.run/stepGroup"
+ id="org.eclipse.debug.internal.ui.actions.SuspendActionDelegate">
+ </action>
+ <action
+ label="%ResumeAction.label"
+ icon="icons/full/elcl16/resume_co.gif"
+ disabledIcon="icons/full/dlcl16/resume_co.gif"
+ hoverIcon="icons/full/clcl16/resume_co.gif"
+ helpContextId="resume_action_context"
+ class="org.eclipse.debug.internal.ui.actions.ResumeActionDelegate"
+ menubarPath="org.eclipse.ui.run/stepGroup"
+ id="org.eclipse.debug.internal.ui.actions.ResumeActionDelegate">
+ </action>
+ </actionSet>
+</extension>
+<extension
+ point="org.eclipse.ui.actionSets">
+ <actionSet
+ label="%LaunchActionSet.label"
+ visible="false"
+ id="org.eclipse.debug.ui.launchActionSet">
+ <menu
+ label="%RunMenu.label"
+ id="org.eclipse.ui.run"
+ path="additions">
+ <separator name="relaunchGroup"/>
+ <separator name="runGroup"/>
+ <separator name="debugGroup"/>
+ <separator name="emptyLaunchGroup"/>
+ </menu>
+ <action
+ label="%OpenRunConfigurations.label"
+ class="org.eclipse.debug.internal.ui.actions.OpenRunConfigurations"
+ menubarPath="org.eclipse.ui.run/runGroup"
+ helpContextId="open_run_configurations_action_context"
+ id="org.eclipse.debug.internal.ui.actions.OpenRunConfigurations">
+ </action>
+ <action
+ label="%RunWithConfigurationAction.label"
+ class="org.eclipse.debug.internal.ui.actions.RunWithConfigurationAction"
+ menubarPath="org.eclipse.ui.run/runGroup"
+ helpContextId="run_with_configuration_action_context"
+ id="org.eclipse.debug.internal.ui.actions.RunWithConfigurationAction">
+ </action>
+ <action
+ label="%RunHistoryMenuAction.label"
+ class="org.eclipse.debug.internal.ui.actions.RunHistoryMenuAction"
+ menubarPath="org.eclipse.ui.run/runGroup"
+ helpContextId="run_history_menu_action_context"
+ id="org.eclipse.debug.internal.ui.actions.RunHistoryMenuAction">
+ </action>
+ <action
+ label="%DebugLastAction.label"
+ icon="icons/full/elcl16/debuglast_co.gif"
+ disabledIcon="icons/full/dlcl16/debuglast_co.gif"
+ hoverIcon="icons/full/clcl16/debuglast_co.gif"
+ class="org.eclipse.debug.internal.ui.actions.DebugLastAction"
+ menubarPath="org.eclipse.ui.run/relaunchGroup"
+ helpContextId="debug_last_action_context"
+ id="org.eclipse.debug.internal.ui.actions.DebugLastAction">
+ </action>
+ <action
+ label="%RunLastAction.label"
+ icon="icons/full/elcl16/runlast_co.gif"
+ disabledIcon="icons/full/dlcl16/runlast_co.gif"
+ hoverIcon="icons/full/clcl16/runlast_co.gif"
+ helpContextId="run_last_action_context"
+ class="org.eclipse.debug.internal.ui.actions.RunLastAction"
+ menubarPath="org.eclipse.ui.run/relaunchGroup"
+ id="org.eclipse.debug.internal.ui.actions.RunLastAction">
+ </action>
+ <action
+ label="%RunDropDownAction.label"
+ pulldown="true"
+ icon="icons/full/etool16/run_exc.gif"
+ disabledIcon="icons/full/dtool16/run_exc.gif"
+ hoverIcon="icons/full/ctool16/run_exc.gif"
+ helpContextId="run_action_context"
+ class="org.eclipse.debug.internal.ui.actions.RunDropDownAction"
+ toolbarPath="debug"
+ id="org.eclipse.debug.internal.ui.actions.RunDropDownAction">
+ </action>
+ <action
+ label="%OpenDebugConfigurations.label"
+ class="org.eclipse.debug.internal.ui.actions.OpenDebugConfigurations"
+ menubarPath="org.eclipse.ui.run/debugGroup"
+ helpContextId="open_debug_configurations_action_context"
+ id="org.eclipse.debug.internal.ui.actions.OpenDebugConfigurations">
+ </action>
+ <action
+ label="%DebugWithConfigurationAction.label"
+ class="org.eclipse.debug.internal.ui.actions.DebugWithConfigurationAction"
+ menubarPath="org.eclipse.ui.run/debugGroup"
+ helpContextId="debug_with_configuration_action_context"
+ id="org.eclipse.debug.internal.ui.actions.DebugWithConfigurationAction">
+ </action>
+ <action
+ label="%DebugHistoryMenuAction.label"
+ class="org.eclipse.debug.internal.ui.actions.DebugHistoryMenuAction"
+ menubarPath="org.eclipse.ui.run/debugGroup"
+ helpContextId="debug_history_menu_action_context"
+ id="org.eclipse.debug.internal.ui.actions.DebugHistoryMenuAction">
+ </action>
+ <action
+ label="%DebugDropDownAction.label"
+ pulldown="true"
+ icon="icons/full/etool16/debug_exc.gif"
+ disabledIcon="icons/full/dtool16/debug_exc.gif"
+ hoverIcon="icons/full/ctool16/debug_exc.gif"
+ helpContextId="debug_action_context"
+ class="org.eclipse.debug.internal.ui.actions.DebugDropDownAction"
+ toolbarPath="debug"
+ id="org.eclipse.debug.internal.ui.actions.DebugDropDownAction">
+ </action>
+ </actionSet>
+</extension>
+
+<extension point = "org.eclipse.ui.viewActions">
+<!-- Contributions to Debug View Toolbar -->
+ <viewContribution
+ id = "org.eclipse.debug.ui.debugview.toolbar"
+ targetID = "org.eclipse.debug.ui.DebugView">
+<!-- Thread Group -->
+ <action
+ id = "org.eclipse.debug.ui.debugview.toolbar.removeAllTerminated"
+ toolbarPath = "threadGroup"
+ icon = "icons/full/elcl16/rem_all_co.gif"
+ disabledIcon="icons/full/dlcl16/rem_all_co.gif"
+ hoverIcon="icons/full/clcl16/rem_all_co.gif"
+ helpContextId = "remove_all_terminated_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.RemoveAllTerminatedAction"
+ tooltip="%RemoveAllTerminatedAction.tooltip"
+ label="%RemoveAllTerminatedAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.debugview.toolbar.disconnect"
+ toolbarPath = "threadGroup"
+ icon = "icons/full/elcl16/disconnect_co.gif"
+ disabledIcon="icons/full/dlcl16/disconnect_co.gif"
+ hoverIcon="icons/full/clcl16/disconnect_co.gif"
+ helpContextId = "disconnect_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.DisconnectActionDelegate"
+ tooltip="%DisconnectAction.tooltip"
+ label="%DisconnectAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.debugview.toolbar.terminate"
+ toolbarPath = "threadGroup"
+ icon = "icons/full/elcl16/terminate_co.gif"
+ disabledIcon= "icons/full/dlcl16/terminate_co.gif"
+ hoverIcon= "icons/full/clcl16/terminate_co.gif"
+ helpContextId = "terminate_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.TerminateActionDelegate"
+ tooltip="%TerminateAction.tooltip"
+ label="%TerminateAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.debugview.toolbar.suspend"
+ toolbarPath = "threadGroup"
+ icon = "icons/full/elcl16/suspend_co.gif"
+ disabledIcon= "icons/full/dlcl16/suspend_co.gif"
+ hoverIcon= "icons/full/clcl16/suspend_co.gif"
+ helpContextId = "suspend_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.SuspendActionDelegate"
+ tooltip="%SuspendAction.tooltip"
+ label="%SuspendAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.debugview.toolbar.resume"
+ toolbarPath = "threadGroup"
+ icon = "icons/full/elcl16/resume_co.gif"
+ disabledIcon= "icons/full/dlcl16/resume_co.gif"
+ hoverIcon= "icons/full/clcl16/resume_co.gif"
+ helpContextId = "resume_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.ResumeActionDelegate"
+ tooltip="%ResumeAction.tooltip"
+ label="%ResumeAction.label">
+ </action>
+<!-- Step Group -->
+ <action
+ id = "org.eclipse.debug.ui.debugview.toolbar.stepReturn"
+ toolbarPath = "stepReturnGroup"
+ icon = "icons/full/elcl16/stepreturn_co.gif"
+ disabledIcon= "icons/full/dlcl16/stepreturn_co.gif"
+ hoverIcon= "icons/full/clcl16/stepreturn_co.gif"
+ helpContextId = "step_return_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.StepReturnActionDelegate"
+ tooltip="%StepReturnAction.tooltip"
+ label="%StepReturnAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.debugview.toolbar.stepOver"
+ toolbarPath = "stepOverGroup"
+ icon = "icons/full/elcl16/stepover_co.gif"
+ disabledIcon= "icons/full/dlcl16/stepover_co.gif"
+ hoverIcon= "icons/full/clcl16/stepover_co.gif"
+ helpContextId = "step_over_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.StepOverActionDelegate"
+ tooltip="%StepOverAction.tooltip"
+ label="%StepOverAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.debugview.toolbar.stepInto"
+ toolbarPath = "stepIntoGroup"
+ icon = "icons/full/elcl16/stepinto_co.gif"
+ disabledIcon= "icons/full/dlcl16/stepinto_co.gif"
+ hoverIcon= "icons/full/clcl16/stepinto_co.gif"
+ helpContextId = "step_into_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.StepIntoActionDelegate"
+ tooltip="%StepIntoAction.tooltip"
+ label="%StepIntoAction.label">
+ </action>
+ </viewContribution>
+<!-- Contributions to Console View Toolbar -->
+ <viewContribution
+ id = "org.eclipse.debug.ui.consoleview.toolbar"
+ targetID = "org.eclipse.debug.ui.ConsoleView">
+ <action
+ id = "org.eclipse.debug.ui.consoleView.toolbar.terminate"
+ icon = "icons/full/elcl16/terminate_co.gif"
+ disabledIcon= "icons/full/dlcl16/terminate_co.gif"
+ hoverIcon= "icons/full/clcl16/terminate_co.gif"
+ helpContextId = "console_terminate_action_context"
+ toolbarPath = "launchGroup"
+ class = "org.eclipse.debug.internal.ui.actions.ConsoleTerminateActionDelegate"
+ tooltip="%TerminateAction.tooltip"
+ label="%TerminateAction.label">
+ </action>
+ </viewContribution>
+<!-- Contributions to Breakpoints View Toolbar -->
+ <viewContribution
+ id = "org.eclipse.debug.ui.breakpointsview.toolbar"
+ targetID = "org.eclipse.debug.ui.BreakpointView">
+ <action
+ id = "org.eclipse.debug.ui.breakpointsView.toolbar.removeAll"
+ icon = "icons/full/elcl16/rem_all_co.gif"
+ disabledIcon= "icons/full/dlcl16/rem_all_co.gif"
+ hoverIcon= "icons/full/clcl16/rem_all_co.gif"
+ helpContextId = "remove_all_breakpoints_action_context"
+ toolbarPath = "breakpointGroup"
+ class = "org.eclipse.debug.internal.ui.actions.RemoveAllBreakpointsAction"
+ tooltip="%RemoveAllBreakpointsAction.tooltip"
+ label="%RemoveAllAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.breakpointsView.toolbar.remove"
+ icon = "icons/full/elcl16/rem_co.gif"
+ disabledIcon= "icons/full/dlcl16/rem_co.gif"
+ hoverIcon= "icons/full/clcl16/rem_co.gif"
+ helpContextId = "remove_breakpoint_action_context"
+ toolbarPath = "breakpointGroup"
+ class = "org.eclipse.debug.internal.ui.actions.RemoveBreakpointAction"
+ tooltip="%RemoveBreakpointAction.tooltip"
+ label="%RemoveAction.label">
+ </action>
+ </viewContribution>
+<!-- Contributions to Expression View Toolbar -->
+ <viewContribution
+ id = "org.eclipse.debug.ui.expressionsView.toolbar"
+ targetID = "org.eclipse.debug.ui.ExpressionView">
+ <action
+ id = "org.eclipse.debug.ui.expresssionsView.toolbar.removeAll"
+ icon = "icons/full/elcl16/rem_all_co.gif"
+ disabledIcon= "icons/full/dlcl16/rem_all_co.gif"
+ hoverIcon= "icons/full/clcl16/rem_all_co.gif"
+ helpContextId = "remove_all_expressions_action_context"
+ toolbarPath = "expressionGroup"
+ class = "org.eclipse.debug.internal.ui.actions.RemoveAllExpressionsAction"
+ tooltip="%RemoveAllExpressionsAction.tooltip"
+ label="%RemoveAllAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.expresssionsView.toolbar.remove"
+ icon = "icons/full/elcl16/rem_co.gif"
+ disabledIcon= "icons/full/dlcl16/rem_co.gif"
+ hoverIcon= "icons/full/clcl16/rem_co.gif"
+ helpContextId = "remove_expression_action_context"
+ toolbarPath = "expressionGroup"
+ class = "org.eclipse.debug.internal.ui.actions.RemoveExpressionAction"
+ tooltip="%RemoveExpressionAction.tooltip"
+ label="%RemoveAction.label">
+ </action>
+ </viewContribution>
+</extension>
+
+<extension point = "org.eclipse.ui.popupMenus">
+<!-- Contributions to Debug View Popup Menu -->
+ <viewerContribution
+ id = "org.eclipse.debug.ui.debugview.popupMenu"
+ targetID = "org.eclipse.debug.ui.DebugView">
+<!-- Edit Group -->
+ <action
+ id = "org.eclipse.debug.ui.debugview.popupMenu.copyToClipboard"
+ menubarPath = "editGroup"
+ icon = "icons/full/clcl16/copy_edit_co.gif"
+ helpContextId = "copy_to_clipboard_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.CopyToClipboardActionDelegate"
+ label="%CopyToClipboardAction.label">
+ </action>
+<!-- Launch Group -->
+ <action
+ id = "org.eclipse.debug.ui.debugview.popupMenu.terminateAll"
+ menubarPath = "launchGroup"
+ helpContextId = "terminate_all_action_context"
+ icon = "icons/full/clcl16/terminate_all_co.gif"
+ class = "org.eclipse.debug.internal.ui.actions.TerminateAllAction"
+ label="%TerminateAllAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.debugview.popupMenu.relaunch"
+ menubarPath = "launchGroup"
+ icon = "icons/full/clcl16/runlast_co.gif"
+ helpContextId = "relaunch_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.RelaunchActionDelegate"
+ label="%RelaunchAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.debugview.popupMenu.terminateAndRemove"
+ menubarPath = "launchGroup"
+ helpContextId = "terminate_and_remove_action_context"
+ icon = "icons/full/clcl16/terminate_rem_co.gif"
+ class = "org.eclipse.debug.internal.ui.actions.TerminateAndRemoveActionDelegate"
+ label="%TerminateAndRemoveAction.label">
+ </action>
+<!-- Thread Group -->
+ <action
+ id = "org.eclipse.debug.ui.debugview.popupMenu.removeAllTerminated"
+ menubarPath = "launchGroup"
+ icon = "icons/full/clcl16/rem_all_co.gif"
+ helpContextId = "remove_all_terminated_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.RemoveAllTerminatedAction"
+ label="%RemoveAllTerminatedAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.debugview.popupMenu.disconnect"
+ menubarPath = "threadGroup"
+ icon = "icons/full/clcl16/disconnect_co.gif"
+ helpContextId = "disconnect_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.DisconnectActionDelegate"
+ label="%DisconnectAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.debugview.popupMenu.terminate"
+ menubarPath = "threadGroup"
+ icon = "icons/full/clcl16/terminate_co.gif"
+ helpContextId = "terminate_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.TerminateActionDelegate"
+ label="%TerminateAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.debugview.popupMenu.suspend"
+ menubarPath = "threadGroup"
+ icon = "icons/full/clcl16/suspend_co.gif"
+ helpContextId = "suspend_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.SuspendActionDelegate"
+ label="%SuspendAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.debugview.popupMenu.resume"
+ menubarPath = "threadGroup"
+ icon = "icons/full/clcl16/resume_co.gif"
+ helpContextId = "resume_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.ResumeActionDelegate"
+ label="%ResumeAction.label">
+ </action>
+<!-- Step Group -->
+ <action
+ id = "org.eclipse.debug.ui.debugview.popupMenu.stepReturn"
+ menubarPath = "stepReturnGroup"
+ icon = "icons/full/clcl16/stepreturn_co.gif"
+ helpContextId = "step_return_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.StepReturnActionDelegate"
+ label="%StepReturnAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.debugview.popupMenu.stepOver"
+ menubarPath = "stepOverGroup"
+ icon = "icons/full/clcl16/stepover_co.gif"
+ helpContextId = "step_over_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.StepOverActionDelegate"
+ label="%StepOverAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.debugview.popupMenu.stepInto"
+ menubarPath = "stepIntoGroup"
+ icon = "icons/full/clcl16/stepinto_co.gif"
+ helpContextId = "step_into_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.StepIntoActionDelegate"
+ label="%StepIntoAction.label">
+ </action>
+ </viewerContribution>
+ <!-- Contributions to Breakpoints View Popup Menu -->
+ <viewerContribution
+ id = "org.eclipse.debug.ui.breakpointview.popupMenu"
+ targetID = "org.eclipse.debug.ui.BreakpointView">
+ <action
+ id="org.eclipse.debug.ui.actions.RemoveAllBreakpoints"
+ icon = "icons/full/clcl16/rem_all_co.gif"
+ label="%RemoveAllAction.label"
+ menubarPath="breakpointGroup"
+ helpContextId = "remove_all_breakpoints_action_context"
+ class="org.eclipse.debug.internal.ui.actions.RemoveAllBreakpointsAction">
+ </action>
+ <action
+ id="org.eclipse.debug.ui.actions.RemoveBreakpoint"
+ label="%RemoveAction.label"
+ icon = "icons/full/clcl16/rem_co.gif"
+ menubarPath="breakpointGroup"
+ helpContextId = "remove_breakpoint_action_context"
+ class="org.eclipse.debug.internal.ui.actions.RemoveBreakpointAction">
+ </action>
+ <action
+ id="org.eclipse.debug.ui.actions.DisableBreakpoint"
+ label="%DisableBreakpointsAction.label"
+ icon="icons/full/clcl16/disabled_co.gif"
+ menubarPath="breakpointGroup"
+ helpContextId = "disable_breakpoint_action_context"
+ class="org.eclipse.debug.internal.ui.actions.DisableBreakpointsAction"
+ enablesFor="2+">
+ </action>
+ <action
+ id="org.eclipse.debug.ui.actions.EnableBreakpoint"
+ label="%EnableBreakpointsAction.label"
+ icon="icons/full/clcl16/enabled_co.gif"
+ menubarPath="breakpointGroup"
+ helpContextId = "enable_breakpoint_action_context"
+ class="org.eclipse.debug.internal.ui.actions.EnableBreakpointsAction"
+ enablesFor="2+">
+ </action>
+ <action
+ id="org.eclipse.debug.ui.actions.SelectAllBreakpointsAction"
+ label="%SelectAll.label"
+ menubarPath="breakpointGroup"
+ helpContextId = "select_all_breakpoints_action_context"
+ class="org.eclipse.debug.internal.ui.actions.SelectAllBreakpointsAction">
+ </action>
+ </viewerContribution>
+<!-- Contributions to Variables View Popup Menu -->
+ <viewerContribution
+ id = "org.eclipse.debug.ui.variablesView.popupMenu"
+ targetID = "org.eclipse.debug.ui.VariableView">
+ <!-- Variable Group -->
+ <action
+ id = "org.eclipse.debug.ui.debugview.popupMenu.copyVariablesToClipboard"
+ menubarPath = "variableGroup"
+ icon = "icons/full/clcl16/copy_edit_co.gif"
+ helpContextId = "copy_variables_to_clipboard_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.CopyVariablesToClipboardActionDelegate"
+ label="%CopyVariablesToClipboardAction.label">
+ </action>
+ <action
+ id="org.eclipse.debug.ui.actions.SelectAllVariablesAction"
+ label="%SelectAll.label"
+ menubarPath="variableGroup"
+ helpContextId = "select_all_variables_action_context"
+ class="org.eclipse.debug.internal.ui.actions.SelectAllVariablesAction">
+ </action>
+ </viewerContribution>
+<!-- Contributions to Expression View Popup Menu -->
+ <viewerContribution
+ id = "org.eclipse.debug.ui.expressionView.popupMenu"
+ targetID = "org.eclipse.debug.ui.ExpressionView">
+ <!-- Expression Group -->
+ <action
+ id = "org.eclipse.debug.ui.debugview.popupMenu.removeAllExpressionsAction"
+ menubarPath = "expressionGroup"
+ class = "org.eclipse.debug.internal.ui.actions.RemoveAllExpressionsAction"
+ icon = "icons/full/clcl16/rem_all_co.gif"
+ helpContextId = "remove_all_expressions_action_context"
+ label="%RemoveAllAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.debugview.popupMenu.removeExpressionAction"
+ menubarPath = "expressionGroup"
+ class = "org.eclipse.debug.internal.ui.actions.RemoveExpressionAction"
+ icon = "icons/full/clcl16/rem_co.gif"
+ helpContextId = "remove_expression_action_context"
+ label="%RemoveAction.label">
+ </action>
+ <action
+ id = "org.eclipse.debug.ui.debugview.popupMenu.copyVariablesToClipboard"
+ menubarPath = "expressionGroup"
+ icon = "icons/full/clcl16/copy_edit_co.gif"
+ helpContextId = "copy_variables_to_clipboard_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.CopyVariablesToClipboardActionDelegate"
+ label="%CopyVariablesToClipboardAction.label">
+ </action>
+ <action
+ id="org.eclipse.debug.ui.actions.SelectAllExpressionsAction"
+ label="%SelectAll.label"
+ menubarPath="expressionGroup"
+ helpContextId = "select_all_expressions_action_context"
+ class="org.eclipse.debug.internal.ui.actions.SelectAllExpressionsAction">
+ </action>
+ </viewerContribution>
+<!-- Contributions to Console View popup menu -->
+ <viewerContribution
+ id = "org.eclipse.debug.ui.consoleview.popupMenu"
+ targetID = "org.eclipse.debug.ui.ConsoleView">
+ <action
+ id = "org.eclipse.debug.ui.consoleView.popupMenu.terminate"
+ icon = "icons/full/clcl16/terminate_co.gif"
+ menubarPath = "additions"
+ helpContextId = "console_terminate_action_context"
+ class = "org.eclipse.debug.internal.ui.actions.ConsoleTerminateActionDelegate"
+ label="%TerminateAction.label">
+ </action>
+ </viewerContribution>
+</extension>
+
+<extension
+ id="instructionPointer"
+ point="org.eclipse.core.resources.markers">
+ <super
+ type="org.eclipse.core.resources.textmarker">
+ </super>
+ <persistent
+ value="false">
+ </persistent>
+</extension>
+
+<extension point="org.eclipse.ui.actionSetPartAssociations">
+ <actionSetPartAssociation
+ targetID="org.eclipse.debug.ui.debugActionSet">
+ <part id="org.eclipse.debug.ui.DebugView"/>
+ </actionSetPartAssociation>
+</extension>
+</plugin>
diff --git a/org.eclipse.debug.ui/scripts/exportplugin.xml b/org.eclipse.debug.ui/scripts/exportplugin.xml
index f25747b98..0ef62d827 100644
--- a/org.eclipse.debug.ui/scripts/exportplugin.xml
+++ b/org.eclipse.debug.ui/scripts/exportplugin.xml
@@ -1,35 +1,35 @@
-<!-- Export a jar of .class files for the org.eclipse.debug.ui Eclipse plugin
- along with other important plugin files to the "plugin-export" subdirectory
- of the target Eclipse installation -->
-<project name="org.eclipse.debug.ui" default="export" basedir="..">
-
- <!-- Set the timestamp and important properties -->
- <target name="init">
- <tstamp/>
- <property name="destdir" value="../../plugin-export" />
- <property name="dest" value="${destdir}/org.eclipse.debug.ui_2.0.0" />
- </target>
-
- <!-- Create the jar of .class files, and copy other important files to export dir -->
- <target name="export" depends="init">
- <mkdir dir="${destdir}" />
- <delete dir="${dest}" />
- <mkdir dir="${dest}" />
- <jar
- jarfile="${dest}/dtui.jar"
- basedir="bin"
- />
- <!-- Create the source zip -->
- <zip zipfile="${dest}/dtuisrc.zip">
- <fileset dir="ui"/>
- </zip>
- <copy file="plugin.xml" todir="${dest}"/>
- <copy file="plugin.properties" todir="${dest}"/>
- <copy file=".classpath" todir="${dest}"/>
- <copy file=".options" todir="${dest}"/>
- <copy todir="${dest}/icons">
- <fileset dir="icons" />
- </copy>
- </target>
-
-</project>
+<!-- Export a jar of .class files for the org.eclipse.debug.ui Eclipse plugin
+ along with other important plugin files to the "plugin-export" subdirectory
+ of the target Eclipse installation -->
+<project name="org.eclipse.debug.ui" default="export" basedir="..">
+
+ <!-- Set the timestamp and important properties -->
+ <target name="init">
+ <tstamp/>
+ <property name="destdir" value="../../plugin-export" />
+ <property name="dest" value="${destdir}/org.eclipse.debug.ui_2.0.0" />
+ </target>
+
+ <!-- Create the jar of .class files, and copy other important files to export dir -->
+ <target name="export" depends="init">
+ <mkdir dir="${destdir}" />
+ <delete dir="${dest}" />
+ <mkdir dir="${dest}" />
+ <jar
+ jarfile="${dest}/dtui.jar"
+ basedir="bin"
+ />
+ <!-- Create the source zip -->
+ <zip zipfile="${dest}/dtuisrc.zip">
+ <fileset dir="ui"/>
+ </zip>
+ <copy file="plugin.xml" todir="${dest}"/>
+ <copy file="plugin.properties" todir="${dest}"/>
+ <copy file=".classpath" todir="${dest}"/>
+ <copy file=".options" todir="${dest}"/>
+ <copy todir="${dest}/icons">
+ <fileset dir="icons" />
+ </copy>
+ </target>
+
+</project>
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java
index 58cd7e38c..55acf5f58 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java
@@ -1,51 +1,51 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Generic color manager.
- */
-public class ColorManager {
-
- private static ColorManager fgColorManager;
-
- private ColorManager() {
- }
-
- public static ColorManager getDefault() {
- if (fgColorManager == null) {
- fgColorManager= new ColorManager();
- }
- return fgColorManager;
- }
-
- protected Map fColorTable= new HashMap(10);
-
- public Color getColor(RGB rgb) {
- Color color= (Color) fColorTable.get(rgb);
- if (color == null) {
- color= new Color(Display.getCurrent(), rgb);
- fColorTable.put(rgb, color);
- }
- return color;
- }
-
- public void dispose() {
- Iterator e= fColorTable.values().iterator();
- while (e.hasNext())
- ((Color) e.next()).dispose();
- }
-}
-
-
+package org.eclipse.debug.internal.ui;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * Generic color manager.
+ */
+public class ColorManager {
+
+ private static ColorManager fgColorManager;
+
+ private ColorManager() {
+ }
+
+ public static ColorManager getDefault() {
+ if (fgColorManager == null) {
+ fgColorManager= new ColorManager();
+ }
+ return fgColorManager;
+ }
+
+ protected Map fColorTable= new HashMap(10);
+
+ public Color getColor(RGB rgb) {
+ Color color= (Color) fColorTable.get(rgb);
+ if (color == null) {
+ color= new Color(Display.getCurrent(), rgb);
+ fColorTable.put(rgb, color);
+ }
+ return color;
+ }
+
+ public void dispose() {
+ Iterator e= fColorTable.values().iterator();
+ while (e.hasNext())
+ ((Color) e.next()).dispose();
+ }
+}
+
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspectiveFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspectiveFactory.java
index b71e267ed..7314557b7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspectiveFactory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspectiveFactory.java
@@ -1,59 +1,59 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-/**
- * The debug perspective factory.
- */
-public class DebugPerspectiveFactory implements IPerspectiveFactory {
-
- /**
- * @see IPerspectiveFactory#createInitialLayout(IPageLayout)
- */
- public void createInitialLayout(IPageLayout layout) {
-
- IFolderLayout consoleFolder = layout.createFolder(IInternalDebugUIConstants.ID_CONSOLE_FOLDER_VIEW, IPageLayout.BOTTOM, (float)0.75, layout.getEditorArea());
- consoleFolder.addView(IDebugUIConstants.ID_CONSOLE_VIEW);
- consoleFolder.addView(IPageLayout.ID_TASK_LIST);
- consoleFolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
- consoleFolder.addPlaceholder(IPageLayout.ID_PROP_SHEET);
-
- IFolderLayout navFolder= layout.createFolder(IInternalDebugUIConstants.ID_NAVIGATOR_FOLDER_VIEW, IPageLayout.TOP, (float) 0.5, layout.getEditorArea());
- navFolder.addView(IDebugUIConstants.ID_DEBUG_VIEW);
- navFolder.addPlaceholder(IPageLayout.ID_RES_NAV);
-
- IFolderLayout toolsFolder= layout.createFolder(IInternalDebugUIConstants.ID_TOOLS_FOLDER_VIEW, IPageLayout.RIGHT, (float) 0.5, IInternalDebugUIConstants.ID_NAVIGATOR_FOLDER_VIEW);
- toolsFolder.addView(IDebugUIConstants.ID_VARIABLE_VIEW);
- toolsFolder.addView(IDebugUIConstants.ID_BREAKPOINT_VIEW);
- toolsFolder.addView(IDebugUIConstants.ID_EXPRESSION_VIEW);
-
- IFolderLayout outlineFolder= layout.createFolder(IInternalDebugUIConstants.ID_OUTLINE_FOLDER_VIEW, IPageLayout.RIGHT, (float) 0.75, layout.getEditorArea());
- outlineFolder.addView(IPageLayout.ID_OUTLINE);
-
- layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
- layout.addActionSet(IDebugUIConstants.DEBUG_ACTION_SET);
-
- setContentsOfShowViewMenu(layout);
- }
-
- /**
- * Sets the intial contents of the "Show View" menu.
- */
- protected void setContentsOfShowViewMenu(IPageLayout layout) {
- layout.addShowViewShortcut(IDebugUIConstants.ID_DEBUG_VIEW);
- layout.addShowViewShortcut(IDebugUIConstants.ID_VARIABLE_VIEW);
- layout.addShowViewShortcut(IDebugUIConstants.ID_BREAKPOINT_VIEW);
- layout.addShowViewShortcut(IDebugUIConstants.ID_EXPRESSION_VIEW);
- layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
- layout.addShowViewShortcut(IDebugUIConstants.ID_CONSOLE_VIEW);
- layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
- }
-}
+package org.eclipse.debug.internal.ui;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+
+/**
+ * The debug perspective factory.
+ */
+public class DebugPerspectiveFactory implements IPerspectiveFactory {
+
+ /**
+ * @see IPerspectiveFactory#createInitialLayout(IPageLayout)
+ */
+ public void createInitialLayout(IPageLayout layout) {
+
+ IFolderLayout consoleFolder = layout.createFolder(IInternalDebugUIConstants.ID_CONSOLE_FOLDER_VIEW, IPageLayout.BOTTOM, (float)0.75, layout.getEditorArea());
+ consoleFolder.addView(IDebugUIConstants.ID_CONSOLE_VIEW);
+ consoleFolder.addView(IPageLayout.ID_TASK_LIST);
+ consoleFolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
+ consoleFolder.addPlaceholder(IPageLayout.ID_PROP_SHEET);
+
+ IFolderLayout navFolder= layout.createFolder(IInternalDebugUIConstants.ID_NAVIGATOR_FOLDER_VIEW, IPageLayout.TOP, (float) 0.5, layout.getEditorArea());
+ navFolder.addView(IDebugUIConstants.ID_DEBUG_VIEW);
+ navFolder.addPlaceholder(IPageLayout.ID_RES_NAV);
+
+ IFolderLayout toolsFolder= layout.createFolder(IInternalDebugUIConstants.ID_TOOLS_FOLDER_VIEW, IPageLayout.RIGHT, (float) 0.5, IInternalDebugUIConstants.ID_NAVIGATOR_FOLDER_VIEW);
+ toolsFolder.addView(IDebugUIConstants.ID_VARIABLE_VIEW);
+ toolsFolder.addView(IDebugUIConstants.ID_BREAKPOINT_VIEW);
+ toolsFolder.addView(IDebugUIConstants.ID_EXPRESSION_VIEW);
+
+ IFolderLayout outlineFolder= layout.createFolder(IInternalDebugUIConstants.ID_OUTLINE_FOLDER_VIEW, IPageLayout.RIGHT, (float) 0.75, layout.getEditorArea());
+ outlineFolder.addView(IPageLayout.ID_OUTLINE);
+
+ layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
+ layout.addActionSet(IDebugUIConstants.DEBUG_ACTION_SET);
+
+ setContentsOfShowViewMenu(layout);
+ }
+
+ /**
+ * Sets the intial contents of the "Show View" menu.
+ */
+ protected void setContentsOfShowViewMenu(IPageLayout layout) {
+ layout.addShowViewShortcut(IDebugUIConstants.ID_DEBUG_VIEW);
+ layout.addShowViewShortcut(IDebugUIConstants.ID_VARIABLE_VIEW);
+ layout.addShowViewShortcut(IDebugUIConstants.ID_BREAKPOINT_VIEW);
+ layout.addShowViewShortcut(IDebugUIConstants.ID_EXPRESSION_VIEW);
+ layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
+ layout.addShowViewShortcut(IDebugUIConstants.ID_CONSOLE_VIEW);
+ layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
+ }
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
index ad2eea3bf..707edd185 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
@@ -1,241 +1,241 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.HashMap;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * The images provided by the debug plugin.
- */
-public class DebugPluginImages {
-
- /**
- * The image registry containing <code>Image</code>s.
- */
- private static ImageRegistry imageRegistry;
-
- /**
- * A table of all the <code>ImageDescriptor</code>s.
- */
- private static HashMap imageDescriptors;
-
- private static final String ATTR_LAUNCH_CONFIG_TYPE_ICON = "icon"; //$NON-NLS-1$
- private static final String ATTR_LAUNCH_CONFIG_TYPE_ID = "configTypeID"; //$NON-NLS-1$
-
- /* Declare Common paths */
- private static URL ICON_BASE_URL= null;
-
- static {
- String pathSuffix = "icons/full/"; //$NON-NLS-1$
-
- try {
- ICON_BASE_URL= new URL(DebugUIPlugin.getDefault().getDescriptor().getInstallURL(), pathSuffix);
- } catch (MalformedURLException e) {
- // do nothing
- }
- }
-
- // Use IPath and toOSString to build the names to ensure they have the slashes correct
- private final static String CTOOL= "ctool16/"; //basic colors - size 16x16 //$NON-NLS-1$
- private final static String LOCALTOOL= "clcl16/"; //basic colors - size 16x16 //$NON-NLS-1$
- private final static String DLCL= "dlcl16/"; //disabled - size 16x16 //$NON-NLS-1$
- private final static String ELCL= "elcl16/"; //enabled - size 16x16 //$NON-NLS-1$
- private final static String OBJECT= "obj16/"; //basic colors - size 16x16 //$NON-NLS-1$
- private final static String WIZBAN= "wizban/"; //basic colors - size 16x16 //$NON-NLS-1$
- private final static String OVR= "ovr16/"; //basic colors - size 7x8 //$NON-NLS-1$
- private final static String VIEW= "cview16/"; // views //$NON-NLS-1$
-
- /**
- * Declare all images
- */
- private static void declareImages() {
- // Actions
- declareRegistryImage(IDebugUIConstants.IMG_ACT_DEBUG, CTOOL + "debug_exc.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_ACT_RUN, CTOOL + "run_exc.gif"); //$NON-NLS-1$
-
- //menus
- declareRegistryImage(IDebugUIConstants.IMG_LCL_CHANGE_VARIABLE_VALUE, LOCALTOOL + "changevariablevalue_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_CHANGE_VARIABLE_VALUE, DLCL + "changevariablevalue_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_CHANGE_VARIABLE_VALUE, ELCL + "changevariablevalue_co.gif"); //$NON-NLS-1$
-
- declareRegistryImage(IDebugUIConstants.IMG_LCL_CONTENT_ASSIST, LOCALTOOL + "metharg_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_DLCL_CONTENT_ASSIST, DLCL + "metharg_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_ELCL_CONTENT_ASSIST, ELCL + "metharg_obj.gif"); //$NON-NLS-1$
-
- //Local toolbars
- declareRegistryImage(IDebugUIConstants.IMG_LCL_DETAIL_PANE, LOCALTOOL + "toggledetailpane_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_LCL_CLEAR, LOCALTOOL + "clear_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_LCL_TYPE_NAMES, LOCALTOOL + "tnames_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_LCL_DISCONNECT, LOCALTOOL + "disconnect_co.gif"); //$NON-NLS-1$
-
- // disabled local toolbars
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE, ELCL + "toggledetailpane_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_CLEAR, DLCL + "clear_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_TYPE_NAMES, DLCL + "tnames_co.gif"); //$NON-NLS-1$
-
- // enabled local toolbars
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE, ELCL + "toggledetailpane_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_CLEAR, ELCL + "clear_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_TYPE_NAMES, ELCL + "tnames_co.gif"); //$NON-NLS-1$
-
- //Object
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_LAUNCH_DEBUG, OBJECT + "ldebug_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_LAUNCH_RUN, OBJECT + "lrun_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_LAUNCH_RUN_TERMINATED, OBJECT + "terminatedlaunch_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET, OBJECT + "debugt_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET_TERMINATED, OBJECT + "debugtt_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_THREAD_RUNNING, OBJECT + "thread_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_THREAD_SUSPENDED, OBJECT + "threads_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_THREAD_TERMINATED, OBJECT + "threadt_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_STACKFRAME, OBJECT + "stckframe_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_STACKFRAME_RUNNING, OBJECT + "stckframe_running_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_VARIABLE, OBJECT + "genericvariable_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT, OBJECT + "brkp_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT_DISABLED, OBJECT + "brkpd_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_OS_PROCESS, OBJECT + "osprc_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_OS_PROCESS_TERMINATED, OBJECT + "osprct_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_EXPRESSION, OBJECT + "expression_obj.gif"); //$NON-NLS-1$
-
- // Views
- declareRegistryImage(IDebugUIConstants.IMG_VIEW_BREAKPOINTS, VIEW + "breakpoint_view.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_VIEW_CONSOLE, VIEW + "console_view.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_VIEW_EXPRESSIONS, VIEW + "watchlist_view.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_VIEW_LAUNCHES, VIEW + "debug_view.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_VIEW_VARIABLES, VIEW + "variable_view.gif"); //$NON-NLS-1$
-
- // Perspectives
- declareRegistryImage(IDebugUIConstants.IMG_PERSPECTIVE_DEBUG, VIEW + "debug_persp.gif"); //$NON-NLS-1$
-
- //Wizard Banners
- declareRegistryImage(IDebugUIConstants.IMG_WIZBAN_DEBUG, WIZBAN + "debug_wiz.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_WIZBAN_RUN, WIZBAN + "run_wiz.gif"); //$NON-NLS-1$
-
- // Overlays
- declareRegistryImage(IDebugUIConstants.IMG_OVR_ERROR, OVR + "error.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_OVR_TRANSPARENT, OVR + "transparent.gif"); //$NON-NLS-1$
-
- // launch configuration types
- IPluginDescriptor pluginDescriptor = DebugUIPlugin.getDefault().getDescriptor();
- IExtensionPoint extensionPoint= pluginDescriptor.getExtensionPoint(IDebugUIConstants.EXTENSION_POINT_LAUNCH_CONFIGURATION_TYPE_IMAGES);
- IConfigurationElement[] configElements= extensionPoint.getConfigurationElements();
- for (int i = 0; i < configElements.length; i++) {
- IConfigurationElement configElement = configElements[i];
- URL iconURL = configElement.getDeclaringExtension().getDeclaringPluginDescriptor().getInstallURL();
- String iconPath = configElement.getAttribute(ATTR_LAUNCH_CONFIG_TYPE_ICON);
- ImageDescriptor imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
- try {
- iconURL = new URL(iconURL, iconPath);
- imageDescriptor = ImageDescriptor.createFromURL(iconURL);
- } catch (MalformedURLException mue) {
- DebugUIPlugin.log(mue);
- }
- String configTypeID = configElement.getAttribute(ATTR_LAUNCH_CONFIG_TYPE_ID);
- imageRegistry.put(configTypeID, imageDescriptor);
- imageDescriptors.put(configTypeID, imageDescriptor);
- }
- }
-
- /**
- * Declare an Image in the registry table.
- * @param key The key to use when registering the image
- * @param path The path where the image can be found. This path is relative to where
- * this plugin class is found (i.e. typically the packages directory)
- */
- private final static void declareRegistryImage(String key, String path) {
- ImageDescriptor desc= ImageDescriptor.getMissingImageDescriptor();
- try {
- desc= ImageDescriptor.createFromURL(makeIconFileURL(path));
- } catch (MalformedURLException me) {
- DebugUIPlugin.log(me);
- }
- imageRegistry.put(key, desc);
- imageDescriptors.put(key, desc);
- }
-
- /**
- * Returns the ImageRegistry.
- */
- public static ImageRegistry getImageRegistry() {
- if (imageRegistry == null) {
- initializeImageRegistry();
- }
- return imageRegistry;
- }
-
- /**
- * Initialize the image registry by declaring all of the required
- * graphics. This involves creating JFace image descriptors describing
- * how to create/find the image should it be needed.
- * The image is not actually allocated until requested.
- *
- * Prefix conventions
- * Wizard Banners WIZBAN_
- * Preference Banners PREF_BAN_
- * Property Page Banners PROPBAN_
- * Color toolbar CTOOL_
- * Enable toolbar ETOOL_
- * Disable toolbar DTOOL_
- * Local enabled toolbar ELCL_
- * Local Disable toolbar DLCL_
- * Object large OBJL_
- * Object small OBJS_
- * View VIEW_
- * Product images PROD_
- * Misc images MISC_
- *
- * Where are the images?
- * The images (typically gifs) are found in the same location as this plugin class.
- * This may mean the same package directory as the package holding this class.
- * The images are declared using this.getClass() to ensure they are looked up via
- * this plugin class.
- * @see JFace's ImageRegistry
- */
- public static ImageRegistry initializeImageRegistry() {
- imageRegistry= new ImageRegistry(DebugUIPlugin.getStandardDisplay());
- imageDescriptors = new HashMap(30);
- declareImages();
- return imageRegistry;
- }
-
- /**
- * Returns the <code>Image<code> identified by the given key,
- * or <code>null</code> if it does not exist.
- */
- public static Image getImage(String key) {
- return getImageRegistry().get(key);
- }
-
- /**
- * Returns the <code>ImageDescriptor<code> identified by the given key,
- * or <code>null</code> if it does not exist.
- */
- public static ImageDescriptor getImageDescriptor(String key) {
- if (imageDescriptors == null) {
- initializeImageRegistry();
- }
- return (ImageDescriptor)imageDescriptors.get(key);
- }
-
- private static URL makeIconFileURL(String iconPath) throws MalformedURLException {
- if (ICON_BASE_URL == null) {
- throw new MalformedURLException();
- }
-
- return new URL(ICON_BASE_URL, iconPath);
- }
-}
-
-
+package org.eclipse.debug.internal.ui;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import java.util.HashMap;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IPluginDescriptor;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * The images provided by the debug plugin.
+ */
+public class DebugPluginImages {
+
+ /**
+ * The image registry containing <code>Image</code>s.
+ */
+ private static ImageRegistry imageRegistry;
+
+ /**
+ * A table of all the <code>ImageDescriptor</code>s.
+ */
+ private static HashMap imageDescriptors;
+
+ private static final String ATTR_LAUNCH_CONFIG_TYPE_ICON = "icon"; //$NON-NLS-1$
+ private static final String ATTR_LAUNCH_CONFIG_TYPE_ID = "configTypeID"; //$NON-NLS-1$
+
+ /* Declare Common paths */
+ private static URL ICON_BASE_URL= null;
+
+ static {
+ String pathSuffix = "icons/full/"; //$NON-NLS-1$
+
+ try {
+ ICON_BASE_URL= new URL(DebugUIPlugin.getDefault().getDescriptor().getInstallURL(), pathSuffix);
+ } catch (MalformedURLException e) {
+ // do nothing
+ }
+ }
+
+ // Use IPath and toOSString to build the names to ensure they have the slashes correct
+ private final static String CTOOL= "ctool16/"; //basic colors - size 16x16 //$NON-NLS-1$
+ private final static String LOCALTOOL= "clcl16/"; //basic colors - size 16x16 //$NON-NLS-1$
+ private final static String DLCL= "dlcl16/"; //disabled - size 16x16 //$NON-NLS-1$
+ private final static String ELCL= "elcl16/"; //enabled - size 16x16 //$NON-NLS-1$
+ private final static String OBJECT= "obj16/"; //basic colors - size 16x16 //$NON-NLS-1$
+ private final static String WIZBAN= "wizban/"; //basic colors - size 16x16 //$NON-NLS-1$
+ private final static String OVR= "ovr16/"; //basic colors - size 7x8 //$NON-NLS-1$
+ private final static String VIEW= "cview16/"; // views //$NON-NLS-1$
+
+ /**
+ * Declare all images
+ */
+ private static void declareImages() {
+ // Actions
+ declareRegistryImage(IDebugUIConstants.IMG_ACT_DEBUG, CTOOL + "debug_exc.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_ACT_RUN, CTOOL + "run_exc.gif"); //$NON-NLS-1$
+
+ //menus
+ declareRegistryImage(IDebugUIConstants.IMG_LCL_CHANGE_VARIABLE_VALUE, LOCALTOOL + "changevariablevalue_co.gif"); //$NON-NLS-1$
+ declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_CHANGE_VARIABLE_VALUE, DLCL + "changevariablevalue_co.gif"); //$NON-NLS-1$
+ declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_CHANGE_VARIABLE_VALUE, ELCL + "changevariablevalue_co.gif"); //$NON-NLS-1$
+
+ declareRegistryImage(IDebugUIConstants.IMG_LCL_CONTENT_ASSIST, LOCALTOOL + "metharg_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_DLCL_CONTENT_ASSIST, DLCL + "metharg_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_ELCL_CONTENT_ASSIST, ELCL + "metharg_obj.gif"); //$NON-NLS-1$
+
+ //Local toolbars
+ declareRegistryImage(IDebugUIConstants.IMG_LCL_DETAIL_PANE, LOCALTOOL + "toggledetailpane_co.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_LCL_CLEAR, LOCALTOOL + "clear_co.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_LCL_TYPE_NAMES, LOCALTOOL + "tnames_co.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_LCL_DISCONNECT, LOCALTOOL + "disconnect_co.gif"); //$NON-NLS-1$
+
+ // disabled local toolbars
+ declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE, ELCL + "toggledetailpane_co.gif"); //$NON-NLS-1$
+ declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_CLEAR, DLCL + "clear_co.gif"); //$NON-NLS-1$
+ declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_TYPE_NAMES, DLCL + "tnames_co.gif"); //$NON-NLS-1$
+
+ // enabled local toolbars
+ declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE, ELCL + "toggledetailpane_co.gif"); //$NON-NLS-1$
+ declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_CLEAR, ELCL + "clear_co.gif"); //$NON-NLS-1$
+ declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_TYPE_NAMES, ELCL + "tnames_co.gif"); //$NON-NLS-1$
+
+ //Object
+ declareRegistryImage(IDebugUIConstants.IMG_OBJS_LAUNCH_DEBUG, OBJECT + "ldebug_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_OBJS_LAUNCH_RUN, OBJECT + "lrun_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_OBJS_LAUNCH_RUN_TERMINATED, OBJECT + "terminatedlaunch_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET, OBJECT + "debugt_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET_TERMINATED, OBJECT + "debugtt_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_OBJS_THREAD_RUNNING, OBJECT + "thread_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_OBJS_THREAD_SUSPENDED, OBJECT + "threads_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_OBJS_THREAD_TERMINATED, OBJECT + "threadt_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_OBJS_STACKFRAME, OBJECT + "stckframe_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_OBJS_STACKFRAME_RUNNING, OBJECT + "stckframe_running_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_OBJS_VARIABLE, OBJECT + "genericvariable_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT, OBJECT + "brkp_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT_DISABLED, OBJECT + "brkpd_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_OBJS_OS_PROCESS, OBJECT + "osprc_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_OBJS_OS_PROCESS_TERMINATED, OBJECT + "osprct_obj.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_OBJS_EXPRESSION, OBJECT + "expression_obj.gif"); //$NON-NLS-1$
+
+ // Views
+ declareRegistryImage(IDebugUIConstants.IMG_VIEW_BREAKPOINTS, VIEW + "breakpoint_view.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_VIEW_CONSOLE, VIEW + "console_view.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_VIEW_EXPRESSIONS, VIEW + "watchlist_view.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_VIEW_LAUNCHES, VIEW + "debug_view.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_VIEW_VARIABLES, VIEW + "variable_view.gif"); //$NON-NLS-1$
+
+ // Perspectives
+ declareRegistryImage(IDebugUIConstants.IMG_PERSPECTIVE_DEBUG, VIEW + "debug_persp.gif"); //$NON-NLS-1$
+
+ //Wizard Banners
+ declareRegistryImage(IDebugUIConstants.IMG_WIZBAN_DEBUG, WIZBAN + "debug_wiz.gif"); //$NON-NLS-1$
+ declareRegistryImage(IDebugUIConstants.IMG_WIZBAN_RUN, WIZBAN + "run_wiz.gif"); //$NON-NLS-1$
+
+ // Overlays
+ declareRegistryImage(IDebugUIConstants.IMG_OVR_ERROR, OVR + "error.gif"); //$NON-NLS-1$
+ declareRegistryImage(IInternalDebugUIConstants.IMG_OVR_TRANSPARENT, OVR + "transparent.gif"); //$NON-NLS-1$
+
+ // launch configuration types
+ IPluginDescriptor pluginDescriptor = DebugUIPlugin.getDefault().getDescriptor();
+ IExtensionPoint extensionPoint= pluginDescriptor.getExtensionPoint(IDebugUIConstants.EXTENSION_POINT_LAUNCH_CONFIGURATION_TYPE_IMAGES);
+ IConfigurationElement[] configElements= extensionPoint.getConfigurationElements();
+ for (int i = 0; i < configElements.length; i++) {
+ IConfigurationElement configElement = configElements[i];
+ URL iconURL = configElement.getDeclaringExtension().getDeclaringPluginDescriptor().getInstallURL();
+ String iconPath = configElement.getAttribute(ATTR_LAUNCH_CONFIG_TYPE_ICON);
+ ImageDescriptor imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
+ try {
+ iconURL = new URL(iconURL, iconPath);
+ imageDescriptor = ImageDescriptor.createFromURL(iconURL);
+ } catch (MalformedURLException mue) {
+ DebugUIPlugin.log(mue);
+ }
+ String configTypeID = configElement.getAttribute(ATTR_LAUNCH_CONFIG_TYPE_ID);
+ imageRegistry.put(configTypeID, imageDescriptor);
+ imageDescriptors.put(configTypeID, imageDescriptor);
+ }
+ }
+
+ /**
+ * Declare an Image in the registry table.
+ * @param key The key to use when registering the image
+ * @param path The path where the image can be found. This path is relative to where
+ * this plugin class is found (i.e. typically the packages directory)
+ */
+ private final static void declareRegistryImage(String key, String path) {
+ ImageDescriptor desc= ImageDescriptor.getMissingImageDescriptor();
+ try {
+ desc= ImageDescriptor.createFromURL(makeIconFileURL(path));
+ } catch (MalformedURLException me) {
+ DebugUIPlugin.log(me);
+ }
+ imageRegistry.put(key, desc);
+ imageDescriptors.put(key, desc);
+ }
+
+ /**
+ * Returns the ImageRegistry.
+ */
+ public static ImageRegistry getImageRegistry() {
+ if (imageRegistry == null) {
+ initializeImageRegistry();
+ }
+ return imageRegistry;
+ }
+
+ /**
+ * Initialize the image registry by declaring all of the required
+ * graphics. This involves creating JFace image descriptors describing
+ * how to create/find the image should it be needed.
+ * The image is not actually allocated until requested.
+ *
+ * Prefix conventions
+ * Wizard Banners WIZBAN_
+ * Preference Banners PREF_BAN_
+ * Property Page Banners PROPBAN_
+ * Color toolbar CTOOL_
+ * Enable toolbar ETOOL_
+ * Disable toolbar DTOOL_
+ * Local enabled toolbar ELCL_
+ * Local Disable toolbar DLCL_
+ * Object large OBJL_
+ * Object small OBJS_
+ * View VIEW_
+ * Product images PROD_
+ * Misc images MISC_
+ *
+ * Where are the images?
+ * The images (typically gifs) are found in the same location as this plugin class.
+ * This may mean the same package directory as the package holding this class.
+ * The images are declared using this.getClass() to ensure they are looked up via
+ * this plugin class.
+ * @see JFace's ImageRegistry
+ */
+ public static ImageRegistry initializeImageRegistry() {
+ imageRegistry= new ImageRegistry(DebugUIPlugin.getStandardDisplay());
+ imageDescriptors = new HashMap(30);
+ declareImages();
+ return imageRegistry;
+ }
+
+ /**
+ * Returns the <code>Image<code> identified by the given key,
+ * or <code>null</code> if it does not exist.
+ */
+ public static Image getImage(String key) {
+ return getImageRegistry().get(key);
+ }
+
+ /**
+ * Returns the <code>ImageDescriptor<code> identified by the given key,
+ * or <code>null</code> if it does not exist.
+ */
+ public static ImageDescriptor getImageDescriptor(String key) {
+ if (imageDescriptors == null) {
+ initializeImageRegistry();
+ }
+ return (ImageDescriptor)imageDescriptors.get(key);
+ }
+
+ private static URL makeIconFileURL(String iconPath) throws MalformedURLException {
+ if (ICON_BASE_URL == null) {
+ throw new MalformedURLException();
+ }
+
+ return new URL(ICON_BASE_URL, iconPath);
+ }
+}
+
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java
index 448a795af..6f507f969 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java
@@ -1,27 +1,27 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class DebugUIMessages {
-
- private static final String RESOURCE_BUNDLE= "org.eclipse.debug.internal.ui.DebugUIMessages";//$NON-NLS-1$
-
- private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
-
- private DebugUIMessages() {
- }
-
- public static String getString(String key) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
- }
-}
+package org.eclipse.debug.internal.ui;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class DebugUIMessages {
+
+ private static final String RESOURCE_BUNDLE= "org.eclipse.debug.internal.ui.DebugUIMessages";//$NON-NLS-1$
+
+ private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+
+ private DebugUIMessages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ }
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
index 8ea2e6e5f..4da2b5a4a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
@@ -1,539 +1,539 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.lang.reflect.InvocationTargetException;
-
-import org.apache.xml.serialize.Method;
-import org.apache.xml.serialize.OutputFormat;
-import org.apache.xml.serialize.Serializer;
-import org.apache.xml.serialize.SerializerFactory;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
-import org.eclipse.debug.internal.ui.launchConfigurations.PerspectiveManager;
-import org.eclipse.debug.internal.ui.preferences.ConsolePreferencePage;
-import org.eclipse.debug.internal.ui.preferences.DebugActionGroupsManager;
-import org.eclipse.debug.internal.ui.preferences.DebugPreferencePage;
-import org.eclipse.debug.internal.ui.preferences.LaunchHistoryPreferencePage;
-import org.eclipse.debug.internal.ui.preferences.VariableViewsPreferencePage;
-import org.eclipse.debug.internal.ui.views.console.ConsoleDocumentManager;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.w3c.dom.Document;
-
-/**
- * The Debug UI Plugin.
- *
- */
-public class DebugUIPlugin extends AbstractUIPlugin {
-
- /**
- * The singleton debug plugin instance
- */
- private static DebugUIPlugin fgDebugUIPlugin= null;
-
- /**
- * A utility presentation used to obtain labels
- */
- protected static IDebugModelPresentation fgPresentation = null;
-
- /**
- * Default label provider
- */
- private static DefaultLabelProvider fgDefaultLabelProvider;
-
- /**
- * Flag indicating whether the debug UI is in trace
- * mode. When in trace mode, extra debug information
- * is produced.
- */
- private boolean fTrace = false;
-
- /**
- * Returns whether the debug UI plug-in is in trace
- * mode.
- *
- * @return whether the debug UI plug-in is in trace
- * mode
- */
- public boolean isTraceMode() {
- return fTrace;
- }
-
- /**
- * Logs the given message if in trace mode.
- *
- * @param String message to log
- */
- public static void logTraceMessage(String message) {
- if (getDefault().isTraceMode()) {
- IStatus s = new Status(IStatus.WARNING, IDebugUIConstants.PLUGIN_ID, IDebugUIConstants.INTERNAL_ERROR, message, null);
- getDefault().getLog().log(s);
- }
- }
-
- /**
- * Constructs the debug UI plugin
- */
- public DebugUIPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
- fgDebugUIPlugin= this;
- }
- protected ILaunchManager getLaunchManager() {
- return DebugPlugin.getDefault().getLaunchManager();
- }
- /**
- * Returns the singleton instance of the debug plugin.
- */
- public static DebugUIPlugin getDefault() {
- return fgDebugUIPlugin;
- }
-
- /**
- * Convenience method which returns the unique identifier of this plugin.
- */
- public static String getUniqueIdentifier() {
- if (getDefault() == null) {
- // If the default instance is not yet initialized,
- // return a static identifier. This identifier must
- // match the plugin id defined in plugin.xml
- return "org.eclipse.debug.ui"; //$NON-NLS-1$
- }
- return getDefault().getDescriptor().getUniqueIdentifier();
- }
-
- public static IDebugModelPresentation getModelPresentation() {
- if (fgPresentation == null) {
- fgPresentation = new DelegatingModelPresentation();
- }
- return fgPresentation;
- }
-
- public static LaunchConfigurationManager getLaunchConfigurationManager() {
- return LaunchConfigurationManager.getDefault();
- }
- public static IWorkbenchWindow getActiveWorkbenchWindow() {
- return getDefault().getWorkbench().getActiveWorkbenchWindow();
- }
-
- public static Shell getShell() {
- if (getActiveWorkbenchWindow() != null) {
- return getActiveWorkbenchWindow().getShell();
- }
- return null;
- }
- /**
- * Returns the default label provider for the debug UI.
- */
- public static ILabelProvider getDefaultLabelProvider() {
- if (fgDefaultLabelProvider == null) {
- fgDefaultLabelProvider = new DefaultLabelProvider();
- }
- return fgDefaultLabelProvider;
- }
-
- /**
- * Creates an extension. If the extension plugin has not
- * been loaded a busy cursor will be activated during the duration of
- * the load.
- *
- * @param element the config element defining the extension
- * @param classAttribute the name of the attribute carrying the class
- * @return the extension object
- */
- public static Object createExtension(final IConfigurationElement element, final String classAttribute) throws CoreException {
- // If plugin has been loaded create extension.
- // Otherwise, show busy cursor then create extension.
- IPluginDescriptor plugin = element.getDeclaringExtension().getDeclaringPluginDescriptor();
- if (plugin.isPluginActivated()) {
- return element.createExecutableExtension(classAttribute);
- } else {
- final Object [] ret = new Object[1];
- final CoreException [] exc = new CoreException[1];
- BusyIndicator.showWhile(null, new Runnable() {
- public void run() {
- try {
- ret[0] = element.createExecutableExtension(classAttribute);
- } catch (CoreException e) {
- exc[0] = e;
- }
- }
- });
- if (exc[0] != null) {
- throw exc[0];
- }
- else {
- return ret[0];
- }
- }
- }
-
- protected ImageRegistry createImageRegistry() {
- return DebugPluginImages.initializeImageRegistry();
- }
-
- /**
- * Shuts down this plug-in and discards all plug-in state.
- * If a plug-in has been started, this method is automatically
- * invoked by the platform core when the workbench is closed.
- * <p>
- * This method is intended to perform simple termination
- * of the plug-in environment. The platform may terminate invocations
- * that do not complete in a timely fashion.
- * </p><p>
- * By default this will save the preference and dialog stores (if they are in use).
- * </p><p>
- * Subclasses which override this method must call super first.
- * </p>
- */
- public void shutdown() throws CoreException {
-
- // shutdown the perspective manager
- PerspectiveManager.getDefault().shutdown();
- if (DebugActionGroupsManager.defaultExists()) {
- DebugActionGroupsManager.getDefault().shutdown();
- }
- if (LaunchConfigurationManager.defaultExists()) {
- LaunchConfigurationManager.getDefault().shutdown();
- }
- if (ConsoleDocumentManager.defaultExists()) {
- ConsoleDocumentManager.getDefault().shutdown();
- }
-
- ColorManager.getDefault().dispose();
- if (fgPresentation != null) {
- fgPresentation.dispose();
- }
-
- super.shutdown();
- }
-
- /**
- * @see AbstractUIPlugin#startup()
- */
- public void startup() throws CoreException {
- super.startup();
-
- PerspectiveManager.getDefault().startup();
- ConsoleDocumentManager.getDefault().startup();
-
- IAdapterManager manager= Platform.getAdapterManager();
- manager.registerAdapters(new DebugUIPropertiesAdapterFactory(), IDebugElement.class);
- manager.registerAdapters(new DebugUIPropertiesAdapterFactory(), IProcess.class);
-
- getStandardDisplay().asyncExec(
- new Runnable() {
- public void run() {
- createImageRegistry();
- }
- }
- );
- }
-
- /**
- * @see AbstractUIPlugin#initializeDefaultPreferences
- */
- protected void initializeDefaultPreferences(IPreferenceStore prefs) {
- DebugPreferencePage.initDefaults(prefs);
- ConsolePreferencePage.initDefaults(prefs);
- LaunchHistoryPreferencePage.initDefaults(prefs);
- VariableViewsPreferencePage.initDefaults(prefs);
+package org.eclipse.debug.internal.ui;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.lang.reflect.InvocationTargetException;
+
+import org.apache.xml.serialize.Method;
+import org.apache.xml.serialize.OutputFormat;
+import org.apache.xml.serialize.Serializer;
+import org.apache.xml.serialize.SerializerFactory;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdapterManager;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IPluginDescriptor;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.model.IDebugElement;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
+import org.eclipse.debug.internal.ui.launchConfigurations.PerspectiveManager;
+import org.eclipse.debug.internal.ui.preferences.ConsolePreferencePage;
+import org.eclipse.debug.internal.ui.preferences.DebugActionGroupsManager;
+import org.eclipse.debug.internal.ui.preferences.DebugPreferencePage;
+import org.eclipse.debug.internal.ui.preferences.LaunchHistoryPreferencePage;
+import org.eclipse.debug.internal.ui.preferences.VariableViewsPreferencePage;
+import org.eclipse.debug.internal.ui.views.console.ConsoleDocumentManager;
+import org.eclipse.debug.ui.IDebugModelPresentation;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.w3c.dom.Document;
+
+/**
+ * The Debug UI Plugin.
+ *
+ */
+public class DebugUIPlugin extends AbstractUIPlugin {
+
+ /**
+ * The singleton debug plugin instance
+ */
+ private static DebugUIPlugin fgDebugUIPlugin= null;
+
+ /**
+ * A utility presentation used to obtain labels
+ */
+ protected static IDebugModelPresentation fgPresentation = null;
+
+ /**
+ * Default label provider
+ */
+ private static DefaultLabelProvider fgDefaultLabelProvider;
+
+ /**
+ * Flag indicating whether the debug UI is in trace
+ * mode. When in trace mode, extra debug information
+ * is produced.
+ */
+ private boolean fTrace = false;
+
+ /**
+ * Returns whether the debug UI plug-in is in trace
+ * mode.
+ *
+ * @return whether the debug UI plug-in is in trace
+ * mode
+ */
+ public boolean isTraceMode() {
+ return fTrace;
+ }
+
+ /**
+ * Logs the given message if in trace mode.
+ *
+ * @param String message to log
+ */
+ public static void logTraceMessage(String message) {
+ if (getDefault().isTraceMode()) {
+ IStatus s = new Status(IStatus.WARNING, IDebugUIConstants.PLUGIN_ID, IDebugUIConstants.INTERNAL_ERROR, message, null);
+ getDefault().getLog().log(s);
+ }
+ }
+
+ /**
+ * Constructs the debug UI plugin
+ */
+ public DebugUIPlugin(IPluginDescriptor descriptor) {
+ super(descriptor);
+ fgDebugUIPlugin= this;
+ }
+ protected ILaunchManager getLaunchManager() {
+ return DebugPlugin.getDefault().getLaunchManager();
}
-
- protected IProcess getProcessFromInput(Object input) {
- IProcess processInput= null;
- if (input instanceof IProcess) {
- processInput= (IProcess) input;
- } else
- if (input instanceof ILaunch) {
- IDebugTarget target= ((ILaunch) input).getDebugTarget();
- if (target != null) {
- processInput= target.getProcess();
- } else {
- IProcess[] processes= ((ILaunch) input).getProcesses();
- if ((processes != null) && (processes.length > 0)) {
- processInput= processes[0];
- }
- }
- } else
- if (input instanceof IDebugElement) {
- processInput= ((IDebugElement) input).getDebugTarget().getProcess();
- }
-
- return processInput;
+ /**
+ * Returns the singleton instance of the debug plugin.
+ */
+ public static DebugUIPlugin getDefault() {
+ return fgDebugUIPlugin;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getDefault() == null) {
+ // If the default instance is not yet initialized,
+ // return a static identifier. This identifier must
+ // match the plugin id defined in plugin.xml
+ return "org.eclipse.debug.ui"; //$NON-NLS-1$
+ }
+ return getDefault().getDescriptor().getUniqueIdentifier();
+ }
+
+ public static IDebugModelPresentation getModelPresentation() {
+ if (fgPresentation == null) {
+ fgPresentation = new DelegatingModelPresentation();
+ }
+ return fgPresentation;
+ }
+
+ public static LaunchConfigurationManager getLaunchConfigurationManager() {
+ return LaunchConfigurationManager.getDefault();
}
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ public static Shell getShell() {
+ if (getActiveWorkbenchWindow() != null) {
+ return getActiveWorkbenchWindow().getShell();
+ }
+ return null;
+ }
+ /**
+ * Returns the default label provider for the debug UI.
+ */
+ public static ILabelProvider getDefaultLabelProvider() {
+ if (fgDefaultLabelProvider == null) {
+ fgDefaultLabelProvider = new DefaultLabelProvider();
+ }
+ return fgDefaultLabelProvider;
+ }
+
+ /**
+ * Creates an extension. If the extension plugin has not
+ * been loaded a busy cursor will be activated during the duration of
+ * the load.
+ *
+ * @param element the config element defining the extension
+ * @param classAttribute the name of the attribute carrying the class
+ * @return the extension object
+ */
+ public static Object createExtension(final IConfigurationElement element, final String classAttribute) throws CoreException {
+ // If plugin has been loaded create extension.
+ // Otherwise, show busy cursor then create extension.
+ IPluginDescriptor plugin = element.getDeclaringExtension().getDeclaringPluginDescriptor();
+ if (plugin.isPluginActivated()) {
+ return element.createExecutableExtension(classAttribute);
+ } else {
+ final Object [] ret = new Object[1];
+ final CoreException [] exc = new CoreException[1];
+ BusyIndicator.showWhile(null, new Runnable() {
+ public void run() {
+ try {
+ ret[0] = element.createExecutableExtension(classAttribute);
+ } catch (CoreException e) {
+ exc[0] = e;
+ }
+ }
+ });
+ if (exc[0] != null) {
+ throw exc[0];
+ }
+ else {
+ return ret[0];
+ }
+ }
+ }
+
+ protected ImageRegistry createImageRegistry() {
+ return DebugPluginImages.initializeImageRegistry();
+ }
- /**
- * Utility method with conventions
- */
- public static void errorDialog(Shell shell, String title, String message, IStatus s) {
- log(s);
- // if the 'message' resource string and the IStatus' message are the same,
- // don't show both in the dialog
- if (s != null && message.equals(s.getMessage())) {
- message= null;
- }
- ErrorDialog.openError(shell, title, message, s);
- }
-
- /**
- * Utility method with conventions
- */
- public static void errorDialog(Shell shell, String title, String message, Throwable t) {
- log(t);
- IStatus status;
- if (t instanceof CoreException) {
- status= ((CoreException)t).getStatus();
- // if the 'message' resource string and the IStatus' message are the same,
- // don't show both in the dialog
- if (status != null && message.equals(status.getMessage())) {
- message= null;
- }
- } else {
- status= new Status(IStatus.ERROR, getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, "Error within Debug UI: ", t); //$NON-NLS-1$
- }
- ErrorDialog.openError(shell, title, message, status);
- }
+ /**
+ * Shuts down this plug-in and discards all plug-in state.
+ * If a plug-in has been started, this method is automatically
+ * invoked by the platform core when the workbench is closed.
+ * <p>
+ * This method is intended to perform simple termination
+ * of the plug-in environment. The platform may terminate invocations
+ * that do not complete in a timely fashion.
+ * </p><p>
+ * By default this will save the preference and dialog stores (if they are in use).
+ * </p><p>
+ * Subclasses which override this method must call super first.
+ * </p>
+ */
+ public void shutdown() throws CoreException {
+
+ // shutdown the perspective manager
+ PerspectiveManager.getDefault().shutdown();
+ if (DebugActionGroupsManager.defaultExists()) {
+ DebugActionGroupsManager.getDefault().shutdown();
+ }
+ if (LaunchConfigurationManager.defaultExists()) {
+ LaunchConfigurationManager.getDefault().shutdown();
+ }
+ if (ConsoleDocumentManager.defaultExists()) {
+ ConsoleDocumentManager.getDefault().shutdown();
+ }
+
+ ColorManager.getDefault().dispose();
+ if (fgPresentation != null) {
+ fgPresentation.dispose();
+ }
+
+ super.shutdown();
+ }
+
+ /**
+ * @see AbstractUIPlugin#startup()
+ */
+ public void startup() throws CoreException {
+ super.startup();
+
+ PerspectiveManager.getDefault().startup();
+ ConsoleDocumentManager.getDefault().startup();
+
+ IAdapterManager manager= Platform.getAdapterManager();
+ manager.registerAdapters(new DebugUIPropertiesAdapterFactory(), IDebugElement.class);
+ manager.registerAdapters(new DebugUIPropertiesAdapterFactory(), IProcess.class);
+
+ getStandardDisplay().asyncExec(
+ new Runnable() {
+ public void run() {
+ createImageRegistry();
+ }
+ }
+ );
+ }
+
+ /**
+ * @see AbstractUIPlugin#initializeDefaultPreferences
+ */
+ protected void initializeDefaultPreferences(IPreferenceStore prefs) {
+ DebugPreferencePage.initDefaults(prefs);
+ ConsolePreferencePage.initDefaults(prefs);
+ LaunchHistoryPreferencePage.initDefaults(prefs);
+ VariableViewsPreferencePage.initDefaults(prefs);
+ }
+
+ protected IProcess getProcessFromInput(Object input) {
+ IProcess processInput= null;
+ if (input instanceof IProcess) {
+ processInput= (IProcess) input;
+ } else
+ if (input instanceof ILaunch) {
+ IDebugTarget target= ((ILaunch) input).getDebugTarget();
+ if (target != null) {
+ processInput= target.getProcess();
+ } else {
+ IProcess[] processes= ((ILaunch) input).getProcesses();
+ if ((processes != null) && (processes.length > 0)) {
+ processInput= processes[0];
+ }
+ }
+ } else
+ if (input instanceof IDebugElement) {
+ processInput= ((IDebugElement) input).getDebugTarget().getProcess();
+ }
+
+ return processInput;
+ }
+
+ /**
+ * Utility method with conventions
+ */
+ public static void errorDialog(Shell shell, String title, String message, IStatus s) {
+ log(s);
+ // if the 'message' resource string and the IStatus' message are the same,
+ // don't show both in the dialog
+ if (s != null && message.equals(s.getMessage())) {
+ message= null;
+ }
+ ErrorDialog.openError(shell, title, message, s);
+ }
+
+ /**
+ * Utility method with conventions
+ */
+ public static void errorDialog(Shell shell, String title, String message, Throwable t) {
+ log(t);
+ IStatus status;
+ if (t instanceof CoreException) {
+ status= ((CoreException)t).getStatus();
+ // if the 'message' resource string and the IStatus' message are the same,
+ // don't show both in the dialog
+ if (status != null && message.equals(status.getMessage())) {
+ message= null;
+ }
+ } else {
+ status= new Status(IStatus.ERROR, getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, "Error within Debug UI: ", t); //$NON-NLS-1$
+ }
+ ErrorDialog.openError(shell, title, message, status);
+ }
+
+ /**
+ * Logs the specified status with this plug-in's log.
+ *
+ * @param status status to log
+ */
+ public static void log(IStatus status) {
+ getDefault().getLog().log(status);
+ }
+
+ /**
+ * Logs the specified throwable with this plug-in's log.
+ *
+ * @param t throwable to log
+ */
+ public static void log(Throwable t) {
+ IStatus status= new Status(IStatus.ERROR, getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, "Error logged from Debug UI: ", t); //$NON-NLS-1$
+ log(status);
+ }
+
+ /**
+ * Logs the given message if in debug mode.
+ *
+ * @param String message to log
+ */
+ public static void logDebugMessage(String message) {
+ if (getDefault().isDebugging()) {
+ logErrorMessage(message);
+ }
+ }
+
+ /**
+ * Logs an internal error with the specified message.
+ *
+ * @param message the error message to log
+ */
+ public static void logErrorMessage(String message) {
+ // this message is intentionally not internationalized, as an exception may
+ // be due to the resource bundle itself
+ log(new Status(IStatus.ERROR, getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, "Internal message logged from Debug UI: " + message, null)); //$NON-NLS-1$
+ }
+
+ /**
+ * Save all dirty editors of all the workbench pages.
+ * Returns whether the operation succeeded.
+ *
+ * @return whether all saving was completed
+ */
+ protected static boolean saveAllPages(boolean confirm) {
+ if (getActiveWorkbenchWindow() == null) {
+ return false;
+ }
+ IWorkbench wb = getActiveWorkbenchWindow().getWorkbench();
+ IWorkbenchWindow[] windows = wb.getWorkbenchWindows();
+ for (int i = 0; i < windows.length; i++) {
+ IWorkbenchPage[] pages = windows[i].getPages();
+ for (int j = 0; j < pages.length; j++) {
+ if (!pages[j].saveAllEditors(confirm)) {
+ return false;
+ };
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Save & build the workspace according to the user-specified preferences. Return <code>false</code> if
+ * any problems were encountered, <code>true</code> otherwise.
+ */
+ public static boolean saveAndBuild() {
+ boolean status = true;
+ String saveDirty = getDefault().getPreferenceStore().getString(IDebugUIConstants.PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH_RADIO);
+ boolean buildBeforeLaunch = getDefault().getPreferenceStore().getBoolean(IDebugUIConstants.PREF_BUILD_BEFORE_LAUNCH);
+ boolean autobuilding = ResourcesPlugin.getWorkspace().isAutoBuilding();
+
+ // If we're ignoring dirty editors, check if we need to build
+ if (saveDirty.equals(IDebugUIConstants.PREF_NEVER_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH)) {
+ if (buildBeforeLaunch) {
+ return doBuild();
+ }
+ } else {
+ boolean prompt = false;
+ if (saveDirty.equals(IDebugUIConstants.PREF_PROMPT_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH)) {
+ prompt = true;
+ }
+ status = saveAllPages(prompt);
+ if (status && !autobuilding && buildBeforeLaunch) {
+ status = doBuild();
+ }
+ }
+
+ return status;
+ }
+
+ private static boolean doBuild() {
+ ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell());
+ try {
+ dialog.run(true, true, new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException {
+ try {
+ ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, monitor);
+ } catch (CoreException e) {
+ throw new InvocationTargetException(e);
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ // cancelled by user
+ return false;
+ } catch (InvocationTargetException e) {
+ String title= DebugUIMessages.getString("DebugUIPlugin.Run/Debug_1"); //$NON-NLS-1$
+ String message= DebugUIMessages.getString("DebugUIPlugin.Build_error._Check_log_for_details._2"); //$NON-NLS-1$
+ Throwable t = e.getTargetException();
+ errorDialog(getShell(), title, message, t);
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Returns the standard display to be used. The method first checks, if
+ * the thread calling this method has an associated display. If so, this
+ * display is returned. Otherwise the method returns the default display.
+ */
+ public static Display getStandardDisplay() {
+ Display display= Display.getCurrent();
+ if (display == null) {
+ display= Display.getDefault();
+ }
+ return display;
+ }
+
+ /**
+ * Returns the a color based on the type of output.
+ * Valid types:
+ * <li>CONSOLE_SYS_OUT_RGB</li>
+ * <li>CONSOLE_SYS_ERR_RGB</li>
+ * <li>CONSOLE_SYS_IN_RGB</li>
+ * <li>CHANGED_VARIABLE_RGB</li>
+ */
+ public static Color getPreferenceColor(String type) {
+ return ColorManager.getDefault().getColor(PreferenceConverter.getColor(getDefault().getPreferenceStore(), type));
+ }
+
+ public static ConsoleDocumentManager getConsoleDocumentManager() {
+ return ConsoleDocumentManager.getDefault();
+ }
+
+ /**
+ * Serializes a XML document into a string - encoded in UTF8 format,
+ * with platform line separators.
+ *
+ * @param doc document to serialize
+ * @return the document as a string
+ */
+ public static String serializeDocument(Document doc) throws IOException {
+ ByteArrayOutputStream s= new ByteArrayOutputStream();
+ OutputFormat format = new OutputFormat();
+ format.setIndenting(true);
+ format.setLineSeparator(System.getProperty("line.separator")); //$NON-NLS-1$
+
+ Serializer serializer =
+ SerializerFactory.getSerializerFactory(Method.XML).makeSerializer(
+ new OutputStreamWriter(s, "UTF8"), //$NON-NLS-1$
+ format);
+ serializer.asDOMSerializer().serialize(doc);
+ return s.toString("UTF8"); //$NON-NLS-1$
+ }
+
+ /**
+ * Determines and returns the selection in the specified window. If nothing is
+ * actually selected, look for an active editor.
+ */
+ public static IStructuredSelection resolveSelection(IWorkbenchWindow window) {
+ if (window == null) {
+ return null;
+ }
+ ISelection selection= window.getSelectionService().getSelection();
+ if (selection == null || selection.isEmpty() || !(selection instanceof IStructuredSelection)) {
+ // there is no obvious selection - go fishing
+ selection= null;
+ IWorkbenchPage page= window.getActivePage();
+ if (page == null) {
+ //workspace is closed
+ return null;
+ }
+
+ // first, see if there is an active editor, and try its input element
+ IEditorPart editor= page.getActiveEditor();
+ Object element= null;
+ if (editor != null) {
+ element= editor.getEditorInput();
+ }
+
+ if (selection == null && element != null) {
+ selection= new StructuredSelection(element);
+ }
+ }
+ return (IStructuredSelection)selection;
+ }
+
+}
- /**
- * Logs the specified status with this plug-in's log.
- *
- * @param status status to log
- */
- public static void log(IStatus status) {
- getDefault().getLog().log(status);
- }
-
- /**
- * Logs the specified throwable with this plug-in's log.
- *
- * @param t throwable to log
- */
- public static void log(Throwable t) {
- IStatus status= new Status(IStatus.ERROR, getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, "Error logged from Debug UI: ", t); //$NON-NLS-1$
- log(status);
- }
-
- /**
- * Logs the given message if in debug mode.
- *
- * @param String message to log
- */
- public static void logDebugMessage(String message) {
- if (getDefault().isDebugging()) {
- logErrorMessage(message);
- }
- }
-
- /**
- * Logs an internal error with the specified message.
- *
- * @param message the error message to log
- */
- public static void logErrorMessage(String message) {
- // this message is intentionally not internationalized, as an exception may
- // be due to the resource bundle itself
- log(new Status(IStatus.ERROR, getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, "Internal message logged from Debug UI: " + message, null)); //$NON-NLS-1$
- }
-
- /**
- * Save all dirty editors of all the workbench pages.
- * Returns whether the operation succeeded.
- *
- * @return whether all saving was completed
- */
- protected static boolean saveAllPages(boolean confirm) {
- if (getActiveWorkbenchWindow() == null) {
- return false;
- }
- IWorkbench wb = getActiveWorkbenchWindow().getWorkbench();
- IWorkbenchWindow[] windows = wb.getWorkbenchWindows();
- for (int i = 0; i < windows.length; i++) {
- IWorkbenchPage[] pages = windows[i].getPages();
- for (int j = 0; j < pages.length; j++) {
- if (!pages[j].saveAllEditors(confirm)) {
- return false;
- };
- }
- }
- return true;
- }
-
- /**
- * Save & build the workspace according to the user-specified preferences. Return <code>false</code> if
- * any problems were encountered, <code>true</code> otherwise.
- */
- public static boolean saveAndBuild() {
- boolean status = true;
- String saveDirty = getDefault().getPreferenceStore().getString(IDebugUIConstants.PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH_RADIO);
- boolean buildBeforeLaunch = getDefault().getPreferenceStore().getBoolean(IDebugUIConstants.PREF_BUILD_BEFORE_LAUNCH);
- boolean autobuilding = ResourcesPlugin.getWorkspace().isAutoBuilding();
-
- // If we're ignoring dirty editors, check if we need to build
- if (saveDirty.equals(IDebugUIConstants.PREF_NEVER_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH)) {
- if (buildBeforeLaunch) {
- return doBuild();
- }
- } else {
- boolean prompt = false;
- if (saveDirty.equals(IDebugUIConstants.PREF_PROMPT_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH)) {
- prompt = true;
- }
- status = saveAllPages(prompt);
- if (status && !autobuilding && buildBeforeLaunch) {
- status = doBuild();
- }
- }
-
- return status;
- }
-
- private static boolean doBuild() {
- ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell());
- try {
- dialog.run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- try {
- ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InterruptedException e) {
- // cancelled by user
- return false;
- } catch (InvocationTargetException e) {
- String title= DebugUIMessages.getString("DebugUIPlugin.Run/Debug_1"); //$NON-NLS-1$
- String message= DebugUIMessages.getString("DebugUIPlugin.Build_error._Check_log_for_details._2"); //$NON-NLS-1$
- Throwable t = e.getTargetException();
- errorDialog(getShell(), title, message, t);
- return false;
- }
- return true;
- }
-
- /**
- * Returns the standard display to be used. The method first checks, if
- * the thread calling this method has an associated display. If so, this
- * display is returned. Otherwise the method returns the default display.
- */
- public static Display getStandardDisplay() {
- Display display= Display.getCurrent();
- if (display == null) {
- display= Display.getDefault();
- }
- return display;
- }
-
- /**
- * Returns the a color based on the type of output.
- * Valid types:
- * <li>CONSOLE_SYS_OUT_RGB</li>
- * <li>CONSOLE_SYS_ERR_RGB</li>
- * <li>CONSOLE_SYS_IN_RGB</li>
- * <li>CHANGED_VARIABLE_RGB</li>
- */
- public static Color getPreferenceColor(String type) {
- return ColorManager.getDefault().getColor(PreferenceConverter.getColor(getDefault().getPreferenceStore(), type));
- }
-
- public static ConsoleDocumentManager getConsoleDocumentManager() {
- return ConsoleDocumentManager.getDefault();
- }
-
- /**
- * Serializes a XML document into a string - encoded in UTF8 format,
- * with platform line separators.
- *
- * @param doc document to serialize
- * @return the document as a string
- */
- public static String serializeDocument(Document doc) throws IOException {
- ByteArrayOutputStream s= new ByteArrayOutputStream();
- OutputFormat format = new OutputFormat();
- format.setIndenting(true);
- format.setLineSeparator(System.getProperty("line.separator")); //$NON-NLS-1$
-
- Serializer serializer =
- SerializerFactory.getSerializerFactory(Method.XML).makeSerializer(
- new OutputStreamWriter(s, "UTF8"), //$NON-NLS-1$
- format);
- serializer.asDOMSerializer().serialize(doc);
- return s.toString("UTF8"); //$NON-NLS-1$
- }
-
- /**
- * Determines and returns the selection in the specified window. If nothing is
- * actually selected, look for an active editor.
- */
- public static IStructuredSelection resolveSelection(IWorkbenchWindow window) {
- if (window == null) {
- return null;
- }
- ISelection selection= window.getSelectionService().getSelection();
- if (selection == null || selection.isEmpty() || !(selection instanceof IStructuredSelection)) {
- // there is no obvious selection - go fishing
- selection= null;
- IWorkbenchPage page= window.getActivePage();
- if (page == null) {
- //workspace is closed
- return null;
- }
-
- // first, see if there is an active editor, and try its input element
- IEditorPart editor= page.getActiveEditor();
- Object element= null;
- if (editor != null) {
- element= editor.getEditorInput();
- }
-
- if (selection == null && element != null) {
- selection= new StructuredSelection(element);
- }
- }
- return (IStructuredSelection)selection;
- }
-
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPropertiesAdapterFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPropertiesAdapterFactory.java
index f2aff3af0..5f88180d2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPropertiesAdapterFactory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPropertiesAdapterFactory.java
@@ -1,82 +1,82 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * This factory and the IWorkbenchAdapter that it provides exist so that
- * a properties dialog that is realized on a launches view element will have a
- * title.
- */
-/*package*/ class DebugUIPropertiesAdapterFactory implements IAdapterFactory {
-
- class DebugUIPropertiesAdapter implements IWorkbenchAdapter {
-
- /**
- * @see IWorkbenchAdapter#getChildren(Object)
- */
- public Object[] getChildren(Object o) {
- return new Object[0];
- }
-
- /**
- * @see IWorkbenchAdapter#getImageDescriptor(Object)
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return DebugUITools.getDefaultImageDescriptor(object);
- }
-
- /**
- * @see IWorkbenchAdapter#getLabel(Object)
- */
- public String getLabel(Object o) {
- IDebugModelPresentation presentation= DebugUIPlugin.getModelPresentation();
- return presentation.getText(o);
- }
-
- /**
- * @see IWorkbenchAdapter#getParent(Object)
- */
- public Object getParent(Object o) {
- return null;
- }
- }
-
- /**
- * @see IAdapterFactory#getAdapter(Object, Class)
- */
- public Object getAdapter(Object obj, Class adapterType) {
- if (adapterType.isInstance(obj)) {
- return obj;
- }
- if (adapterType == IWorkbenchAdapter.class) {
- if (obj instanceof IDebugElement) {
- return new DebugUIPropertiesAdapter();
- }
- if (obj instanceof IProcess) {
- return new DebugUIPropertiesAdapter();
- }
- }
- return null;
- }
-
- /**
- * @see IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList() {
- return new Class[] {
- IWorkbenchAdapter.class
- };
- }
-}
-
+package org.eclipse.debug.internal.ui;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.debug.core.model.IDebugElement;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugModelPresentation;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+
+/**
+ * This factory and the IWorkbenchAdapter that it provides exist so that
+ * a properties dialog that is realized on a launches view element will have a
+ * title.
+ */
+/*package*/ class DebugUIPropertiesAdapterFactory implements IAdapterFactory {
+
+ class DebugUIPropertiesAdapter implements IWorkbenchAdapter {
+
+ /**
+ * @see IWorkbenchAdapter#getChildren(Object)
+ */
+ public Object[] getChildren(Object o) {
+ return new Object[0];
+ }
+
+ /**
+ * @see IWorkbenchAdapter#getImageDescriptor(Object)
+ */
+ public ImageDescriptor getImageDescriptor(Object object) {
+ return DebugUITools.getDefaultImageDescriptor(object);
+ }
+
+ /**
+ * @see IWorkbenchAdapter#getLabel(Object)
+ */
+ public String getLabel(Object o) {
+ IDebugModelPresentation presentation= DebugUIPlugin.getModelPresentation();
+ return presentation.getText(o);
+ }
+
+ /**
+ * @see IWorkbenchAdapter#getParent(Object)
+ */
+ public Object getParent(Object o) {
+ return null;
+ }
+ }
+
+ /**
+ * @see IAdapterFactory#getAdapter(Object, Class)
+ */
+ public Object getAdapter(Object obj, Class adapterType) {
+ if (adapterType.isInstance(obj)) {
+ return obj;
+ }
+ if (adapterType == IWorkbenchAdapter.class) {
+ if (obj instanceof IDebugElement) {
+ return new DebugUIPropertiesAdapter();
+ }
+ if (obj instanceof IProcess) {
+ return new DebugUIPropertiesAdapter();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @see IAdapterFactory#getAdapterList()
+ */
+ public Class[] getAdapterList() {
+ return new Class[] {
+ IWorkbenchAdapter.class
+ };
+ }
+}
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java
index d9957ec7d..4751370bc 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java
@@ -1,292 +1,292 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IExpression;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.IValueDetailListener;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IEditorInput;
-
-/**
- * A model presentation that delegates to the appropriate extension. This
- * presentation contains a table of specialized presentations that are defined
- * as <code>org.eclipse.debug.ui.debugModelPresentations</code> extensions. When
- * asked to render an object from a debug model, this presentation delegates
- * to the extension registered for that debug model.
- */
-public class DelegatingModelPresentation implements IDebugModelPresentation {
-
- /**
- * A mapping of attribute ids to their values
- * @see IDebugModelPresentation#setAttribute
- */
- private HashMap fAttributes= new HashMap(3);
- /**
- * A table of label providers keyed by debug model identifiers.
- */
- private HashMap fLabelProviders= new HashMap(5);
-
- /**
- * Constructs a new DelegatingLabelProvider that delegates to extensions
- * of kind <code>org.eclipse.debug.ui.debugLabelProvider</code>
- */
- public DelegatingModelPresentation() {
- IPluginDescriptor descriptor= DebugUIPlugin.getDefault().getDescriptor();
- IExtensionPoint point= descriptor.getExtensionPoint(IDebugUIConstants.ID_DEBUG_MODEL_PRESENTATION);
- if (point != null) {
- IExtension[] extensions= point.getExtensions();
- for (int i= 0; i < extensions.length; i++) {
- IExtension extension= extensions[i];
- IConfigurationElement[] configElements= extension.getConfigurationElements();
- for (int j= 0; j < configElements.length; j++) {
- IConfigurationElement elt= configElements[j];
- String id= elt.getAttribute("id"); //$NON-NLS-1$
- if (id != null) {
- IDebugModelPresentation lp= new LazyModelPresentation(elt);
- getLabelProviders().put(id, lp);
- }
- }
- }
- }
- }
-
- /**
- * Delegate to all extensions.
- *
- * @see IBaseLabelProvider#addListener(ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- Iterator i= getLabelProviders().values().iterator();
- while (i.hasNext()) {
- ((ILabelProvider) i.next()).addListener(listener);
- }
- }
-
- /**
- * Delegate to all extensions.
- *
- * @see IBaseLabelProvider#dispose()
- */
- public void dispose() {
- Iterator i= getLabelProviders().values().iterator();
- while (i.hasNext()) {
- ((ILabelProvider) i.next()).dispose();
- }
- }
-
- /**
- * @see IDebugModelPresentation#getImage(Object)
- */
- public Image getImage(Object item) {
- // Attempt to delegate
- IDebugModelPresentation lp= getConfiguredPresentation(item);
- if (lp != null) {
- Image image= lp.getImage(item);
- if (image != null) {
- return image;
- }
- }
- // If no delegate returned an image, use the default
- return getDefaultImage(item);
- }
-
- /**
- * @see IDebugModelPresentation#getText(Object)
- */
- public String getText(Object item) {
- // Attempt to delegate
- IDebugModelPresentation lp= getConfiguredPresentation(item);
- if (lp != null) {
- String label= lp.getText(item);
- if (label != null) {
- return label;
- }
- }
- // If no delegate returned a text label, use the default
- if (showVariableTypeNames()) {
- try {
- if (item instanceof IExpression) {
- return new StringBuffer(((IExpression)item).getValue().getReferenceTypeName()).append(' ').append(getDefaultText(item)).toString(); //$NON-NLS-1$
- } else if (item instanceof IVariable) {
- return new StringBuffer(((IVariable)item).getValue().getReferenceTypeName()).append(' ').append(getDefaultText(item)).toString(); //$NON-NLS-1$
- }
- } catch (DebugException de) {
- DebugUIPlugin.log(de);
- }
- }
- return getDefaultText(item);
- }
-
- /**
- * @see IDebugModelPresentation#getEditorInput(Object)
- */
- public IEditorInput getEditorInput(Object item) {
- IDebugModelPresentation lp= getConfiguredPresentation(item);
- if (lp != null) {
- return lp.getEditorInput(item);
- }
- return null;
- }
-
- /**
- * @see IDebugModelPresentation#getEditorId(IEditorInput, Object)
- */
- public String getEditorId(IEditorInput input, Object objectInput) {
- IDebugModelPresentation lp= getConfiguredPresentation(objectInput);
- if (lp != null) {
- return lp.getEditorId(input, objectInput);
- }
- return null;
- }
-
-
- /**
- * Returns a default text label for the debug element
- */
- protected String getDefaultText(Object element) {
- return DebugUIPlugin.getDefaultLabelProvider().getText(element);
- }
-
- /**
- * Returns a default image for the debug element
- */
- protected Image getDefaultImage(Object element) {
- return DebugUIPlugin.getDefaultLabelProvider().getImage(element);
- }
-
- /*
- * @see IDebugModelPresentation#computeDetail(IValue, IValueDetailListener)
- */
- public void computeDetail(IValue value, IValueDetailListener listener) {
- IDebugModelPresentation lp= getConfiguredPresentation(value);
- if (lp != null) {
- lp.computeDetail(value, listener);
- } else {
- listener.detailComputed(value, getText(value));
- }
- }
-
- /**
- * Delegate to all extensions.
- *
- * @see IBaseLabelProvider#removeListener(ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- Iterator i= getLabelProviders().values().iterator();
- while (i.hasNext()) {
- ((ILabelProvider) i.next()).removeListener(listener);
- }
- }
-
- /**
- * Delegate to the appropriate label provider.
- *
- * @see IBaseLabelProvider#isLabelProperty(Object, String)
- */
- public boolean isLabelProperty(Object element, String property) {
- if (element instanceof IDebugElement) {
- IDebugModelPresentation lp= getConfiguredPresentation((IDebugElement) element);
- if (lp != null) {
- return lp.isLabelProperty(element, property);
- }
- }
-
- return true;
- }
-
- /**
- * Returns a configured model presentation for the given object,
- * or <code>null</code> if one is not registered.
- */
- protected IDebugModelPresentation getConfiguredPresentation(Object element) {
- String id= null;
- if (element instanceof IDebugElement) {
- IDebugElement de= (IDebugElement) element;
- id= de.getModelIdentifier();
- } else if (element instanceof IMarker) {
- IMarker m= (IMarker) element;
- IBreakpoint bp = DebugPlugin.getDefault().getBreakpointManager().getBreakpoint(m);
- if (bp != null) {
- id= bp.getModelIdentifier();
- }
- } else if (element instanceof IBreakpoint) {
- id = ((IBreakpoint)element).getModelIdentifier();
- }
- if (id != null) {
- return getPresentation(id);
- }
-
- return null;
- }
-
- /**
- * Returns the presentation registered for the given id, or <code>null</code>
- * of nothing is registered for the id.
- */
- public IDebugModelPresentation getPresentation(String id) {
- return (IDebugModelPresentation) getLabelProviders().get(id);
- }
-
- /**
- * @see IDebugModelPresentation#setAttribute(String, Object)
- */
- public void setAttribute(String id, Object value) {
- if (value == null) {
- return;
- }
- getAttributes().put(id, value);
- Iterator presentations = fLabelProviders.values().iterator();
- while (presentations.hasNext()) {
- ((IDebugModelPresentation)presentations.next()).setAttribute(id, value);
- }
- }
-
- /**
- * Whether or not to show variable type names.
- * This option is configured per model presentation.
- * This allows this option to be set per view, for example.
- */
- protected boolean showVariableTypeNames() {
- Boolean show= (Boolean) fAttributes.get(DISPLAY_VARIABLE_TYPE_NAMES);
- show= show == null ? Boolean.FALSE : show;
- return show.booleanValue();
- }
-
- protected HashMap getAttributes() {
- return fAttributes;
- }
-
- protected void setAttributes(HashMap attributes) {
- fAttributes = attributes;
- }
-
- protected HashMap getLabelProviders() {
- return fLabelProviders;
- }
-
- protected void setLabelProviders(HashMap labelProviders) {
- fLabelProviders = labelProviders;
- }
-}
-
+package org.eclipse.debug.internal.ui;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import java.util.HashMap;
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IPluginDescriptor;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.IDebugElement;
+import org.eclipse.debug.core.model.IExpression;
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.debug.ui.IDebugModelPresentation;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.debug.ui.IValueDetailListener;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IEditorInput;
+
+/**
+ * A model presentation that delegates to the appropriate extension. This
+ * presentation contains a table of specialized presentations that are defined
+ * as <code>org.eclipse.debug.ui.debugModelPresentations</code> extensions. When
+ * asked to render an object from a debug model, this presentation delegates
+ * to the extension registered for that debug model.
+ */
+public class DelegatingModelPresentation implements IDebugModelPresentation {
+
+ /**
+ * A mapping of attribute ids to their values
+ * @see IDebugModelPresentation#setAttribute
+ */
+ private HashMap fAttributes= new HashMap(3);
+ /**
+ * A table of label providers keyed by debug model identifiers.
+ */
+ private HashMap fLabelProviders= new HashMap(5);
+
+ /**
+ * Constructs a new DelegatingLabelProvider that delegates to extensions
+ * of kind <code>org.eclipse.debug.ui.debugLabelProvider</code>
+ */
+ public DelegatingModelPresentation() {
+ IPluginDescriptor descriptor= DebugUIPlugin.getDefault().getDescriptor();
+ IExtensionPoint point= descriptor.getExtensionPoint(IDebugUIConstants.ID_DEBUG_MODEL_PRESENTATION);
+ if (point != null) {
+ IExtension[] extensions= point.getExtensions();
+ for (int i= 0; i < extensions.length; i++) {
+ IExtension extension= extensions[i];
+ IConfigurationElement[] configElements= extension.getConfigurationElements();
+ for (int j= 0; j < configElements.length; j++) {
+ IConfigurationElement elt= configElements[j];
+ String id= elt.getAttribute("id"); //$NON-NLS-1$
+ if (id != null) {
+ IDebugModelPresentation lp= new LazyModelPresentation(elt);
+ getLabelProviders().put(id, lp);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Delegate to all extensions.
+ *
+ * @see IBaseLabelProvider#addListener(ILabelProviderListener)
+ */
+ public void addListener(ILabelProviderListener listener) {
+ Iterator i= getLabelProviders().values().iterator();
+ while (i.hasNext()) {
+ ((ILabelProvider) i.next()).addListener(listener);
+ }
+ }
+
+ /**
+ * Delegate to all extensions.
+ *
+ * @see IBaseLabelProvider#dispose()
+ */
+ public void dispose() {
+ Iterator i= getLabelProviders().values().iterator();
+ while (i.hasNext()) {
+ ((ILabelProvider) i.next()).dispose();
+ }
+ }
+
+ /**
+ * @see IDebugModelPresentation#getImage(Object)
+ */
+ public Image getImage(Object item) {
+ // Attempt to delegate
+ IDebugModelPresentation lp= getConfiguredPresentation(item);
+ if (lp != null) {
+ Image image= lp.getImage(item);
+ if (image != null) {
+ return image;
+ }
+ }
+ // If no delegate returned an image, use the default
+ return getDefaultImage(item);
+ }
+
+ /**
+ * @see IDebugModelPresentation#getText(Object)
+ */
+ public String getText(Object item) {
+ // Attempt to delegate
+ IDebugModelPresentation lp= getConfiguredPresentation(item);
+ if (lp != null) {
+ String label= lp.getText(item);
+ if (label != null) {
+ return label;
+ }
+ }
+ // If no delegate returned a text label, use the default
+ if (showVariableTypeNames()) {
+ try {
+ if (item instanceof IExpression) {
+ return new StringBuffer(((IExpression)item).getValue().getReferenceTypeName()).append(' ').append(getDefaultText(item)).toString(); //$NON-NLS-1$
+ } else if (item instanceof IVariable) {
+ return new StringBuffer(((IVariable)item).getValue().getReferenceTypeName()).append(' ').append(getDefaultText(item)).toString(); //$NON-NLS-1$
+ }
+ } catch (DebugException de) {
+ DebugUIPlugin.log(de);
+ }
+ }
+ return getDefaultText(item);
+ }
+
+ /**
+ * @see IDebugModelPresentation#getEditorInput(Object)
+ */
+ public IEditorInput getEditorInput(Object item) {
+ IDebugModelPresentation lp= getConfiguredPresentation(item);
+ if (lp != null) {
+ return lp.getEditorInput(item);
+ }
+ return null;
+ }
+
+ /**
+ * @see IDebugModelPresentation#getEditorId(IEditorInput, Object)
+ */
+ public String getEditorId(IEditorInput input, Object objectInput) {
+ IDebugModelPresentation lp= getConfiguredPresentation(objectInput);
+ if (lp != null) {
+ return lp.getEditorId(input, objectInput);
+ }
+ return null;
+ }
+
+
+ /**
+ * Returns a default text label for the debug element
+ */
+ protected String getDefaultText(Object element) {
+ return DebugUIPlugin.getDefaultLabelProvider().getText(element);
+ }
+
+ /**
+ * Returns a default image for the debug element
+ */
+ protected Image getDefaultImage(Object element) {
+ return DebugUIPlugin.getDefaultLabelProvider().getImage(element);
+ }
+
+ /*
+ * @see IDebugModelPresentation#computeDetail(IValue, IValueDetailListener)
+ */
+ public void computeDetail(IValue value, IValueDetailListener listener) {
+ IDebugModelPresentation lp= getConfiguredPresentation(value);
+ if (lp != null) {
+ lp.computeDetail(value, listener);
+ } else {
+ listener.detailComputed(value, getText(value));
+ }
+ }
+
+ /**
+ * Delegate to all extensions.
+ *
+ * @see IBaseLabelProvider#removeListener(ILabelProviderListener)
+ */
+ public void removeListener(ILabelProviderListener listener) {
+ Iterator i= getLabelProviders().values().iterator();
+ while (i.hasNext()) {
+ ((ILabelProvider) i.next()).removeListener(listener);
+ }
+ }
+
+ /**
+ * Delegate to the appropriate label provider.
+ *
+ * @see IBaseLabelProvider#isLabelProperty(Object, String)
+ */
+ public boolean isLabelProperty(Object element, String property) {
+ if (element instanceof IDebugElement) {
+ IDebugModelPresentation lp= getConfiguredPresentation((IDebugElement) element);
+ if (lp != null) {
+ return lp.isLabelProperty(element, property);
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Returns a configured model presentation for the given object,
+ * or <code>null</code> if one is not registered.
+ */
+ protected IDebugModelPresentation getConfiguredPresentation(Object element) {
+ String id= null;
+ if (element instanceof IDebugElement) {
+ IDebugElement de= (IDebugElement) element;
+ id= de.getModelIdentifier();
+ } else if (element instanceof IMarker) {
+ IMarker m= (IMarker) element;
+ IBreakpoint bp = DebugPlugin.getDefault().getBreakpointManager().getBreakpoint(m);
+ if (bp != null) {
+ id= bp.getModelIdentifier();
+ }
+ } else if (element instanceof IBreakpoint) {
+ id = ((IBreakpoint)element).getModelIdentifier();
+ }
+ if (id != null) {
+ return getPresentation(id);
+ }
+
+ return null;
+ }
+
+ /**
+ * Returns the presentation registered for the given id, or <code>null</code>
+ * of nothing is registered for the id.
+ */
+ public IDebugModelPresentation getPresentation(String id) {
+ return (IDebugModelPresentation) getLabelProviders().get(id);
+ }
+
+ /**
+ * @see IDebugModelPresentation#setAttribute(String, Object)
+ */
+ public void setAttribute(String id, Object value) {
+ if (value == null) {
+ return;
+ }
+ getAttributes().put(id, value);
+ Iterator presentations = fLabelProviders.values().iterator();
+ while (presentations.hasNext()) {
+ ((IDebugModelPresentation)presentations.next()).setAttribute(id, value);
+ }
+ }
+
+ /**
+ * Whether or not to show variable type names.
+ * This option is configured per model presentation.
+ * This allows this option to be set per view, for example.
+ */
+ protected boolean showVariableTypeNames() {
+ Boolean show= (Boolean) fAttributes.get(DISPLAY_VARIABLE_TYPE_NAMES);
+ show= show == null ? Boolean.FALSE : show;
+ return show.booleanValue();
+ }
+
+ protected HashMap getAttributes() {
+ return fAttributes;
+ }
+
+ protected void setAttributes(HashMap attributes) {
+ fAttributes = attributes;
+ }
+
+ protected HashMap getLabelProviders() {
+ return fLabelProviders;
+ }
+
+ protected void setLabelProviders(HashMap labelProviders) {
+ fLabelProviders = labelProviders;
+ }
+}
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java
index 548fa188b..1ca3d33b2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java
@@ -1,52 +1,52 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-/**
- * Help context ids for the debug ui.
- * <p>
- * This interface contains constants only; it is not intended to be implemented
- * or extended.
- * </p>
- *
- */
-public interface IDebugHelpContextIds {
-
- public static final String PREFIX = IDebugUIConstants.PLUGIN_ID + "."; //$NON-NLS-1$
-
- // Actions
- public static final String CHANGE_VALUE_ACTION = PREFIX + "change_value_action_context"; //$NON-NLS-1$
- public static final String CLEAR_CONSOLE_ACTION = PREFIX + "clear_console_action_context"; //$NON-NLS-1$
- public static final String OPEN_BREAKPOINT_ACTION = PREFIX + "open_breakpoint_action_context"; //$NON-NLS-1$
- public static final String RELAUNCH_HISTORY_ACTION = PREFIX + "relaunch_history_action_context"; //$NON-NLS-1$
- public static final String SHOW_DETAIL_PANE_ACTION = PREFIX + "show_detail_pane_action_context"; //$NON-NLS-1$
- public static final String SHOW_BREAKPOINTS_FOR_MODEL_ACTION = PREFIX + "show_breakpoints_for_model_action_context"; //$NON-NLS-1$
- public static final String SHOW_TYPES_ACTION = PREFIX + "show_types_action_context"; //$NON-NLS-1$
-
- // Views
- public static final String DEBUG_VIEW = PREFIX + "debug_view_context"; //$NON-NLS-1$
- public static final String VARIABLE_VIEW = PREFIX + "variable_view_context"; //$NON-NLS-1$
- public static final String BREAKPOINT_VIEW = PREFIX + "breakpoint_view_context"; //$NON-NLS-1$
- public static final String CONSOLE_VIEW = PREFIX + "console_view_context"; //$NON-NLS-1$
- public static final String EXPRESSION_VIEW = PREFIX + "expression_view_context"; //$NON-NLS-1$
-
- // Preference pages
- public static final String DEBUG_PREFERENCE_PAGE = PREFIX + "debug_preference_page_context"; //$NON-NLS-1$
- public static final String CONSOLE_PREFERENCE_PAGE = PREFIX + "console_preference_page_context"; //$NON-NLS-1$
- public static final String VARIABLE_VIEWS_PREFERENCE_PAGE = PREFIX + "variable_views_preference_page_context"; //$NON-NLS-1$
- public static final String DEBUG_ACTION_GROUPS_PREFERENCE_PAGE = PREFIX + "debug_action_groups_views_preference_page_context"; //$NON-NLS-1$
- public static final String LAUNCH_HISTORY_PREFERENCE_PAGE = PREFIX + "launch_history_preference_page_context"; //$NON-NLS-1$
-
- // Dialogs
- public static final String LAUNCH_CONFIGURATION_DIALOG = PREFIX + "launch_configuration_dialog"; //$NON-NLS-1$
-
- // Launch configuration dialog pages
- public static final String LAUNCH_CONFIGURATION_DIALOG_COMMON_TAB = PREFIX + "launch_configuration_dialog_common_tab"; //$NON-NLS-1$
-
-}
-
+package org.eclipse.debug.internal.ui;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.ui.IDebugUIConstants;
+
+/**
+ * Help context ids for the debug ui.
+ * <p>
+ * This interface contains constants only; it is not intended to be implemented
+ * or extended.
+ * </p>
+ *
+ */
+public interface IDebugHelpContextIds {
+
+ public static final String PREFIX = IDebugUIConstants.PLUGIN_ID + "."; //$NON-NLS-1$
+
+ // Actions
+ public static final String CHANGE_VALUE_ACTION = PREFIX + "change_value_action_context"; //$NON-NLS-1$
+ public static final String CLEAR_CONSOLE_ACTION = PREFIX + "clear_console_action_context"; //$NON-NLS-1$
+ public static final String OPEN_BREAKPOINT_ACTION = PREFIX + "open_breakpoint_action_context"; //$NON-NLS-1$
+ public static final String RELAUNCH_HISTORY_ACTION = PREFIX + "relaunch_history_action_context"; //$NON-NLS-1$
+ public static final String SHOW_DETAIL_PANE_ACTION = PREFIX + "show_detail_pane_action_context"; //$NON-NLS-1$
+ public static final String SHOW_BREAKPOINTS_FOR_MODEL_ACTION = PREFIX + "show_breakpoints_for_model_action_context"; //$NON-NLS-1$
+ public static final String SHOW_TYPES_ACTION = PREFIX + "show_types_action_context"; //$NON-NLS-1$
+
+ // Views
+ public static final String DEBUG_VIEW = PREFIX + "debug_view_context"; //$NON-NLS-1$
+ public static final String VARIABLE_VIEW = PREFIX + "variable_view_context"; //$NON-NLS-1$
+ public static final String BREAKPOINT_VIEW = PREFIX + "breakpoint_view_context"; //$NON-NLS-1$
+ public static final String CONSOLE_VIEW = PREFIX + "console_view_context"; //$NON-NLS-1$
+ public static final String EXPRESSION_VIEW = PREFIX + "expression_view_context"; //$NON-NLS-1$
+
+ // Preference pages
+ public static final String DEBUG_PREFERENCE_PAGE = PREFIX + "debug_preference_page_context"; //$NON-NLS-1$
+ public static final String CONSOLE_PREFERENCE_PAGE = PREFIX + "console_preference_page_context"; //$NON-NLS-1$
+ public static final String VARIABLE_VIEWS_PREFERENCE_PAGE = PREFIX + "variable_views_preference_page_context"; //$NON-NLS-1$
+ public static final String DEBUG_ACTION_GROUPS_PREFERENCE_PAGE = PREFIX + "debug_action_groups_views_preference_page_context"; //$NON-NLS-1$
+ public static final String LAUNCH_HISTORY_PREFERENCE_PAGE = PREFIX + "launch_history_preference_page_context"; //$NON-NLS-1$
+
+ // Dialogs
+ public static final String LAUNCH_CONFIGURATION_DIALOG = PREFIX + "launch_configuration_dialog"; //$NON-NLS-1$
+
+ // Launch configuration dialog pages
+ public static final String LAUNCH_CONFIGURATION_DIALOG_COMMON_TAB = PREFIX + "launch_configuration_dialog_common_tab"; //$NON-NLS-1$
+
+}
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java
index 155f62837..f2936377f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java
@@ -1,36 +1,36 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-public interface IInternalDebugUIConstants {
-
- public static final String DIALOGSTORE_LASTEXTJAR= "org.eclipse.debug.ui.lastextjar"; //$NON-NLS-1$
-
- //Folders
- public static final String ID_NAVIGATOR_FOLDER_VIEW= "org.eclipse.debug.internal.ui.NavigatorFolderView"; //$NON-NLS-1$
- public static final String ID_TOOLS_FOLDER_VIEW= "org.eclipse.debug.internal.ui.ToolsFolderView"; //$NON-NLS-1$
- public static final String ID_CONSOLE_FOLDER_VIEW= "org.eclipse.debug.internal.ui.ConsoleFolderView"; //$NON-NLS-1$
- public static final String ID_OUTLINE_FOLDER_VIEW= "org.eclipse.debug.internal.ui.OutlineFolderView"; //$NON-NLS-1$
-
- //Current stack frame instruction pointer
- public static final String INSTRUCTION_POINTER= "org.eclipse.debug.ui.instructionPointer"; //$NON-NLS-1$
-
- // disabled local tool images
- public static final String IMG_DLCL_CLEAR= "IMG_DLCL_CLEAR"; //$NON-NLS-1$
- public static final String IMG_DLCL_DETAIL_PANE= "IMG_DLCL_DETAIL_PANE"; //$NON-NLS-1$
- public static final String IMG_DLCL_CHANGE_VARIABLE_VALUE= "IMG_DLCL_CHANGE_VARIABLE_VALUE"; //$NON-NLS-1$
- public static final String IMG_DLCL_TYPE_NAMES= "IMG_DLCL_TYPE_NAMES"; //$NON-NLS-1$
-
- // enabled local tool images
- public static final String IMG_ELCL_CLEAR= "IMG_ELCL_CLEAR"; //$NON-NLS-1$
- public static final String IMG_ELCL_DETAIL_PANE= "IMG_ELCL_DETAIL_PANE"; //$NON-NLS-1$
- public static final String IMG_ELCL_CHANGE_VARIABLE_VALUE= "IMG_ELCL_CHANGE_VARIABLE_VALUE"; //$NON-NLS-1$
- public static final String IMG_ELCL_TYPE_NAMES= "IMG_ELCL_TYPE_NAMES"; //$NON-NLS-1$
-
- /** Transparent overlay image identifier. */
- public static final String IMG_OVR_TRANSPARENT = "IMG_OVR_TRANSPARENT"; //$NON-NLS-1$
-
-}
+package org.eclipse.debug.internal.ui;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+public interface IInternalDebugUIConstants {
+
+ public static final String DIALOGSTORE_LASTEXTJAR= "org.eclipse.debug.ui.lastextjar"; //$NON-NLS-1$
+
+ //Folders
+ public static final String ID_NAVIGATOR_FOLDER_VIEW= "org.eclipse.debug.internal.ui.NavigatorFolderView"; //$NON-NLS-1$
+ public static final String ID_TOOLS_FOLDER_VIEW= "org.eclipse.debug.internal.ui.ToolsFolderView"; //$NON-NLS-1$
+ public static final String ID_CONSOLE_FOLDER_VIEW= "org.eclipse.debug.internal.ui.ConsoleFolderView"; //$NON-NLS-1$
+ public static final String ID_OUTLINE_FOLDER_VIEW= "org.eclipse.debug.internal.ui.OutlineFolderView"; //$NON-NLS-1$
+
+ //Current stack frame instruction pointer
+ public static final String INSTRUCTION_POINTER= "org.eclipse.debug.ui.instructionPointer"; //$NON-NLS-1$
+
+ // disabled local tool images
+ public static final String IMG_DLCL_CLEAR= "IMG_DLCL_CLEAR"; //$NON-NLS-1$
+ public static final String IMG_DLCL_DETAIL_PANE= "IMG_DLCL_DETAIL_PANE"; //$NON-NLS-1$
+ public static final String IMG_DLCL_CHANGE_VARIABLE_VALUE= "IMG_DLCL_CHANGE_VARIABLE_VALUE"; //$NON-NLS-1$
+ public static final String IMG_DLCL_TYPE_NAMES= "IMG_DLCL_TYPE_NAMES"; //$NON-NLS-1$
+
+ // enabled local tool images
+ public static final String IMG_ELCL_CLEAR= "IMG_ELCL_CLEAR"; //$NON-NLS-1$
+ public static final String IMG_ELCL_DETAIL_PANE= "IMG_ELCL_DETAIL_PANE"; //$NON-NLS-1$
+ public static final String IMG_ELCL_CHANGE_VARIABLE_VALUE= "IMG_ELCL_CHANGE_VARIABLE_VALUE"; //$NON-NLS-1$
+ public static final String IMG_ELCL_TYPE_NAMES= "IMG_ELCL_TYPE_NAMES"; //$NON-NLS-1$
+
+ /** Transparent overlay image identifier. */
+ public static final String IMG_OVR_TRANSPARENT = "IMG_OVR_TRANSPARENT"; //$NON-NLS-1$
+
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java
index c283b6384..9e745c90d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java
@@ -1,198 +1,198 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IValueDetailListener;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.jface.util.ListenerList;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IEditorInput;
-
-/**
- * A proxy to an IDebugModelPresentation extension. Instantiates the extension
- * when it is needed.
- */
-
-public class LazyModelPresentation implements IDebugModelPresentation {
-
- /**
- * A temporary mapping of attribute ids to their values
- * @see IDebugModelPresentation#setAttribute
- */
- protected HashMap fAttributes= new HashMap(3);
-
- /**
- * The config element that defines the extension
- */
- protected IConfigurationElement fConfig = null;
-
- /**
- * The actual presentation instance - null until called upon
- */
- protected IDebugModelPresentation fPresentation = null;
-
- /**
- * Temp holding for listeners - we do not add to presentation until
- * it needs to be instantiated.
- */
- protected ListenerList fListeners= new ListenerList(5);
- /**
- * Constructs a lazy presentation from the config element.
- */
- public LazyModelPresentation(IConfigurationElement configElement) {
- fConfig = configElement;
- }
-
- /**
- * @see IDebugModelPresentation#getImage(Object)
- */
- public Image getImage(Object element) {
- return getPresentation().getImage(element);
- }
-
- /**
- * @see IDebugModelPresentation#getText(Object)
- */
- public String getText(Object element) {
- return getPresentation().getText(element);
- }
-
- /**
- * @see IDebugModelPresentation#computeDetail(IValue, IValueDetailListener)
- */
- public void computeDetail(IValue value, IValueDetailListener listener) {
- getPresentation().computeDetail(value, listener);
- }
-
- /**
- * @see ISourcePresentation#getEditorInput(Object)
- */
- public IEditorInput getEditorInput(Object element) {
- return getPresentation().getEditorInput(element);
- }
-
- /**
- * @see ISourcePresentation#getEditorId(IEditorInput, Object)
- */
- public String getEditorId(IEditorInput input, Object inputObject) {
- return getPresentation().getEditorId(input, inputObject);
- }
-
- /**
- * @see IBaseLabelProvider#addListener(ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- if (fPresentation != null) {
- getPresentation().addListener(listener);
- }
- fListeners.add(listener);
- }
-
- /**
- * @see IBaseLabelProvider#dispose()
- */
- public void dispose() {
- if (fPresentation != null) {
- getPresentation().dispose();
- }
- fListeners = null;
- }
-
- /**
- * @see IBaseLabelProvider#isLabelProperty(Object, String)
- */
- public boolean isLabelProperty(Object element, String property) {
- if (fPresentation != null) {
- return getPresentation().isLabelProperty(element, property);
- }
- return false;
- }
-
- /**
- * @see IBaseLabelProvider#removeListener(ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- if (fPresentation != null) {
- getPresentation().removeListener(listener);
- }
- fListeners.remove(listener);
- }
-
- /**
- * Returns the real presentation, instantiating if required.
- */
- protected IDebugModelPresentation getPresentation() {
- if (fPresentation == null) {
- try {
- fPresentation= (IDebugModelPresentation) DebugUIPlugin.createExtension(fConfig, "class"); //$NON-NLS-1$
- // configure it
- if (fListeners != null) {
- Object[] list = fListeners.getListeners();
- for (int i= 0; i < list.length; i++) {
- fPresentation.addListener((ILabelProviderListener)list[i]);
- }
- }
- Iterator keys= fAttributes.keySet().iterator();
- while (keys.hasNext()) {
- String key= (String)keys.next();
- fPresentation.setAttribute(key, fAttributes.get(key));
- }
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- }
- }
- return fPresentation;
- }
-
- /**
- * @see IDebugModelPresentation#setAttribute(String, Object)
- */
- public void setAttribute(String id, Object value) {
- if (value == null) {
- return;
- }
- if (fPresentation != null) {
- getPresentation().setAttribute(id, value);
- }
-
- fAttributes.put(id, value);
- }
-
- /**
- * Returns the identifier of the debug model this
- * presentation is registered for.
- */
- public String getDebugModelIdentifier() {
- return fConfig.getAttribute("id"); //$NON-NLS-1$
- }
-
- /**
- * Returns a new source viewer configuration for the details
- * area of the variables view, or <code>null</code> if
- * unspecified.
- *
- * @return source viewer configuration or <code>null</code>
- * @exception CoreException if unable to create the specified
- * source viewer configuration
- */
- public SourceViewerConfiguration newDetailsViewerConfiguration() throws CoreException {
- String attr = fConfig.getAttribute("detailsViewerConfiguration"); //$NON-NLS-1$
- if (attr != null) {
- return (SourceViewerConfiguration)fConfig.createExecutableExtension("detailsViewerConfiguration"); //$NON-NLS-1$
- }
- return null;
- }
-
-
-}
+package org.eclipse.debug.internal.ui;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import java.util.HashMap;
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.debug.ui.IDebugModelPresentation;
+import org.eclipse.debug.ui.IValueDetailListener;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+import org.eclipse.jface.util.ListenerList;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IEditorInput;
+
+/**
+ * A proxy to an IDebugModelPresentation extension. Instantiates the extension
+ * when it is needed.
+ */
+
+public class LazyModelPresentation implements IDebugModelPresentation {
+
+ /**
+ * A temporary mapping of attribute ids to their values
+ * @see IDebugModelPresentation#setAttribute
+ */
+ protected HashMap fAttributes= new HashMap(3);
+
+ /**
+ * The config element that defines the extension
+ */
+ protected IConfigurationElement fConfig = null;
+
+ /**
+ * The actual presentation instance - null until called upon
+ */
+ protected IDebugModelPresentation fPresentation = null;
+
+ /**
+ * Temp holding for listeners - we do not add to presentation until
+ * it needs to be instantiated.
+ */
+ protected ListenerList fListeners= new ListenerList(5);
+ /**
+ * Constructs a lazy presentation from the config element.
+ */
+ public LazyModelPresentation(IConfigurationElement configElement) {
+ fConfig = configElement;
+ }
+
+ /**
+ * @see IDebugModelPresentation#getImage(Object)
+ */
+ public Image getImage(Object element) {
+ return getPresentation().getImage(element);
+ }
+
+ /**
+ * @see IDebugModelPresentation#getText(Object)
+ */
+ public String getText(Object element) {
+ return getPresentation().getText(element);
+ }
+
+ /**
+ * @see IDebugModelPresentation#computeDetail(IValue, IValueDetailListener)
+ */
+ public void computeDetail(IValue value, IValueDetailListener listener) {
+ getPresentation().computeDetail(value, listener);
+ }
+
+ /**
+ * @see ISourcePresentation#getEditorInput(Object)
+ */
+ public IEditorInput getEditorInput(Object element) {
+ return getPresentation().getEditorInput(element);
+ }
+
+ /**
+ * @see ISourcePresentation#getEditorId(IEditorInput, Object)
+ */
+ public String getEditorId(IEditorInput input, Object inputObject) {
+ return getPresentation().getEditorId(input, inputObject);
+ }
+
+ /**
+ * @see IBaseLabelProvider#addListener(ILabelProviderListener)
+ */
+ public void addListener(ILabelProviderListener listener) {
+ if (fPresentation != null) {
+ getPresentation().addListener(listener);
+ }
+ fListeners.add(listener);
+ }
+
+ /**
+ * @see IBaseLabelProvider#dispose()
+ */
+ public void dispose() {
+ if (fPresentation != null) {
+ getPresentation().dispose();
+ }
+ fListeners = null;
+ }
+
+ /**
+ * @see IBaseLabelProvider#isLabelProperty(Object, String)
+ */
+ public boolean isLabelProperty(Object element, String property) {
+ if (fPresentation != null) {
+ return getPresentation().isLabelProperty(element, property);
+ }
+ return false;
+ }
+
+ /**
+ * @see IBaseLabelProvider#removeListener(ILabelProviderListener)
+ */
+ public void removeListener(ILabelProviderListener listener) {
+ if (fPresentation != null) {
+ getPresentation().removeListener(listener);
+ }
+ fListeners.remove(listener);
+ }
+
+ /**
+ * Returns the real presentation, instantiating if required.
+ */
+ protected IDebugModelPresentation getPresentation() {
+ if (fPresentation == null) {
+ try {
+ fPresentation= (IDebugModelPresentation) DebugUIPlugin.createExtension(fConfig, "class"); //$NON-NLS-1$
+ // configure it
+ if (fListeners != null) {
+ Object[] list = fListeners.getListeners();
+ for (int i= 0; i < list.length; i++) {
+ fPresentation.addListener((ILabelProviderListener)list[i]);
+ }
+ }
+ Iterator keys= fAttributes.keySet().iterator();
+ while (keys.hasNext()) {
+ String key= (String)keys.next();
+ fPresentation.setAttribute(key, fAttributes.get(key));
+ }
+ } catch (CoreException e) {
+ DebugUIPlugin.log(e);
+ }
+ }
+ return fPresentation;
+ }
+
+ /**
+ * @see IDebugModelPresentation#setAttribute(String, Object)
+ */
+ public void setAttribute(String id, Object value) {
+ if (value == null) {
+ return;
+ }
+ if (fPresentation != null) {
+ getPresentation().setAttribute(id, value);
+ }
+
+ fAttributes.put(id, value);
+ }
+
+ /**
+ * Returns the identifier of the debug model this
+ * presentation is registered for.
+ */
+ public String getDebugModelIdentifier() {
+ return fConfig.getAttribute("id"); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns a new source viewer configuration for the details
+ * area of the variables view, or <code>null</code> if
+ * unspecified.
+ *
+ * @return source viewer configuration or <code>null</code>
+ * @exception CoreException if unable to create the specified
+ * source viewer configuration
+ */
+ public SourceViewerConfiguration newDetailsViewerConfiguration() throws CoreException {
+ String attr = fConfig.getAttribute("detailsViewerConfiguration"); //$NON-NLS-1$
+ if (attr != null) {
+ return (SourceViewerConfiguration)fConfig.createExecutableExtension("detailsViewerConfiguration"); //$NON-NLS-1$
+ }
+ return null;
+ }
+
+
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java
index 1420a80e5..a10db3ef1 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java
@@ -1,329 +1,329 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/**********************************************************************
-Copyright (c) 2000, 2002 IBM Corp. All rights reserved.
-This file is made available under the terms of the Common Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/cpl-v10.html
-**********************************************************************/
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-public abstract class AbstractDebugActionDelegate implements IWorkbenchWindowActionDelegate, IViewActionDelegate, ISelectionListener {
-
- /**
- * The underlying action for this delegate
- */
- private IAction fAction;
- /**
- * This action's view part, or <code>null</code>
- * if not installed in a view.
- */
- private IViewPart fViewPart;
-
- /**
- * Cache of the most recent seletion
- */
- private IStructuredSelection fSelection;
-
- /**
- * Whether this delegate has been initialized
- */
- private boolean fInitialized = false;
-
- /**
- * The window associated with this action delegate
- * May be <code>null</code>
- */
- protected IWorkbenchWindow fWindow;
-
- /**
- * It's crucial that delegate actions have a zero-arg constructor so that
- * they can be reflected into existence when referenced in an action set
- * in the plugin's plugin.xml file.
- */
- public AbstractDebugActionDelegate() {
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate#dispose()
- */
- public void dispose(){
- if (getWindow() != null) {
- getWindow().getSelectionService().removeSelectionListener(IDebugUIConstants.ID_DEBUG_VIEW, this);
- }
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate#init(IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window){
- // listen to selection changes in the debug view
- setWindow(window);
- window.getSelectionService().addSelectionListener(IDebugUIConstants.ID_DEBUG_VIEW, this);
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action){
- IStructuredSelection selection= getSelection();
-
- final Iterator enum= selection.iterator();
- String pluginId= DebugUIPlugin.getUniqueIdentifier();
- final MultiStatus ms=
- new MultiStatus(pluginId, DebugException.REQUEST_FAILED, getStatusMessage(), null);
- BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
- public void run() {
- while (enum.hasNext()) {
- Object element= enum.next();
- try {
- doAction(element);
- } catch (DebugException e) {
- ms.merge(e.getStatus());
- }
- }
- }
- });
- if (!ms.isOK()) {
- IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
- if (window != null) {
- DebugUIPlugin.errorDialog(window.getShell(), getErrorDialogTitle(), getErrorDialogMessage(), ms);
- } else {
- DebugUIPlugin.log(ms);
- }
- }
- }
-
- /**
- * AbstractDebugActionDelegates come in 2 flavors: IViewActionDelegate,
- * IWorkbenchWindowActionDelegate delegates.
- * </p>
- * <ul>
- * <li>IViewActionDelegate delegate: getView() != null</li>
- * <li>IWorkbenchWindowActionDelegate: getView == null</li>
- * </ul>
- * <p>
- * Only want to call update(action, selection) for IViewActionDelegates.
- * An initialize call to update(action, selection) is made for all flavors to set the initial
- * enabled state of the underlying action.
- * IWorkbenchWindowActionDelegate's listen to selection changes
- * in the debug view only.
- * </p>
- *
- * @see IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection s) {
- boolean wasInitialized= initialize(action, s);
- if (!wasInitialized) {
- if (getView() != null) {
- update(action, s);
- }
- }
- }
-
- protected void update(IAction action, ISelection s) {
- if (s instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection)s;
- action.setEnabled(getEnableStateForSelection(ss));
- setSelection(ss);
- } else {
- action.setEnabled(false);
- setSelection(StructuredSelection.EMPTY);
- }
- }
-
- /**
- * Return whether the action should be enabled or not based on the given selection.
- */
- protected boolean getEnableStateForSelection(IStructuredSelection selection) {
- if (selection.size() == 0) {
- return false;
- }
- Iterator enum= selection.iterator();
- int count= 0;
- while (enum.hasNext()) {
- count++;
- if (count > 1 && !enableForMultiSelection()) {
- return false;
- }
- Object element= enum.next();
- if (!isEnabledFor(element)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Returns whether this action should be enabled if there is
- * multi selection.
- */
- protected boolean enableForMultiSelection() {
- return true;
- }
-
- /**
- * Performs the specific action on this element.
- */
- protected abstract void doAction(Object element) throws DebugException;
-
- /**
- * Returns whether this action will work for the given element
- */
- protected abstract boolean isEnabledFor(Object element);
-
- /**
- * Returns the String to use as an error dialog title for
- * a failed action. Default is to return null.
- */
- protected String getErrorDialogTitle(){
- return null;
- }
- /**
- * Returns the String to use as an error dialog message for
- * a failed action. This message appears as the "Message:" in
- * the error dialog for this action.
- * Default is to return null.
- */
- protected String getErrorDialogMessage(){
- return null;
- }
- /**
- * Returns the String to use as a status message for
- * a failed action. This message appears as the "Reason:"
- * in the error dialog for this action.
- * Default is to return the empty String.
- */
- protected String getStatusMessage(){
- return ""; //$NON-NLS-1$
- }
-
- /**
- * @see IViewActionDelegate#init(IViewPart)
- */
- public void init(IViewPart view) {
- fViewPart = view;
- }
-
- /**
- * Returns this action's view part, or <code>null</code>
- * if not installed in a view.
- *
- * @return view part or <code>null</code>
- */
- protected IViewPart getView() {
- return fViewPart;
- }
-
- /**
- * Initialize this delegate, updating this delegate's
- * presentation.
- * As well, all of the flavors of AbstractDebugActionDelegates need to
- * have the initial enabled state set with a call to update(IAction, ISelection).
- *
- * @param action the presentation for this action
- * @return whether the action was initialized
- */
- protected boolean initialize(IAction action, ISelection selection) {
- if (!isInitialized()) {
- setAction(action);
- if (getView() == null) {
- //update on the selection in the debug view
- IWorkbenchWindow window= getWindow();
- if (window != null && window.getShell() != null && !window.getShell().isDisposed()) {
- IWorkbenchPage page= window.getActivePage();
- if (page != null) {
- selection= page.getSelection(IDebugUIConstants.ID_DEBUG_VIEW);
- }
- }
- }
- update(action, selection);
- setInitialized(true);
- return true;
- }
- return false;
- }
-
- /**
- * Returns the most recent selection
- *
- * @return structured selection
- */
- protected IStructuredSelection getSelection() {
- if (getView() != null) {
- //cannot used the cached selection in a view
- //as the selection can be out of date for context menu
- //actions. See bug 14556
- ISelection s= getView().getViewSite().getSelectionProvider().getSelection();
- if (s instanceof IStructuredSelection) {
- return (IStructuredSelection)s;
- } else {
- return StructuredSelection.EMPTY;
- }
- }
- return fSelection;
- }
-
- /**
- * Sets the most recent selection
- *
- * @parm selection structured selection
- */
- private void setSelection(IStructuredSelection selection) {
- fSelection = selection;
- }
-
- /**
- * @see ISelectionListener#selectionChanged(IWorkbenchPart, ISelection)
- */
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- update(getAction(), selection);
- }
-
- protected void setAction(IAction action) {
- fAction = action;
- }
-
- protected IAction getAction() {
- return fAction;
- }
-
- protected void setView(IViewPart viewPart) {
- fViewPart = viewPart;
- }
-
- protected boolean isInitialized() {
- return fInitialized;
- }
-
- protected void setInitialized(boolean initialized) {
- fInitialized = initialized;
- }
-
+package org.eclipse.debug.internal.ui.actions;
+
+/**********************************************************************
+Copyright (c) 2000, 2002 IBM Corp. All rights reserved.
+This file is made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+**********************************************************************/
+
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+public abstract class AbstractDebugActionDelegate implements IWorkbenchWindowActionDelegate, IViewActionDelegate, ISelectionListener {
+
+ /**
+ * The underlying action for this delegate
+ */
+ private IAction fAction;
+ /**
+ * This action's view part, or <code>null</code>
+ * if not installed in a view.
+ */
+ private IViewPart fViewPart;
+
+ /**
+ * Cache of the most recent seletion
+ */
+ private IStructuredSelection fSelection;
+
+ /**
+ * Whether this delegate has been initialized
+ */
+ private boolean fInitialized = false;
+
+ /**
+ * The window associated with this action delegate
+ * May be <code>null</code>
+ */
+ protected IWorkbenchWindow fWindow;
+
+ /**
+ * It's crucial that delegate actions have a zero-arg constructor so that
+ * they can be reflected into existence when referenced in an action set
+ * in the plugin's plugin.xml file.
+ */
+ public AbstractDebugActionDelegate() {
+ }
+
+ /**
+ * @see IWorkbenchWindowActionDelegate#dispose()
+ */
+ public void dispose(){
+ if (getWindow() != null) {
+ getWindow().getSelectionService().removeSelectionListener(IDebugUIConstants.ID_DEBUG_VIEW, this);
+ }
+ }
+
+ /**
+ * @see IWorkbenchWindowActionDelegate#init(IWorkbenchWindow)
+ */
+ public void init(IWorkbenchWindow window){
+ // listen to selection changes in the debug view
+ setWindow(window);
+ window.getSelectionService().addSelectionListener(IDebugUIConstants.ID_DEBUG_VIEW, this);
+ }
+
+ /**
+ * @see IActionDelegate#run(IAction)
+ */
+ public void run(IAction action){
+ IStructuredSelection selection= getSelection();
+
+ final Iterator enum= selection.iterator();
+ String pluginId= DebugUIPlugin.getUniqueIdentifier();
+ final MultiStatus ms=
+ new MultiStatus(pluginId, DebugException.REQUEST_FAILED, getStatusMessage(), null);
+ BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
+ public void run() {
+ while (enum.hasNext()) {
+ Object element= enum.next();
+ try {
+ doAction(element);
+ } catch (DebugException e) {
+ ms.merge(e.getStatus());
+ }
+ }
+ }
+ });
+ if (!ms.isOK()) {
+ IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
+ if (window != null) {
+ DebugUIPlugin.errorDialog(window.getShell(), getErrorDialogTitle(), getErrorDialogMessage(), ms);
+ } else {
+ DebugUIPlugin.log(ms);
+ }
+ }
+ }
+
+ /**
+ * AbstractDebugActionDelegates come in 2 flavors: IViewActionDelegate,
+ * IWorkbenchWindowActionDelegate delegates.
+ * </p>
+ * <ul>
+ * <li>IViewActionDelegate delegate: getView() != null</li>
+ * <li>IWorkbenchWindowActionDelegate: getView == null</li>
+ * </ul>
+ * <p>
+ * Only want to call update(action, selection) for IViewActionDelegates.
+ * An initialize call to update(action, selection) is made for all flavors to set the initial
+ * enabled state of the underlying action.
+ * IWorkbenchWindowActionDelegate's listen to selection changes
+ * in the debug view only.
+ * </p>
+ *
+ * @see IActionDelegate#selectionChanged(IAction, ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection s) {
+ boolean wasInitialized= initialize(action, s);
+ if (!wasInitialized) {
+ if (getView() != null) {
+ update(action, s);
+ }
+ }
+ }
+
+ protected void update(IAction action, ISelection s) {
+ if (s instanceof IStructuredSelection) {
+ IStructuredSelection ss = (IStructuredSelection)s;
+ action.setEnabled(getEnableStateForSelection(ss));
+ setSelection(ss);
+ } else {
+ action.setEnabled(false);
+ setSelection(StructuredSelection.EMPTY);
+ }
+ }
+
+ /**
+ * Return whether the action should be enabled or not based on the given selection.
+ */
+ protected boolean getEnableStateForSelection(IStructuredSelection selection) {
+ if (selection.size() == 0) {
+ return false;
+ }
+ Iterator enum= selection.iterator();
+ int count= 0;
+ while (enum.hasNext()) {
+ count++;
+ if (count > 1 && !enableForMultiSelection()) {
+ return false;
+ }
+ Object element= enum.next();
+ if (!isEnabledFor(element)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Returns whether this action should be enabled if there is
+ * multi selection.
+ */
+ protected boolean enableForMultiSelection() {
+ return true;
+ }
+
+ /**
+ * Performs the specific action on this element.
+ */
+ protected abstract void doAction(Object element) throws DebugException;
+
+ /**
+ * Returns whether this action will work for the given element
+ */
+ protected abstract boolean isEnabledFor(Object element);
+
+ /**
+ * Returns the String to use as an error dialog title for
+ * a failed action. Default is to return null.
+ */
+ protected String getErrorDialogTitle(){
+ return null;
+ }
+ /**
+ * Returns the String to use as an error dialog message for
+ * a failed action. This message appears as the "Message:" in
+ * the error dialog for this action.
+ * Default is to return null.
+ */
+ protected String getErrorDialogMessage(){
+ return null;
+ }
+ /**
+ * Returns the String to use as a status message for
+ * a failed action. This message appears as the "Reason:"
+ * in the error dialog for this action.
+ * Default is to return the empty String.
+ */
+ protected String getStatusMessage(){
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * @see IViewActionDelegate#init(IViewPart)
+ */
+ public void init(IViewPart view) {
+ fViewPart = view;
+ }
+
+ /**
+ * Returns this action's view part, or <code>null</code>
+ * if not installed in a view.
+ *
+ * @return view part or <code>null</code>
+ */
+ protected IViewPart getView() {
+ return fViewPart;
+ }
+
+ /**
+ * Initialize this delegate, updating this delegate's
+ * presentation.
+ * As well, all of the flavors of AbstractDebugActionDelegates need to
+ * have the initial enabled state set with a call to update(IAction, ISelection).
+ *
+ * @param action the presentation for this action
+ * @return whether the action was initialized
+ */
+ protected boolean initialize(IAction action, ISelection selection) {
+ if (!isInitialized()) {
+ setAction(action);
+ if (getView() == null) {
+ //update on the selection in the debug view
+ IWorkbenchWindow window= getWindow();
+ if (window != null && window.getShell() != null && !window.getShell().isDisposed()) {
+ IWorkbenchPage page= window.getActivePage();
+ if (page != null) {
+ selection= page.getSelection(IDebugUIConstants.ID_DEBUG_VIEW);
+ }
+ }
+ }
+ update(action, selection);
+ setInitialized(true);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Returns the most recent selection
+ *
+ * @return structured selection
+ */
+ protected IStructuredSelection getSelection() {
+ if (getView() != null) {
+ //cannot used the cached selection in a view
+ //as the selection can be out of date for context menu
+ //actions. See bug 14556
+ ISelection s= getView().getViewSite().getSelectionProvider().getSelection();
+ if (s instanceof IStructuredSelection) {
+ return (IStructuredSelection)s;
+ } else {
+ return StructuredSelection.EMPTY;
+ }
+ }
+ return fSelection;
+ }
+
+ /**
+ * Sets the most recent selection
+ *
+ * @parm selection structured selection
+ */
+ private void setSelection(IStructuredSelection selection) {
+ fSelection = selection;
+ }
+
+ /**
+ * @see ISelectionListener#selectionChanged(IWorkbenchPart, ISelection)
+ */
+ public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+ update(getAction(), selection);
+ }
+
+ protected void setAction(IAction action) {
+ fAction = action;
+ }
+
+ protected IAction getAction() {
+ return fAction;
+ }
+
+ protected void setView(IViewPart viewPart) {
+ fViewPart = viewPart;
+ }
+
+ protected boolean isInitialized() {
+ return fInitialized;
+ }
+
+ protected void setInitialized(boolean initialized) {
+ fInitialized = initialized;
+ }
+
protected IWorkbenchWindow getWindow() {
return fWindow;
}
-
+
protected void setWindow(IWorkbenchWindow window) {
fWindow = window;
- }
+ }
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractListenerActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractListenerActionDelegate.java
index 503dffeca..56ee5f4c8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractListenerActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractListenerActionDelegate.java
@@ -19,9 +19,9 @@ import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-
-public abstract class AbstractListenerActionDelegate extends AbstractDebugActionDelegate implements IDebugEventSetListener, IPartListener, IPageListener {
+import org.eclipse.ui.IWorkbenchWindow;
+
+public abstract class AbstractListenerActionDelegate extends AbstractDebugActionDelegate implements IDebugEventSetListener, IPartListener, IPageListener {
/**
* @see IPartListener#partActivated(IWorkbenchPart)
@@ -133,22 +133,22 @@ public abstract class AbstractListenerActionDelegate extends AbstractDebugAction
}
}
- /**
- * @see IWorkbenchWindowActionDelegate#init(IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window){
- super.init(window);
+ /**
+ * @see IWorkbenchWindowActionDelegate#init(IWorkbenchWindow)
+ */
+ public void init(IWorkbenchWindow window){
+ super.init(window);
DebugPlugin.getDefault().addDebugEventListener(this);
window.addPageListener(this);
}
- /**
- * @see IViewActionDelegate#init(IViewPart)
- */
- public void init(IViewPart view) {
- super.init(view);
+ /**
+ * @see IViewActionDelegate#init(IViewPart)
+ */
+ public void init(IViewPart view) {
+ super.init(view);
DebugPlugin.getDefault().addDebugEventListener(this);
- setWindow(view.getViewSite().getWorkbenchWindow());
+ setWindow(view.getViewSite().getWorkbenchWindow());
getPage().addPartListener(this);
getPage().getWorkbenchWindow().addPageListener(this);
}
@@ -173,7 +173,7 @@ public abstract class AbstractListenerActionDelegate extends AbstractDebugAction
getPage().getWorkbenchWindow().getShell().getDisplay().asyncExec(r);
}
}
-
+
/**
* @see IPageListener#pageClosed(IWorkbenchPage)
*/
@@ -188,4 +188,4 @@ public abstract class AbstractListenerActionDelegate extends AbstractDebugAction
*/
public void pageOpened(IWorkbenchPage page) {
}
-}
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveAllActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveAllActionDelegate.java
index 8761960ab..2a387b0f3 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveAllActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveAllActionDelegate.java
@@ -1,66 +1,66 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IViewPart;
-
-public abstract class AbstractRemoveAllActionDelegate extends AbstractListenerActionDelegate {
-
- /**
- * @see AbstractDebugActionDelegate#doAction(Object)
- */
- protected void doAction(Object element) {
- doAction();
- getAction().setEnabled(false);
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action){
- doAction(null);
- }
-
- protected abstract void doAction();
-
- /**
- * @see AbstractDebugActionDelegate#isEnabledFor(Object)
- */
- protected boolean isEnabledFor(Object element) {
- return true;
- }
-
- protected void update(IAction action, ISelection s) {
- update();
- }
-
- protected abstract void update();
-
- /**
- * Remove all actions do care nothing about the current selection
- * @see IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection s) {
- if (!isInitialized()) {
- action.setEnabled(false);
- setAction(action);
- setInitialized(true);
- }
- update();
- }
-
- /**
- * @see IViewActionDelegate#init(IViewPart)
- */
- public void init(IViewPart view) {
- setView(view);
- setWindow(view.getViewSite().getWorkbenchWindow());
- getPage().addPartListener(this);
- getPage().getWorkbenchWindow().addPageListener(this);
- }
-}
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2002.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IViewPart;
+
+public abstract class AbstractRemoveAllActionDelegate extends AbstractListenerActionDelegate {
+
+ /**
+ * @see AbstractDebugActionDelegate#doAction(Object)
+ */
+ protected void doAction(Object element) {
+ doAction();
+ getAction().setEnabled(false);
+ }
+
+ /**
+ * @see IActionDelegate#run(IAction)
+ */
+ public void run(IAction action){
+ doAction(null);
+ }
+
+ protected abstract void doAction();
+
+ /**
+ * @see AbstractDebugActionDelegate#isEnabledFor(Object)
+ */
+ protected boolean isEnabledFor(Object element) {
+ return true;
+ }
+
+ protected void update(IAction action, ISelection s) {
+ update();
+ }
+
+ protected abstract void update();
+
+ /**
+ * Remove all actions do care nothing about the current selection
+ * @see IActionDelegate#selectionChanged(IAction, ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection s) {
+ if (!isInitialized()) {
+ action.setEnabled(false);
+ setAction(action);
+ setInitialized(true);
+ }
+ update();
+ }
+
+ /**
+ * @see IViewActionDelegate#init(IViewPart)
+ */
+ public void init(IViewPart view) {
+ setView(view);
+ setWindow(view.getViewSite().getWorkbenchWindow());
+ getPage().addPartListener(this);
+ getPage().getWorkbenchWindow().addPageListener(this);
+ }
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java
index 19fe1cf31..7a2950364 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java
@@ -1,27 +1,27 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class ActionMessages {
-
- private static final String RESOURCE_BUNDLE= "org.eclipse.debug.internal.ui.actions.ActionMessages";//$NON-NLS-1$
-
- private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
-
- private ActionMessages() {
- }
-
- public static String getString(String key) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
- }
- }
-}
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class ActionMessages {
+
+ private static final String RESOURCE_BUNDLE= "org.eclipse.debug.internal.ui.actions.ActionMessages";//$NON-NLS-1$
+
+ private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+
+ private ActionMessages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ }
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties
index 4af3246a2..801087739 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties
@@ -1,109 +1,109 @@
-######################################################################
-# Copyright (c) 2000, 2002 IBM Corp. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v0.5
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v05.html
-#
-# Contributors:
-# IBM Corporation - Initial implementation
-######################################################################
-
-ChangeVariableValue.errorDialogMessage=Setting the variable value failed.
-ChangeVariableValue.errorDialogTitle=Setting variable value
-ChangeVariableValue.title=&Change Variable Value
-ChangeVariableValue.toolTipText=Changes the Value of a Simple Type Variable
-
-ClearOutputAction.title=Clea&r
-ClearOutputAction.toolTipText=Clear Console
-
-CopyToClipboardActionDelegate.Problem_Copying_to_Clipboard_1=Problem Copying to Clipboard
-CopyToClipboardActionDelegate.There_was_a_problem_when_accessing_the_system_clipboard._Retry__2=There was a problem when accessing the system clipboard. Retry?
-
-DisconnectActionDelegate.Disconnect_3=Disconnect
-DisconnectActionDelegate.Disconnect_failed_1=Disconnect failed
-DisconnectActionDelegate.Exceptions_occurred_attempting_to_disconnect._2=Exceptions occurred attempting to disconnect.
-
-EnableBreakpointAction.Enable_breakpoint(s)_failed_2=Enable/Disable breakpoint(s) failed
-EnableBreakpointAction.Enabling_breakpoints_3=Enabling/disabling breakpoints
-EnableBreakpointAction.Exceptions_occurred_enabling_the_breakpoint(s)._4=Exceptions occurred enabling/disabling the breakpoint(s).
-
-OpenBreakpointMarkerAction.&Go_to_File_1=&Go to File
-OpenBreakpointMarkerAction.Exceptions_occurred_attempting_to_open_the_editor_for_the_breakpoint_resource_2=Exceptions occurred attempting to open the editor for the breakpoint resource
-OpenBreakpointMarkerAction.Go_to_Breakpoint_1=Go to File
-OpenBreakpointMarkerAction.Go_to_File_for_Breakpoint_2=Go to File for Breakpoint
-
-RelaunchActionDelegate.An_exception_occurred_while_launching_2=An exception occurred while launching
-RelaunchActionDelegate.Launch_Failed_1=Launch Failed
-RelaunchActionDelegate.Launch_1=Launch
-
-RemoveAllBreakpointsAction.Breakpoint(s)_removal_failed_3=Breakpoint(s) removal failed
-RemoveAllBreakpointsAction.Exceptions_occurred_removing_breakpoints._5=Exceptions occurred removing breakpoints.
-RemoveAllBreakpointsAction.Removing_all_breakpoints_4=Removing all breakpoints
-
-RemoveBreakpointAction.Breakpoint(s)_removal_failed_3=Breakpoint(s) removal failed
-RemoveBreakpointAction.Exceptions_occurred_attempting_to_remove_a_breakpoint._5=Exceptions occurred attempting to remove a breakpoint.
-RemoveBreakpointAction.Removing_a_breakpoint_4=Removing a breakpoint
-
-ResumeActionDelegate.Exceptions_occurred_attempting_to_resume._2=Exceptions occurred attempting to resume.
-ResumeActionDelegate.Resume_3=Resume
-ResumeActionDelegate.Resume_failed._1=Resume failed.
-
-ShowDetailPaneAction.Show_detail_pane_2=Show Detail Pane
-ShowDetailPaneAction.Show_Variable_Detail_Pane_1=Show &Detail Pane
-
-ShowSupportedBreakpointsAction.Show_For_Selected=Show Supported &Breakpoints
-ShowSupportedBreakpointsAction.tooltip=Show Breakpoints Supported by Selected Target
-
-ShowTypesAction.Show_&Type_Names_1=Show &Type Names
-ShowTypesAction.Show_Type_Names=Show Type Names
-
-StepIntoActionDelegate.Exceptions_occurred_attempting_to_step_into_the_frame_2=Exceptions occurred attempting to step into the frame
-StepIntoActionDelegate.Step_Into_3=Step Into
-StepIntoActionDelegate.Step_into_failed_1=Step into failed
-
-StepOverActionDelegate.Exceptions_occurred_attempting_to_step_over_the_frame_2=Exceptions occurred attempting to step over the frame
-StepOverActionDelegate.Step_over_3=Step Over
-StepOverActionDelegate.Step_over_failed_1=Step over failed
-
-StepReturnActionDelegate.Exceptions_occurred_attempting_to_run_to_return_of_the_frame._2=Exceptions occurred attempting to run to return of the frame.
-StepReturnActionDelegate.Run_to_Return_3=Step Return
-StepReturnActionDelegate.Run_to_return_failed._1=Step return failed.
-
-SuspendActionDelegate.Exceptions_occurred_attempting_to_suspend._2=Exceptions occurred attempting to suspend.
-SuspendActionDelegate.Suspend_3=Suspend
-SuspendActionDelegate.Suspend_failed_1=Suspend failed
-
-TerminateActionDelegate.Exceptions_occurred_attempting_to_terminate._2=Exceptions occurred attempting to terminate.
-TerminateActionDelegate.Terminate_3=Terminate
-
-TerminateActionDelegate.Terminate_failed._1=Terminate failed.
-TerminateAllAction.Exceptions_occurred_attempting_to_terminate_all._5=Exceptions occurred attempting to terminate all.
-TerminateAllAction.Terminate_All_2=Terminate All
-TerminateAllAction.Terminate_all_failed_3=Terminate all failed
-
-TerminateAndRemoveActionDelegate.Exceptions_occurred_attempting_to_terminate_and_remove_2=Exceptions occurred attempting to terminate and remove
-TerminateAndRemoveActionDelegate.Terminate_and_Remove;_3=Terminate and Remove;
-TerminateAndRemoveActionDelegate.Terminate_and_remove_failed_1=Terminate and remove failed
-
-TextViewerGotoLineAction.Enter_line_number__8=Enter line number (1...{0}):
-TextViewerGotoLineAction.Exceptions_occurred_attempt_to_go_to_line_2=Exceptions occurred attempt to go to line
-TextViewerGotoLineAction.Go_to_&Line...@Ctrl+L_4=Go to &Line...@Ctrl+L
-TextViewerGotoLineAction.Go_To_Line_1=Go to Line
-TextViewerGotoLineAction.Line_number_out_of_range_1=Line number out of range
-TextViewerGotoLineAction.Not_a_number_2=Not a number
-DebugDropDownAction.Debug_last_launched_1=Debug Last Launched:
-RunDropDownAction.Run_last_launched_1=Run Last Launched:
-DebugDropDownAction.Debug_1=Debug
-RunDropDownAction.Run_1=Run
-DebugWithConfigurationAction.Debug_As_1=Debug &As
-RunWithConfigurationAction.Run_As_1=Run &As
-OpenDebugConfigurations.Debug..._1=&Debug...
-OpenRunConfigurations.Run..._1=&Run...
-RelaunchLastAction.Cannot_relaunch_1=Cannot relaunch
-RelaunchLastAction.Cannot_relaunch_[{0}]_because_it_does_not_support_{2}_mode_2=Cannot relaunch [{0}] because it does not support {1} mode
-RelaunchLastAction.Error_relaunching_3=Error relaunching
-RelaunchLastAction.Error_encountered_attempting_to_relaunch_4=Error encountered attempting to relaunch
+######################################################################
+# Copyright (c) 2000, 2002 IBM Corp. and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Common Public License v0.5
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/cpl-v05.html
+#
+# Contributors:
+# IBM Corporation - Initial implementation
+######################################################################
+
+ChangeVariableValue.errorDialogMessage=Setting the variable value failed.
+ChangeVariableValue.errorDialogTitle=Setting variable value
+ChangeVariableValue.title=&Change Variable Value
+ChangeVariableValue.toolTipText=Changes the Value of a Simple Type Variable
+
+ClearOutputAction.title=Clea&r
+ClearOutputAction.toolTipText=Clear Console
+
+CopyToClipboardActionDelegate.Problem_Copying_to_Clipboard_1=Problem Copying to Clipboard
+CopyToClipboardActionDelegate.There_was_a_problem_when_accessing_the_system_clipboard._Retry__2=There was a problem when accessing the system clipboard. Retry?
+
+DisconnectActionDelegate.Disconnect_3=Disconnect
+DisconnectActionDelegate.Disconnect_failed_1=Disconnect failed
+DisconnectActionDelegate.Exceptions_occurred_attempting_to_disconnect._2=Exceptions occurred attempting to disconnect.
+
+EnableBreakpointAction.Enable_breakpoint(s)_failed_2=Enable/Disable breakpoint(s) failed
+EnableBreakpointAction.Enabling_breakpoints_3=Enabling/disabling breakpoints
+EnableBreakpointAction.Exceptions_occurred_enabling_the_breakpoint(s)._4=Exceptions occurred enabling/disabling the breakpoint(s).
+
+OpenBreakpointMarkerAction.&Go_to_File_1=&Go to File
+OpenBreakpointMarkerAction.Exceptions_occurred_attempting_to_open_the_editor_for_the_breakpoint_resource_2=Exceptions occurred attempting to open the editor for the breakpoint resource
+OpenBreakpointMarkerAction.Go_to_Breakpoint_1=Go to File
+OpenBreakpointMarkerAction.Go_to_File_for_Breakpoint_2=Go to File for Breakpoint
+
+RelaunchActionDelegate.An_exception_occurred_while_launching_2=An exception occurred while launching
+RelaunchActionDelegate.Launch_Failed_1=Launch Failed
+RelaunchActionDelegate.Launch_1=Launch
+
+RemoveAllBreakpointsAction.Breakpoint(s)_removal_failed_3=Breakpoint(s) removal failed
+RemoveAllBreakpointsAction.Exceptions_occurred_removing_breakpoints._5=Exceptions occurred removing breakpoints.
+RemoveAllBreakpointsAction.Removing_all_breakpoints_4=Removing all breakpoints
+
+RemoveBreakpointAction.Breakpoint(s)_removal_failed_3=Breakpoint(s) removal failed
+RemoveBreakpointAction.Exceptions_occurred_attempting_to_remove_a_breakpoint._5=Exceptions occurred attempting to remove a breakpoint.
+RemoveBreakpointAction.Removing_a_breakpoint_4=Removing a breakpoint
+
+ResumeActionDelegate.Exceptions_occurred_attempting_to_resume._2=Exceptions occurred attempting to resume.
+ResumeActionDelegate.Resume_3=Resume
+ResumeActionDelegate.Resume_failed._1=Resume failed.
+
+ShowDetailPaneAction.Show_detail_pane_2=Show Detail Pane
+ShowDetailPaneAction.Show_Variable_Detail_Pane_1=Show &Detail Pane
+
+ShowSupportedBreakpointsAction.Show_For_Selected=Show Supported &Breakpoints
+ShowSupportedBreakpointsAction.tooltip=Show Breakpoints Supported by Selected Target
+
+ShowTypesAction.Show_&Type_Names_1=Show &Type Names
+ShowTypesAction.Show_Type_Names=Show Type Names
+
+StepIntoActionDelegate.Exceptions_occurred_attempting_to_step_into_the_frame_2=Exceptions occurred attempting to step into the frame
+StepIntoActionDelegate.Step_Into_3=Step Into
+StepIntoActionDelegate.Step_into_failed_1=Step into failed
+
+StepOverActionDelegate.Exceptions_occurred_attempting_to_step_over_the_frame_2=Exceptions occurred attempting to step over the frame
+StepOverActionDelegate.Step_over_3=Step Over
+StepOverActionDelegate.Step_over_failed_1=Step over failed
+
+StepReturnActionDelegate.Exceptions_occurred_attempting_to_run_to_return_of_the_frame._2=Exceptions occurred attempting to run to return of the frame.
+StepReturnActionDelegate.Run_to_Return_3=Step Return
+StepReturnActionDelegate.Run_to_return_failed._1=Step return failed.
+
+SuspendActionDelegate.Exceptions_occurred_attempting_to_suspend._2=Exceptions occurred attempting to suspend.
+SuspendActionDelegate.Suspend_3=Suspend
+SuspendActionDelegate.Suspend_failed_1=Suspend failed
+
+TerminateActionDelegate.Exceptions_occurred_attempting_to_terminate._2=Exceptions occurred attempting to terminate.
+TerminateActionDelegate.Terminate_3=Terminate
+
+TerminateActionDelegate.Terminate_failed._1=Terminate failed.
+TerminateAllAction.Exceptions_occurred_attempting_to_terminate_all._5=Exceptions occurred attempting to terminate all.
+TerminateAllAction.Terminate_All_2=Terminate All
+TerminateAllAction.Terminate_all_failed_3=Terminate all failed
+
+TerminateAndRemoveActionDelegate.Exceptions_occurred_attempting_to_terminate_and_remove_2=Exceptions occurred attempting to terminate and remove
+TerminateAndRemoveActionDelegate.Terminate_and_Remove;_3=Terminate and Remove;
+TerminateAndRemoveActionDelegate.Terminate_and_remove_failed_1=Terminate and remove failed
+
+TextViewerGotoLineAction.Enter_line_number__8=Enter line number (1...{0}):
+TextViewerGotoLineAction.Exceptions_occurred_attempt_to_go_to_line_2=Exceptions occurred attempt to go to line
+TextViewerGotoLineAction.Go_to_&Line...@Ctrl+L_4=Go to &Line...@Ctrl+L
+TextViewerGotoLineAction.Go_To_Line_1=Go to Line
+TextViewerGotoLineAction.Line_number_out_of_range_1=Line number out of range
+TextViewerGotoLineAction.Not_a_number_2=Not a number
+DebugDropDownAction.Debug_last_launched_1=Debug Last Launched:
+RunDropDownAction.Run_last_launched_1=Run Last Launched:
+DebugDropDownAction.Debug_1=Debug
+RunDropDownAction.Run_1=Run
+DebugWithConfigurationAction.Debug_As_1=Debug &As
+RunWithConfigurationAction.Run_As_1=Run &As
+OpenDebugConfigurations.Debug..._1=&Debug...
+OpenRunConfigurations.Run..._1=&Run...
+RelaunchLastAction.Cannot_relaunch_1=Cannot relaunch
+RelaunchLastAction.Cannot_relaunch_[{0}]_because_it_does_not_support_{2}_mode_2=Cannot relaunch [{0}] because it does not support {1} mode
+RelaunchLastAction.Error_relaunching_3=Error relaunching
+RelaunchLastAction.Error_encountered_attempting_to_relaunch_4=Error encountered attempting to relaunch
ChangeVariableValueSet_Variable_Value_1=Set Variable Value
ChangeVariableValueEnter_a_new_value_for__2=Enter a new value for
ChangeVariableValueAn_exception_occurred_3=An exception occurred
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ChangeVariableValueAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ChangeVariableValueAction.java
index b0f58560e..d7312a1df 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ChangeVariableValueAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ChangeVariableValueAction.java
@@ -1,142 +1,142 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/**********************************************************************
-Copyright (c) 2000, 2002 IBM Corp. All rights reserved.
-This file is made available under the terms of the Common Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/cpl-v10.html
-**********************************************************************/
-
-import java.util.Iterator;
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IValueModification;
-import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.SelectionProviderAction;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Action for changing the value of primitives and <code>String</code> variables.
- */
-public class ChangeVariableValueAction extends SelectionProviderAction {
-
- private ChangeVariableValueInputDialog fInputDialog;
- protected IVariable fVariable;
-
- public ChangeVariableValueAction(Viewer viewer) {
- super(viewer, ActionMessages.getString("ChangeVariableValue.title")); //$NON-NLS-1$
- setDescription(ActionMessages.getString("ChangeVariableValue.toolTipText")); //$NON-NLS-1$
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_CHANGE_VARIABLE_VALUE));
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_CHANGE_VARIABLE_VALUE));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_CHANGE_VARIABLE_VALUE));
- WorkbenchHelp.setHelp(
- this,
- IDebugHelpContextIds.CHANGE_VALUE_ACTION);
- }
-
- /**
- * Edit the variable value with an inline text editor.
- */
- protected void doActionPerformed(final IVariable variable) {
- IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
- if (window == null) {
- return;
- }
- Shell activeShell= window.getShell();
-
- // If a previous edit is still in progress, don't start another
- if (fInputDialog != null) {
- return;
- }
-
- fVariable = variable;
- String name= ""; //$NON-NLS-1$
- String value= ""; //$NON-NLS-1$
- try {
- name= fVariable.getName();
- value= fVariable.getValue().getValueString();
- } catch (DebugException exception) {
- DebugUIPlugin.errorDialog(activeShell, ActionMessages.getString("ChangeVariableValue.errorDialogTitle"),ActionMessages.getString("ChangeVariableValue.errorDialogMessage"), exception); //$NON-NLS-2$ //$NON-NLS-1$
- fInputDialog= null;
- return;
- }
- fInputDialog= new ChangeVariableValueInputDialog(activeShell, ActionMessages.getString("ChangeVariableValueSet_Variable_Value_1"), ActionMessages.getString("ChangeVariableValueEnter_a_new_value_for__2") + name + ':', value, new IInputValidator() { //$NON-NLS-1$ //$NON-NLS-2$
- /**
- * Returns an error string if the input is invalid
- */
- public String isValid(String input) {
- try {
- if (fVariable.verifyValue(input)) {
- return null; // null means valid
- }
- } catch (DebugException exception) {
- return ActionMessages.getString("ChangeVariableValueAn_exception_occurred_3"); //$NON-NLS-1$
- }
- return ActionMessages.getString("ChangeVariableValueInvalid_value_4"); //$NON-NLS-1$
- }
- });
-
- fInputDialog.open();
- String newValue= fInputDialog.getValue();
- if (newValue != null) {
- // null value means cancel was pressed
- try {
- fVariable.setValue(newValue);
- getSelectionProvider().setSelection(new StructuredSelection(variable));
- } catch (DebugException de) {
- DebugUIPlugin.errorDialog(activeShell, ActionMessages.getString("ChangeVariableValue.errorDialogTitle"),ActionMessages.getString("ChangeVariableValue.errorDialogMessage"), de); //$NON-NLS-2$ //$NON-NLS-1$
- fInputDialog= null;
- return;
- }
- }
- fInputDialog= null;
- }
-
- /**
- * Updates the enabled state of this action based
- * on the selection
- */
- protected void update(IStructuredSelection sel) {
- Iterator iter= sel.iterator();
- if (iter.hasNext()) {
- Object object= iter.next();
- if (object instanceof IValueModification) {
- IValueModification varMod= (IValueModification)object;
- if (!varMod.supportsValueModification()) {
- setEnabled(false);
- return;
- }
- setEnabled(!iter.hasNext());
- return;
- }
- }
- setEnabled(false);
- }
-
- /**
- * @see IAction#run()
- */
- public void run() {
- Iterator iterator= getStructuredSelection().iterator();
- doActionPerformed((IVariable)iterator.next());
- }
-
- /**
- * @see SelectionProviderAction#selectionChanged(org.eclipse.jface.viewers.IStructuredSelection)
- */
- public void selectionChanged(IStructuredSelection sel) {
- update(sel);
- }
-}
-
+package org.eclipse.debug.internal.ui.actions;
+
+/**********************************************************************
+Copyright (c) 2000, 2002 IBM Corp. All rights reserved.
+This file is made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+**********************************************************************/
+
+import java.util.Iterator;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IValueModification;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.debug.internal.ui.DebugPluginImages;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
+import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.SelectionProviderAction;
+import org.eclipse.ui.help.WorkbenchHelp;
+
+/**
+ * Action for changing the value of primitives and <code>String</code> variables.
+ */
+public class ChangeVariableValueAction extends SelectionProviderAction {
+
+ private ChangeVariableValueInputDialog fInputDialog;
+ protected IVariable fVariable;
+
+ public ChangeVariableValueAction(Viewer viewer) {
+ super(viewer, ActionMessages.getString("ChangeVariableValue.title")); //$NON-NLS-1$
+ setDescription(ActionMessages.getString("ChangeVariableValue.toolTipText")); //$NON-NLS-1$
+ setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_CHANGE_VARIABLE_VALUE));
+ setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_CHANGE_VARIABLE_VALUE));
+ setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_CHANGE_VARIABLE_VALUE));
+ WorkbenchHelp.setHelp(
+ this,
+ IDebugHelpContextIds.CHANGE_VALUE_ACTION);
+ }
+
+ /**
+ * Edit the variable value with an inline text editor.
+ */
+ protected void doActionPerformed(final IVariable variable) {
+ IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
+ if (window == null) {
+ return;
+ }
+ Shell activeShell= window.getShell();
+
+ // If a previous edit is still in progress, don't start another
+ if (fInputDialog != null) {
+ return;
+ }
+
+ fVariable = variable;
+ String name= ""; //$NON-NLS-1$
+ String value= ""; //$NON-NLS-1$
+ try {
+ name= fVariable.getName();
+ value= fVariable.getValue().getValueString();
+ } catch (DebugException exception) {
+ DebugUIPlugin.errorDialog(activeShell, ActionMessages.getString("ChangeVariableValue.errorDialogTitle"),ActionMessages.getString("ChangeVariableValue.errorDialogMessage"), exception); //$NON-NLS-2$ //$NON-NLS-1$
+ fInputDialog= null;
+ return;
+ }
+ fInputDialog= new ChangeVariableValueInputDialog(activeShell, ActionMessages.getString("ChangeVariableValueSet_Variable_Value_1"), ActionMessages.getString("ChangeVariableValueEnter_a_new_value_for__2") + name + ':', value, new IInputValidator() { //$NON-NLS-1$ //$NON-NLS-2$
+ /**
+ * Returns an error string if the input is invalid
+ */
+ public String isValid(String input) {
+ try {
+ if (fVariable.verifyValue(input)) {
+ return null; // null means valid
+ }
+ } catch (DebugException exception) {
+ return ActionMessages.getString("ChangeVariableValueAn_exception_occurred_3"); //$NON-NLS-1$
+ }
+ return ActionMessages.getString("ChangeVariableValueInvalid_value_4"); //$NON-NLS-1$
+ }
+ });
+
+ fInputDialog.open();
+ String newValue= fInputDialog.getValue();
+ if (newValue != null) {
+ // null value means cancel was pressed
+ try {
+ fVariable.setValue(newValue);
+ getSelectionProvider().setSelection(new StructuredSelection(variable));
+ } catch (DebugException de) {
+ DebugUIPlugin.errorDialog(activeShell, ActionMessages.getString("ChangeVariableValue.errorDialogTitle"),ActionMessages.getString("ChangeVariableValue.errorDialogMessage"), de); //$NON-NLS-2$ //$NON-NLS-1$
+ fInputDialog= null;
+ return;
+ }
+ }
+ fInputDialog= null;
+ }
+
+ /**
+ * Updates the enabled state of this action based
+ * on the selection
+ */
+ protected void update(IStructuredSelection sel) {
+ Iterator iter= sel.iterator();
+ if (iter.hasNext()) {
+ Object object= iter.next();
+ if (object instanceof IValueModification) {
+ IValueModification varMod= (IValueModification)object;
+ if (!varMod.supportsValueModification()) {
+ setEnabled(false);
+ return;
+ }
+ setEnabled(!iter.hasNext());
+ return;
+ }
+ }
+ setEnabled(false);
+ }
+
+ /**
+ * @see IAction#run()
+ */
+ public void run() {
+ Iterator iterator= getStructuredSelection().iterator();
+ doActionPerformed((IVariable)iterator.next());
+ }
+
+ /**
+ * @see SelectionProviderAction#selectionChanged(org.eclipse.jface.viewers.IStructuredSelection)
+ */
+ public void selectionChanged(IStructuredSelection sel) {
+ update(sel);
+ }
+}
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ClearOutputAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ClearOutputAction.java
index d8771c061..b18fe5bec 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ClearOutputAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ClearOutputAction.java
@@ -1,44 +1,44 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/**********************************************************************
-Copyright (c) 2000, 2002 IBM Corp. All rights reserved.
-This file is made available under the terms of the Common Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/cpl-v10.html
-**********************************************************************/
-
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.views.console.ConsoleViewer;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Clears the output of the selected launches
- */
-public class ClearOutputAction extends Action {
-
- private ConsoleViewer fConsoleViewer;
-
- public ClearOutputAction(ConsoleViewer viewer) {
- super(ActionMessages.getString("ClearOutputAction.title")); //$NON-NLS-1$
- fConsoleViewer= viewer;
- setToolTipText(ActionMessages.getString("ClearOutputAction.toolTipText")); //$NON-NLS-1$
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_CLEAR));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_CLEAR));
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_CLEAR));
- WorkbenchHelp.setHelp(
- this,
- IDebugHelpContextIds.CLEAR_CONSOLE_ACTION);
- }
-
- /**
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- fConsoleViewer.clearDocument();
- }
-}
-
+package org.eclipse.debug.internal.ui.actions;
+
+/**********************************************************************
+Copyright (c) 2000, 2002 IBM Corp. All rights reserved.
+This file is made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+**********************************************************************/
+
+import org.eclipse.debug.internal.ui.DebugPluginImages;
+import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
+import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
+import org.eclipse.debug.internal.ui.views.console.ConsoleViewer;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.help.WorkbenchHelp;
+
+/**
+ * Clears the output of the selected launches
+ */
+public class ClearOutputAction extends Action {
+
+ private ConsoleViewer fConsoleViewer;
+
+ public ClearOutputAction(ConsoleViewer viewer) {
+ super(ActionMessages.getString("ClearOutputAction.title")); //$NON-NLS-1$
+ fConsoleViewer= viewer;
+ setToolTipText(ActionMessages.getString("ClearOutputAction.toolTipText")); //$NON-NLS-1$
+ setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_CLEAR));
+ setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_CLEAR));
+ setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_CLEAR));
+ WorkbenchHelp.setHelp(
+ this,
+ IDebugHelpContextIds.CLEAR_CONSOLE_ACTION);
+ }
+
+ /**
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run() {
+ fConsoleViewer.clearDocument();
+ }
+}
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConsoleTerminateActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConsoleTerminateActionDelegate.java
index d29ffd007..820fee576 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConsoleTerminateActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConsoleTerminateActionDelegate.java
@@ -1,84 +1,84 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/**********************************************************************
-Copyright (c) 2000, 2002 IBM Corp. All rights reserved.
-This file is made available under the terms of the Common Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/cpl-v10.html
-**********************************************************************/
-
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.internal.ui.views.console.ConsoleView;
-import org.eclipse.debug.ui.IDebugView;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.texteditor.IUpdate;
-
-/**
- * Terminate action for the console. Terminates the process
- * currently being displayed in the console.
- */
-public class ConsoleTerminateActionDelegate extends TerminateActionDelegate implements IUpdate {
-
- /**
- * Returns a selection with the console view's
- * current process, or an empty selection.
- *
- * @return structured selection
- */
- protected IStructuredSelection getSelection() {
- IViewPart view = getView();
- if (view instanceof ConsoleView) {
- IProcess process = ((ConsoleView)view).getProcess();
- if (process != null) {
- return new StructuredSelection(process);
- }
- }
- return StructuredSelection.EMPTY;
- }
-
- /**
- * @see AbstractDebugActionDelegate#init(IViewPart)
- */
- public void init(IViewPart view) {
- super.init(view);
- IDebugView debugView= (IDebugView)view.getAdapter(IDebugView.class);
- if (debugView != null) {
- debugView.add(this);
- }
- }
-
- /**
- * @see AbstractDebugActionDelegate#dispose()
- */
- public void dispose() {
- IViewPart view= getView();
- IDebugView debugView= (IDebugView)view.getAdapter(IDebugView.class);
- if (debugView != null) {
- debugView.remove(this);
- }
- super.dispose();
- }
-
- /**
- * @see IUpdate#update()
- */
- public void update() {
- if (getAction() != null) {
- update(getAction(), null);
- }
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate#update(IAction, ISelection)
- */
- protected void update(IAction action, ISelection s) {
- //only update on the current process associated with the
- //console view
- s= getSelection();
- super.update(action, s);
- }
-}
+package org.eclipse.debug.internal.ui.actions;
+
+/**********************************************************************
+Copyright (c) 2000, 2002 IBM Corp. All rights reserved.
+This file is made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+**********************************************************************/
+
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.internal.ui.views.console.ConsoleView;
+import org.eclipse.debug.ui.IDebugView;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.texteditor.IUpdate;
+
+/**
+ * Terminate action for the console. Terminates the process
+ * currently being displayed in the console.
+ */
+public class ConsoleTerminateActionDelegate extends TerminateActionDelegate implements IUpdate {
+
+ /**
+ * Returns a selection with the console view's
+ * current process, or an empty selection.
+ *
+ * @return structured selection
+ */
+ protected IStructuredSelection getSelection() {
+ IViewPart view = getView();
+ if (view instanceof ConsoleView) {
+ IProcess process = ((ConsoleView)view).getProcess();
+ if (process != null) {
+ return new StructuredSelection(process);
+ }
+ }
+ return StructuredSelection.EMPTY;
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#init(IViewPart)
+ */
+ public void init(IViewPart view) {
+ super.init(view);
+ IDebugView debugView= (IDebugView)view.getAdapter(IDebugView.class);
+ if (debugView != null) {
+ debugView.add(this);
+ }
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#dispose()
+ */
+ public void dispose() {
+ IViewPart view= getView();
+ IDebugView debugView= (IDebugView)view.getAdapter(IDebugView.class);
+ if (debugView != null) {
+ debugView.remove(this);
+ }
+ super.dispose();
+ }
+
+ /**
+ * @see IUpdate#update()
+ */
+ public void update() {
+ if (getAction() != null) {
+ update(getAction(), null);
+ }
+ }
+
+ /**
+ * @see org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate#update(IAction, ISelection)
+ */
+ protected void update(IAction action, ISelection s) {
+ //only update on the current process associated with the
+ //console view
+ s= getSelection();
+ super.update(action, s);
+ }
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CopyToClipboardActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CopyToClipboardActionDelegate.java
index 9939bc05e..39ff91c0b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CopyToClipboardActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CopyToClipboardActionDelegate.java
@@ -1,201 +1,201 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.ui.IDebugView;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ContentViewer;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.swt.SWTError;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.widgets.Display;
-
-public class CopyToClipboardActionDelegate extends AbstractDebugActionDelegate {
-
- private ContentViewer fViewer;
-
- /**
- * @see AbstractDebugActionDelegate#initialize(IAction, ISelection)
- */
- protected boolean initialize(IAction action, ISelection selection) {
- if (!isInitialized()) {
- IDebugView adapter= (IDebugView)getView().getAdapter(IDebugView.class);
- if (adapter != null) {
- if (adapter.getViewer() instanceof ContentViewer) {
- setViewer((ContentViewer) adapter.getViewer());
- }
- adapter.setAction(getActionId(), action);
- }
- return super.initialize(action, selection);
- }
- return false;
- }
-
- protected String getActionId() {
- return IDebugView.COPY_ACTION;
- }
- /**
- * @see AbstractDebugActionDelegate#isEnabledFor(Object)
- */
- protected boolean isEnabledFor(Object element) {
- return getViewer() != null && element instanceof IDebugElement;
- }
-
- /**
- * @see AbstractDebugActionDelegate#doAction(Object)
- */
- protected void doAction(Object element, StringBuffer buffer) {
- append(element, buffer, (ILabelProvider)getViewer().getLabelProvider(), 0);
- }
-
- /**
- * Appends the representation of the specified element (using the label provider and indent)
- * to the buffer. For elements down to stack frames, children representations
- * are append to the buffer as well.
- */
- protected void append(Object e, StringBuffer buffer, ILabelProvider lp, int indent) {
- for (int i= 0; i < indent; i++) {
- buffer.append('\t');
- }
- buffer.append(lp.getText(e));
- buffer.append(System.getProperty("line.separator")); //$NON-NLS-1$
- if (shouldAppendChildren(e)) {
- Object[] children= new Object[0];
- children= getChildren(e);
- for (int i = 0;i < children.length; i++) {
- Object de= children[i];
- append(de, buffer, lp, indent + 1);
- }
- }
- }
-
- protected Object getParent(Object e) {
- return ((ITreeContentProvider) getViewer().getContentProvider()).getParent(e);
- }
-
- /**
- * Returns the children of the parent after applying the filters
- * that are present in the viewer.
- */
- protected Object[] getChildren(Object parent) {
- Object[] children= ((ITreeContentProvider)getViewer().getContentProvider()).getChildren(parent);
- ViewerFilter[] filters= ((StructuredViewer)getViewer()).getFilters();
- if (filters != null) {
- for (int i= 0; i < filters.length; i++) {
- ViewerFilter f = filters[i];
- children = f.filter(getViewer(), parent, children);
- }
- }
- return children;
- }
-
- /**
- * Do the specific action using the current selection.
- */
- public void run(IAction action) {
- final Iterator iter= pruneSelection();
- BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
- public void run() {
- StringBuffer buffer= new StringBuffer();
- while (iter.hasNext()) {
- doAction(iter.next(), buffer);
- }
- TextTransfer plainTextTransfer = TextTransfer.getInstance();
- Clipboard clipboard= new Clipboard(getViewer().getControl().getDisplay());
- try {
- doCopy(clipboard, plainTextTransfer, buffer);
- } finally {
- clipboard.dispose();
- }
- }
- });
- }
-
- protected void doCopy(Clipboard clipboard, TextTransfer plainTextTransfer, StringBuffer buffer) {
- try {
- clipboard.setContents(
- new String[]{buffer.toString()},
- new Transfer[]{plainTextTransfer});
- } catch (SWTError e){
- if (e.code != DND.ERROR_CANNOT_SET_CLIPBOARD) {
- throw e;
- }
- if (MessageDialog.openQuestion(getViewer().getControl().getShell(), ActionMessages.getString("CopyToClipboardActionDelegate.Problem_Copying_to_Clipboard_1"), ActionMessages.getString("CopyToClipboardActionDelegate.There_was_a_problem_when_accessing_the_system_clipboard._Retry__2"))) { //$NON-NLS-1$ //$NON-NLS-2$
- doCopy(clipboard, plainTextTransfer, buffer);
- }
- }
- }
-
- /**
- * Removes the duplicate items from the selection.
- * That is, if both a parent and a child are in a selection
- * remove the child.
- */
- protected Iterator pruneSelection() {
- IStructuredSelection selection= (IStructuredSelection)getViewer().getSelection();
- List elements= new ArrayList(selection.size());
- Iterator iter= selection.iterator();
- while (iter.hasNext()) {
- Object element= iter.next();
- if (isEnabledFor(element)) {
- if(walkHierarchy(element, elements)) {
- elements.add(element);
- }
- }
- }
- return elements.iterator();
- }
-
- /**
- * Returns whether the parent of the specified
- * element is already contained in the collection.
- */
- protected boolean walkHierarchy(Object element, List elements) {
- Object parent= getParent(element);
- if (parent == null) {
- return true;
- }
- if (elements.contains(parent)) {
- return false;
- }
- return walkHierarchy(parent, elements);
- }
-
- protected boolean shouldAppendChildren(Object e) {
- return e instanceof IDebugTarget || e instanceof IThread;
- }
-
- protected ContentViewer getViewer() {
- return fViewer;
- }
-
- protected void setViewer(ContentViewer viewer) {
- fViewer = viewer;
- }
- /**
- * @see AbstractDebugActionDelegate#doAction(Object)
- */
- protected void doAction(Object element) {
- //not used
- }
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.debug.core.model.IDebugElement;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IThread;
+import org.eclipse.debug.ui.IDebugView;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ContentViewer;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.swt.SWTError;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.widgets.Display;
+
+public class CopyToClipboardActionDelegate extends AbstractDebugActionDelegate {
+
+ private ContentViewer fViewer;
+
+ /**
+ * @see AbstractDebugActionDelegate#initialize(IAction, ISelection)
+ */
+ protected boolean initialize(IAction action, ISelection selection) {
+ if (!isInitialized()) {
+ IDebugView adapter= (IDebugView)getView().getAdapter(IDebugView.class);
+ if (adapter != null) {
+ if (adapter.getViewer() instanceof ContentViewer) {
+ setViewer((ContentViewer) adapter.getViewer());
+ }
+ adapter.setAction(getActionId(), action);
+ }
+ return super.initialize(action, selection);
+ }
+ return false;
+ }
+
+ protected String getActionId() {
+ return IDebugView.COPY_ACTION;
+ }
+ /**
+ * @see AbstractDebugActionDelegate#isEnabledFor(Object)
+ */
+ protected boolean isEnabledFor(Object element) {
+ return getViewer() != null && element instanceof IDebugElement;
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#doAction(Object)
+ */
+ protected void doAction(Object element, StringBuffer buffer) {
+ append(element, buffer, (ILabelProvider)getViewer().getLabelProvider(), 0);
+ }
+
+ /**
+ * Appends the representation of the specified element (using the label provider and indent)
+ * to the buffer. For elements down to stack frames, children representations
+ * are append to the buffer as well.
+ */
+ protected void append(Object e, StringBuffer buffer, ILabelProvider lp, int indent) {
+ for (int i= 0; i < indent; i++) {
+ buffer.append('\t');
+ }
+ buffer.append(lp.getText(e));
+ buffer.append(System.getProperty("line.separator")); //$NON-NLS-1$
+ if (shouldAppendChildren(e)) {
+ Object[] children= new Object[0];
+ children= getChildren(e);
+ for (int i = 0;i < children.length; i++) {
+ Object de= children[i];
+ append(de, buffer, lp, indent + 1);
+ }
+ }
+ }
+
+ protected Object getParent(Object e) {
+ return ((ITreeContentProvider) getViewer().getContentProvider()).getParent(e);
+ }
+
+ /**
+ * Returns the children of the parent after applying the filters
+ * that are present in the viewer.
+ */
+ protected Object[] getChildren(Object parent) {
+ Object[] children= ((ITreeContentProvider)getViewer().getContentProvider()).getChildren(parent);
+ ViewerFilter[] filters= ((StructuredViewer)getViewer()).getFilters();
+ if (filters != null) {
+ for (int i= 0; i < filters.length; i++) {
+ ViewerFilter f = filters[i];
+ children = f.filter(getViewer(), parent, children);
+ }
+ }
+ return children;
+ }
+
+ /**
+ * Do the specific action using the current selection.
+ */
+ public void run(IAction action) {
+ final Iterator iter= pruneSelection();
+ BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
+ public void run() {
+ StringBuffer buffer= new StringBuffer();
+ while (iter.hasNext()) {
+ doAction(iter.next(), buffer);
+ }
+ TextTransfer plainTextTransfer = TextTransfer.getInstance();
+ Clipboard clipboard= new Clipboard(getViewer().getControl().getDisplay());
+ try {
+ doCopy(clipboard, plainTextTransfer, buffer);
+ } finally {
+ clipboard.dispose();
+ }
+ }
+ });
+ }
+
+ protected void doCopy(Clipboard clipboard, TextTransfer plainTextTransfer, StringBuffer buffer) {
+ try {
+ clipboard.setContents(
+ new String[]{buffer.toString()},
+ new Transfer[]{plainTextTransfer});
+ } catch (SWTError e){
+ if (e.code != DND.ERROR_CANNOT_SET_CLIPBOARD) {
+ throw e;
+ }
+ if (MessageDialog.openQuestion(getViewer().getControl().getShell(), ActionMessages.getString("CopyToClipboardActionDelegate.Problem_Copying_to_Clipboard_1"), ActionMessages.getString("CopyToClipboardActionDelegate.There_was_a_problem_when_accessing_the_system_clipboard._Retry__2"))) { //$NON-NLS-1$ //$NON-NLS-2$
+ doCopy(clipboard, plainTextTransfer, buffer);
+ }
+ }
+ }
+
+ /**
+ * Removes the duplicate items from the selection.
+ * That is, if both a parent and a child are in a selection
+ * remove the child.
+ */
+ protected Iterator pruneSelection() {
+ IStructuredSelection selection= (IStructuredSelection)getViewer().getSelection();
+ List elements= new ArrayList(selection.size());
+ Iterator iter= selection.iterator();
+ while (iter.hasNext()) {
+ Object element= iter.next();
+ if (isEnabledFor(element)) {
+ if(walkHierarchy(element, elements)) {
+ elements.add(element);
+ }
+ }
+ }
+ return elements.iterator();
+ }
+
+ /**
+ * Returns whether the parent of the specified
+ * element is already contained in the collection.
+ */
+ protected boolean walkHierarchy(Object element, List elements) {
+ Object parent= getParent(element);
+ if (parent == null) {
+ return true;
+ }
+ if (elements.contains(parent)) {
+ return false;
+ }
+ return walkHierarchy(parent, elements);
+ }
+
+ protected boolean shouldAppendChildren(Object e) {
+ return e instanceof IDebugTarget || e instanceof IThread;
+ }
+
+ protected ContentViewer getViewer() {
+ return fViewer;
+ }
+
+ protected void setViewer(ContentViewer viewer) {
+ fViewer = viewer;
+ }
+ /**
+ * @see AbstractDebugActionDelegate#doAction(Object)
+ */
+ protected void doAction(Object element) {
+ //not used
+ }
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CopyVariablesToClipboardActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CopyVariablesToClipboardActionDelegate.java
index 302721218..ee8f09c95 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CopyVariablesToClipboardActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CopyVariablesToClipboardActionDelegate.java
@@ -1,35 +1,35 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.ui.IDebugView;
-import org.eclipse.jface.viewers.TreeViewer;
-
-/**
- * Used to copy the values of variables to the clipboard from
- * the Variables and Expression views.
- */
-public class CopyVariablesToClipboardActionDelegate extends CopyToClipboardActionDelegate {
-
- /**
- * Only append children that are visible in the tree viewer
- */
- protected boolean shouldAppendChildren(Object e) {
- return((TreeViewer)getViewer()).getExpandedState(e);
- }
-
- /**
- * @see AbstractDebugActionDelegate#isEnabledFor(Object)
- */
- protected boolean isEnabledFor(Object element) {
- return element instanceof IDebugElement;
- }
-
- protected String getActionId() {
- return IDebugView.COPY_ACTION + ".Variables"; //$NON-NLS-1$
- }
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.core.model.IDebugElement;
+import org.eclipse.debug.ui.IDebugView;
+import org.eclipse.jface.viewers.TreeViewer;
+
+/**
+ * Used to copy the values of variables to the clipboard from
+ * the Variables and Expression views.
+ */
+public class CopyVariablesToClipboardActionDelegate extends CopyToClipboardActionDelegate {
+
+ /**
+ * Only append children that are visible in the tree viewer
+ */
+ protected boolean shouldAppendChildren(Object e) {
+ return((TreeViewer)getViewer()).getExpandedState(e);
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#isEnabledFor(Object)
+ */
+ protected boolean isEnabledFor(Object element) {
+ return element instanceof IDebugElement;
+ }
+
+ protected String getActionId() {
+ return IDebugView.COPY_ACTION + ".Variables"; //$NON-NLS-1$
+ }
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugDropDownAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugDropDownAction.java
index 1d0969abb..d9f79fc41 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugDropDownAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugDropDownAction.java
@@ -1,59 +1,59 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationHistoryElement;
-import org.eclipse.debug.ui.actions.DebugAction;
-
-public class DebugDropDownAction extends LaunchDropDownAction {
-
-
- public DebugDropDownAction() {
- super(new DebugAction());
- }
-
- protected DebugDropDownAction(ExecutionAction action) {
- super(action);
- }
-
- /**
- * @see LaunchDropDownAction#getMode()
- */
- public String getMode() {
- return ILaunchManager.DEBUG_MODE;
- }
-
- /**
- * @see LaunchDropDownAction#getHistory()
- */
- public LaunchConfigurationHistoryElement[] getHistory() {
- return DebugUIPlugin.getLaunchConfigurationManager().getDebugHistory();
- }
-
- /**
- * @see LaunchDropDownAction#getFavorites()
- */
- public LaunchConfigurationHistoryElement[] getFavorites() {
- return DebugUIPlugin.getLaunchConfigurationManager().getDebugFavorites();
- }
-
- /**
- * @see LaunchDropDownAction#getLastLaunchPrefix()
- */
- protected String getLastLaunchPrefix() {
- return ActionMessages.getString("DebugDropDownAction.Debug_last_launched_1"); //$NON-NLS-1$
- }
-
- /**
- * @see LaunchDropDownAction#getTooltipPrefix()
- */
- protected String getStaticTooltip() {
- return ActionMessages.getString("DebugDropDownAction.Debug_1"); //$NON-NLS-1$
- }
-}
-
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationHistoryElement;
+import org.eclipse.debug.ui.actions.DebugAction;
+
+public class DebugDropDownAction extends LaunchDropDownAction {
+
+
+ public DebugDropDownAction() {
+ super(new DebugAction());
+ }
+
+ protected DebugDropDownAction(ExecutionAction action) {
+ super(action);
+ }
+
+ /**
+ * @see LaunchDropDownAction#getMode()
+ */
+ public String getMode() {
+ return ILaunchManager.DEBUG_MODE;
+ }
+
+ /**
+ * @see LaunchDropDownAction#getHistory()
+ */
+ public LaunchConfigurationHistoryElement[] getHistory() {
+ return DebugUIPlugin.getLaunchConfigurationManager().getDebugHistory();
+ }
+
+ /**
+ * @see LaunchDropDownAction#getFavorites()
+ */
+ public LaunchConfigurationHistoryElement[] getFavorites() {
+ return DebugUIPlugin.getLaunchConfigurationManager().getDebugFavorites();
+ }
+
+ /**
+ * @see LaunchDropDownAction#getLastLaunchPrefix()
+ */
+ protected String getLastLaunchPrefix() {
+ return ActionMessages.getString("DebugDropDownAction.Debug_last_launched_1"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see LaunchDropDownAction#getTooltipPrefix()
+ */
+ protected String getStaticTooltip() {
+ return ActionMessages.getString("DebugDropDownAction.Debug_1"); //$NON-NLS-1$
+ }
+}
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugHistoryMenuAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugHistoryMenuAction.java
index 8bebe6e78..b40e8829f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugHistoryMenuAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugHistoryMenuAction.java
@@ -1,90 +1,90 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.events.MenuListener;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Menu;
-
-public class DebugHistoryMenuAction extends DebugDropDownAction implements IMenuCreator {
-
- private MenuListener fMenuListener= null;
- private Menu fTopMenu= null;
-
- public DebugHistoryMenuAction() {
- super(null);
- }
-
- /**
- * @see IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if (action instanceof Action) {
- if (getActionProxy() == null) {
- ((Action)action).setMenuCreator(this);
- setActionProxy(action);
- }
- } else {
- action.setEnabled(false);
- }
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- //do nothing as the action strictly generates the history sub menu
- }
-
- /**
- * @see IActionDelegateWithEvent#runWithEvent(IAction, Event)
- */
- public void runWithEvent(IAction action, Event event) {
- //do nothing as the action strictly generates the history sub menu
- }
-
- public Menu getMenu(Menu parent) {
- cleanup();
- Menu menu= new Menu(parent);
- parent.addMenuListener(getDebugActionSetMenuListener());
- fTopMenu= parent;
- setCreatedMenu(menu);
- Menu subMenu= createMenu(menu);
- return subMenu;
- }
-
- /**
- * @see LaunchDropDownAction#getDebugActionSetMenuListener()
- */
- protected MenuListener getDebugActionSetMenuListener() {
- if (fMenuListener == null) {
- fMenuListener= super.getDebugActionSetMenuListener();
- }
- return fMenuListener;
- }
-
- public void dispose() {
- cleanup();
- super.dispose();
- }
-
- protected void cleanup() {
- if (fTopMenu != null && !fTopMenu.isDisposed()) {
- fTopMenu.removeMenuListener(getDebugActionSetMenuListener());
- }
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.actions.LaunchDropDownAction#createTopSeparator(Menu)
- */
- protected void createTopSeparator(Menu menu) {
- }
-
-}
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.events.MenuListener;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Menu;
+
+public class DebugHistoryMenuAction extends DebugDropDownAction implements IMenuCreator {
+
+ private MenuListener fMenuListener= null;
+ private Menu fTopMenu= null;
+
+ public DebugHistoryMenuAction() {
+ super(null);
+ }
+
+ /**
+ * @see IActionDelegate#selectionChanged(IAction, ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ if (action instanceof Action) {
+ if (getActionProxy() == null) {
+ ((Action)action).setMenuCreator(this);
+ setActionProxy(action);
+ }
+ } else {
+ action.setEnabled(false);
+ }
+ }
+
+ /**
+ * @see IActionDelegate#run(IAction)
+ */
+ public void run(IAction action) {
+ //do nothing as the action strictly generates the history sub menu
+ }
+
+ /**
+ * @see IActionDelegateWithEvent#runWithEvent(IAction, Event)
+ */
+ public void runWithEvent(IAction action, Event event) {
+ //do nothing as the action strictly generates the history sub menu
+ }
+
+ public Menu getMenu(Menu parent) {
+ cleanup();
+ Menu menu= new Menu(parent);
+ parent.addMenuListener(getDebugActionSetMenuListener());
+ fTopMenu= parent;
+ setCreatedMenu(menu);
+ Menu subMenu= createMenu(menu);
+ return subMenu;
+ }
+
+ /**
+ * @see LaunchDropDownAction#getDebugActionSetMenuListener()
+ */
+ protected MenuListener getDebugActionSetMenuListener() {
+ if (fMenuListener == null) {
+ fMenuListener= super.getDebugActionSetMenuListener();
+ }
+ return fMenuListener;
+ }
+
+ public void dispose() {
+ cleanup();
+ super.dispose();
+ }
+
+ protected void cleanup() {
+ if (fTopMenu != null && !fTopMenu.isDisposed()) {
+ fTopMenu.removeMenuListener(getDebugActionSetMenuListener());
+ }
+ }
+
+ /**
+ * @see org.eclipse.debug.internal.ui.actions.LaunchDropDownAction#createTopSeparator(Menu)
+ */
+ protected void createTopSeparator(Menu menu) {
+ }
+
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DisableBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DisableBreakpointsAction.java
index 3c14eaa86..1525f6213 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DisableBreakpointsAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DisableBreakpointsAction.java
@@ -5,9 +5,9 @@ Copyright (c) 2002 IBM Corp. All rights reserved.
This file is made available under the terms of the Common Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/cpl-v10.html
-**********************************************************************/
-
-public class DisableBreakpointsAction extends EnableBreakpointsAction {
+**********************************************************************/
+
+public class DisableBreakpointsAction extends EnableBreakpointsAction {
/**
* This action disables breakpoints.
@@ -15,4 +15,4 @@ public class DisableBreakpointsAction extends EnableBreakpointsAction {
protected boolean isEnableAction() {
return false;
}
-}
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DisconnectActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DisconnectActionDelegate.java
index c91b8b567..f4eac569e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DisconnectActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DisconnectActionDelegate.java
@@ -1,59 +1,59 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IDisconnect;
-
-public class DisconnectActionDelegate extends AbstractListenerActionDelegate {
-
- /**
- * @see AbstractDebugActionDelegate#doAction(Object)
- */
- protected void doAction(Object element) throws DebugException {
- if (element instanceof IDisconnect) {
- ((IDisconnect) element).disconnect();
- }
- }
-
- /**
- * @see AbstractDebugActionDelegate#isEnabledFor(Object)
- */
- protected boolean isEnabledFor(Object element) {
- return element instanceof IDisconnect && ((IDisconnect) element).canDisconnect();
- }
-
- /**
- * @see AbstractDebugActionDelegate#getStatusMessage()
- */
- protected String getStatusMessage() {
- return ActionMessages.getString("DisconnectActionDelegate.Exceptions_occurred_attempting_to_disconnect._2"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogMessage()
- */
- protected String getErrorDialogMessage() {
- return ActionMessages.getString("DisconnectActionDelegate.Disconnect_failed_1"); //$NON-NLS-1$
- }
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogTitle()
- */
- protected String getErrorDialogTitle() {
- return ActionMessages.getString("DisconnectActionDelegate.Disconnect_3"); //$NON-NLS-1$
- }
-
- /**
- * @see ListenerActionDelegate#doHandleDebugEvent(DebugEvent)
- */
- protected void doHandleDebugEvent(DebugEvent event) {
- if (event.getKind() == DebugEvent.TERMINATE && event.getSource() instanceof IDebugTarget) {
- update(getAction(), getSelection());
- }
- }
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IDisconnect;
+
+public class DisconnectActionDelegate extends AbstractListenerActionDelegate {
+
+ /**
+ * @see AbstractDebugActionDelegate#doAction(Object)
+ */
+ protected void doAction(Object element) throws DebugException {
+ if (element instanceof IDisconnect) {
+ ((IDisconnect) element).disconnect();
+ }
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#isEnabledFor(Object)
+ */
+ protected boolean isEnabledFor(Object element) {
+ return element instanceof IDisconnect && ((IDisconnect) element).canDisconnect();
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getStatusMessage()
+ */
+ protected String getStatusMessage() {
+ return ActionMessages.getString("DisconnectActionDelegate.Exceptions_occurred_attempting_to_disconnect._2"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogMessage()
+ */
+ protected String getErrorDialogMessage() {
+ return ActionMessages.getString("DisconnectActionDelegate.Disconnect_failed_1"); //$NON-NLS-1$
+ }
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogTitle()
+ */
+ protected String getErrorDialogTitle() {
+ return ActionMessages.getString("DisconnectActionDelegate.Disconnect_3"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see ListenerActionDelegate#doHandleDebugEvent(DebugEvent)
+ */
+ protected void doHandleDebugEvent(DebugEvent event) {
+ if (event.getKind() == DebugEvent.TERMINATE && event.getSource() instanceof IDebugTarget) {
+ update(getAction(), getSelection());
+ }
+ }
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/EnableBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/EnableBreakpointsAction.java
index 56bbc2d72..822a6bcb2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/EnableBreakpointsAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/EnableBreakpointsAction.java
@@ -1,247 +1,247 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/**********************************************************************
-Copyright (c) 2002 IBM Corp. All rights reserved.
-This file is made available under the terms of the Common Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/cpl-v10.html
-**********************************************************************/
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IBreakpointListener;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-
-public class EnableBreakpointsAction implements IViewActionDelegate, IPartListener, IBreakpointListener {
-
- private IViewPart fView;
- private IAction fAction;
-
- public EnableBreakpointsAction() {
- }
-
- protected IViewPart getView() {
- return fView;
- }
-
- protected void setView(IViewPart view) {
- fView = view;
- }
-
- /**
- * @see IViewActionDelegate#init(IViewPart)
- */
- public void init(IViewPart view) {
- setView(view);
- DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this);
- view.getViewSite().getPage().addPartListener(this);
- }
-
- protected void update() {
- selectionChanged(getAction(), getView().getViewSite().getSelectionProvider().getSelection());
- }
-
- /**
- * This action enables breakpoints.
- */
- protected boolean isEnableAction() {
- return true;
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- IStructuredSelection selection= getSelection();
- int size= selection.size();
- if (size == 0) {
- return;
- }
- Iterator enum= selection.iterator();
- MultiStatus ms= new MultiStatus(DebugUIPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, ActionMessages.getString("EnableBreakpointAction.Enable_breakpoint(s)_failed_2"), null); //$NON-NLS-1$
- while (enum.hasNext()) {
- IBreakpoint breakpoint = (IBreakpoint) enum.next();
- try {
- if (size > 1) {
- if (isEnableAction()) {
- breakpoint.setEnabled(true);
- } else {
- breakpoint.setEnabled(false);
- }
- } else {
- breakpoint.setEnabled(!breakpoint.isEnabled());
- }
- } catch (CoreException e) {
- ms.merge(e.getStatus());
- }
- }
- if (!ms.isOK()) {
- IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
- if (window != null) {
- DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.getString("EnableBreakpointAction.Enabling_breakpoints_3"), ActionMessages.getString("EnableBreakpointAction.Exceptions_occurred_enabling_the_breakpoint(s)._4"), ms); //$NON-NLS-2$ //$NON-NLS-1$
- } else {
- DebugUIPlugin.log(ms);
- }
- }
- }
-
- private IStructuredSelection getSelection() {
- return (IStructuredSelection)getView().getViewSite().getSelectionProvider().getSelection();
- }
-
- /**
- * @see IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- setAction(action);
- if (!(selection instanceof IStructuredSelection)) {
- return;
- }
- IStructuredSelection sel= (IStructuredSelection)selection;
- Object o= sel.getFirstElement();
- if (!(o instanceof IBreakpoint)) {
- return;
- }
-
- Iterator enum= sel.iterator();
- boolean allEnabled= true;
- boolean allDisabled= true;
+package org.eclipse.debug.internal.ui.actions;
+
+/**********************************************************************
+Copyright (c) 2002 IBM Corp. All rights reserved.
+This file is made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+**********************************************************************/
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IMarkerDelta;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IBreakpointListener;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+
+public class EnableBreakpointsAction implements IViewActionDelegate, IPartListener, IBreakpointListener {
+
+ private IViewPart fView;
+ private IAction fAction;
+
+ public EnableBreakpointsAction() {
+ }
+
+ protected IViewPart getView() {
+ return fView;
+ }
+
+ protected void setView(IViewPart view) {
+ fView = view;
+ }
+
+ /**
+ * @see IViewActionDelegate#init(IViewPart)
+ */
+ public void init(IViewPart view) {
+ setView(view);
+ DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this);
+ view.getViewSite().getPage().addPartListener(this);
+ }
+
+ protected void update() {
+ selectionChanged(getAction(), getView().getViewSite().getSelectionProvider().getSelection());
+ }
+
+ /**
+ * This action enables breakpoints.
+ */
+ protected boolean isEnableAction() {
+ return true;
+ }
+
+ /**
+ * @see IActionDelegate#run(IAction)
+ */
+ public void run(IAction action) {
+ IStructuredSelection selection= getSelection();
+ int size= selection.size();
+ if (size == 0) {
+ return;
+ }
+ Iterator enum= selection.iterator();
+ MultiStatus ms= new MultiStatus(DebugUIPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, ActionMessages.getString("EnableBreakpointAction.Enable_breakpoint(s)_failed_2"), null); //$NON-NLS-1$
while (enum.hasNext()) {
- IBreakpoint bp= (IBreakpoint)enum.next();
- try {
- if (bp.isEnabled()) {
- allDisabled= false;
- } else {
- allEnabled= false;
- }
- } catch (CoreException ce) {
- IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
- if (window != null) {
- DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.getString("EnableBreakpointAction.Enabling_breakpoints_3"), ActionMessages.getString("EnableBreakpointAction.Exceptions_occurred_enabling_the_breakpoint(s)._4"), ce); //$NON-NLS-2$ //$NON-NLS-1$
- } else {
- DebugUIPlugin.log(ce);
- }
- }
- }
-
- if (isEnableAction()) {
- action.setEnabled(!allEnabled);
- } else {
- action.setEnabled(!allDisabled);
- }
- }
-
-
- /**
- * Removes this action as a breakpoint and part listener.
- */
- public void dispose() {
- DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);
- getView().getViewSite().getPage().removePartListener(this);
- }
-
- /**
- * @see IBreakpointListener#breakpointAdded(IBreakpoint)
- */
- public void breakpointAdded(IBreakpoint breakpoint) {
- }
-
- /**
- * @see IBreakpointListener#breakpointRemoved(IBreakpoint, IMarkerDelta)
- */
- public void breakpointRemoved(final IBreakpoint breakpoint, IMarkerDelta delta) {
- asynchUpdate();
- }
-
- /**
- * @see IBreakpointListener#breakpointChanged(IBreakpoint, IMarkerDelta)
- */
- public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
- asynchUpdate();
- }
-
- protected void asynchUpdate() {
- if (getAction() == null) {
- return;
- }
- IWorkbenchWindow window= getView().getViewSite().getPage().getWorkbenchWindow();
- if (window == null) {
- return;
- }
- Shell shell= window.getShell();
- if (shell == null || shell.isDisposed()) {
- return;
- }
- Runnable r= new Runnable() {
- public void run() {
- IWorkbenchWindow window= getView().getViewSite().getPage().getWorkbenchWindow();
- if (window == null) {
- return;
- }
- Shell shell= window.getShell();
- if (shell == null || shell.isDisposed()) {
- return;
- }
- update();
- }
- };
-
- shell.getDisplay().asyncExec(r);
- }
-
- protected IAction getAction() {
- return fAction;
- }
-
- protected void setAction(IAction action) {
- fAction = action;
- }
- /**
- * @see IPartListener#partActivated(IWorkbenchPart)
- */
- public void partActivated(IWorkbenchPart part) {
- }
-
- /**
- * @see IPartListener#partBroughtToTop(IWorkbenchPart)
- */
- public void partBroughtToTop(IWorkbenchPart part) {
- }
-
- /**
- * @see IPartListener#partClosed(IWorkbenchPart)
- */
- public void partClosed(IWorkbenchPart part) {
- if (part.equals(getView())) {
- dispose();
- }
- }
-
- /**
- * @see IPartListener#partDeactivated(IWorkbenchPart)
- */
- public void partDeactivated(IWorkbenchPart part) {
- }
-
- /**
- * @see IPartListener#partOpened(IWorkbenchPart)
- */
- public void partOpened(IWorkbenchPart part) {
- }
-}
-
+ IBreakpoint breakpoint = (IBreakpoint) enum.next();
+ try {
+ if (size > 1) {
+ if (isEnableAction()) {
+ breakpoint.setEnabled(true);
+ } else {
+ breakpoint.setEnabled(false);
+ }
+ } else {
+ breakpoint.setEnabled(!breakpoint.isEnabled());
+ }
+ } catch (CoreException e) {
+ ms.merge(e.getStatus());
+ }
+ }
+ if (!ms.isOK()) {
+ IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
+ if (window != null) {
+ DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.getString("EnableBreakpointAction.Enabling_breakpoints_3"), ActionMessages.getString("EnableBreakpointAction.Exceptions_occurred_enabling_the_breakpoint(s)._4"), ms); //$NON-NLS-2$ //$NON-NLS-1$
+ } else {
+ DebugUIPlugin.log(ms);
+ }
+ }
+ }
+
+ private IStructuredSelection getSelection() {
+ return (IStructuredSelection)getView().getViewSite().getSelectionProvider().getSelection();
+ }
+
+ /**
+ * @see IActionDelegate#selectionChanged(IAction, ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ setAction(action);
+ if (!(selection instanceof IStructuredSelection)) {
+ return;
+ }
+ IStructuredSelection sel= (IStructuredSelection)selection;
+ Object o= sel.getFirstElement();
+ if (!(o instanceof IBreakpoint)) {
+ return;
+ }
+
+ Iterator enum= sel.iterator();
+ boolean allEnabled= true;
+ boolean allDisabled= true;
+ while (enum.hasNext()) {
+ IBreakpoint bp= (IBreakpoint)enum.next();
+ try {
+ if (bp.isEnabled()) {
+ allDisabled= false;
+ } else {
+ allEnabled= false;
+ }
+ } catch (CoreException ce) {
+ IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
+ if (window != null) {
+ DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.getString("EnableBreakpointAction.Enabling_breakpoints_3"), ActionMessages.getString("EnableBreakpointAction.Exceptions_occurred_enabling_the_breakpoint(s)._4"), ce); //$NON-NLS-2$ //$NON-NLS-1$
+ } else {
+ DebugUIPlugin.log(ce);
+ }
+ }
+ }
+
+ if (isEnableAction()) {
+ action.setEnabled(!allEnabled);
+ } else {
+ action.setEnabled(!allDisabled);
+ }
+ }
+
+
+ /**
+ * Removes this action as a breakpoint and part listener.
+ */
+ public void dispose() {
+ DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);
+ getView().getViewSite().getPage().removePartListener(this);
+ }
+
+ /**
+ * @see IBreakpointListener#breakpointAdded(IBreakpoint)
+ */
+ public void breakpointAdded(IBreakpoint breakpoint) {
+ }
+
+ /**
+ * @see IBreakpointListener#breakpointRemoved(IBreakpoint, IMarkerDelta)
+ */
+ public void breakpointRemoved(final IBreakpoint breakpoint, IMarkerDelta delta) {
+ asynchUpdate();
+ }
+
+ /**
+ * @see IBreakpointListener#breakpointChanged(IBreakpoint, IMarkerDelta)
+ */
+ public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
+ asynchUpdate();
+ }
+
+ protected void asynchUpdate() {
+ if (getAction() == null) {
+ return;
+ }
+ IWorkbenchWindow window= getView().getViewSite().getPage().getWorkbenchWindow();
+ if (window == null) {
+ return;
+ }
+ Shell shell= window.getShell();
+ if (shell == null || shell.isDisposed()) {
+ return;
+ }
+ Runnable r= new Runnable() {
+ public void run() {
+ IWorkbenchWindow window= getView().getViewSite().getPage().getWorkbenchWindow();
+ if (window == null) {
+ return;
+ }
+ Shell shell= window.getShell();
+ if (shell == null || shell.isDisposed()) {
+ return;
+ }
+ update();
+ }
+ };
+
+ shell.getDisplay().asyncExec(r);
+ }
+
+ protected IAction getAction() {
+ return fAction;
+ }
+
+ protected void setAction(IAction action) {
+ fAction = action;
+ }
+ /**
+ * @see IPartListener#partActivated(IWorkbenchPart)
+ */
+ public void partActivated(IWorkbenchPart part) {
+ }
+
+ /**
+ * @see IPartListener#partBroughtToTop(IWorkbenchPart)
+ */
+ public void partBroughtToTop(IWorkbenchPart part) {
+ }
+
+ /**
+ * @see IPartListener#partClosed(IWorkbenchPart)
+ */
+ public void partClosed(IWorkbenchPart part) {
+ if (part.equals(getView())) {
+ dispose();
+ }
+ }
+
+ /**
+ * @see IPartListener#partDeactivated(IWorkbenchPart)
+ */
+ public void partDeactivated(IWorkbenchPart part) {
+ }
+
+ /**
+ * @see IPartListener#partOpened(IWorkbenchPart)
+ */
+ public void partOpened(IWorkbenchPart part) {
+ }
+}
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ExecutionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ExecutionAction.java
index d37191248..a9db82e45 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ExecutionAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ExecutionAction.java
@@ -1,47 +1,47 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationDialog;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegateWithEvent;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * This is the super class of the Run & Debug actions which appears in the desktop menu and toolbar.
- */
-public abstract class ExecutionAction implements IActionDelegateWithEvent {
-
- /**
- * @see IActionDelegateWithEvent#runWithEvent(IAction, Event)
- */
- public void runWithEvent(IAction action, Event event) {
- openLaunchConfigurationDialog();
- }
-
- /**
- * Open the launch configuration dialog, passing in the current workbench selection.
- */
- private void openLaunchConfigurationDialog() {
- IWorkbenchWindow dwindow= DebugUIPlugin.getActiveWorkbenchWindow();
- if (dwindow == null) {
- return;
- }
- IStructuredSelection selection= DebugUIPlugin.resolveSelection(dwindow);
- LaunchConfigurationDialog dialog = new LaunchConfigurationDialog(DebugUIPlugin.getShell(), selection, getMode());
- dialog.setOpenMode(LaunchConfigurationDialog.LAUNCH_CONFIGURATION_DIALOG_LAUNCH_LAST);
- dialog.open();
- }
-
- /**
- * Returns the mode of a launcher to use for this action
- */
- protected abstract String getMode();
-
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationDialog;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IActionDelegateWithEvent;
+import org.eclipse.ui.IWorkbenchWindow;
+
+/**
+ * This is the super class of the Run & Debug actions which appears in the desktop menu and toolbar.
+ */
+public abstract class ExecutionAction implements IActionDelegateWithEvent {
+
+ /**
+ * @see IActionDelegateWithEvent#runWithEvent(IAction, Event)
+ */
+ public void runWithEvent(IAction action, Event event) {
+ openLaunchConfigurationDialog();
+ }
+
+ /**
+ * Open the launch configuration dialog, passing in the current workbench selection.
+ */
+ private void openLaunchConfigurationDialog() {
+ IWorkbenchWindow dwindow= DebugUIPlugin.getActiveWorkbenchWindow();
+ if (dwindow == null) {
+ return;
+ }
+ IStructuredSelection selection= DebugUIPlugin.resolveSelection(dwindow);
+ LaunchConfigurationDialog dialog = new LaunchConfigurationDialog(DebugUIPlugin.getShell(), selection, getMode());
+ dialog.setOpenMode(LaunchConfigurationDialog.LAUNCH_CONFIGURATION_DIALOG_LAUNCH_LAST);
+ dialog.open();
+ }
+
+ /**
+ * Returns the mode of a launcher to use for this action
+ */
+ protected abstract String getMode();
+
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchDropDownAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchDropDownAction.java
index e84fe3fa1..4cdd6b7cf 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchDropDownAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchDropDownAction.java
@@ -1,338 +1,338 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/**********************************************************************
-Copyright (c) 2000, 2002 IBM Corp. All rights reserved.
-This file is made available under the terms of the Common Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/cpl-v10.html
-**********************************************************************/
-
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.ILaunchHistoryChangedListener;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationHistoryElement;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.SubContributionItem;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.ApplicationWindow;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MenuEvent;
-import org.eclipse.swt.events.MenuListener;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.ui.IActionDelegateWithEvent;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowPulldownDelegate2;
-
-/**
- * Superclass of run & debug pulldown actions.
- */
-public abstract class LaunchDropDownAction implements IWorkbenchWindowPulldownDelegate2,
- IActionDelegateWithEvent,
- ILaunchHistoryChangedListener {
-
- private ExecutionAction fLaunchAction;
-
- private Menu fCreatedMenu;
-
- private DebugWithConfigurationAction fDebugWithAction;
- private RunWithConfigurationAction fRunWithAction;
-
- /**
- * This action delegate's proxy.
- */
- private IAction fActionProxy;
-
- /**
- * The tooltip that was specified in XML for this action.
- */
- private String fOriginalTooltip;
-
- protected void setActionProxy(IAction action) {
- fActionProxy = action;
- }
-
- protected IAction getActionProxy() {
- return fActionProxy;
- }
-
- public LaunchDropDownAction(ExecutionAction launchAction) {
- setLaunchAction(launchAction);
- }
-
- private void createMenuForAction(Menu parent, IAction action, int count) {
- if (count > 0) {
- StringBuffer label= new StringBuffer();
- if (count < 10) {
- //add the numerical accelerator
- label.append('&');
- label.append(count);
- label.append(' ');
- }
- label.append(action.getText());
- action.setText(label.toString());
- }
- ActionContributionItem item= new ActionContributionItem(action);
- item.fill(parent, -1);
- }
-
- /**
- * Initialize this action so that it can dynamically set its tooltip.
- */
- protected void initialize(IAction action) {
- DebugUIPlugin.getLaunchConfigurationManager().addLaunchHistoryListener(this);
- fOriginalTooltip = action.getToolTipText();
- setActionProxy(action);
- updateTooltip();
- }
-
- /**
- * Updates this action's tooltip to correspond to the most recent launch.
- */
- protected void updateTooltip() {
- LaunchConfigurationHistoryElement lastLaunched = getLastLaunch();
- String tooltip= fOriginalTooltip;
- if (lastLaunched != null) {
- tooltip= getLastLaunchPrefix() + lastLaunched.getLaunchConfiguration().getName();
- } else {
- tooltip= getStaticTooltip();
- }
- getActionProxy().setToolTipText(tooltip);
- }
-
- /**
- * @see ILaunchHistoryChangedListener#launchHistoryChanged()
- */
- public void launchHistoryChanged() {
- updateTooltip();
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate#dispose()
- */
- public void dispose() {
- if (getCreatedMenu() != null) {
- getCreatedMenu().dispose();
- }
- DebugUIPlugin.getLaunchConfigurationManager().removeLaunchHistoryListener(this);
- }
-
- /**
- * Return the last launch that occurred in the workspace.
- */
- protected LaunchConfigurationHistoryElement getLastLaunch() {
- return DebugUIPlugin.getLaunchConfigurationManager().getLastLaunch();
- }
-
- /**
- * @see IWorkbenchWindowPulldownDelegate#getMenu(Control)
- */
- public Menu getMenu(Control parent) {
- if (getCreatedMenu() != null) {
- getCreatedMenu().dispose();
- }
- setCreatedMenu(new Menu(parent));
- return createMenu(getCreatedMenu());
- }
-
- /**
- * @see IMenuCreator#getMenu(Menu)
- */
- public Menu getMenu(Menu parent) {
- if (getCreatedMenu() != null) {
- getCreatedMenu().dispose();
- }
- setCreatedMenu(new Menu(parent));
- return createMenu(getCreatedMenu());
- }
-
- /**
- * Create the drop-down menu based on whether the config style pref is set
- */
- protected Menu createMenu(Menu menu) {
- LaunchConfigurationHistoryElement[] historyList= getHistory();
- LaunchConfigurationHistoryElement[] favoriteList = getFavorites();
-
- // Add any favorites
- int total = 0;
- for (int i = 0; i < favoriteList.length; i++) {
- LaunchConfigurationHistoryElement launch= favoriteList[i];
- RelaunchHistoryLaunchAction newAction= new RelaunchHistoryLaunchAction(launch);
- createMenuForAction(menu, newAction, total + 1);
- total++;
- }
-
- // Separator between favorites and history
- if (favoriteList.length > 0) {
- if (historyList.length > 0) {
- new MenuItem(menu, SWT.SEPARATOR);
- } else {
- createTopSeparator(menu);
- }
- }
-
- // Add history launches next
- for (int i = 0; i < historyList.length; i++) {
- LaunchConfigurationHistoryElement launch= historyList[i];
- RelaunchHistoryLaunchAction newAction= new RelaunchHistoryLaunchAction(launch);
- createMenuForAction(menu, newAction, total+1);
- total++;
- }
-
- // Separator between history and common actions
- if (historyList.length > 0) {
- createTopSeparator(menu);
- }
-
- // Add the actions to bring up the dialog
- if (getLaunchAction() != null) {
- // Cascading menu for config type 'shortcuts'
- if (getMode() == ILaunchManager.DEBUG_MODE) {
- createMenuForAction(menu, getDebugWithAction(), -1);
- } else {
- createMenuForAction(menu, getRunWithAction(), -1);
- }
-
- // Add non-shortcutted access to the launch configuration dialog
- OpenLaunchConfigurationsAction action = null;
- if (getMode() == ILaunchManager.DEBUG_MODE) {
- action = new OpenDebugConfigurations();
- } else {
- action = new OpenRunConfigurations();
- }
- createMenuForAction(menu, action, -1);
- }
- return menu;
- }
-
- /**
- * Create a separator at the top of the history/favorites area. This method may
- * be overridden to prevent a separator from being placed at the top.
- */
- protected void createTopSeparator(Menu menu) {
- new MenuItem(menu, SWT.SEPARATOR);
- }
-
- /**
- * @see runWithEvent(IAction, Event)
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- }
-
- /**
- * @see IActionDelegateWithEvent#runWithEvent(IAction, Event)
- */
- public void runWithEvent(IAction action, Event event) {
- getLaunchAction().runWithEvent(action, event);
- }
-
- /**
- * @see IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection){
- if (fActionProxy == null) {
- initialize(action);
- }
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate#init(IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window){
- }
-
- /**
- * Returns an array of previous launches applicable to this drop down.
- */
- public abstract LaunchConfigurationHistoryElement[] getHistory();
-
- /**
- * Returns an array of favorites applicable to this drop down.
- */
- public abstract LaunchConfigurationHistoryElement[] getFavorites();
-
- /**
- * Returns the mode (e.g., 'run' or 'debug') of this drop down.
- */
- public abstract String getMode();
-
- /**
- * Return the String to use as the first part of the tooltip for this action
- * when there is no launch history.
- */
- protected abstract String getStaticTooltip();
-
- /**
- * Return the String to use as the first part of the tooltip for this action
- * when there is a launch history.
- */
- protected abstract String getLastLaunchPrefix();
-
- protected ExecutionAction getLaunchAction() {
- return fLaunchAction;
- }
-
- protected void setLaunchAction(ExecutionAction launchAction) {
- fLaunchAction = launchAction;
- }
-
- /**
- * A menu listener that is used to constantly flag the debug
- * action set menu as dirty so that any underlying changes to the
- * contributions will be shown.
- * As well, if there are no history items, disable the action.
- */
- protected MenuListener getDebugActionSetMenuListener() {
- return new MenuListener() {
- public void menuShown(MenuEvent e) {
- getActionProxy().setEnabled(getHistory().length > 0 || getFavorites().length > 0);
- IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
- if (window instanceof ApplicationWindow) {
- ApplicationWindow appWindow= (ApplicationWindow)window;
- IMenuManager manager= appWindow.getMenuBarManager();
- IContributionItem actionSetItem= manager.findUsingPath("org.eclipse.ui.run"); //$NON-NLS-1$
- if (actionSetItem instanceof SubContributionItem) {
- IContributionItem item= ((SubContributionItem)actionSetItem).getInnerItem();
- if (item instanceof IMenuManager) {
- ((IMenuManager)item).markDirty();
- }
- }
- }
- }
- public void menuHidden(MenuEvent e) {
- }
- };
- }
-
- protected Menu getCreatedMenu() {
- return fCreatedMenu;
- }
-
- protected void setCreatedMenu(Menu createdMenu) {
- fCreatedMenu = createdMenu;
- }
-
- protected IAction getDebugWithAction() {
- if (fDebugWithAction == null) {
- fDebugWithAction= new DebugWithConfigurationAction();
- } else {
- fDebugWithAction.dispose();
- }
- return fDebugWithAction;
- }
-
- protected IAction getRunWithAction() {
- if (fRunWithAction == null) {
- fRunWithAction= new RunWithConfigurationAction();
- } else {
- fRunWithAction.dispose();
- }
- return fRunWithAction;
- }
+package org.eclipse.debug.internal.ui.actions;
+
+/**********************************************************************
+Copyright (c) 2000, 2002 IBM Corp. All rights reserved.
+This file is made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+**********************************************************************/
+
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.ILaunchHistoryChangedListener;
+import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationHistoryElement;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.SubContributionItem;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.window.ApplicationWindow;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MenuEvent;
+import org.eclipse.swt.events.MenuListener;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.ui.IActionDelegateWithEvent;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowPulldownDelegate2;
+
+/**
+ * Superclass of run & debug pulldown actions.
+ */
+public abstract class LaunchDropDownAction implements IWorkbenchWindowPulldownDelegate2,
+ IActionDelegateWithEvent,
+ ILaunchHistoryChangedListener {
+
+ private ExecutionAction fLaunchAction;
+
+ private Menu fCreatedMenu;
+
+ private DebugWithConfigurationAction fDebugWithAction;
+ private RunWithConfigurationAction fRunWithAction;
+
+ /**
+ * This action delegate's proxy.
+ */
+ private IAction fActionProxy;
+
+ /**
+ * The tooltip that was specified in XML for this action.
+ */
+ private String fOriginalTooltip;
+
+ protected void setActionProxy(IAction action) {
+ fActionProxy = action;
+ }
+
+ protected IAction getActionProxy() {
+ return fActionProxy;
+ }
+
+ public LaunchDropDownAction(ExecutionAction launchAction) {
+ setLaunchAction(launchAction);
+ }
+
+ private void createMenuForAction(Menu parent, IAction action, int count) {
+ if (count > 0) {
+ StringBuffer label= new StringBuffer();
+ if (count < 10) {
+ //add the numerical accelerator
+ label.append('&');
+ label.append(count);
+ label.append(' ');
+ }
+ label.append(action.getText());
+ action.setText(label.toString());
+ }
+ ActionContributionItem item= new ActionContributionItem(action);
+ item.fill(parent, -1);
+ }
+
+ /**
+ * Initialize this action so that it can dynamically set its tooltip.
+ */
+ protected void initialize(IAction action) {
+ DebugUIPlugin.getLaunchConfigurationManager().addLaunchHistoryListener(this);
+ fOriginalTooltip = action.getToolTipText();
+ setActionProxy(action);
+ updateTooltip();
+ }
+
+ /**
+ * Updates this action's tooltip to correspond to the most recent launch.
+ */
+ protected void updateTooltip() {
+ LaunchConfigurationHistoryElement lastLaunched = getLastLaunch();
+ String tooltip= fOriginalTooltip;
+ if (lastLaunched != null) {
+ tooltip= getLastLaunchPrefix() + lastLaunched.getLaunchConfiguration().getName();
+ } else {
+ tooltip= getStaticTooltip();
+ }
+ getActionProxy().setToolTipText(tooltip);
+ }
+
+ /**
+ * @see ILaunchHistoryChangedListener#launchHistoryChanged()
+ */
+ public void launchHistoryChanged() {
+ updateTooltip();
+ }
+
+ /**
+ * @see IWorkbenchWindowActionDelegate#dispose()
+ */
+ public void dispose() {
+ if (getCreatedMenu() != null) {
+ getCreatedMenu().dispose();
+ }
+ DebugUIPlugin.getLaunchConfigurationManager().removeLaunchHistoryListener(this);
+ }
+
+ /**
+ * Return the last launch that occurred in the workspace.
+ */
+ protected LaunchConfigurationHistoryElement getLastLaunch() {
+ return DebugUIPlugin.getLaunchConfigurationManager().getLastLaunch();
+ }
+
+ /**
+ * @see IWorkbenchWindowPulldownDelegate#getMenu(Control)
+ */
+ public Menu getMenu(Control parent) {
+ if (getCreatedMenu() != null) {
+ getCreatedMenu().dispose();
+ }
+ setCreatedMenu(new Menu(parent));
+ return createMenu(getCreatedMenu());
+ }
+
+ /**
+ * @see IMenuCreator#getMenu(Menu)
+ */
+ public Menu getMenu(Menu parent) {
+ if (getCreatedMenu() != null) {
+ getCreatedMenu().dispose();
+ }
+ setCreatedMenu(new Menu(parent));
+ return createMenu(getCreatedMenu());
+ }
+
+ /**
+ * Create the drop-down menu based on whether the config style pref is set
+ */
+ protected Menu createMenu(Menu menu) {
+ LaunchConfigurationHistoryElement[] historyList= getHistory();
+ LaunchConfigurationHistoryElement[] favoriteList = getFavorites();
+
+ // Add any favorites
+ int total = 0;
+ for (int i = 0; i < favoriteList.length; i++) {
+ LaunchConfigurationHistoryElement launch= favoriteList[i];
+ RelaunchHistoryLaunchAction newAction= new RelaunchHistoryLaunchAction(launch);
+ createMenuForAction(menu, newAction, total + 1);
+ total++;
+ }
+
+ // Separator between favorites and history
+ if (favoriteList.length > 0) {
+ if (historyList.length > 0) {
+ new MenuItem(menu, SWT.SEPARATOR);
+ } else {
+ createTopSeparator(menu);
+ }
+ }
+
+ // Add history launches next
+ for (int i = 0; i < historyList.length; i++) {
+ LaunchConfigurationHistoryElement launch= historyList[i];
+ RelaunchHistoryLaunchAction newAction= new RelaunchHistoryLaunchAction(launch);
+ createMenuForAction(menu, newAction, total+1);
+ total++;
+ }
+
+ // Separator between history and common actions
+ if (historyList.length > 0) {
+ createTopSeparator(menu);
+ }
+
+ // Add the actions to bring up the dialog
+ if (getLaunchAction() != null) {
+ // Cascading menu for config type 'shortcuts'
+ if (getMode() == ILaunchManager.DEBUG_MODE) {
+ createMenuForAction(menu, getDebugWithAction(), -1);
+ } else {
+ createMenuForAction(menu, getRunWithAction(), -1);
+ }
+
+ // Add non-shortcutted access to the launch configuration dialog
+ OpenLaunchConfigurationsAction action = null;
+ if (getMode() == ILaunchManager.DEBUG_MODE) {
+ action = new OpenDebugConfigurations();
+ } else {
+ action = new OpenRunConfigurations();
+ }
+ createMenuForAction(menu, action, -1);
+ }
+ return menu;
+ }
+
+ /**
+ * Create a separator at the top of the history/favorites area. This method may
+ * be overridden to prevent a separator from being placed at the top.
+ */
+ protected void createTopSeparator(Menu menu) {
+ new MenuItem(menu, SWT.SEPARATOR);
+ }
+
+ /**
+ * @see runWithEvent(IAction, Event)
+ * @see IActionDelegate#run(IAction)
+ */
+ public void run(IAction action) {
+ }
+
+ /**
+ * @see IActionDelegateWithEvent#runWithEvent(IAction, Event)
+ */
+ public void runWithEvent(IAction action, Event event) {
+ getLaunchAction().runWithEvent(action, event);
+ }
+
+ /**
+ * @see IActionDelegate#selectionChanged(IAction, ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection){
+ if (fActionProxy == null) {
+ initialize(action);
+ }
+ }
+
+ /**
+ * @see IWorkbenchWindowActionDelegate#init(IWorkbenchWindow)
+ */
+ public void init(IWorkbenchWindow window){
+ }
+
+ /**
+ * Returns an array of previous launches applicable to this drop down.
+ */
+ public abstract LaunchConfigurationHistoryElement[] getHistory();
+
+ /**
+ * Returns an array of favorites applicable to this drop down.
+ */
+ public abstract LaunchConfigurationHistoryElement[] getFavorites();
+
+ /**
+ * Returns the mode (e.g., 'run' or 'debug') of this drop down.
+ */
+ public abstract String getMode();
+
+ /**
+ * Return the String to use as the first part of the tooltip for this action
+ * when there is no launch history.
+ */
+ protected abstract String getStaticTooltip();
+
+ /**
+ * Return the String to use as the first part of the tooltip for this action
+ * when there is a launch history.
+ */
+ protected abstract String getLastLaunchPrefix();
+
+ protected ExecutionAction getLaunchAction() {
+ return fLaunchAction;
+ }
+
+ protected void setLaunchAction(ExecutionAction launchAction) {
+ fLaunchAction = launchAction;
+ }
+
+ /**
+ * A menu listener that is used to constantly flag the debug
+ * action set menu as dirty so that any underlying changes to the
+ * contributions will be shown.
+ * As well, if there are no history items, disable the action.
+ */
+ protected MenuListener getDebugActionSetMenuListener() {
+ return new MenuListener() {
+ public void menuShown(MenuEvent e) {
+ getActionProxy().setEnabled(getHistory().length > 0 || getFavorites().length > 0);
+ IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
+ if (window instanceof ApplicationWindow) {
+ ApplicationWindow appWindow= (ApplicationWindow)window;
+ IMenuManager manager= appWindow.getMenuBarManager();
+ IContributionItem actionSetItem= manager.findUsingPath("org.eclipse.ui.run"); //$NON-NLS-1$
+ if (actionSetItem instanceof SubContributionItem) {
+ IContributionItem item= ((SubContributionItem)actionSetItem).getInnerItem();
+ if (item instanceof IMenuManager) {
+ ((IMenuManager)item).markDirty();
+ }
+ }
+ }
+ }
+ public void menuHidden(MenuEvent e) {
+ }
+ };
+ }
+
+ protected Menu getCreatedMenu() {
+ return fCreatedMenu;
+ }
+
+ protected void setCreatedMenu(Menu createdMenu) {
+ fCreatedMenu = createdMenu;
+ }
+
+ protected IAction getDebugWithAction() {
+ if (fDebugWithAction == null) {
+ fDebugWithAction= new DebugWithConfigurationAction();
+ } else {
+ fDebugWithAction.dispose();
+ }
+ return fDebugWithAction;
+ }
+
+ protected IAction getRunWithAction() {
+ if (fRunWithAction == null) {
+ fRunWithAction= new RunWithConfigurationAction();
+ } else {
+ fRunWithAction.dispose();
+ }
+ return fRunWithAction;
+ }
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenBreakpointMarkerAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenBreakpointMarkerAction.java
index a38cc4fcb..797b4700a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenBreakpointMarkerAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenBreakpointMarkerAction.java
@@ -1,86 +1,86 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Iterator;
-
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.SelectionProviderAction;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class OpenBreakpointMarkerAction extends SelectionProviderAction {
-
- protected static DelegatingModelPresentation fgPresentation = new DelegatingModelPresentation();
-
- public OpenBreakpointMarkerAction(ISelectionProvider selectionProvider) {
- super(selectionProvider, ActionMessages.getString("OpenBreakpointMarkerAction.&Go_to_File_1")); //$NON-NLS-1$
- setToolTipText(ActionMessages.getString("OpenBreakpointMarkerAction.Go_to_File_for_Breakpoint_2")); //$NON-NLS-1$
- ISharedImages images= DebugUIPlugin.getDefault().getWorkbench().getSharedImages();
- setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_OPEN_MARKER));
- WorkbenchHelp.setHelp(
- this,
- IDebugHelpContextIds.OPEN_BREAKPOINT_ACTION);
- setEnabled(false);
- }
-
- /**
- * @see IAction#run()
- */
- public void run() {
- IWorkbenchWindow dwindow= DebugUIPlugin.getActiveWorkbenchWindow();
- if (dwindow == null) {
- return;
- }
- IWorkbenchPage page= dwindow.getActivePage();
- if (page == null) {
- return;
- }
-
- IStructuredSelection selection= getStructuredSelection();
- if (selection.isEmpty()) {
- setEnabled(false);
- return;
- }
- Iterator enum= selection.iterator();
- IBreakpoint breakpoint= (IBreakpoint)enum.next();
- IEditorInput input= fgPresentation.getEditorInput(breakpoint);
- IEditorPart part= null;
- if (input != null) {
- String editorId = fgPresentation.getEditorId(input, breakpoint);
- try {
- part= page.openEditor(input, editorId);
- } catch (PartInitException e) {
- DebugUIPlugin.errorDialog(dwindow.getShell(), ActionMessages.getString("OpenBreakpointMarkerAction.Go_to_Breakpoint_1"), ActionMessages.getString("OpenBreakpointMarkerAction.Exceptions_occurred_attempting_to_open_the_editor_for_the_breakpoint_resource_2"), e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- if (part != null) {
- part.setFocus();
- part.gotoMarker(breakpoint.getMarker());
- }
- }
-
- /**
- * @see SelectionProviderAction#selectionChanged(ISelection)
- */
- public void selectionChanged(IStructuredSelection sel) {
- if (sel.size() == 1) {
- setEnabled(true);
- } else {
- setEnabled(false);
- }
- }
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import java.util.Iterator;
+
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
+import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.actions.SelectionProviderAction;
+import org.eclipse.ui.help.WorkbenchHelp;
+
+public class OpenBreakpointMarkerAction extends SelectionProviderAction {
+
+ protected static DelegatingModelPresentation fgPresentation = new DelegatingModelPresentation();
+
+ public OpenBreakpointMarkerAction(ISelectionProvider selectionProvider) {
+ super(selectionProvider, ActionMessages.getString("OpenBreakpointMarkerAction.&Go_to_File_1")); //$NON-NLS-1$
+ setToolTipText(ActionMessages.getString("OpenBreakpointMarkerAction.Go_to_File_for_Breakpoint_2")); //$NON-NLS-1$
+ ISharedImages images= DebugUIPlugin.getDefault().getWorkbench().getSharedImages();
+ setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_OPEN_MARKER));
+ WorkbenchHelp.setHelp(
+ this,
+ IDebugHelpContextIds.OPEN_BREAKPOINT_ACTION);
+ setEnabled(false);
+ }
+
+ /**
+ * @see IAction#run()
+ */
+ public void run() {
+ IWorkbenchWindow dwindow= DebugUIPlugin.getActiveWorkbenchWindow();
+ if (dwindow == null) {
+ return;
+ }
+ IWorkbenchPage page= dwindow.getActivePage();
+ if (page == null) {
+ return;
+ }
+
+ IStructuredSelection selection= getStructuredSelection();
+ if (selection.isEmpty()) {
+ setEnabled(false);
+ return;
+ }
+ Iterator enum= selection.iterator();
+ IBreakpoint breakpoint= (IBreakpoint)enum.next();
+ IEditorInput input= fgPresentation.getEditorInput(breakpoint);
+ IEditorPart part= null;
+ if (input != null) {
+ String editorId = fgPresentation.getEditorId(input, breakpoint);
+ try {
+ part= page.openEditor(input, editorId);
+ } catch (PartInitException e) {
+ DebugUIPlugin.errorDialog(dwindow.getShell(), ActionMessages.getString("OpenBreakpointMarkerAction.Go_to_Breakpoint_1"), ActionMessages.getString("OpenBreakpointMarkerAction.Exceptions_occurred_attempting_to_open_the_editor_for_the_breakpoint_resource_2"), e); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ if (part != null) {
+ part.setFocus();
+ part.gotoMarker(breakpoint.getMarker());
+ }
+ }
+
+ /**
+ * @see SelectionProviderAction#selectionChanged(ISelection)
+ */
+ public void selectionChanged(IStructuredSelection sel) {
+ if (sel.size() == 1) {
+ setEnabled(true);
+ } else {
+ setEnabled(false);
+ }
+ }
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java
index 43d12cf7f..37c0f7436 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java
@@ -1,98 +1,98 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationHistoryElement;
-
-public class RelaunchActionDelegate extends AbstractDebugActionDelegate {
-
- /**
- * @see AbstractDebugActionDelegate#doAction(Object)
- */
- protected void doAction(Object object) {
- if (object instanceof IDebugElement) {
- relaunch((IDebugElement)object);
- } else if (object instanceof ILaunch) {
- relaunch((ILaunch)object);
- } else if (object instanceof IProcess) {
- relaunch((IProcess)object);
- }
- }
-
- public static void relaunch(LaunchConfigurationHistoryElement history) {
- relaunch(history.getLaunchConfiguration(), history.getMode());
- }
-
- public static void relaunch(IDebugElement element) {
- relaunch(element.getLaunch());
- }
-
- public static void relaunch(IProcess process) {
- relaunch(process.getLaunch());
- }
-
- public static void relaunch(ILaunch launch) {
- relaunch(launch.getLaunchConfiguration(), launch.getLaunchMode());
- }
-
- public static void relaunch(ILaunch launch, String mode) {
- relaunch(launch.getLaunchConfiguration(), mode);
- }
-
- /**
- * Re-launches the given configuration in the specified mode.
- */
- public static void relaunch(ILaunchConfiguration config, String mode) {
- try {
- config.launch(mode, null);
- } catch (CoreException ce) {
- DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), ActionMessages.getString("RelaunchActionDelegate.Launch_Failed_1"), ActionMessages.getString("RelaunchActionDelegate.An_exception_occurred_while_launching_2"), ce); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * @see AbstractDebugActionDelegate#isEnabledFor(Object)
- */
- protected boolean isEnabledFor(Object element) {
- ILaunch launch= null;
- if (element instanceof ILaunch) {
- launch= (ILaunch)element;
- } else if (element instanceof IDebugElement) {
- launch= ((IDebugElement)element).getLaunch();
- } else if (element instanceof IProcess) {
- launch= ((IProcess)element).getLaunch();
- }
-
- return launch != null && launch.getLaunchConfiguration() != null;
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogMessage()
- */
- protected String getErrorDialogMessage() {
- return ActionMessages.getString("RelaunchActionDelegate.Launch_Failed_1"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogTitle()
- */
- protected String getErrorDialogTitle() {
- return ActionMessages.getString("RelaunchActionDelegate.Launch_1"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getStatusMessage()
- */
- protected String getStatusMessage() {
- return ActionMessages.getString("RelaunchActionDelegate.An_exception_occurred_while_launching_2"); //$NON-NLS-1$
- }
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.model.IDebugElement;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationHistoryElement;
+
+public class RelaunchActionDelegate extends AbstractDebugActionDelegate {
+
+ /**
+ * @see AbstractDebugActionDelegate#doAction(Object)
+ */
+ protected void doAction(Object object) {
+ if (object instanceof IDebugElement) {
+ relaunch((IDebugElement)object);
+ } else if (object instanceof ILaunch) {
+ relaunch((ILaunch)object);
+ } else if (object instanceof IProcess) {
+ relaunch((IProcess)object);
+ }
+ }
+
+ public static void relaunch(LaunchConfigurationHistoryElement history) {
+ relaunch(history.getLaunchConfiguration(), history.getMode());
+ }
+
+ public static void relaunch(IDebugElement element) {
+ relaunch(element.getLaunch());
+ }
+
+ public static void relaunch(IProcess process) {
+ relaunch(process.getLaunch());
+ }
+
+ public static void relaunch(ILaunch launch) {
+ relaunch(launch.getLaunchConfiguration(), launch.getLaunchMode());
+ }
+
+ public static void relaunch(ILaunch launch, String mode) {
+ relaunch(launch.getLaunchConfiguration(), mode);
+ }
+
+ /**
+ * Re-launches the given configuration in the specified mode.
+ */
+ public static void relaunch(ILaunchConfiguration config, String mode) {
+ try {
+ config.launch(mode, null);
+ } catch (CoreException ce) {
+ DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), ActionMessages.getString("RelaunchActionDelegate.Launch_Failed_1"), ActionMessages.getString("RelaunchActionDelegate.An_exception_occurred_while_launching_2"), ce); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#isEnabledFor(Object)
+ */
+ protected boolean isEnabledFor(Object element) {
+ ILaunch launch= null;
+ if (element instanceof ILaunch) {
+ launch= (ILaunch)element;
+ } else if (element instanceof IDebugElement) {
+ launch= ((IDebugElement)element).getLaunch();
+ } else if (element instanceof IProcess) {
+ launch= ((IProcess)element).getLaunch();
+ }
+
+ return launch != null && launch.getLaunchConfiguration() != null;
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogMessage()
+ */
+ protected String getErrorDialogMessage() {
+ return ActionMessages.getString("RelaunchActionDelegate.Launch_Failed_1"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogTitle()
+ */
+ protected String getErrorDialogTitle() {
+ return ActionMessages.getString("RelaunchActionDelegate.Launch_1"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getStatusMessage()
+ */
+ protected String getStatusMessage() {
+ return ActionMessages.getString("RelaunchActionDelegate.An_exception_occurred_while_launching_2"); //$NON-NLS-1$
+ }
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchHistoryLaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchHistoryLaunchAction.java
index 294b8c790..21ffdb562 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchHistoryLaunchAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchHistoryLaunchAction.java
@@ -1,63 +1,63 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationHistoryElement;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Re-launches a previous launch.
- */
-public class RelaunchHistoryLaunchAction extends Action {
-
- protected LaunchConfigurationHistoryElement fLaunch;
-
- public RelaunchHistoryLaunchAction(LaunchConfigurationHistoryElement launch) {
- super();
- fLaunch= launch;
- setText(launch.getLabel());
- ImageDescriptor descriptor= null;
- if (launch.getLaunchConfiguration() != null) {
- descriptor = DebugUITools.getDefaultImageDescriptor(launch.getLaunchConfiguration());
- } else {
- if (launch.getMode().equals(ILaunchManager.DEBUG_MODE)) {
- descriptor= DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_ACT_DEBUG);
- } else {
- descriptor= DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_ACT_RUN);
- }
- }
-
- if (descriptor != null) {
- setImageDescriptor(descriptor);
- }
- WorkbenchHelp.setHelp(
- this,
- IDebugHelpContextIds.RELAUNCH_HISTORY_ACTION);
- }
-
- /**
- * @see IAction
- */
- public void run() {
- if (!DebugUITools.saveAndBuildBeforeLaunch()) {
- return;
- }
- BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
- public void run() {
- RelaunchActionDelegate.relaunch(fLaunch);
- }
- });
- }
-}
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.internal.ui.DebugPluginImages;
+import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
+import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationHistoryElement;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.help.WorkbenchHelp;
+
+/**
+ * Re-launches a previous launch.
+ */
+public class RelaunchHistoryLaunchAction extends Action {
+
+ protected LaunchConfigurationHistoryElement fLaunch;
+
+ public RelaunchHistoryLaunchAction(LaunchConfigurationHistoryElement launch) {
+ super();
+ fLaunch= launch;
+ setText(launch.getLabel());
+ ImageDescriptor descriptor= null;
+ if (launch.getLaunchConfiguration() != null) {
+ descriptor = DebugUITools.getDefaultImageDescriptor(launch.getLaunchConfiguration());
+ } else {
+ if (launch.getMode().equals(ILaunchManager.DEBUG_MODE)) {
+ descriptor= DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_ACT_DEBUG);
+ } else {
+ descriptor= DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_ACT_RUN);
+ }
+ }
+
+ if (descriptor != null) {
+ setImageDescriptor(descriptor);
+ }
+ WorkbenchHelp.setHelp(
+ this,
+ IDebugHelpContextIds.RELAUNCH_HISTORY_ACTION);
+ }
+
+ /**
+ * @see IAction
+ */
+ public void run() {
+ if (!DebugUITools.saveAndBuildBeforeLaunch()) {
+ return;
+ }
+ BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
+ public void run() {
+ RelaunchActionDelegate.relaunch(fLaunch);
+ }
+ });
+ }
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java
index 8dc0193c6..33eeb9b10 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java
@@ -1,115 +1,115 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.text.MessageFormat;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationDialog;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationHistoryElement;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-/**
- * Relaunches the last launch.
- */
-public abstract class RelaunchLastAction implements IWorkbenchWindowActionDelegate {
-
- private IWorkbenchWindow fWorkbenchWindow;
-
- /**
- * @see IWorkbenchWindowActionDelegate
- */
- public void dispose(){
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate
- */
- public void init(IWorkbenchWindow window){
- fWorkbenchWindow = window;
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action){
- try {
- final LaunchConfigurationHistoryElement historyElement = getLastLaunch();
- if (historyElement != null) {
- final ILaunchConfiguration historyConfig = historyElement.getLaunchConfiguration();
- if (historyConfig.supportsMode(getMode())) {
- if (!DebugUITools.saveAndBuildBeforeLaunch()) {
- return;
- }
- BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
- public void run() {
- RelaunchActionDelegate.relaunch(historyConfig, getMode());
- }
- });
- } else {
- String configName = historyElement.getLaunchConfiguration().getName();
- String title = ActionMessages.getString("RelaunchLastAction.Cannot_relaunch_1"); //$NON-NLS-1$
- String message = MessageFormat.format(ActionMessages.getString("RelaunchLastAction.Cannot_relaunch_[{0}]_because_it_does_not_support_{2}_mode_2"), new String[] {configName, getMode()}); //$NON-NLS-1$
- MessageDialog.openError(getShell(), title, message);
- }
- } else {
- // If the history is empty, just open the launch config dialog
- openLaunchConfigurationDialog();
- }
- } catch (CoreException ce) {
- DebugUIPlugin.errorDialog(getShell(), ActionMessages.getString("RelaunchLastAction.Error_relaunching_3"), ActionMessages.getString("RelaunchLastAction.Error_encountered_attempting_to_relaunch_4"), ce); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Open the launch configuration dialog, passing in the current workbench selection.
- */
- private void openLaunchConfigurationDialog() {
- IWorkbenchWindow dwindow= DebugUIPlugin.getActiveWorkbenchWindow();
- if (dwindow == null) {
- return;
- }
- IStructuredSelection selection= DebugUIPlugin.resolveSelection(dwindow);
- LaunchConfigurationDialog dialog = new LaunchConfigurationDialog(DebugUIPlugin.getShell(), selection, getMode());
- dialog.setOpenMode(LaunchConfigurationDialog.LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_LAST_LAUNCHED);
- dialog.open();
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection){
- }
-
- /**
- * Return the last launch that occurred in the workspace.
- */
- protected LaunchConfigurationHistoryElement getLastLaunch() {
- return DebugUIPlugin.getLaunchConfigurationManager().getLastLaunch();
- }
-
- protected Shell getShell() {
- return fWorkbenchWindow.getShell();
- }
-
- /**
- * Returns the mode (run or debug) of this action.
- */
- public abstract String getMode();
-
-}
-
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import java.text.MessageFormat;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationDialog;
+import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationHistoryElement;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+/**
+ * Relaunches the last launch.
+ */
+public abstract class RelaunchLastAction implements IWorkbenchWindowActionDelegate {
+
+ private IWorkbenchWindow fWorkbenchWindow;
+
+ /**
+ * @see IWorkbenchWindowActionDelegate
+ */
+ public void dispose(){
+ }
+
+ /**
+ * @see IWorkbenchWindowActionDelegate
+ */
+ public void init(IWorkbenchWindow window){
+ fWorkbenchWindow = window;
+ }
+
+ /**
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action){
+ try {
+ final LaunchConfigurationHistoryElement historyElement = getLastLaunch();
+ if (historyElement != null) {
+ final ILaunchConfiguration historyConfig = historyElement.getLaunchConfiguration();
+ if (historyConfig.supportsMode(getMode())) {
+ if (!DebugUITools.saveAndBuildBeforeLaunch()) {
+ return;
+ }
+ BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
+ public void run() {
+ RelaunchActionDelegate.relaunch(historyConfig, getMode());
+ }
+ });
+ } else {
+ String configName = historyElement.getLaunchConfiguration().getName();
+ String title = ActionMessages.getString("RelaunchLastAction.Cannot_relaunch_1"); //$NON-NLS-1$
+ String message = MessageFormat.format(ActionMessages.getString("RelaunchLastAction.Cannot_relaunch_[{0}]_because_it_does_not_support_{2}_mode_2"), new String[] {configName, getMode()}); //$NON-NLS-1$
+ MessageDialog.openError(getShell(), title, message);
+ }
+ } else {
+ // If the history is empty, just open the launch config dialog
+ openLaunchConfigurationDialog();
+ }
+ } catch (CoreException ce) {
+ DebugUIPlugin.errorDialog(getShell(), ActionMessages.getString("RelaunchLastAction.Error_relaunching_3"), ActionMessages.getString("RelaunchLastAction.Error_encountered_attempting_to_relaunch_4"), ce); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * Open the launch configuration dialog, passing in the current workbench selection.
+ */
+ private void openLaunchConfigurationDialog() {
+ IWorkbenchWindow dwindow= DebugUIPlugin.getActiveWorkbenchWindow();
+ if (dwindow == null) {
+ return;
+ }
+ IStructuredSelection selection= DebugUIPlugin.resolveSelection(dwindow);
+ LaunchConfigurationDialog dialog = new LaunchConfigurationDialog(DebugUIPlugin.getShell(), selection, getMode());
+ dialog.setOpenMode(LaunchConfigurationDialog.LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_LAST_LAUNCHED);
+ dialog.open();
+ }
+
+ /**
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection){
+ }
+
+ /**
+ * Return the last launch that occurred in the workspace.
+ */
+ protected LaunchConfigurationHistoryElement getLastLaunch() {
+ return DebugUIPlugin.getLaunchConfigurationManager().getLastLaunch();
+ }
+
+ protected Shell getShell() {
+ return fWorkbenchWindow.getShell();
+ }
+
+ /**
+ * Returns the mode (run or debug) of this action.
+ */
+ public abstract String getMode();
+
+}
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllBreakpointsAction.java
index 484bc70ed..6ebafd1fe 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllBreakpointsAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllBreakpointsAction.java
@@ -1,98 +1,98 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IBreakpointListener;
-import org.eclipse.debug.core.IBreakpointManager;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * Removes all breakpoints from the source (markers) and remove all
- * breakpoints from processes
- */
-public class RemoveAllBreakpointsAction extends AbstractRemoveAllActionDelegate implements IBreakpointListener {
-
- protected void doAction() {
- final IBreakpointManager breakpointManager= DebugPlugin.getDefault().getBreakpointManager();
- final IBreakpoint[] breakpoints= breakpointManager.getBreakpoints();
- final MultiStatus ms= new MultiStatus(DebugPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, ActionMessages.getString("RemoveAllBreakpointsAction.Breakpoint(s)_removal_failed_3"), null); //$NON-NLS-1$
- IWorkspaceRunnable r = new IWorkspaceRunnable() {
- public void run(IProgressMonitor pm) {
- for (int i= 0; i < breakpoints.length; i++) {
- try {
- breakpointManager.removeBreakpoint(breakpoints[i], true);
- } catch (CoreException e) {
- ms.merge(e.getStatus());
- }
- }
- }
- };
- try {
- ResourcesPlugin.getWorkspace().run(r, null);
- } catch (CoreException e) {
- ms.merge(e.getStatus());
- }
- if (!ms.isOK()) {
- IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
- if (window != null) {
- DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.getString("RemoveAllBreakpointsAction.Removing_all_breakpoints_4"),ActionMessages.getString("RemoveAllBreakpointsAction.Exceptions_occurred_removing_breakpoints._5"), ms); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
-
- protected void update() {
- getAction().setEnabled(
- DebugPlugin.getDefault().getBreakpointManager().hasBreakpoints());
- }
-
- /**
- * @see IBreakpointListener#breakpointAdded(IBreakpoint)
- */
- public void breakpointAdded(IBreakpoint breakpoint) {
- if (getAction() != null && !getAction().isEnabled()){
- update();
- }
- }
-
- /**
- * @see IBreakpointListener#breakpointChanged(IBreakpoint, IMarkerDelta)
- */
- public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
- }
-
- /**
- * @see IBreakpointListener#breakpointRemoved(IBreakpoint, IMarkerDelta)
- */
- public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
- if (getAction() != null) {
- update();
- }
- }
-
- /**
- * @see IViewActionDelegate#init(IViewPart)
- */
- public void init(IViewPart view) {
- super.init(view);
- DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this);
- }
-
- public void dispose() {
- DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);
- super.dispose();
- }
-}
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.core.resources.IMarkerDelta;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IBreakpointListener;
+import org.eclipse.debug.core.IBreakpointManager;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchWindow;
+
+/**
+ * Removes all breakpoints from the source (markers) and remove all
+ * breakpoints from processes
+ */
+public class RemoveAllBreakpointsAction extends AbstractRemoveAllActionDelegate implements IBreakpointListener {
+
+ protected void doAction() {
+ final IBreakpointManager breakpointManager= DebugPlugin.getDefault().getBreakpointManager();
+ final IBreakpoint[] breakpoints= breakpointManager.getBreakpoints();
+ final MultiStatus ms= new MultiStatus(DebugPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, ActionMessages.getString("RemoveAllBreakpointsAction.Breakpoint(s)_removal_failed_3"), null); //$NON-NLS-1$
+ IWorkspaceRunnable r = new IWorkspaceRunnable() {
+ public void run(IProgressMonitor pm) {
+ for (int i= 0; i < breakpoints.length; i++) {
+ try {
+ breakpointManager.removeBreakpoint(breakpoints[i], true);
+ } catch (CoreException e) {
+ ms.merge(e.getStatus());
+ }
+ }
+ }
+ };
+ try {
+ ResourcesPlugin.getWorkspace().run(r, null);
+ } catch (CoreException e) {
+ ms.merge(e.getStatus());
+ }
+ if (!ms.isOK()) {
+ IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
+ if (window != null) {
+ DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.getString("RemoveAllBreakpointsAction.Removing_all_breakpoints_4"),ActionMessages.getString("RemoveAllBreakpointsAction.Exceptions_occurred_removing_breakpoints._5"), ms); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ }
+
+ protected void update() {
+ getAction().setEnabled(
+ DebugPlugin.getDefault().getBreakpointManager().hasBreakpoints());
+ }
+
+ /**
+ * @see IBreakpointListener#breakpointAdded(IBreakpoint)
+ */
+ public void breakpointAdded(IBreakpoint breakpoint) {
+ if (getAction() != null && !getAction().isEnabled()){
+ update();
+ }
+ }
+
+ /**
+ * @see IBreakpointListener#breakpointChanged(IBreakpoint, IMarkerDelta)
+ */
+ public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
+ }
+
+ /**
+ * @see IBreakpointListener#breakpointRemoved(IBreakpoint, IMarkerDelta)
+ */
+ public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
+ if (getAction() != null) {
+ update();
+ }
+ }
+
+ /**
+ * @see IViewActionDelegate#init(IViewPart)
+ */
+ public void init(IViewPart view) {
+ super.init(view);
+ DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this);
+ }
+
+ public void dispose() {
+ DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);
+ super.dispose();
+ }
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllExpressionsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllExpressionsAction.java
index 93419b511..fc1f97b59 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllExpressionsAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllExpressionsAction.java
@@ -1,29 +1,29 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IExpressionManager;
-import org.eclipse.debug.core.model.IExpression;
-
-/**
- * Removes all expressions from the expressions view.
- */
-public class RemoveAllExpressionsAction extends AbstractRemoveAllActionDelegate {
-
- protected void doAction() {
- IExpressionManager manager = DebugPlugin.getDefault().getExpressionManager();
- IExpression[] expressions= manager.getExpressions();
- for (int i= 0; i < expressions.length; i++) {
- manager.removeExpression(expressions[i]);
- }
- }
-
- protected void update() {
- getAction().setEnabled(
- DebugPlugin.getDefault().getExpressionManager().hasExpressions());
- }
-}
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IExpressionManager;
+import org.eclipse.debug.core.model.IExpression;
+
+/**
+ * Removes all expressions from the expressions view.
+ */
+public class RemoveAllExpressionsAction extends AbstractRemoveAllActionDelegate {
+
+ protected void doAction() {
+ IExpressionManager manager = DebugPlugin.getDefault().getExpressionManager();
+ IExpression[] expressions= manager.getExpressions();
+ for (int i= 0; i < expressions.length; i++) {
+ manager.removeExpression(expressions[i]);
+ }
+ }
+
+ protected void update() {
+ getAction().setEnabled(
+ DebugPlugin.getDefault().getExpressionManager().hasExpressions());
+ }
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java
index 49c66e286..6a756e3d0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java
@@ -1,149 +1,149 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchListener;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.ui.IDebugView;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.ui.IViewPart;
-
-/**
- * Removes all terminated/detached launches from the
- * active debug view.
- */
-public class RemoveAllTerminatedAction extends AbstractRemoveAllActionDelegate implements ILaunchListener {
-
- /**
- * @see ListenerActionDelegate#doHandleDebugEvent(DebugEvent)
- */
- protected void doHandleDebugEvent(DebugEvent event) {
- if (event.getKind() == DebugEvent.TERMINATE) {
- Object source= event.getSource();
- if (source instanceof IDebugTarget) {
- ILaunch launch= ((IDebugTarget)source).getLaunch();
- if (launch.isTerminated() && launchIsRegistered(launch)) {
- getAction().setEnabled(true);
- }
- } else if (source instanceof IProcess) {
- ILaunch launch= ((IProcess)source).getLaunch();
- if (launch.isTerminated() && launchIsRegistered(launch)) {
- getAction().setEnabled(true);
- }
- }
- }
- }
-
- private boolean launchIsRegistered(ILaunch iLaunch) {
- ILaunch[] launches= DebugPlugin.getDefault().getLaunchManager().getLaunches();
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchListener;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.ui.IDebugView;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.ui.IViewPart;
+
+/**
+ * Removes all terminated/detached launches from the
+ * active debug view.
+ */
+public class RemoveAllTerminatedAction extends AbstractRemoveAllActionDelegate implements ILaunchListener {
+
+ /**
+ * @see ListenerActionDelegate#doHandleDebugEvent(DebugEvent)
+ */
+ protected void doHandleDebugEvent(DebugEvent event) {
+ if (event.getKind() == DebugEvent.TERMINATE) {
+ Object source= event.getSource();
+ if (source instanceof IDebugTarget) {
+ ILaunch launch= ((IDebugTarget)source).getLaunch();
+ if (launch.isTerminated() && launchIsRegistered(launch)) {
+ getAction().setEnabled(true);
+ }
+ } else if (source instanceof IProcess) {
+ ILaunch launch= ((IProcess)source).getLaunch();
+ if (launch.isTerminated() && launchIsRegistered(launch)) {
+ getAction().setEnabled(true);
+ }
+ }
+ }
+ }
+
+ private boolean launchIsRegistered(ILaunch iLaunch) {
+ ILaunch[] launches= DebugPlugin.getDefault().getLaunchManager().getLaunches();
for (int i = 0; i < launches.length; i++) {
ILaunch launch = launches[i];
- if (launch.equals(iLaunch)) {
- return true;
+ if (launch.equals(iLaunch)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Updates the enabled state of this action to enabled if at
+ * least one launch is terminated and relative to the current perspective.
+ */
+ protected void update() {
+ Object[] elements = getElements();
+ if (elements != null) {
+ for (int i= 0; i < elements.length; i++) {
+ if (elements[i] instanceof ILaunch) {
+ ILaunch launch= (ILaunch)elements[i];
+ if (launch.isTerminated()) {
+ getAction().setEnabled(true);
+ return;
+ }
+ }
+ }
+ }
+ getAction().setEnabled(false);
+ }
+
+ /**
+ * Returns the top level elements in the active debug
+ * view, or <code>null</code> if none.
+ *
+ * @return array of object
+ */
+ protected Object[] getElements() {
+ IDebugView view = (IDebugView)getView().getAdapter(IDebugView.class);
+ if (view != null) {
+ Viewer viewer = view.getViewer();
+ if (viewer instanceof StructuredViewer) {
+ IStructuredContentProvider cp = (IStructuredContentProvider)((StructuredViewer)viewer).getContentProvider();
+ Object input = viewer.getInput();
+ return cp.getElements(input);
+ }
+ }
+ return null;
+ }
+
+ protected void doAction() {
+ Object[] elements = getElements();
+ ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
+ for (int i = 0; i < elements.length; i++) {
+ if (elements[i] instanceof ILaunch) {
+ ILaunch launch = (ILaunch)elements[i];
+ if (launch.isTerminated()) {
+ manager.removeLaunch(launch);
+ }
}
- }
- return false;
- }
-
- /**
- * Updates the enabled state of this action to enabled if at
- * least one launch is terminated and relative to the current perspective.
- */
- protected void update() {
- Object[] elements = getElements();
- if (elements != null) {
- for (int i= 0; i < elements.length; i++) {
- if (elements[i] instanceof ILaunch) {
- ILaunch launch= (ILaunch)elements[i];
- if (launch.isTerminated()) {
- getAction().setEnabled(true);
- return;
- }
- }
- }
- }
- getAction().setEnabled(false);
- }
-
- /**
- * Returns the top level elements in the active debug
- * view, or <code>null</code> if none.
- *
- * @return array of object
- */
- protected Object[] getElements() {
- IDebugView view = (IDebugView)getView().getAdapter(IDebugView.class);
- if (view != null) {
- Viewer viewer = view.getViewer();
- if (viewer instanceof StructuredViewer) {
- IStructuredContentProvider cp = (IStructuredContentProvider)((StructuredViewer)viewer).getContentProvider();
- Object input = viewer.getInput();
- return cp.getElements(input);
- }
- }
- return null;
- }
-
- protected void doAction() {
- Object[] elements = getElements();
- ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
- for (int i = 0; i < elements.length; i++) {
- if (elements[i] instanceof ILaunch) {
- ILaunch launch = (ILaunch)elements[i];
- if (launch.isTerminated()) {
- manager.removeLaunch(launch);
- }
- }
- }
- }
-
- /**
- * @see IViewActionDelegate#init(IViewPart)
- */
- public void init(IViewPart view) {
- super.init(view);
- DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
- DebugPlugin.getDefault().addDebugEventListener(this);
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate#dispose()
- */
- public void dispose() {
- //removes as a debug event listener
- super.dispose();
- DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this);
- }
-
- /**
- * @see ILaunchListener#launchAdded(ILaunch)
- */
- public void launchAdded(ILaunch launch) {
- }
-
- /**
- * @see ILaunchListener#launchChanged(ILaunch)
- */
- public void launchChanged(ILaunch launch) {
- }
-
- /**
- * @see ILaunchListener#launchRemoved(ILaunch)
- */
- public void launchRemoved(ILaunch launch) {
- if (getAction().isEnabled()) {
- update();
- }
- }
-}
-
+ }
+ }
+
+ /**
+ * @see IViewActionDelegate#init(IViewPart)
+ */
+ public void init(IViewPart view) {
+ super.init(view);
+ DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
+ DebugPlugin.getDefault().addDebugEventListener(this);
+ }
+
+ /**
+ * @see IWorkbenchWindowActionDelegate#dispose()
+ */
+ public void dispose() {
+ //removes as a debug event listener
+ super.dispose();
+ DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this);
+ }
+
+ /**
+ * @see ILaunchListener#launchAdded(ILaunch)
+ */
+ public void launchAdded(ILaunch launch) {
+ }
+
+ /**
+ * @see ILaunchListener#launchChanged(ILaunch)
+ */
+ public void launchChanged(ILaunch launch) {
+ }
+
+ /**
+ * @see ILaunchListener#launchRemoved(ILaunch)
+ */
+ public void launchRemoved(ILaunch launch) {
+ if (getAction().isEnabled()) {
+ update();
+ }
+ }
+}
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveBreakpointAction.java
index 3d9a911ad..afac3e192 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveBreakpointAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveBreakpointAction.java
@@ -1,80 +1,80 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IBreakpointManager;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IWorkbenchWindow;
-
-public class RemoveBreakpointAction extends AbstractRemoveActionDelegate {
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- IStructuredSelection selection= getSelection();
- final Iterator itr= selection.iterator();
- final MultiStatus ms = new MultiStatus(DebugUIPlugin.getUniqueIdentifier(),
- DebugException.REQUEST_FAILED,
- ActionMessages.getString("RemoveBreakpointAction.Breakpoint(s)_removal_failed_3"), null); //$NON-NLS-1$
- IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
- IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
- while (itr.hasNext()) {
- try {
- Object next= itr.next();
- if (next instanceof IBreakpoint) {
- IBreakpoint breakpoint= (IBreakpoint)next;
- breakpointManager.removeBreakpoint(breakpoint, true);
- }
- } catch (CoreException ce) {
- ms.merge(ce.getStatus());
- }
- }
- }
- };
- try {
- ResourcesPlugin.getWorkspace().run(runnable, null);
- } catch (CoreException ce) {
- ms.merge(ce.getStatus());
- }
- if (!ms.isOK()) {
- IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
- if (window != null) {
- DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.getString("RemoveBreakpointAction.Removing_a_breakpoint_4"),ActionMessages.getString("RemoveBreakpointAction.Exceptions_occurred_attempting_to_remove_a_breakpoint._5") , ms); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- DebugUIPlugin.log(ms);
- }
- }
- }
-
- /**
- * @see AbstractDebugActionDelegate#doAction(Object)
- */
- protected void doAction(Object element) throws DebugException {
- //not used
- }
-
- /**
- * @see AbstractDebugActionDelegate#isEnabledFor(Object)
- */
- protected boolean isEnabledFor(Object element) {
- return element instanceof IBreakpoint;
- }
-}
-
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IBreakpointManager;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IWorkbenchWindow;
+
+public class RemoveBreakpointAction extends AbstractRemoveActionDelegate {
+
+ /**
+ * @see IActionDelegate#run(IAction)
+ */
+ public void run(IAction action) {
+ IStructuredSelection selection= getSelection();
+ final Iterator itr= selection.iterator();
+ final MultiStatus ms = new MultiStatus(DebugUIPlugin.getUniqueIdentifier(),
+ DebugException.REQUEST_FAILED,
+ ActionMessages.getString("RemoveBreakpointAction.Breakpoint(s)_removal_failed_3"), null); //$NON-NLS-1$
+ IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) {
+ IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
+ while (itr.hasNext()) {
+ try {
+ Object next= itr.next();
+ if (next instanceof IBreakpoint) {
+ IBreakpoint breakpoint= (IBreakpoint)next;
+ breakpointManager.removeBreakpoint(breakpoint, true);
+ }
+ } catch (CoreException ce) {
+ ms.merge(ce.getStatus());
+ }
+ }
+ }
+ };
+ try {
+ ResourcesPlugin.getWorkspace().run(runnable, null);
+ } catch (CoreException ce) {
+ ms.merge(ce.getStatus());
+ }
+ if (!ms.isOK()) {
+ IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
+ if (window != null) {
+ DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.getString("RemoveBreakpointAction.Removing_a_breakpoint_4"),ActionMessages.getString("RemoveBreakpointAction.Exceptions_occurred_attempting_to_remove_a_breakpoint._5") , ms); //$NON-NLS-1$ //$NON-NLS-2$
+ } else {
+ DebugUIPlugin.log(ms);
+ }
+ }
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#doAction(Object)
+ */
+ protected void doAction(Object element) throws DebugException {
+ //not used
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#isEnabledFor(Object)
+ */
+ protected boolean isEnabledFor(Object element) {
+ return element instanceof IBreakpoint;
+ }
+}
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveExpressionAction.java
index 40ed2763f..1ac7e2018 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveExpressionAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveExpressionAction.java
@@ -1,60 +1,60 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IExpressionManager;
-import org.eclipse.debug.core.model.IExpression;
-import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.debug.ui.IDebugView;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-
-public class RemoveExpressionAction extends AbstractRemoveActionDelegate {
-
- protected void doAction(Object element) {
- IExpressionManager manager = DebugPlugin.getDefault().getExpressionManager();
- IExpression exp = getExpression(element);
- if (exp != null) {
- manager.removeExpression(exp);
- }
- }
-
- /**
- * Returns the expression associated with the given
- * element.
- *
- * @param element an expression of child of an expression in
- * the expression view.
- * @return associated expression
- */
- protected IExpression getExpression(Object obj) {
- if (getView() == null) {
- return null;
- }
- IDebugView adapter= (IDebugView)getView().getAdapter(IDebugView.class);
- if (adapter != null) {
- Viewer v= adapter.getViewer();
- if (v instanceof TreeViewer) {
- ITreeContentProvider cp = (ITreeContentProvider)((TreeViewer)v).getContentProvider();
- while (!(obj instanceof IExpression) && obj != null) {
- obj = cp.getParent(obj);
- }
- return (IExpression)obj;
- }
- }
- return null;
- }
-
- /**
- * @see AbstractDebugActionDelegate#isEnabledFor(Object)
- */
- protected boolean isEnabledFor(Object element) {
- return element instanceof IVariable || element instanceof IExpression;
- }
-}
-
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IExpressionManager;
+import org.eclipse.debug.core.model.IExpression;
+import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.debug.ui.IDebugView;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+
+public class RemoveExpressionAction extends AbstractRemoveActionDelegate {
+
+ protected void doAction(Object element) {
+ IExpressionManager manager = DebugPlugin.getDefault().getExpressionManager();
+ IExpression exp = getExpression(element);
+ if (exp != null) {
+ manager.removeExpression(exp);
+ }
+ }
+
+ /**
+ * Returns the expression associated with the given
+ * element.
+ *
+ * @param element an expression of child of an expression in
+ * the expression view.
+ * @return associated expression
+ */
+ protected IExpression getExpression(Object obj) {
+ if (getView() == null) {
+ return null;
+ }
+ IDebugView adapter= (IDebugView)getView().getAdapter(IDebugView.class);
+ if (adapter != null) {
+ Viewer v= adapter.getViewer();
+ if (v instanceof TreeViewer) {
+ ITreeContentProvider cp = (ITreeContentProvider)((TreeViewer)v).getContentProvider();
+ while (!(obj instanceof IExpression) && obj != null) {
+ obj = cp.getParent(obj);
+ }
+ return (IExpression)obj;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#isEnabledFor(Object)
+ */
+ protected boolean isEnabledFor(Object element) {
+ return element instanceof IVariable || element instanceof IExpression;
+ }
+}
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ResumeActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ResumeActionDelegate.java
index a12d09138..53a131ff0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ResumeActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ResumeActionDelegate.java
@@ -1,61 +1,61 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.ISuspendResume;
-import org.eclipse.jface.viewers.IStructuredSelection;
-
-public class ResumeActionDelegate extends AbstractListenerActionDelegate {
-
- /**
- * @see AbstractDebugActionDelegate#doAction(Object)
- */
- protected void doAction(Object object) throws DebugException {
- if (object instanceof ISuspendResume) {
- ((ISuspendResume)object).resume();
- }
- }
-
- /**
- * @see AbstractDebugActionDelegate#isEnabledFor(Object)
- */
- protected boolean isEnabledFor(Object element) {
- return element instanceof ISuspendResume && ((ISuspendResume) element).canResume();
- }
-
- /**
- * @see AbstractDebugActionDelegate#getEnableStateForSelection(IStructuredSelection)
- */
- protected boolean getEnableStateForSelection(IStructuredSelection selection) {
- if (selection.size() == 1) {
- return isEnabledFor(selection.getFirstElement());
- } else {
- return false;
- }
- }
-
- /**
- * @see AbstractDebugActionDelegate#getStatusMessage()
- */
- protected String getStatusMessage() {
- return ActionMessages.getString("ResumeActionDelegate.Exceptions_occurred_attempting_to_resume._2"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogMessage()
- */
- protected String getErrorDialogMessage() {
- return ActionMessages.getString("ResumeActionDelegate.Resume_failed._1"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogTitle()
- */
- protected String getErrorDialogTitle() {
- return ActionMessages.getString("ResumeActionDelegate.Resume_3"); //$NON-NLS-1$
- }
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.ISuspendResume;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+public class ResumeActionDelegate extends AbstractListenerActionDelegate {
+
+ /**
+ * @see AbstractDebugActionDelegate#doAction(Object)
+ */
+ protected void doAction(Object object) throws DebugException {
+ if (object instanceof ISuspendResume) {
+ ((ISuspendResume)object).resume();
+ }
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#isEnabledFor(Object)
+ */
+ protected boolean isEnabledFor(Object element) {
+ return element instanceof ISuspendResume && ((ISuspendResume) element).canResume();
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getEnableStateForSelection(IStructuredSelection)
+ */
+ protected boolean getEnableStateForSelection(IStructuredSelection selection) {
+ if (selection.size() == 1) {
+ return isEnabledFor(selection.getFirstElement());
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getStatusMessage()
+ */
+ protected String getStatusMessage() {
+ return ActionMessages.getString("ResumeActionDelegate.Exceptions_occurred_attempting_to_resume._2"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogMessage()
+ */
+ protected String getErrorDialogMessage() {
+ return ActionMessages.getString("ResumeActionDelegate.Resume_failed._1"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogTitle()
+ */
+ protected String getErrorDialogTitle() {
+ return ActionMessages.getString("ResumeActionDelegate.Resume_3"); //$NON-NLS-1$
+ }
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunDropDownAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunDropDownAction.java
index 19833d49d..2a8dc5f91 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunDropDownAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunDropDownAction.java
@@ -1,57 +1,57 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationHistoryElement;
-import org.eclipse.debug.ui.actions.RunAction;
-
-public class RunDropDownAction extends LaunchDropDownAction {
-
- public RunDropDownAction() {
- super(new RunAction());
- }
-
- protected RunDropDownAction(ExecutionAction action) {
- super(action);
- }
-
- /**
- * @see LaunchDropDownAction#getMode()
- */
- public String getMode() {
- return ILaunchManager.RUN_MODE;
- }
-
- /**
- * @see LaunchDropDownAction#getHistory()
- */
- public LaunchConfigurationHistoryElement[] getHistory() {
- return DebugUIPlugin.getDefault().getLaunchConfigurationManager().getRunHistory();
- }
-
- /**
- * @see LaunchDropDownAction#getFavorites()
- */
- public LaunchConfigurationHistoryElement[] getFavorites() {
- return DebugUIPlugin.getDefault().getLaunchConfigurationManager().getRunFavorites();
- }
-
- /**
- * @see LaunchDropDownAction#getLastLaunchPrefix()
- */
- protected String getLastLaunchPrefix() {
- return ActionMessages.getString("RunDropDownAction.Run_last_launched_1"); //$NON-NLS-1$
- }
- /**
- * @see LaunchDropDownAction#getTooltipPrefix()
- */
- protected String getStaticTooltip() {
- return ActionMessages.getString("RunDropDownAction.Run_1"); //$NON-NLS-1$
- }
-}
-
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationHistoryElement;
+import org.eclipse.debug.ui.actions.RunAction;
+
+public class RunDropDownAction extends LaunchDropDownAction {
+
+ public RunDropDownAction() {
+ super(new RunAction());
+ }
+
+ protected RunDropDownAction(ExecutionAction action) {
+ super(action);
+ }
+
+ /**
+ * @see LaunchDropDownAction#getMode()
+ */
+ public String getMode() {
+ return ILaunchManager.RUN_MODE;
+ }
+
+ /**
+ * @see LaunchDropDownAction#getHistory()
+ */
+ public LaunchConfigurationHistoryElement[] getHistory() {
+ return DebugUIPlugin.getDefault().getLaunchConfigurationManager().getRunHistory();
+ }
+
+ /**
+ * @see LaunchDropDownAction#getFavorites()
+ */
+ public LaunchConfigurationHistoryElement[] getFavorites() {
+ return DebugUIPlugin.getDefault().getLaunchConfigurationManager().getRunFavorites();
+ }
+
+ /**
+ * @see LaunchDropDownAction#getLastLaunchPrefix()
+ */
+ protected String getLastLaunchPrefix() {
+ return ActionMessages.getString("RunDropDownAction.Run_last_launched_1"); //$NON-NLS-1$
+ }
+ /**
+ * @see LaunchDropDownAction#getTooltipPrefix()
+ */
+ protected String getStaticTooltip() {
+ return ActionMessages.getString("RunDropDownAction.Run_1"); //$NON-NLS-1$
+ }
+}
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunHistoryMenuAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunHistoryMenuAction.java
index 9b058f30d..288ad0443 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunHistoryMenuAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunHistoryMenuAction.java
@@ -1,90 +1,90 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.events.MenuListener;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Menu;
-
-public class RunHistoryMenuAction extends RunDropDownAction implements IMenuCreator {
-
- private MenuListener fMenuListener= null;
- private Menu fTopMenu= null;
-
- public RunHistoryMenuAction() {
- super(null);
- }
-
- /**
- * @see IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if (action instanceof Action) {
- if (getActionProxy() == null) {
- ((Action)action).setMenuCreator(this);
- setActionProxy(action);
- }
- } else {
- action.setEnabled(false);
- }
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- //do nothing as the action strictly generates the history sub menu
- }
-
- /**
- * @see IActionDelegateWithEvent#runWithEvent(IAction, Event)
- */
- public void runWithEvent(IAction action, Event event) {
- //do nothing as the action strictly generates the history sub menu
- }
-
- public Menu getMenu(Menu parent) {
- cleanup();
- Menu menu= new Menu(parent);
- parent.addMenuListener(getDebugActionSetMenuListener());
- fTopMenu= parent;
- setCreatedMenu(menu);
- Menu submenu= createMenu(menu);
- return submenu;
- }
-
- /**
- * @see LaunchDropDownAction#getDebugActionSetMenuListener()
- */
- protected MenuListener getDebugActionSetMenuListener() {
- if (fMenuListener == null) {
- fMenuListener= super.getDebugActionSetMenuListener();
- }
- return fMenuListener;
- }
-
- public void dispose() {
- cleanup();
- super.dispose();
- }
-
- protected void cleanup() {
- if (fTopMenu != null && !fTopMenu.isDisposed()) {
- fTopMenu.removeMenuListener(getDebugActionSetMenuListener());
- }
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.actions.LaunchDropDownAction#createTopSeparator(Menu)
- */
- protected void createTopSeparator(Menu menu) {
- }
-
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.events.MenuListener;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Menu;
+
+public class RunHistoryMenuAction extends RunDropDownAction implements IMenuCreator {
+
+ private MenuListener fMenuListener= null;
+ private Menu fTopMenu= null;
+
+ public RunHistoryMenuAction() {
+ super(null);
+ }
+
+ /**
+ * @see IActionDelegate#selectionChanged(IAction, ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ if (action instanceof Action) {
+ if (getActionProxy() == null) {
+ ((Action)action).setMenuCreator(this);
+ setActionProxy(action);
+ }
+ } else {
+ action.setEnabled(false);
+ }
+ }
+
+ /**
+ * @see IActionDelegate#run(IAction)
+ */
+ public void run(IAction action) {
+ //do nothing as the action strictly generates the history sub menu
+ }
+
+ /**
+ * @see IActionDelegateWithEvent#runWithEvent(IAction, Event)
+ */
+ public void runWithEvent(IAction action, Event event) {
+ //do nothing as the action strictly generates the history sub menu
+ }
+
+ public Menu getMenu(Menu parent) {
+ cleanup();
+ Menu menu= new Menu(parent);
+ parent.addMenuListener(getDebugActionSetMenuListener());
+ fTopMenu= parent;
+ setCreatedMenu(menu);
+ Menu submenu= createMenu(menu);
+ return submenu;
+ }
+
+ /**
+ * @see LaunchDropDownAction#getDebugActionSetMenuListener()
+ */
+ protected MenuListener getDebugActionSetMenuListener() {
+ if (fMenuListener == null) {
+ fMenuListener= super.getDebugActionSetMenuListener();
+ }
+ return fMenuListener;
+ }
+
+ public void dispose() {
+ cleanup();
+ super.dispose();
+ }
+
+ protected void cleanup() {
+ if (fTopMenu != null && !fTopMenu.isDisposed()) {
+ fTopMenu.removeMenuListener(getDebugActionSetMenuListener());
+ }
+ }
+
+ /**
+ * @see org.eclipse.debug.internal.ui.actions.LaunchDropDownAction#createTopSeparator(Menu)
+ */
+ protected void createTopSeparator(Menu menu) {
+ }
+
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ShowTypesAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ShowTypesAction.java
index ea67c69a7..5c7f5bb6c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ShowTypesAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ShowTypesAction.java
@@ -1,81 +1,81 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * An action that toggles the state of a viewer to
- * show/hide type names of variables.
- * Only viewers that use a <code>VariableLabelProvider</code> to render its
- * elements are effected.
- */
-public class ShowTypesAction extends Action {
-
- private StructuredViewer fViewer;
-
- public ShowTypesAction(StructuredViewer viewer) {
- super(ActionMessages.getString("ShowTypesAction.Show_&Type_Names_1")); //$NON-NLS-1$
- setViewer(viewer);
- setToolTipText(ActionMessages.getString("ShowTypesAction.Show_Type_Names")); //$NON-NLS-1$
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_TYPE_NAMES));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_TYPE_NAMES));
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_TYPE_NAMES));
- setId(DebugUIPlugin.getUniqueIdentifier() + ".ShowTypesAction"); //$NON-NLS-1$
- WorkbenchHelp.setHelp(this, IDebugHelpContextIds.SHOW_TYPES_ACTION);
- }
-
- /**
- * @see Action#run()
- */
- public void run() {
- valueChanged(isChecked());
- }
-
- private void valueChanged(boolean on) {
- if (getViewer().getControl().isDisposed()) {
- return;
- }
- ILabelProvider labelProvider= (ILabelProvider)getViewer().getLabelProvider();
- if (labelProvider instanceof IDebugModelPresentation) {
- IDebugModelPresentation debugLabelProvider= (IDebugModelPresentation)labelProvider;
- debugLabelProvider.setAttribute(IDebugModelPresentation.DISPLAY_VARIABLE_TYPE_NAMES, (on ? Boolean.TRUE : Boolean.FALSE));
- BusyIndicator.showWhile(getViewer().getControl().getDisplay(), new Runnable() {
- public void run() {
- getViewer().refresh();
- }
- });
- }
- }
-
- /**
- * @see Action#setChecked(boolean)
- */
- public void setChecked(boolean value) {
- super.setChecked(value);
- valueChanged(value);
- }
-
- protected StructuredViewer getViewer() {
- return fViewer;
- }
-
- protected void setViewer(StructuredViewer viewer) {
- fViewer = viewer;
- }
-}
-
-
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.internal.ui.DebugPluginImages;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
+import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
+import org.eclipse.debug.ui.IDebugModelPresentation;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.ui.help.WorkbenchHelp;
+
+/**
+ * An action that toggles the state of a viewer to
+ * show/hide type names of variables.
+ * Only viewers that use a <code>VariableLabelProvider</code> to render its
+ * elements are effected.
+ */
+public class ShowTypesAction extends Action {
+
+ private StructuredViewer fViewer;
+
+ public ShowTypesAction(StructuredViewer viewer) {
+ super(ActionMessages.getString("ShowTypesAction.Show_&Type_Names_1")); //$NON-NLS-1$
+ setViewer(viewer);
+ setToolTipText(ActionMessages.getString("ShowTypesAction.Show_Type_Names")); //$NON-NLS-1$
+ setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_TYPE_NAMES));
+ setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_TYPE_NAMES));
+ setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_TYPE_NAMES));
+ setId(DebugUIPlugin.getUniqueIdentifier() + ".ShowTypesAction"); //$NON-NLS-1$
+ WorkbenchHelp.setHelp(this, IDebugHelpContextIds.SHOW_TYPES_ACTION);
+ }
+
+ /**
+ * @see Action#run()
+ */
+ public void run() {
+ valueChanged(isChecked());
+ }
+
+ private void valueChanged(boolean on) {
+ if (getViewer().getControl().isDisposed()) {
+ return;
+ }
+ ILabelProvider labelProvider= (ILabelProvider)getViewer().getLabelProvider();
+ if (labelProvider instanceof IDebugModelPresentation) {
+ IDebugModelPresentation debugLabelProvider= (IDebugModelPresentation)labelProvider;
+ debugLabelProvider.setAttribute(IDebugModelPresentation.DISPLAY_VARIABLE_TYPE_NAMES, (on ? Boolean.TRUE : Boolean.FALSE));
+ BusyIndicator.showWhile(getViewer().getControl().getDisplay(), new Runnable() {
+ public void run() {
+ getViewer().refresh();
+ }
+ });
+ }
+ }
+
+ /**
+ * @see Action#setChecked(boolean)
+ */
+ public void setChecked(boolean value) {
+ super.setChecked(value);
+ valueChanged(value);
+ }
+
+ protected StructuredViewer getViewer() {
+ return fViewer;
+ }
+
+ protected void setViewer(StructuredViewer viewer) {
+ fViewer = viewer;
+ }
+}
+
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepActionDelegate.java
index 0379a47a1..90b25ec25 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepActionDelegate.java
@@ -1,51 +1,51 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IStep;
-
-public abstract class StepActionDelegate extends AbstractListenerActionDelegate {
-
- /**
- * @see AbstractDebugActionDelegate#doAction(Object)
- */
- protected void doAction(Object object) throws DebugException {
- if (object instanceof IStep) {
- stepAction((IStep)object);
- }
- }
-
- /**
- * @see AbstractDebugActionDelegate#isEnabledFor(Object)
- */
- protected boolean isEnabledFor(Object element) {
- if (element instanceof IStep) {
- return checkCapability((IStep)element);
- }
- return false;
- }
-
- /**
- * @see AbstractDebugActionDelegate#enableForMultiSelection()
- */
- protected boolean enableForMultiSelection() {
- return false;
- }
-
- /**
- * Returns whether the <code>IStep</code> has the capability to perform the
- * requested step action.
- */
- protected abstract boolean checkCapability(IStep element);
-
- /**
- * Performs the specific step action.
- *
- * @exception DebugException if the action fails
- */
- protected abstract void stepAction(IStep element) throws DebugException;
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IStep;
+
+public abstract class StepActionDelegate extends AbstractListenerActionDelegate {
+
+ /**
+ * @see AbstractDebugActionDelegate#doAction(Object)
+ */
+ protected void doAction(Object object) throws DebugException {
+ if (object instanceof IStep) {
+ stepAction((IStep)object);
+ }
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#isEnabledFor(Object)
+ */
+ protected boolean isEnabledFor(Object element) {
+ if (element instanceof IStep) {
+ return checkCapability((IStep)element);
+ }
+ return false;
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#enableForMultiSelection()
+ */
+ protected boolean enableForMultiSelection() {
+ return false;
+ }
+
+ /**
+ * Returns whether the <code>IStep</code> has the capability to perform the
+ * requested step action.
+ */
+ protected abstract boolean checkCapability(IStep element);
+
+ /**
+ * Performs the specific step action.
+ *
+ * @exception DebugException if the action fails
+ */
+ protected abstract void stepAction(IStep element) throws DebugException;
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepIntoActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepIntoActionDelegate.java
index bfd9fde9e..bb12f0b75 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepIntoActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepIntoActionDelegate.java
@@ -1,47 +1,47 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IStep;
-
-public class StepIntoActionDelegate extends StepActionDelegate {
-
- /**
- * @see StepActionDelegate#checkCapability(IStep)
- */
- protected boolean checkCapability(IStep element) {
- return element.canStepInto();
- }
-
- /**
- * @see StepActionDelegate#stepAction(IStep)
- */
- protected void stepAction(IStep element) throws DebugException {
- element.stepInto();
- }
-
- /**
- * @see AbstractDebugActionDelegate#getStatusMessage()
- */
- protected String getStatusMessage() {
- return ActionMessages.getString("StepIntoActionDelegate.Exceptions_occurred_attempting_to_step_into_the_frame_2"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogMessage()
- */
- protected String getErrorDialogMessage() {
- return ActionMessages.getString("StepIntoActionDelegate.Step_into_failed_1"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogTitle()
- */
- protected String getErrorDialogTitle() {
- return ActionMessages.getString("StepIntoActionDelegate.Step_Into_3"); //$NON-NLS-1$
- }
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IStep;
+
+public class StepIntoActionDelegate extends StepActionDelegate {
+
+ /**
+ * @see StepActionDelegate#checkCapability(IStep)
+ */
+ protected boolean checkCapability(IStep element) {
+ return element.canStepInto();
+ }
+
+ /**
+ * @see StepActionDelegate#stepAction(IStep)
+ */
+ protected void stepAction(IStep element) throws DebugException {
+ element.stepInto();
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getStatusMessage()
+ */
+ protected String getStatusMessage() {
+ return ActionMessages.getString("StepIntoActionDelegate.Exceptions_occurred_attempting_to_step_into_the_frame_2"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogMessage()
+ */
+ protected String getErrorDialogMessage() {
+ return ActionMessages.getString("StepIntoActionDelegate.Step_into_failed_1"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogTitle()
+ */
+ protected String getErrorDialogTitle() {
+ return ActionMessages.getString("StepIntoActionDelegate.Step_Into_3"); //$NON-NLS-1$
+ }
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepOverActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepOverActionDelegate.java
index e6f4ae479..b26126b7c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepOverActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepOverActionDelegate.java
@@ -1,47 +1,47 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IStep;
-
-public class StepOverActionDelegate extends StepActionDelegate {
-
- /**
- * @see StepActionDelegate#checkCapability(IStep)
- */
- protected boolean checkCapability(IStep element) {
- return element.canStepOver();
- }
-
- /**
- * @see StepActionDelegate#stepAction(IStep)
- */
- protected void stepAction(IStep element) throws DebugException {
- element.stepOver();
- }
-
- /**
- * @see AbstractDebugActionDelegate#getStatusMessage()
- */
- protected String getStatusMessage() {
- return ActionMessages.getString("StepOverActionDelegate.Exceptions_occurred_attempting_to_step_over_the_frame_2"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogMessage()
- */
- protected String getErrorDialogMessage() {
- return ActionMessages.getString("StepOverActionDelegate.Step_over_failed_1"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogTitle()
- */
- protected String getErrorDialogTitle() {
- return ActionMessages.getString("StepOverActionDelegate.Step_over_3"); //$NON-NLS-1$
- }
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IStep;
+
+public class StepOverActionDelegate extends StepActionDelegate {
+
+ /**
+ * @see StepActionDelegate#checkCapability(IStep)
+ */
+ protected boolean checkCapability(IStep element) {
+ return element.canStepOver();
+ }
+
+ /**
+ * @see StepActionDelegate#stepAction(IStep)
+ */
+ protected void stepAction(IStep element) throws DebugException {
+ element.stepOver();
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getStatusMessage()
+ */
+ protected String getStatusMessage() {
+ return ActionMessages.getString("StepOverActionDelegate.Exceptions_occurred_attempting_to_step_over_the_frame_2"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogMessage()
+ */
+ protected String getErrorDialogMessage() {
+ return ActionMessages.getString("StepOverActionDelegate.Step_over_failed_1"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogTitle()
+ */
+ protected String getErrorDialogTitle() {
+ return ActionMessages.getString("StepOverActionDelegate.Step_over_3"); //$NON-NLS-1$
+ }
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepReturnActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepReturnActionDelegate.java
index cc9ce7b88..3323f9f74 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepReturnActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StepReturnActionDelegate.java
@@ -1,47 +1,47 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IStep;
-
-public class StepReturnActionDelegate extends StepActionDelegate {
-
- /**
- * @see StepActionDelegate#checkCapability(IStep)
- */
- protected boolean checkCapability(IStep element) {
- return element.canStepReturn();
- }
-
- /**
- * @see StepActionDelegate#stepAction(IStep)
- */
- protected void stepAction(IStep element) throws DebugException {
- element.stepReturn();
- }
-
- /**
- * @see AbstractDebugActionDelegate#getStatusMessage()
- */
- protected String getStatusMessage() {
- return ActionMessages.getString("StepReturnActionDelegate.Exceptions_occurred_attempting_to_run_to_return_of_the_frame._2"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogMessage()
- */
- protected String getErrorDialogMessage() {
- return ActionMessages.getString("StepReturnActionDelegate.Run_to_return_failed._1"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogTitle()
- */
- protected String getErrorDialogTitle() {
- return ActionMessages.getString("StepReturnActionDelegate.Run_to_Return_3"); //$NON-NLS-1$
- }
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IStep;
+
+public class StepReturnActionDelegate extends StepActionDelegate {
+
+ /**
+ * @see StepActionDelegate#checkCapability(IStep)
+ */
+ protected boolean checkCapability(IStep element) {
+ return element.canStepReturn();
+ }
+
+ /**
+ * @see StepActionDelegate#stepAction(IStep)
+ */
+ protected void stepAction(IStep element) throws DebugException {
+ element.stepReturn();
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getStatusMessage()
+ */
+ protected String getStatusMessage() {
+ return ActionMessages.getString("StepReturnActionDelegate.Exceptions_occurred_attempting_to_run_to_return_of_the_frame._2"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogMessage()
+ */
+ protected String getErrorDialogMessage() {
+ return ActionMessages.getString("StepReturnActionDelegate.Run_to_return_failed._1"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogTitle()
+ */
+ protected String getErrorDialogTitle() {
+ return ActionMessages.getString("StepReturnActionDelegate.Run_to_Return_3"); //$NON-NLS-1$
+ }
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SuspendActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SuspendActionDelegate.java
index b4af0a250..bfd8c910e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SuspendActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SuspendActionDelegate.java
@@ -1,61 +1,61 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.ISuspendResume;
-import org.eclipse.jface.viewers.IStructuredSelection;
-
-public class SuspendActionDelegate extends AbstractListenerActionDelegate {
-
- /**
- * @see AbstractDebugActionDelegate#doAction(Object)
- */
- protected void doAction(Object element) throws DebugException {
- if (element instanceof ISuspendResume) {
- ((ISuspendResume) element).suspend();
- }
- }
-
- /**
- * @see AbstractDebugActionDelegate#isEnabledFor(Object)
- */
- protected boolean isEnabledFor(Object element) {
- return element instanceof ISuspendResume && ((ISuspendResume)element).canSuspend();
- }
-
- /**
- * @see AbstractDebugActionDelegate#getEnableStateForSelection(IStructuredSelection)
- */
- protected boolean getEnableStateForSelection(IStructuredSelection selection) {
- if (selection.size() == 1) {
- return isEnabledFor(selection.getFirstElement());
- } else {
- return false;
- }
- }
-
- /**
- * @see AbstractDebugActionDelegate#getStatusMessage()
- */
- protected String getStatusMessage() {
- return ActionMessages.getString("SuspendActionDelegate.Exceptions_occurred_attempting_to_suspend._2"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogMessage()
- */
- protected String getErrorDialogMessage() {
- return ActionMessages.getString("SuspendActionDelegate.Suspend_failed_1"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogTitle()
- */
- protected String getErrorDialogTitle() {
- return ActionMessages.getString("SuspendActionDelegate.Suspend_3"); //$NON-NLS-1$
- }
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.ISuspendResume;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+public class SuspendActionDelegate extends AbstractListenerActionDelegate {
+
+ /**
+ * @see AbstractDebugActionDelegate#doAction(Object)
+ */
+ protected void doAction(Object element) throws DebugException {
+ if (element instanceof ISuspendResume) {
+ ((ISuspendResume) element).suspend();
+ }
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#isEnabledFor(Object)
+ */
+ protected boolean isEnabledFor(Object element) {
+ return element instanceof ISuspendResume && ((ISuspendResume)element).canSuspend();
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getEnableStateForSelection(IStructuredSelection)
+ */
+ protected boolean getEnableStateForSelection(IStructuredSelection selection) {
+ if (selection.size() == 1) {
+ return isEnabledFor(selection.getFirstElement());
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getStatusMessage()
+ */
+ protected String getStatusMessage() {
+ return ActionMessages.getString("SuspendActionDelegate.Exceptions_occurred_attempting_to_suspend._2"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogMessage()
+ */
+ protected String getErrorDialogMessage() {
+ return ActionMessages.getString("SuspendActionDelegate.Suspend_failed_1"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogTitle()
+ */
+ protected String getErrorDialogTitle() {
+ return ActionMessages.getString("SuspendActionDelegate.Suspend_3"); //$NON-NLS-1$
+ }
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TerminateActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TerminateActionDelegate.java
index 0eac9ccc5..a209aa6a0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TerminateActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TerminateActionDelegate.java
@@ -1,61 +1,61 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/**********************************************************************
-Copyright (c) 2000, 2002 IBM Corp. All rights reserved.
-This file is made available under the terms of the Common Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/cpl-v10.html
-**********************************************************************/
-
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.ITerminate;
-
-public class TerminateActionDelegate extends AbstractListenerActionDelegate {
-
- /**
- * @see AbstractDebugActionDelegate#doAction(Object)
- */
- protected void doAction(Object element) throws DebugException {
- if (element instanceof ITerminate) {
- ((ITerminate)element).terminate();
- }
- }
-
- /**
- * @see AbstractDebugActionDelegate#isEnabledFor(Object)
- */
- protected boolean isEnabledFor(Object element) {
- return element instanceof ITerminate && ((ITerminate)element).canTerminate();
- }
-
- /**
- * @see AbstractDebugActionDelegate#getStatusMessage()
- */
- protected String getStatusMessage() {
- return ActionMessages.getString("TerminateActionDelegate.Exceptions_occurred_attempting_to_terminate._2"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogMessage()
- */
- protected String getErrorDialogMessage() {
- return ActionMessages.getString("TerminateActionDelegate.Terminate_failed._1"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogTitle()
- */
- protected String getErrorDialogTitle() {
- return ActionMessages.getString("TerminateActionDelegate.Terminate_3"); //$NON-NLS-1$
- }
-
- /**
- * @see ListenerActionDelegate#doHandleDebugEvent(DebugEvent)
- */
- protected void doHandleDebugEvent(DebugEvent event) {
- if (event.getKind() == DebugEvent.TERMINATE) {
- update(getAction(), getSelection());
- }
- }
+package org.eclipse.debug.internal.ui.actions;
+
+/**********************************************************************
+Copyright (c) 2000, 2002 IBM Corp. All rights reserved.
+This file is made available under the terms of the Common Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v10.html
+**********************************************************************/
+
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.ITerminate;
+
+public class TerminateActionDelegate extends AbstractListenerActionDelegate {
+
+ /**
+ * @see AbstractDebugActionDelegate#doAction(Object)
+ */
+ protected void doAction(Object element) throws DebugException {
+ if (element instanceof ITerminate) {
+ ((ITerminate)element).terminate();
+ }
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#isEnabledFor(Object)
+ */
+ protected boolean isEnabledFor(Object element) {
+ return element instanceof ITerminate && ((ITerminate)element).canTerminate();
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getStatusMessage()
+ */
+ protected String getStatusMessage() {
+ return ActionMessages.getString("TerminateActionDelegate.Exceptions_occurred_attempting_to_terminate._2"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogMessage()
+ */
+ protected String getErrorDialogMessage() {
+ return ActionMessages.getString("TerminateActionDelegate.Terminate_failed._1"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogTitle()
+ */
+ protected String getErrorDialogTitle() {
+ return ActionMessages.getString("TerminateActionDelegate.Terminate_3"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see ListenerActionDelegate#doHandleDebugEvent(DebugEvent)
+ */
+ protected void doHandleDebugEvent(DebugEvent event) {
+ if (event.getKind() == DebugEvent.TERMINATE) {
+ update(getAction(), getSelection());
+ }
+ }
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TerminateAllAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TerminateAllAction.java
index 465fa061b..9279f5313 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TerminateAllAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TerminateAllAction.java
@@ -1,94 +1,94 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * Terminates all launches.
- */
-public class TerminateAllAction extends AbstractListenerActionDelegate {
-
- protected void doAction(Object element) {
- //not used
- }
-
- protected void update() {
- ILaunchManager lManager= DebugPlugin.getDefault().getLaunchManager();
- ILaunch[] launches= lManager.getLaunches();
- for (int i= 0; i< launches.length; i++) {
- ILaunch launch= launches[i];
- if (!launch.isTerminated()) {
- getAction().setEnabled(true);
- return;
- }
- }
- getAction().setEnabled(false);
- }
-
- /**
- * @see IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- setAction(action);
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- ILaunchManager lManager= DebugPlugin.getDefault().getLaunchManager();
- ILaunch[] launches= lManager.getLaunches();
- MultiStatus ms = new MultiStatus(DebugPlugin.getUniqueIdentifier(),
- DebugException.REQUEST_FAILED, ActionMessages.getString("TerminateAllAction.Terminate_all_failed_3"), null); //$NON-NLS-1$
- for (int i= 0; i < launches.length; i++) {
- ILaunch launch= (ILaunch) launches[i];
- if (!launch.isTerminated()) {
- try {
- launch.terminate();
- } catch (DebugException de) {
- ms.merge(de.getStatus());
- }
- }
- }
- if (!ms.isOK()) {
- IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
- if (window != null) {
- DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.getString("TerminateAllAction.Terminate_All_2"),ActionMessages.getString("TerminateAllAction.Exceptions_occurred_attempting_to_terminate_all._5") , ms); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- DebugUIPlugin.log(ms);
- }
- }
- }
-
- /**
- * @see AbstractDebugActionDelegate#isEnabledFor(Object)
- */
- protected boolean isEnabledFor(Object element) {
- return true;
- }
-
-
- protected void doHandleDebugEvent(DebugEvent event) {
- switch (event.getKind()) {
- case DebugEvent.TERMINATE :
- update();
- break;
- case DebugEvent.CREATE :
- update();
- break;
- }
- }
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IWorkbenchWindow;
+
+/**
+ * Terminates all launches.
+ */
+public class TerminateAllAction extends AbstractListenerActionDelegate {
+
+ protected void doAction(Object element) {
+ //not used
+ }
+
+ protected void update() {
+ ILaunchManager lManager= DebugPlugin.getDefault().getLaunchManager();
+ ILaunch[] launches= lManager.getLaunches();
+ for (int i= 0; i< launches.length; i++) {
+ ILaunch launch= launches[i];
+ if (!launch.isTerminated()) {
+ getAction().setEnabled(true);
+ return;
+ }
+ }
+ getAction().setEnabled(false);
+ }
+
+ /**
+ * @see IActionDelegate#selectionChanged(IAction, ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ setAction(action);
+ }
+
+ /**
+ * @see IActionDelegate#run(IAction)
+ */
+ public void run(IAction action) {
+ ILaunchManager lManager= DebugPlugin.getDefault().getLaunchManager();
+ ILaunch[] launches= lManager.getLaunches();
+ MultiStatus ms = new MultiStatus(DebugPlugin.getUniqueIdentifier(),
+ DebugException.REQUEST_FAILED, ActionMessages.getString("TerminateAllAction.Terminate_all_failed_3"), null); //$NON-NLS-1$
+ for (int i= 0; i < launches.length; i++) {
+ ILaunch launch= (ILaunch) launches[i];
+ if (!launch.isTerminated()) {
+ try {
+ launch.terminate();
+ } catch (DebugException de) {
+ ms.merge(de.getStatus());
+ }
+ }
+ }
+ if (!ms.isOK()) {
+ IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
+ if (window != null) {
+ DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.getString("TerminateAllAction.Terminate_All_2"),ActionMessages.getString("TerminateAllAction.Exceptions_occurred_attempting_to_terminate_all._5") , ms); //$NON-NLS-1$ //$NON-NLS-2$
+ } else {
+ DebugUIPlugin.log(ms);
+ }
+ }
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#isEnabledFor(Object)
+ */
+ protected boolean isEnabledFor(Object element) {
+ return true;
+ }
+
+
+ protected void doHandleDebugEvent(DebugEvent event) {
+ switch (event.getKind()) {
+ case DebugEvent.TERMINATE :
+ update();
+ break;
+ case DebugEvent.CREATE :
+ update();
+ break;
+ }
+ }
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TerminateAndRemoveActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TerminateAndRemoveActionDelegate.java
index 6ab65b134..e0af08ece 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TerminateAndRemoveActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TerminateAndRemoveActionDelegate.java
@@ -1,76 +1,76 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.ITerminate;
-
-public class TerminateAndRemoveActionDelegate extends AbstractDebugActionDelegate {
-
- /**
- * @see AbstractDebugActionDelegate#doAction(Object)
- */
- protected void doAction(Object element) throws DebugException {
- try {
- if (element instanceof ITerminate) {
- ITerminate terminate= (ITerminate)element;
- if (!terminate.isTerminated()) {
- terminate.terminate();
- }
- }
- } finally {
- ILaunch launch= null;
- if (element instanceof ILaunch) {
- launch= (ILaunch) element;
- } else if (element instanceof IDebugElement) {
- launch= ((IDebugElement) element).getLaunch();
- } else if (element instanceof IProcess) {
- launch= ((IProcess) element).getLaunch();
- }
- ILaunchManager lManager= DebugPlugin.getDefault().getLaunchManager();
- lManager.removeLaunch(launch);
- }
- }
-
- /**
- * @see AbstractDebugActionDelegate#isEnabledFor(Object)
- */
- protected boolean isEnabledFor(Object element) {
- if (element instanceof ITerminate) {
- ITerminate terminate= (ITerminate)element;
- //do not want to terminate an attach launch that does not
- //have termination enabled
- return terminate.canTerminate() || terminate.isTerminated();
- }
- return false;
- }
-
- /**
- * @see AbstractDebugActionDelegate#getStatusMessage()
- */
- protected String getStatusMessage() {
- return ActionMessages.getString("TerminateAndRemoveActionDelegate.Exceptions_occurred_attempting_to_terminate_and_remove_2"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogMessage()
- */
- protected String getErrorDialogMessage() {
- return ActionMessages.getString("TerminateAndRemoveActionDelegate.Terminate_and_remove_failed_1"); //$NON-NLS-1$
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogTitle()
- */
- protected String getErrorDialogTitle() {
- return ActionMessages.getString("TerminateAndRemoveActionDelegate.Terminate_and_Remove;_3"); //$NON-NLS-1$
- }
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.model.IDebugElement;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.core.model.ITerminate;
+
+public class TerminateAndRemoveActionDelegate extends AbstractDebugActionDelegate {
+
+ /**
+ * @see AbstractDebugActionDelegate#doAction(Object)
+ */
+ protected void doAction(Object element) throws DebugException {
+ try {
+ if (element instanceof ITerminate) {
+ ITerminate terminate= (ITerminate)element;
+ if (!terminate.isTerminated()) {
+ terminate.terminate();
+ }
+ }
+ } finally {
+ ILaunch launch= null;
+ if (element instanceof ILaunch) {
+ launch= (ILaunch) element;
+ } else if (element instanceof IDebugElement) {
+ launch= ((IDebugElement) element).getLaunch();
+ } else if (element instanceof IProcess) {
+ launch= ((IProcess) element).getLaunch();
+ }
+ ILaunchManager lManager= DebugPlugin.getDefault().getLaunchManager();
+ lManager.removeLaunch(launch);
+ }
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#isEnabledFor(Object)
+ */
+ protected boolean isEnabledFor(Object element) {
+ if (element instanceof ITerminate) {
+ ITerminate terminate= (ITerminate)element;
+ //do not want to terminate an attach launch that does not
+ //have termination enabled
+ return terminate.canTerminate() || terminate.isTerminated();
+ }
+ return false;
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getStatusMessage()
+ */
+ protected String getStatusMessage() {
+ return ActionMessages.getString("TerminateAndRemoveActionDelegate.Exceptions_occurred_attempting_to_terminate_and_remove_2"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogMessage()
+ */
+ protected String getErrorDialogMessage() {
+ return ActionMessages.getString("TerminateAndRemoveActionDelegate.Terminate_and_remove_failed_1"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see AbstractDebugActionDelegate#getErrorDialogTitle()
+ */
+ protected String getErrorDialogTitle() {
+ return ActionMessages.getString("TerminateAndRemoveActionDelegate.Terminate_and_Remove;_3"); //$NON-NLS-1$
+ }
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TextViewerAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TextViewerAction.java
index 61df99e45..e4dc6cd73 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TextViewerAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TextViewerAction.java
@@ -1,56 +1,56 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.text.ITextOperationTarget;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.ui.texteditor.IUpdate;
-
-public class TextViewerAction extends Action implements IUpdate {
-
- private int fOperationCode= -1;
- private ITextOperationTarget fOperationTarget;
-
- public TextViewerAction(ITextViewer viewer, int operationCode) {
- fOperationCode= operationCode;
- fOperationTarget= viewer.getTextOperationTarget();
- update();
- }
-
- /**
- * Updates the enabled state of the action.
- * Fires a property change if the enabled state changes.
- *
- * @see Action#firePropertyChange(String, Object, Object)
- */
- public void update() {
-
- boolean wasEnabled= isEnabled();
- boolean isEnabled= (fOperationTarget != null && fOperationTarget.canDoOperation(fOperationCode));
- setEnabled(isEnabled);
-
- if (wasEnabled != isEnabled) {
- firePropertyChange(ENABLED, wasEnabled ? Boolean.TRUE : Boolean.FALSE, isEnabled ? Boolean.TRUE : Boolean.FALSE);
- }
- }
-
- /**
- * @see Action#run()
- */
- public void run() {
- if (fOperationCode != -1 && fOperationTarget != null) {
- fOperationTarget.doOperation(fOperationCode);
- }
- }
-
- public void configureAction(String text, String toolTipText, String description) {
- setText(text);
- setToolTipText(toolTipText);
- setDescription(description);
- }
-}
-
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.text.ITextOperationTarget;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.ui.texteditor.IUpdate;
+
+public class TextViewerAction extends Action implements IUpdate {
+
+ private int fOperationCode= -1;
+ private ITextOperationTarget fOperationTarget;
+
+ public TextViewerAction(ITextViewer viewer, int operationCode) {
+ fOperationCode= operationCode;
+ fOperationTarget= viewer.getTextOperationTarget();
+ update();
+ }
+
+ /**
+ * Updates the enabled state of the action.
+ * Fires a property change if the enabled state changes.
+ *
+ * @see Action#firePropertyChange(String, Object, Object)
+ */
+ public void update() {
+
+ boolean wasEnabled= isEnabled();
+ boolean isEnabled= (fOperationTarget != null && fOperationTarget.canDoOperation(fOperationCode));
+ setEnabled(isEnabled);
+
+ if (wasEnabled != isEnabled) {
+ firePropertyChange(ENABLED, wasEnabled ? Boolean.TRUE : Boolean.FALSE, isEnabled ? Boolean.TRUE : Boolean.FALSE);
+ }
+ }
+
+ /**
+ * @see Action#run()
+ */
+ public void run() {
+ if (fOperationCode != -1 && fOperationTarget != null) {
+ fOperationTarget.doOperation(fOperationCode);
+ }
+ }
+
+ public void configureAction(String text, String toolTipText, String description) {
+ setText(text);
+ setToolTipText(toolTipText);
+ setDescription(description);
+ }
+}
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TextViewerGotoLineAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TextViewerGotoLineAction.java
index bdb0133c0..20e887e8a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TextViewerGotoLineAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TextViewerGotoLineAction.java
@@ -1,107 +1,107 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.text.MessageFormat;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.views.console.ConsoleViewer;
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Shell;
-
-public class TextViewerGotoLineAction extends TextViewerAction {
-
- /**
- * Validates whether the text found in the input field of the
- * dialog forms a valid line number, i.e. one to which can be
- * jumped.
- */
- class NumberValidator implements IInputValidator {
-
- public String isValid(String input) {
- try {
- int i= Integer.parseInt(input);
- if (i <= 0 || fLastLine < i)
- return ActionMessages.getString("TextViewerGotoLineAction.Line_number_out_of_range_1"); //$NON-NLS-1$
-
- } catch (NumberFormatException x) {
- return ActionMessages.getString("TextViewerGotoLineAction.Not_a_number_2"); //$NON-NLS-1$
- }
-
- return null;
- }
- };
-
- protected int fLastLine;
- protected ITextViewer fTextViewer;
-
- /**
- * Constructs a goto line action for the console using the provided resource bundle
- */
- public TextViewerGotoLineAction(ConsoleViewer viewer) {
- super(viewer, -1);
- fTextViewer= viewer;
- setText(ActionMessages.getString("TextViewerGotoLineAction.Go_to_&Line...@Ctrl+L_4")); //$NON-NLS-1$
- setToolTipText(ActionMessages.getString("TextViewerGotoLineAction.Go_To_Line_1")); //$NON-NLS-1$
- setDescription(ActionMessages.getString("TextViewerGotoLineAction.Go_To_Line_1")); //$NON-NLS-1$
- }
-
- /**
- * @see TextViewerAction#update()
- */
- public void update() {
- }
-
- /**
- * Jumps to the line.
- */
- protected void gotoLine(int line) {
-
- IDocument document= fTextViewer.getDocument();
- try {
- int start= document.getLineOffset(line);
- int length= document.getLineLength(line);
- fTextViewer.getTextWidget().setSelection(start, start + length);
- fTextViewer.revealRange(start, length);
- } catch (BadLocationException x) {
- DebugUIPlugin.errorDialog(fTextViewer.getTextWidget().getShell(), ActionMessages.getString("TextViewerGotoLineAction.Go_To_Line_1"), ActionMessages.getString("TextViewerGotoLineAction.Exceptions_occurred_attempt_to_go_to_line_2"), x); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * @see Action#run()
- */
- public void run() {
- try {
- Point selection= fTextViewer.getTextWidget().getSelection();
- IDocument document= fTextViewer.getDocument();
- fLastLine= document.getLineOfOffset(document.getLength()) + 1;
- int startLine= selection == null ? 1 : fTextViewer.getTextWidget().getLineAtOffset(selection.x) + 1;
- String title= ActionMessages.getString("TextViewerGotoLineAction.Go_To_Line_1"); //$NON-NLS-1$
- String message= MessageFormat.format(ActionMessages.getString("TextViewerGotoLineAction.Enter_line_number__8"), new Object[] {new Integer(fLastLine)}); //$NON-NLS-1$
- String value= Integer.toString(startLine);
- Shell activeShell= fTextViewer.getTextWidget().getShell();
- InputDialog d= new InputDialog(activeShell, title, message, value, new NumberValidator());
- if (d.open() == d.OK) {
- try {
- int line= Integer.parseInt(d.getValue());
- gotoLine(line - 1);
- } catch (NumberFormatException x) {
- DebugUIPlugin.errorDialog(activeShell, ActionMessages.getString("TextViewerGotoLineAction.Go_To_Line_1"), ActionMessages.getString("TextViewerGotoLineAction.Exceptions_occurred_attempt_to_go_to_line_2"), x); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- } catch (BadLocationException x) {
- DebugUIPlugin.errorDialog(fTextViewer.getTextWidget().getShell(), ActionMessages.getString("TextViewerGotoLineAction.Go_To_Line_1"), ActionMessages.getString("TextViewerGotoLineAction.Exceptions_occurred_attempt_to_go_to_line_2"), x); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- }
-}
-
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import java.text.MessageFormat;
+
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.views.console.ConsoleViewer;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Shell;
+
+public class TextViewerGotoLineAction extends TextViewerAction {
+
+ /**
+ * Validates whether the text found in the input field of the
+ * dialog forms a valid line number, i.e. one to which can be
+ * jumped.
+ */
+ class NumberValidator implements IInputValidator {
+
+ public String isValid(String input) {
+ try {
+ int i= Integer.parseInt(input);
+ if (i <= 0 || fLastLine < i)
+ return ActionMessages.getString("TextViewerGotoLineAction.Line_number_out_of_range_1"); //$NON-NLS-1$
+
+ } catch (NumberFormatException x) {
+ return ActionMessages.getString("TextViewerGotoLineAction.Not_a_number_2"); //$NON-NLS-1$
+ }
+
+ return null;
+ }
+ };
+
+ protected int fLastLine;
+ protected ITextViewer fTextViewer;
+
+ /**
+ * Constructs a goto line action for the console using the provided resource bundle
+ */
+ public TextViewerGotoLineAction(ConsoleViewer viewer) {
+ super(viewer, -1);
+ fTextViewer= viewer;
+ setText(ActionMessages.getString("TextViewerGotoLineAction.Go_to_&Line...@Ctrl+L_4")); //$NON-NLS-1$
+ setToolTipText(ActionMessages.getString("TextViewerGotoLineAction.Go_To_Line_1")); //$NON-NLS-1$
+ setDescription(ActionMessages.getString("TextViewerGotoLineAction.Go_To_Line_1")); //$NON-NLS-1$
+ }
+
+ /**
+ * @see TextViewerAction#update()
+ */
+ public void update() {
+ }
+
+ /**
+ * Jumps to the line.
+ */
+ protected void gotoLine(int line) {
+
+ IDocument document= fTextViewer.getDocument();
+ try {
+ int start= document.getLineOffset(line);
+ int length= document.getLineLength(line);
+ fTextViewer.getTextWidget().setSelection(start, start + length);
+ fTextViewer.revealRange(start, length);
+ } catch (BadLocationException x) {
+ DebugUIPlugin.errorDialog(fTextViewer.getTextWidget().getShell(), ActionMessages.getString("TextViewerGotoLineAction.Go_To_Line_1"), ActionMessages.getString("TextViewerGotoLineAction.Exceptions_occurred_attempt_to_go_to_line_2"), x); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * @see Action#run()
+ */
+ public void run() {
+ try {
+ Point selection= fTextViewer.getTextWidget().getSelection();
+ IDocument document= fTextViewer.getDocument();
+ fLastLine= document.getLineOfOffset(document.getLength()) + 1;
+ int startLine= selection == null ? 1 : fTextViewer.getTextWidget().getLineAtOffset(selection.x) + 1;
+ String title= ActionMessages.getString("TextViewerGotoLineAction.Go_To_Line_1"); //$NON-NLS-1$
+ String message= MessageFormat.format(ActionMessages.getString("TextViewerGotoLineAction.Enter_line_number__8"), new Object[] {new Integer(fLastLine)}); //$NON-NLS-1$
+ String value= Integer.toString(startLine);
+ Shell activeShell= fTextViewer.getTextWidget().getShell();
+ InputDialog d= new InputDialog(activeShell, title, message, value, new NumberValidator());
+ if (d.open() == d.OK) {
+ try {
+ int line= Integer.parseInt(d.getValue());
+ gotoLine(line - 1);
+ } catch (NumberFormatException x) {
+ DebugUIPlugin.errorDialog(activeShell, ActionMessages.getString("TextViewerGotoLineAction.Go_To_Line_1"), ActionMessages.getString("TextViewerGotoLineAction.Exceptions_occurred_attempt_to_go_to_line_2"), x); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ } catch (BadLocationException x) {
+ DebugUIPlugin.errorDialog(fTextViewer.getTextWidget().getShell(), ActionMessages.getString("TextViewerGotoLineAction.Go_To_Line_1"), ActionMessages.getString("TextViewerGotoLineAction.Exceptions_occurred_attempt_to_go_to_line_2"), x); //$NON-NLS-1$ //$NON-NLS-2$
+ return;
+ }
+ }
+}
+
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleFilterAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleFilterAction.java
index 4a37e3ed8..35c1714c6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleFilterAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleFilterAction.java
@@ -1,84 +1,84 @@
-package org.eclipse.debug.internal.ui.actions;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.swt.custom.BusyIndicator;
-
-/**
- * A generic Toggle filter action, meant to be subclassed to provide
- * a specific filter.
- */
-public abstract class ToggleFilterAction extends Action {
-
- /**
- * The viewer that this action works for
- */
- private StructuredViewer fViewer;
-
- /**
- * The filter this action applies to the viewer
- */
- private ViewerFilter fViewerFilter;
-
- public void run() {
- valueChanged(isChecked());
- }
- /**
- * Adds or removes the viewer filter depending
- * on the value of the parameter.
- */
- protected void valueChanged(final boolean on) {
- if (getViewer().getControl().isDisposed()) {
- return;
- }
- BusyIndicator.showWhile(getViewer().getControl().getDisplay(), new Runnable() {
- public void run() {
- if (on) {
- ViewerFilter filter= getViewerFilter();
- ViewerFilter[] filters= getViewer().getFilters();
- boolean alreadyAdded= false;
- for (int i= 0; i < filters.length; i++) {
- ViewerFilter addedFilter= filters[i];
- if (addedFilter.equals(filter)) {
- alreadyAdded= true;
- break;
- }
- }
- if (!alreadyAdded) {
- getViewer().addFilter(filter);
- }
-
- } else {
- getViewer().removeFilter(getViewerFilter());
- }
- }
- });
- }
-
- /**
- * Returns the <code>ViewerFilter</code> that this action
- * will add/remove from the viewer, or <code>null</code>
- * if no filter is involved.
- */
- protected ViewerFilter getViewerFilter() {
- return fViewerFilter;
- }
-
- protected void setViewerFilter(ViewerFilter filter) {
- fViewerFilter= filter;
- }
-
- protected StructuredViewer getViewer() {
- return fViewer;
- }
-
- protected void setViewer(StructuredViewer viewer) {
- fViewer = viewer;
- }
+package org.eclipse.debug.internal.ui.actions;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.swt.custom.BusyIndicator;
+
+/**
+ * A generic Toggle filter action, meant to be subclassed to provide
+ * a specific filter.
+ */
+public abstract class ToggleFilterAction extends Action {
+
+ /**
+ * The viewer that this action works for
+ */
+ private StructuredViewer fViewer;
+
+ /**
+ * The filter this action applies to the viewer
+ */
+ private ViewerFilter fViewerFilter;
+
+ public void run() {
+ valueChanged(isChecked());
+ }
+ /**
+ * Adds or removes the viewer filter depending
+ * on the value of the parameter.
+ */
+ protected void valueChanged(final boolean on) {
+ if (getViewer().getControl().isDisposed()) {
+ return;
+ }
+ BusyIndicator.showWhile(getViewer().getControl().getDisplay(), new Runnable() {
+ public void run() {
+ if (on) {
+ ViewerFilter filter= getViewerFilter();
+ ViewerFilter[] filters= getViewer().getFilters();
+ boolean alreadyAdded= false;
+ for (int i= 0; i < filters.length; i++) {
+ ViewerFilter addedFilter= filters[i];
+ if (addedFilter.equals(filter)) {
+ alreadyAdded= true;
+ break;
+ }
+ }
+ if (!alreadyAdded) {
+ getViewer().addFilter(filter);
+ }
+
+ } else {
+ getViewer().removeFilter(getViewerFilter());
+ }
+ }
+ });
+ }
+
+ /**
+ * Returns the <code>ViewerFilter</code> that this action
+ * will add/remove from the viewer, or <code>null</code>
+ * if no filter is involved.
+ */
+ protected ViewerFilter getViewerFilter() {
+ return fViewerFilter;
+ }
+
+ protected void setViewerFilter(ViewerFilter filter) {
+ fViewerFilter= filter;
+ }
+
+ protected StructuredViewer getViewer() {
+ return fViewer;
+ }
+
+ protected void setViewer(StructuredViewer viewer) {
+ fViewer = viewer;
+ }
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java
index cc55e7f29..69b6a6952 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java
@@ -1,3063 +1,3063 @@
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationListener;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.PixelConverter;
-import org.eclipse.debug.internal.ui.SWTUtil;
-import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.dialogs.ControlEnableState;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.operation.ModalContext;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.wizard.ProgressMonitorPart;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.model.WorkbenchViewerSorter;
-
-/**
- * The dialog used to edit and launch launch configurations.
- */
-public class LaunchConfigurationDialog extends TitleAreaDialog
- implements ISelectionChangedListener,
- ILaunchConfigurationListener,
- ILaunchConfigurationDialog,
- IDoubleClickListener {
-
- /**
- * The tree of launch configurations
- */
- private TreeViewer fConfigTree;
-
- /**
- * The workbench context present when this dialog is opened.
- */
- private Object fContext;
-
- /**
- * The IResource corresponding to <code>fContext</code>.
- */
- private IResource fResourceContext;
-
- /**
- * The mode (run or debug) for this dialog.
- */
- private String fMode;
-
- /**
- * The Composite used to insert an adjustable 'sash' between the tree and the tabs.
- */
- private SashForm fSashForm;
-
- /**
- * Default weights for the SashForm that specify how wide the selection and
- * edit areas aree relative to each other.
- */
- private static final int[] DEFAULT_SASH_WEIGHTS = new int[] {11, 30};
-
- /**
- * The launch configuration selection area.
- */
- private Composite fSelectionArea;
-
- /**
- * The launch configuration edit area.
- */
- private Composite fEditArea;
-
- /**
- * The 'New configuration' action.
- */
- private ButtonAction fButtonActionNew;
-
- /**
- * The 'Duplicate configuration' action.
- */
- private ButtonAction fButtonActionDuplicate;
-
- /**
- * The 'Delete configuration' action.
- */
- private ButtonAction fButtonActionDelete;
-
- /**
- * The 'apply' button
- */
- private Button fApplyButton;
-
- /**
- * The 'revert' button
- */
- private Button fRevertButton;
-
- /**
- * The 'cancel' button that appears when the in-dialog progress monitor is shown.
- */
- private Button fProgressMonitorCancelButton;
-
- /**
- * Flag indicating if the progress monitor part's Cancel button has been pressed.
- */
- private boolean fCancelButtonPressed;
-
- /**
- * The text widget displaying the name of the
- * launch configuration under edit
- */
- private Text fNameText;
-
- private String fLastSavedName = null;
-
- /**
- * Container for the edit area <code>TabFolder</code>
- */
- private Composite fTabComposite;
-
- /**
- * The tab folder that contains tabs for the selected configuration
- */
- private TabFolder fTabFolder;
-
- /**
- * Flag that indicates when the tabs are being disposed.
- */
- private boolean fDisposingTabs = false;
-
- /**
- * The current (working copy) launch configuration
- * being displayed/edited or <code>null</code> if
- * none
- */
- private ILaunchConfigurationWorkingCopy fWorkingCopy;
-
- /**
- * The actual (non-working copy) launch configuration that underlies the current working copy
- */
- private ILaunchConfiguration fUnderlyingConfig;
-
- /**
- * Clients of this dialog may set an 'initial configuration type', which means that when
- * the dialog is opened, a configuration of that type will be created, initialized, and
- * saved. Note that the initial config type is ignored if single-click launching is enabled.
- */
- private ILaunchConfigurationType fInitialConfigType;
-
- /**
- * When this dialog is opened in <code>LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION</code>
- * mode, this specifies the selection that is initially shown in the dialog.
- */
- private IStructuredSelection fInitialSelection;
-
- /**
- * The current tab group being displayed
- */
- private ILaunchConfigurationTabGroup fTabGroup;
-
- /**
- * The type of config tabs are currently displayed
- * for
- */
- private ILaunchConfigurationType fTabType;
-
- /**
- * The index of the currently selected tab
- */
- private int fCurrentTabIndex;
-
- private ProgressMonitorPart fProgressMonitorPart;
- private Cursor waitCursor;
- private Cursor arrowCursor;
- private MessageDialog fWindowClosingDialog;
-
- /**
- * Whether initlialing tabs
- */
- private boolean fInitializingTabs = false;
-
- /**
- * Indicates if selection changes in the tree should be ignored
- */
- private boolean fIgnoreSelectionChanges = false;
-
- /**
- * Previously selected element in the tree
- */
- private Object fSelectedTreeObject;
-
- /**
- * The number of 'long-running' operations currently taking place in this dialog
- */
- private long fActiveRunningOperations = 0;
-
- /**
- * Id for 'Launch' button.
- */
- protected static final int ID_LAUNCH_BUTTON = IDialogConstants.CLIENT_ID + 1;
-
- /**
- * Id for 'Close' button.
- */
- protected static final int ID_CLOSE_BUTTON = IDialogConstants.CLIENT_ID + 2;
-
- /**
- * Id for 'Cancel' button.
- */
- protected static final int ID_CANCEL_BUTTON = IDialogConstants.CLIENT_ID + 3;
-
- /**
- * Constrant String used as key for setting and retrieving current Control with focus
- */
- private static final String FOCUS_CONTROL = "focusControl";//$NON-NLS-1$
-
- /**
- * The height in pixels of this dialog's progress indicator
- */
- private static int PROGRESS_INDICATOR_HEIGHT = 18;
-
- /**
- * Constant specifying how wide this dialog is allowed to get (as a percentage of
- * total available screen width) as a result of tab labels in the edit area.
- */
- private static final float MAX_DIALOG_WIDTH_PERCENT = 0.75f;
-
- /**
- * Empty array
- */
- protected static final Object[] EMPTY_ARRAY = new Object[0];
-
- protected static final String DEFAULT_NEW_CONFIG_NAME = LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.New_configuration_1"); //$NON-NLS-1$
-
- /**
- * Size of this dialog if there is no preference specifying a size.
- */
- protected static final Point DEFAULT_INITIAL_DIALOG_SIZE = new Point(620, 560);
-
- /**
- * Status area messages
- */
- protected static final String LAUNCH_STATUS_OK_MESSAGE = LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Ready_to_launch_2"); //$NON-NLS-1$
- protected static final String LAUNCH_STATUS_STARTING_FROM_SCRATCH_MESSAGE
- = LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Select_a_configuration_to_launch_or_a_config_type_to_create_a_new_configuration_3"); //$NON-NLS-1$
-
- private String fCantSaveErrorMessage;
-
- /**
- * Constant specifying that the launch configuration dialog should not actually open,
- * but instead should attempt to re-launch the last configuration that was sucessfully
- * launched in the workspace. If there is no last launched configuration, just open the dialog.
- */
- public static final int LAUNCH_CONFIGURATION_DIALOG_LAUNCH_LAST = 0;
-
- /**
- * Constant specifying that this dialog should be opened with a new configuration of a type
- * specified via <code>setInitialConfigType()</code> selected.
- */
- public static final int LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_NEW_CONFIG_OF_TYPE = 1;
-
- /**
- * Constant specifying that this dialog should be opened with the last configuration launched
- * in the workspace selected.
- */
- public static final int LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_LAST_LAUNCHED = 2;
-
- /**
- * Constant specifying that this dialog should be opened with the value specified via
- * <code>setInitialSelection()</code> selected.
- */
- public static final int LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION = 3;
-
- /**
- * Specifies how this dialog behaves when opened. Value is one of the
- * 'LAUNCH_CONFIGURATION_DIALOG' constants defined in this class.
- */
- private int fOpenMode = LAUNCH_CONFIGURATION_DIALOG_LAUNCH_LAST;
-
- /**
- * Constructs a new launch configuration dialog on the given
- * parent shell.
- *
- * @param shell the parent shell
- * @param selection the selection used to initialize this dialog, typically the
- * current workbench selection
- * @param mode one of <code>ILaunchManager.RUN_MODE</code> or
- * <code>ILaunchManager.DEBUG_MODE</code>
- */
- public LaunchConfigurationDialog(Shell shell, IStructuredSelection selection, String mode) {
- super(shell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- setContext(resolveContext(selection));
- setMode(mode);
- }
-
- /**
- * Set the flag indicating how this dialog behaves when the <code>open()</code> method is called.
- * Valid values are defined by the LAUNCH_CONFIGURATION_DIALOG... constants in this class.
- */
- public void setOpenMode(int mode) {
- fOpenMode = mode;
- }
-
- protected int getOpenMode() {
- return fOpenMode;
- }
-
- /**
- * Returns the Object to be used as context for this dialog, derived from the specified selection.
- * If the specified selection has as its first element an IFile whose extension matches
- * <code>ILaunchConfiguration.LAUNCH_CONFIGURATION_FILE_EXTENSION</code>, then return
- * the launch configuration declared in the IFile. Otherwise, return the first element
- * in the specified selection.
- */
- protected Object resolveContext(IStructuredSelection selection) {
-
- // Empty selection means no context
- if ((selection == null) || (selection.isEmpty())) {
- return null;
- }
-
- // If first element is a launch config file, create a launch configuration from it
- // and make this the context, otherwise just return the first element
- Object firstSelected = selection.getFirstElement();
- if (firstSelected instanceof IFile) {
- IFile file = (IFile) firstSelected;
- if (ILaunchConfiguration.LAUNCH_CONFIGURATION_FILE_EXTENSION.equals(file.getFileExtension())) {
- return getLaunchManager().getLaunchConfiguration(file);
- }
- }
- return firstSelected;
- }
-
- /**
- * A launch configuration dialog overrides this method
- * to create a custom set of buttons in the button bar.
- * This dialog has 'Launch' and 'Cancel'
- * buttons.
- *
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(Composite)
- */
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, ID_LAUNCH_BUTTON, getLaunchButtonText(), true);
- createButton(parent, ID_CLOSE_BUTTON, LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Close_1"), false); //$NON-NLS-1$
- }
-
- /**
- * Handle the 'save and launch' & 'launch' buttons here, all others are handled
- * in <code>Dialog</code>
- *
- * @see Dialog#buttonPressed(int)
- */
- protected void buttonPressed(int buttonId) {
- if (buttonId == ID_LAUNCH_BUTTON) {
- handleLaunchPressed();
- } else if (buttonId == ID_CLOSE_BUTTON) {
- handleClosePressed();
- } else {
- super.buttonPressed(buttonId);
- }
- }
-
- /**
- * Returns the appropriate text for the launch button - run or debug.
- */
- protected String getLaunchButtonText() {
- if (getMode() == ILaunchManager.DEBUG_MODE) {
- return LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Deb&ug_4"); //$NON-NLS-1$
- } else {
- return LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.R&un_5"); //$NON-NLS-1$
- }
- }
-
- /**
- * @see Dialog#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- Control contents = super.createContents(parent);
- initializeBounds();
- initializeSashForm();
- createContextMenu(getTreeViewer().getControl());
- getLaunchManager().addLaunchConfigurationListener(this);
- ensureSelectionAreaWidth();
- doInitialTreeSelection();
- return contents;
- }
-
- /**
- * Initialize the relative weights (widths) of the 2 sides of the sash.
- */
- protected void initializeSashForm() {
- int[] sashWeights = DEFAULT_SASH_WEIGHTS;
- String sashWeightString = getPreferenceStore().getString(IDebugPreferenceConstants.PREF_LAUNCH_CONFIGURATION_DIALOG_SASH_WEIGHTS);
- if (sashWeightString.length() > 0) {
- Point sashWeightPoint = parseCoordinates(sashWeightString);
- if (sashWeightPoint != null) {
- sashWeights[0] = sashWeightPoint.x;
- sashWeights[1] = sashWeightPoint.y;
- }
- }
- getSashForm().setWeights(sashWeights);
- }
-
- /**
- * Check if the selection area is currently wide enough so that both the 'New' &
- * 'Delete' buttons are shown without truncation. If so, do nothing. Otherwise,
- * increase the width of this dialog's Shell just enough so that both buttons
- * are shown cleanly.
- */
- protected void ensureSelectionAreaWidth() {
- Button newButton = getButtonActionNew().getButton();
- Button deleteButton = getButtonActionDelete().getButton();
- int requiredWidth = newButton.getBounds().width + deleteButton.getBounds().width;
- int marginWidth = ((GridLayout)getSelectionArea().getLayout()).marginWidth;
- int horizontalSpacing = ((GridLayout)getSelectionArea().getLayout()).horizontalSpacing;
- requiredWidth += (2 * marginWidth) + horizontalSpacing;
- int currentWidth = getSelectionArea().getBounds().width;
-
- if (requiredWidth > currentWidth) {
- int[] newSashWeights = new int[2];
- newSashWeights[0] = requiredWidth;
- newSashWeights[1] = getEditArea().getBounds().width;
- Shell shell= getShell();
- Point shellSize= shell.getSize();
- setShellSize(shellSize.x + (requiredWidth - currentWidth), shellSize.y);
- getSashForm().setWeights(newSashWeights);
- }
- }
-
- /**
- * Creates a pop-up menu on the specified control.
- */
- protected void createContextMenu(Control menuControl) {
- MenuManager menuMgr= new MenuManager("#PopUp"); //$NON-NLS-1$
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager mgr) {
- fillContextMenu(mgr);
- }
- });
- Menu menu= menuMgr.createContextMenu(menuControl);
- menuControl.setMenu(menu);
- }
-
- /**
- * Fill the specified context menu with the basic launch configuration
- * management actions - New, Duplicate & Delete.
- */
- protected void fillContextMenu(IMenuManager menu) {
- if (getButtonActionNew().isEnabled()) {
- menu.add(getButtonActionNew());
- }
- if (getButtonActionDuplicate().isEnabled()) {
- menu.add(getButtonActionDuplicate());
- }
- if (getButtonActionDelete().isEnabled()) {
- menu.add(getButtonActionDelete());
- }
- }
-
- /**
- * Set the initial selection in the tree.
- */
- protected void doInitialTreeSelection() {
- getTreeViewer().setSelection(getInitialSelection());
- }
-
- /**
- * Write out this dialog's Shell size, location & sash weights to the preference store.
- */
- protected void persistShellGeometry() {
- Point shellLocation = getShell().getLocation();
- Point shellSize = getShell().getSize();
- int[] sashWeights = getSashForm().getWeights();
- String locationString = serializeCoords(shellLocation);
- String sizeString = serializeCoords(shellSize);
- String sashWeightString = serializeCoords(new Point(sashWeights[0], sashWeights[1]));
- getPreferenceStore().setValue(IDebugPreferenceConstants.PREF_LAUNCH_CONFIGURATION_DIALOG_LOCATION, locationString);
- getPreferenceStore().setValue(IDebugPreferenceConstants.PREF_LAUNCH_CONFIGURATION_DIALOG_SIZE, sizeString);
- getPreferenceStore().setValue(IDebugPreferenceConstants.PREF_LAUNCH_CONFIGURATION_DIALOG_SASH_WEIGHTS, sashWeightString);
- }
-
- /**
- * @see Window#close()
- */
- public boolean close() {
- getLaunchManager().removeLaunchConfigurationListener(this);
- persistShellGeometry();
- return super.close();
- }
-
- /**
- * Determine the first configuration for this dialog. If single-click launching is
- * enabled, launch the configuration WITHOUT realizing the dialog. If single-click
- * launching was successful, this method returns
- * <code>ILaunchConfigurationDialog.SINGLE_CLICK_LAUNCHED</code>. Otherwise, open the
- * dialog in the specified mode.
- *
- * @see Window#open()
- */
- public int open() {
- int mode = getOpenMode();
- if (mode == LAUNCH_CONFIGURATION_DIALOG_LAUNCH_LAST) {
- return doLastLaunchedConfig(true);
- } else if (mode == LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_LAST_LAUNCHED) {
- return doLastLaunchedConfig(false);
- } else if (mode == LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_NEW_CONFIG_OF_TYPE) {
- return openDialogOnNewConfigOfSpecifiedType();
- } else if (mode == LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION) {
- return openDialogOnSelection();
- }
- return super.open();
- }
-
- /**
- * Retrieve the last launched configuration in the workspace. If <code>launch</code>
- * is <code>true</code>, launch this configuration without showing the dialog, otherwise
- * just set the initial selection in the dialog to the last launched configuration.
- */
- protected int doLastLaunchedConfig(boolean launch) {
- ILaunchConfiguration lastLaunchedConfig = getLastLaunchedWorkbenchConfiguration();
- if (launch) {
- try {
- if (lastLaunchedConfig != null) {
- if (lastLaunchedConfig.supportsMode(getMode())) {
- fUnderlyingConfig = lastLaunchedConfig;
- doLaunch(lastLaunchedConfig);
- } else {
- // If we're trying to launch, but the last launched config doesn't
- // support the current mode of the dialog, show an error dialog
- String configName = lastLaunchedConfig.getName();
- String title = LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Cannot_relaunch_1"); //$NON-NLS-1$
- String message = MessageFormat.format(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Cannot_relaunch_[{1}]_because_it_does_not_support_{2}_mode_2"), new String[] {configName, getMode()}); //$NON-NLS-1$
- MessageDialog.openError(getShell(), title, message);
- }
- return ILaunchConfigurationDialog.LAUNCHED_BEFORE_OPENING;
- }
- } catch(CoreException e) {
- DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Launch_Configuration_Error_6"), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Exception_occurred_processing_launch_configuration._See_log_for_more_information_7"), e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- if (lastLaunchedConfig != null) {
- setInitialSelection(new StructuredSelection(lastLaunchedConfig));
- }
- return super.open();
- }
-
- /**
- * Realize this dialog so that a new configuration of the type that was specified via
- * <code>setInitialConfigType()</code> is selected.
- */
- protected int openDialogOnNewConfigOfSpecifiedType() {
- ILaunchConfigurationType configType = getInitialConfigType();
- ILaunchConfiguration config = null;
- if (configType != null) {
- config = createConfigOfType(configType);
- }
- if (config != null) {
- setInitialSelection(new StructuredSelection(config));
- }
- return super.open();
- }
-
- /**
- * Open this dialog with the selection set to the value specified by
- * <code>setInitialSelection()</code>.
- */
- protected int openDialogOnSelection() {
- // Nothing special is required, the dialog will open and whatever was specified
- // via setInitialSelection() will be selected in the tree
- return super.open();
- }
-
- /**
- * Return the last launched configuration in the workspace.
- */
- protected ILaunchConfiguration getLastLaunchedWorkbenchConfiguration() {
- LaunchConfigurationHistoryElement historyElement = DebugUIPlugin.getLaunchConfigurationManager().getLastLaunch();
- if (historyElement != null) {
- return historyElement.getLaunchConfiguration();
- }
- return null;
- }
-
- /**
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(Composite)
- */
- protected Control createDialogArea(Composite parent) {
- GridData gd;
- Composite dialogComp = (Composite)super.createDialogArea(parent);
- Composite topComp = new Composite(dialogComp, SWT.NONE);
- gd = new GridData(GridData.FILL_BOTH);
- topComp.setLayoutData(gd);
- GridLayout topLayout = new GridLayout();
- topLayout.numColumns = 2;
- topLayout.marginHeight = 5;
- topLayout.marginWidth = 0;
- topComp.setLayout(topLayout);
-
- // Set the things that TitleAreaDialog takes care of
- setTitle(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Create,_manage,_and_run_launch_configurations_8")); //$NON-NLS-1$
- setMessage(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Ready_to_launch_2")); //$NON-NLS-1$
- setModeLabelState();
-
- // Create the SashForm that contains the selection area on the left,
- // and the edit area on the right
- setSashForm(new SashForm(topComp, SWT.NONE));
- getSashForm().setOrientation(SWT.HORIZONTAL);
- gd = new GridData(GridData.FILL_BOTH);
- gd.horizontalSpan = 2;
- getSashForm().setLayoutData(gd);
-
- // Build the launch configuration selection area and put it into the composite.
- Composite launchConfigSelectionArea = createLaunchConfigurationSelectionArea(getSashForm());
- gd = new GridData(GridData.FILL_VERTICAL);
- launchConfigSelectionArea.setLayoutData(gd);
-
- // Build the launch configuration edit area and put it into the composite.
- Composite editAreaComp = createLaunchConfigurationEditArea(getSashForm());
- gd = new GridData(GridData.FILL_BOTH);
- editAreaComp.setLayoutData(gd);
-
- // Build the separator line that demarcates the button bar
- Label separator = new Label(topComp, SWT.HORIZONTAL | SWT.SEPARATOR);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- separator.setLayoutData(gd);
-
- dialogComp.layout(true);
-
- return dialogComp;
- }
-
- /**
- * Create and return a launch configuration of the specified type.
- * This method is intended to be called before the UI has been realized, such as in
- * the case of single-click launching or creating a config for an initial configuration
- * type.
- */
- protected ILaunchConfiguration createConfigOfType(ILaunchConfigurationType configType) {
- ILaunchConfigurationWorkingCopy workingCopy = null;
- try {
- workingCopy = configType.newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(DEFAULT_NEW_CONFIG_NAME));
- } catch (CoreException ce) {
- DebugUIPlugin.log(ce);
- return null;
- }
-
- ILaunchConfiguration config = null;
- try {
- ILaunchConfigurationTabGroup group= createGroup(configType);
- group.setDefaults(workingCopy);
- group.dispose();
-
- // Assign a name to the config if it doesn't already have one
- if (workingCopy.getName().trim().length() == 0) {
- IResource res = getResourceContext();
- String name = ""; //$NON-NLS-1$
- if (res != null) {
- name = res.getName();
- }
- name = generateName(name);
- workingCopy.rename(name);
- }
-
- config = workingCopy.doSave();
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- return null;
- }
-
- return config;
- }
-
- /**
- * Returns tab group for the given type of launch configuration.
- * Tabs are initialized to be contained in this dialog.
- *
- * @exception CoreException if unable to instantiate a tab group
- */
- protected ILaunchConfigurationTabGroup createGroup(final ILaunchConfigurationType configType) throws CoreException {
- // Use a final Object array to store the tab group and any exception that
- // results from the Runnable
- final Object[] finalArray = new Object[2];
- Runnable runnable = new Runnable() {
- public void run() {
- ILaunchConfigurationTabGroup tabGroup = null;
- try {
- tabGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(configType);
- finalArray[0] = tabGroup;
- } catch (CoreException ce) {
- finalArray[1] = ce;
- return;
- }
- tabGroup.createTabs(LaunchConfigurationDialog.this, getMode());
- ILaunchConfigurationTab[] tabs = tabGroup.getTabs();
- for (int i = 0; i < tabs.length; i++) {
- tabs[i].setLaunchConfigurationDialog(LaunchConfigurationDialog.this);
- }
- }
- };
-
- // Creating the tabs can result in plugin loading, so we show the busy cursor
- BusyIndicator.showWhile(getDisplay(), runnable);
-
- // Re-throw any CoreException if there was one
- if (finalArray[1] != null) {
- throw (CoreException)finalArray[1];
- }
-
- // Otherwise return the tab group
- return (ILaunchConfigurationTabGroup)finalArray[0];
- }
-
- /**
- * Returns the selected IResource context from the workbench,
- * or <code>null</code> if there was no context in the workbench.
- */
- protected IResource getResourceContext() {
- if (fResourceContext == null) {
- Object workbenchSelection = getContext();
- if (workbenchSelection instanceof IResource) {
- fResourceContext = (IResource)workbenchSelection;
- } else if (workbenchSelection instanceof IAdaptable) {
- fResourceContext = (IResource) ((IAdaptable)workbenchSelection).getAdapter(IResource.class);
- }
- }
- return fResourceContext;
- }
-
- /**
- * Set the title area image based on the mode this dialog was initialized with
- */
- protected void setModeLabelState() {
- Image image;
- if (getMode().equals(ILaunchManager.DEBUG_MODE)) {
- image = DebugUITools.getImage(IDebugUIConstants.IMG_WIZBAN_DEBUG);
- } else {
- image = DebugUITools.getImage(IDebugUIConstants.IMG_WIZBAN_RUN);
- }
- setTitleImage(image);
- }
-
- /**
- * Convenience method to set the selection on the configuration tree.
- */
- protected void setTreeViewerSelection(ISelection selection) {
- getTreeViewer().setSelection(selection);
- }
-
- private void setLastSavedName(String lastSavedName) {
- this.fLastSavedName = lastSavedName;
- }
-
- private String getLastSavedName() {
- return fLastSavedName;
- }
-
- /**
- * Update buttons and message.
- */
- protected void refreshStatus() {
- updateButtons();
- updateMessage();
- }
-
- /**
- * Verify the attributes common to all launch configuration.
- * Indicate failure by throwing a <code>CoreException</code>.
- */
- protected void verifyStandardAttributes() throws CoreException {
- verifyName();
- }
-
- /**
- * Verify that the launch configuration name is valid.
- */
- protected void verifyName() throws CoreException {
- String currentName = getNameTextWidget().getText().trim();
-
- // If there is no name, complain
- if (currentName.length() < 1) {
- throw new CoreException(new Status(IStatus.ERROR,
- DebugUIPlugin.getUniqueIdentifier(),
- 0,
- LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Name_required_for_launch_configuration_11"), //$NON-NLS-1$
- null));
- }
-
- // If the name hasn't changed from the last saved name, do nothing
- if (currentName.equals(getLastSavedName())) {
- return;
- }
-
- // See if name contains any 'illegal' characters
- IStatus status = ResourcesPlugin.getWorkspace().validateName(currentName, IResource.FILE);
- if (status.getCode() != IStatus.OK) {
- throw new CoreException(new Status(IStatus.ERROR,
- DebugUIPlugin.getDefault().getDescriptor().getUniqueIdentifier(),
- 0,
- status.getMessage(),
- null));
- }
-
- // Otherwise, if there's already a config with the same name, complain
- if (getLaunchManager().isExistingLaunchConfigurationName(currentName)) {
- throw new CoreException(new Status(IStatus.ERROR,
- DebugUIPlugin.getDefault().getDescriptor().getUniqueIdentifier(),
- 0,
- LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Launch_configuration_already_exists_with_this_name_12"), //$NON-NLS-1$
- null));
- }
- }
-
- /**
- * If the name is valid, rename the current launch configuration. Otherwise, show an
- * appropriate error message.
- */
- protected void updateConfigFromName() {
- if (getLaunchConfiguration() != null) {
- try {
- verifyName();
- } catch (CoreException ce) {
- refreshStatus();
- return;
- }
-
- getLaunchConfiguration().rename(getNameTextWidget().getText().trim());
- refreshStatus();
- }
- }
-
- protected Display getDisplay() {
- Shell shell = getShell();
- if (shell != null) {
- return shell.getDisplay();
- } else {
- return Display.getDefault();
- }
- }
-
- /**
- * Creates the launch configuration selection area of the dialog.
- * This area displays a tree of launch configurations that the user
- * may select, and allows users to create new configurations, and
- * delete and duplicate existing configurations.
- *
- * @return the composite used for launch configuration selection area
- */
- protected Composite createLaunchConfigurationSelectionArea(Composite parent) {
- Composite comp = new Composite(parent, SWT.NONE);
- setSelectionArea(comp);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- layout.marginHeight = 0;
- layout.marginWidth = 5;
- comp.setLayout(layout);
-
- Label treeLabel = new Label(comp, SWT.NONE);
- treeLabel.setText(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Launch_Con&figurations__1")); //$NON-NLS-1$
- GridData gd = new GridData();
- gd.horizontalSpan = 3;
- treeLabel.setLayoutData(gd);
-
- TreeViewer tree = new TreeViewer(comp);
- gd = new GridData(GridData.FILL_BOTH);
- gd.horizontalSpan = 3;
- // Set width hint to 0 to force tree to only be as wide as the combined
- // width of the 'New' & 'Delete' buttons. Otherwise tree wants to be much wider.
- gd.widthHint = 0;
- tree.getControl().setLayoutData(gd);
- tree.setContentProvider(new LaunchConfigurationContentProvider());
- tree.setLabelProvider(DebugUITools.newDebugModelPresentation());
- tree.setSorter(new WorkbenchViewerSorter());
- setTreeViewer(tree);
- tree.addSelectionChangedListener(this);
- tree.setInput(ResourcesPlugin.getWorkspace().getRoot());
- tree.expandAll();
- tree.addDoubleClickListener(this);
- tree.getControl().addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- handleTreeViewerKeyPressed(e);
- }
- });
-
- Button newButton = SWTUtil.createPushButton(comp, LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Ne&w_13"), null); //$NON-NLS-1$
- setButtonActionNew(new ButtonActionNew(newButton.getText(), newButton));
-
- Button deleteButton = SWTUtil.createPushButton(comp, LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Dele&te_14"), null); //$NON-NLS-1$
- setButtonActionDelete(new ButtonActionDelete(deleteButton.getText(), deleteButton));
-
- setButtonActionDuplicate(new ButtonActionDuplicate(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Duplicate_1"), null)); //$NON-NLS-1$
-
- return comp;
- }
-
- /**
- * Creates the launch configuration edit area of the dialog.
- * This area displays the name of the launch configuration
- * currently being edited, as well as a tab folder of tabs
- * that are applicable to the launch configuration.
- *
- * @return the composite used for launch configuration editing
- */
- protected Composite createLaunchConfigurationEditArea(Composite parent) {
- Composite outerComp = new Composite(parent, SWT.NONE);
- GridLayout outerCompLayout = new GridLayout();
- outerCompLayout.numColumns = 1;
- outerCompLayout.marginHeight = 0;
- outerCompLayout.marginWidth = 0;
- outerComp.setLayout(outerCompLayout);
-
- Composite comp = new Composite(outerComp, SWT.NONE);
- setEditArea(comp);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginWidth = 5;
- comp.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_BOTH);
- comp.setLayoutData(gd);
-
- Label nameLabel = new Label(comp, SWT.HORIZONTAL | SWT.LEFT);
- nameLabel.setText(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.&Name__16")); //$NON-NLS-1$
- gd = new GridData(GridData.BEGINNING);
- nameLabel.setLayoutData(gd);
-
- Text nameText = new Text(comp, SWT.SINGLE | SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- nameText.setLayoutData(gd);
- setNameTextWidget(nameText);
-
- getNameTextWidget().addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateConfigFromName();
- }
- }
- );
-
- Label spacer = new Label(comp, SWT.NONE);
- gd = new GridData();
- gd.horizontalSpan = 2;
- spacer.setLayoutData(gd);
-
- fTabComposite = new Composite(comp, SWT.NONE);
- GridLayout outerTabCompositeLayout = new GridLayout();
- outerTabCompositeLayout.marginHeight = 0;
- outerTabCompositeLayout.marginWidth = 0;
- fTabComposite.setLayout(outerTabCompositeLayout);
- gd = new GridData(GridData.FILL_BOTH);
- gd.horizontalSpan = 2;
- fTabComposite.setLayoutData(gd);
-
- TabFolder tabFolder = new TabFolder(fTabComposite, SWT.NONE);
- setTabFolder(tabFolder);
- gd = new GridData(GridData.FILL_BOTH);
- tabFolder.setLayoutData(gd);
- getTabFolder().addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent evt) {
- handleTabSelected();
- }
- });
-
- Composite buttonComp = new Composite(comp, SWT.NONE);
- GridLayout buttonCompLayout = new GridLayout();
- buttonCompLayout.numColumns = 2;
- buttonComp.setLayout(buttonCompLayout);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
- gd.horizontalSpan = 2;
- buttonComp.setLayoutData(gd);
-
- setApplyButton(new Button(buttonComp, SWT.PUSH));
- getApplyButton().setText(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.&Apply_17")); //$NON-NLS-1$
- gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
- getApplyButton().setLayoutData(gd);
- SWTUtil.setButtonDimensionHint(getApplyButton());
- getApplyButton().addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent evt) {
- handleApplyPressed();
- }
- });
-
- setRevertButton(new Button(buttonComp, SWT.PUSH));
- getRevertButton().setText(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Revert_2")); //$NON-NLS-1$
- gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
- getRevertButton().setLayoutData(gd);
- SWTUtil.setButtonDimensionHint(getRevertButton());
- getRevertButton().addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent evt) {
- handleRevertPressed();
- }
- });
-
- return outerComp;
- }
-
- /**
- * @see Dialog#createButtonBar(Composite)
- */
- protected Control createButtonBar(Composite parent) {
- Composite composite= new Composite(parent, SWT.NULL);
- GridLayout layout= new GridLayout();
- layout.numColumns= 2;
- layout.marginHeight= 0;
- layout.marginWidth= 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- GridLayout pmLayout = new GridLayout();
- pmLayout.numColumns = 3;
- setProgressMonitorPart(new ProgressMonitorPart(composite, pmLayout, PROGRESS_INDICATOR_HEIGHT));
- Button cancelButton = createButton(getProgressMonitorPart(), ID_CANCEL_BUTTON, LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Cancel_3"), true); //$NON-NLS-1$
- setProgressMonitorCancelButton(cancelButton);
- getProgressMonitorCancelButton().addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent evt) {
- setCancelButtonPressed(true);
- }
- });
- getProgressMonitorPart().setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- getProgressMonitorPart().setVisible(false);
-
- return super.createButtonBar(composite);
- }
-
- /**
- * Sets the title for the dialog, and establishes the help context.
- *
- * @see org.eclipse.jface.window.Window#configureShell(Shell);
- */
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Launch_Configurations_18")); //$NON-NLS-1$
- WorkbenchHelp.setHelp(
- shell,
- IDebugHelpContextIds.LAUNCH_CONFIGURATION_DIALOG);
- }
-
- /**
- * @see Window#getInitialLocation(Point)
- */
- protected Point getInitialLocation(Point initialSize) {
- String locationString = getPreferenceStore().getString(IDebugPreferenceConstants.PREF_LAUNCH_CONFIGURATION_DIALOG_LOCATION);
- if (locationString.length() > 0) {
- Point locationPoint = parseCoordinates(locationString);
- if (locationPoint != null) {
- return locationPoint;
- }
- }
- return super.getInitialLocation(initialSize);
- }
-
- /**
- * @see Window#getInitialSize()
- */
- protected Point getInitialSize() {
- String sizeString = getPreferenceStore().getString(IDebugPreferenceConstants.PREF_LAUNCH_CONFIGURATION_DIALOG_SIZE);
- if (sizeString.length() > 0) {
- Point sizePoint = parseCoordinates(sizeString);
- if (sizePoint != null) {
- return sizePoint;
- }
- }
- return DEFAULT_INITIAL_DIALOG_SIZE;
- }
-
- /**
- * Given a coordinate String of the form "123x456" return a Point object whose
- * X value is 123 and Y value is 456. Return <code>null</code> if the String
- * is not in the specified form.
- */
- protected Point parseCoordinates(String coordString) {
- int byIndex = coordString.indexOf('x');
- if (byIndex < 0) {
- return null;
- }
-
- try {
- int x = Integer.parseInt(coordString.substring(0, byIndex));
- int y = Integer.parseInt(coordString.substring(byIndex + 1));
- return new Point(x, y);
- } catch (NumberFormatException nfe) {
- return null;
- }
- }
-
- /**
- * Given a Point object, return a String of the form "XCoordxYCoord".
- */
- protected String serializeCoords(Point coords) {
- StringBuffer buffer = new StringBuffer();
- buffer.append(coords.x);
- buffer.append('x');
- buffer.append(coords.y);
- return buffer.toString();
- }
-
- private void setSashForm(SashForm sashForm) {
- fSashForm = sashForm;
- }
-
- protected SashForm getSashForm() {
- return fSashForm;
- }
-
- /**
- * Sets the tree viewer used to display launch configurations.
- *
- * @param viewer the tree viewer used to display launch
- * configurations
- */
- private void setTreeViewer(TreeViewer viewer) {
- fConfigTree = viewer;
- }
-
- /**
- * Returns the tree viewer used to display launch configurations.
- *
- * @param the tree viewer used to display launch configurations
- */
- protected TreeViewer getTreeViewer() {
- return fConfigTree;
- }
-
- protected IStructuredSelection getTreeViewerSelection() {
- return (IStructuredSelection)getTreeViewer().getSelection();
- }
-
- protected Object getTreeViewerFirstSelectedElement() {
- IStructuredSelection selection = getTreeViewerSelection();
- if (selection == null) {
- return null;
- }
- return selection.getFirstElement();
- }
-
- /**
- * Content provider for launch configuration tree.
- */
- class LaunchConfigurationContentProvider implements ITreeContentProvider {
-
- /**
- * Actual launch configurations have no children. Launch configuration types have
- * all configurations of that type as children, minus any configurations that are
- * marked as private.
- *
- * @see ITreeContentProvider#getChildren(Object)
- */
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof ILaunchConfiguration) {
- return EMPTY_ARRAY;
- } else if (parentElement instanceof ILaunchConfigurationType) {
- try {
- ILaunchConfigurationType type = (ILaunchConfigurationType)parentElement;
- ILaunchConfiguration[] allConfigs = getLaunchManager().getLaunchConfigurations(type);
- ArrayList filteredConfigs = new ArrayList(allConfigs.length);
- for (int i = 0; i < allConfigs.length; i++) {
- ILaunchConfiguration config = allConfigs[i];
- if (config.getAttribute(IDebugUIConstants.ATTR_PRIVATE, false)) {
- continue;
- }
- filteredConfigs.add(config);
- }
- return filteredConfigs.toArray();
- } catch (CoreException e) {
- DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Error_19"), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.An_exception_occurred_while_retrieving_launch_configurations_20"), e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- } else {
- return getLaunchManager().getLaunchConfigurationTypes();
- }
- return EMPTY_ARRAY;
- }
-
- /**
- * @see ITreeContentProvider#getParent(Object)
- */
- public Object getParent(Object element) {
- if (element instanceof ILaunchConfiguration) {
- if (!((ILaunchConfiguration)element).exists()) {
- return null;
- }
- try {
- return ((ILaunchConfiguration)element).getType();
- } catch (CoreException e) {
- DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Error_19"), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.An_exception_occurred_while_retrieving_launch_configurations_20"), e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- } else if (element instanceof ILaunchConfigurationType) {
- return ResourcesPlugin.getWorkspace().getRoot();
- }
- return null;
- }
-
- /**
- * @see ITreeContentProvider#hasChildren(Object)
- */
- public boolean hasChildren(Object element) {
- if (element instanceof ILaunchConfiguration) {
- return false;
- } else {
- return getChildren(element).length > 0;
- }
- }
-
- /**
- * Return only the launch configuration types that support the current mode AND
- * are marked as 'public'.
- *
- * @see IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object inputElement) {
- ILaunchConfigurationType[] allTypes = getLaunchManager().getLaunchConfigurationTypes();
- ArrayList list = new ArrayList(allTypes.length);
- String mode = getMode();
- for (int i = 0; i < allTypes.length; i++) {
- ILaunchConfigurationType configType = allTypes[i];
- if (configType.supportsMode(mode) && configType.isPublic()) {
- list.add(configType);
- }
- }
- return list.toArray();
- }
-
- /**
- * @see IContentProvider#dispose()
- */
- public void dispose() {
- }
-
- /**
- * @see IContentProvider#inputChanged(Viewer, Object, Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- }
-
- /**
- * Returns the launch manager.
- *
- * @return the launch manager
- */
- protected ILaunchManager getLaunchManager() {
- return DebugPlugin.getDefault().getLaunchManager();
- }
-
- /**
- * Returns whether this dialog is currently open
- */
- protected boolean isVisible() {
- return getTreeViewer() != null;
- }
-
- /**
- * Notification that selection has changed in the launch configuration tree.
- * <p>
- * If the currently displayed configuration is not saved,
- * prompt for saving before moving on to the new selection.
- * </p>
- *
- * @param event selection changed event
- */
- public void selectionChanged(SelectionChangedEvent event) {
-
- // Ignore selectionChange events that occur while saving
- if (ignoreSelectionChanges()) {
- return;
- }
-
- // Get the new selection
- IStructuredSelection selection = (IStructuredSelection)event.getSelection();
- if (selection.isEmpty()) {
- getEditArea().setVisible(false);
- setWorkingCopy(null);
- setSelectedTreeObject(null);
- setDefaultMessage();
- updateButtons();
- return;
- }
-
- // Get details of the new selection
- Object firstSelectedElement = selection.getFirstElement();
- boolean singleSelection = selection.size() == 1;
- boolean configSelected = firstSelectedElement instanceof ILaunchConfiguration;
-
- // If selection is the same, don't bother
- Object lastSelectedTreeObj = getSelectedTreeObject();
- if (singleSelection && (lastSelectedTreeObj != null) && lastSelectedTreeObj.equals(firstSelectedElement)) {
- getEditArea().setVisible(lastSelectedTreeObj instanceof ILaunchConfiguration);
- return;
- }
-
- // Take care of any unsaved changes. If the user aborts, reset selection
- // to whatever it was previously selected
- boolean canReplaceConfig = canDiscardCurrentConfig();
- if (!canReplaceConfig) {
- StructuredSelection prevSelection;
- if (lastSelectedTreeObj == null) {
- prevSelection = StructuredSelection.EMPTY;
- } else {
- prevSelection = new StructuredSelection(lastSelectedTreeObj);
- }
- setTreeViewerSelection(prevSelection);
- return;
- }
-
- // If a config is selected, update the edit area for it, if a config type is
- // selected, clear the edit area
- if (singleSelection && configSelected) {
- ILaunchConfiguration config = (ILaunchConfiguration) firstSelectedElement;
- setLastSavedName(config.getName());
- setLaunchConfiguration(config, false);
- } else if (singleSelection && firstSelectedElement instanceof ILaunchConfigurationType) {
- if (canReplaceConfig) {
- clearLaunchConfiguration();
- getEditArea().setVisible(false);
- disposeExistingTabs();
- }
- } else {
- // multi-selection
- clearLaunchConfiguration();
- getEditArea().setVisible(false);
- }
-
- updateButtons();
- if (singleSelection) {
- setSelectedTreeObject(firstSelectedElement);
- } else {
- setSelectedTreeObject(null);
- }
- }
-
- protected void setProgressMonitorPart(ProgressMonitorPart part) {
- fProgressMonitorPart = part;
- }
-
- protected ProgressMonitorPart getProgressMonitorPart() {
- return fProgressMonitorPart;
- }
-
- protected void setProgressMonitorCancelButton(Button button) {
- fProgressMonitorCancelButton = button;
- }
-
- protected Button getProgressMonitorCancelButton() {
- return fProgressMonitorCancelButton;
- }
-
- /**
- * Sets the configuration to display/edit.
- * Updates the tab folder to contain the appropriate pages.
- * Sets all configuration-related state appropriately.
- *
- * @param config the launch configuration to display/edit
- * @param init whether to initialize the config with default values
- */
- protected void setLaunchConfiguration(ILaunchConfiguration config, boolean init) {
- try {
-
- // turn on initializing flag to ignore message updates
- setInitializingTabs(true);
-
- getEditArea().setVisible(true);
- showTabsForConfigType(config.getType());
-
- if (config.isWorkingCopy()) {
- setWorkingCopy((ILaunchConfigurationWorkingCopy)config);
- } else {
- setWorkingCopy(config.getWorkingCopy());
- }
- fUnderlyingConfig = getLaunchConfiguration().getOriginal();
-
- // update the name field before to avoid verify error
- getNameTextWidget().setText(config.getName());
-
- // Set the defaults for all tabs before any are initialized
- // so that every tab can see ALL the default values
- if (init) {
- getTabGroup().setDefaults(getLaunchConfiguration());
- }
-
- // update the tabs with the new working copy
- getTabGroup().initializeFrom(getLaunchConfiguration());
-
- // update the name field after in case client changed it
- getNameTextWidget().setText(config.getName());
-
- // turn off initializing flag to update message
- setInitializingTabs(false);
-
- refreshStatus();
-
- } catch (CoreException ce) {
- DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Error_19"), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Exception_occurred_setting_launch_configuration_24"), ce); //$NON-NLS-1$ //$NON-NLS-2$
- clearLaunchConfiguration();
- return;
- }
- }
-
- /**
- * Clears the configuration being shown/edited.
- * Resets all configuration-related state.
- */
- protected void clearLaunchConfiguration() {
- setWorkingCopy(null);
- fUnderlyingConfig = null;
- setLastSavedName(null);
- getNameTextWidget().setText(""); //$NON-NLS-1$
- refreshStatus();
- }
-
- /**
- * Populate the tabs in the configuration edit area to be appropriate to the current
- * launch configuration type.
- */
- protected void showTabsForConfigType(ILaunchConfigurationType configType) {
-
- // Don't do any work if the current tabs are for the current config type
- if (getTabType() != null && getTabType().equals(configType)) {
- return;
- }
-
- // Avoid flicker
- getEditArea().setVisible(false);
-
- // Dispose the current tabs
- disposeExistingTabs();
-
- // Build the new tabs
- ILaunchConfigurationTabGroup group = null;
- try {
- group = createGroup(configType);
- } catch (CoreException ce) {
- DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Error_19"), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Exception_occurred_creating_launch_configuration_tabs_27"),ce); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
-
- // Create the Control for each tab, and determine the maximum tab dimensions
- PixelConverter pixelConverter = new PixelConverter(getTabFolder());
- int runningTabWidth = 0;
- ILaunchConfigurationTab[] tabs = group.getTabs();
- Point contentSize = new Point(0, 0);
- for (int i = 0; i < tabs.length; i++) {
- TabItem tab = new TabItem(getTabFolder(), SWT.NONE);
- String name = tabs[i].getName();
- if (name == null) {
- name = LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.unspecified_28"); //$NON-NLS-1$
- }
- tab.setText(name);
- Image image = tabs[i].getImage();
- tab.setImage(image);
- runningTabWidth += pixelConverter.convertWidthInCharsToPixels(name.length() + 5);
- if (image != null) {
- runningTabWidth += image.getBounds().width;
- }
- tabs[i].createControl(tab.getParent());
- Control control = tabs[i].getControl();
- if (control != null) {
- tab.setControl(control);
- Point size = control.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- if (size.x > contentSize.x) {
- contentSize.x = size.x;
- }
- if (size.y > contentSize.y) {
- contentSize.y = size.y;
- }
- }
- }
-
- // Determine if more space is needed to show all tab labels across the top of the
- // tab folder. If so, only increase size of dialog to some percent of the available
- // screen real estate.
- if (runningTabWidth > contentSize.x) {
- int maxAllowedWidth = (int) (getDisplay().getBounds().width * MAX_DIALOG_WIDTH_PERCENT);
- int otherWidth = getSashForm().SASH_WIDTH + getSelectionArea().getBounds().width;
- int totalWidth = runningTabWidth + otherWidth;
- if (totalWidth > maxAllowedWidth) {
- contentSize.x = maxAllowedWidth - otherWidth;
- } else {
- contentSize.x = runningTabWidth;
- }
- }
-
- // Adjust the maximum tab dimensions to account for the extra space required for the tab labels
- Rectangle tabFolderBoundingBox = getTabFolder().computeTrim(0, 0, contentSize.x, contentSize.y);
- contentSize.x = tabFolderBoundingBox.width;
- contentSize.y = tabFolderBoundingBox.height;
-
- // Force recalculation of sizes
- getTabFolder().layout(true);
-
- // Calculate difference between required space for tab folder and current size,
- // then increase size of this dialog's Shell by that amount
- Rectangle rect = fTabComposite.getClientArea();
- Point containerSize= new Point(rect.width, rect.height);
- int hdiff= contentSize.x - containerSize.x;
- int vdiff= contentSize.y - containerSize.y;
- // Only increase size of dialog, never shrink it
- if (hdiff > 0 || vdiff > 0) {
- int[] newSashWeights = null;
- if (hdiff > 0) {
- newSashWeights = calculateNewSashWeights(hdiff);
- }
- hdiff= Math.max(0, hdiff);
- vdiff= Math.max(0, vdiff);
- Shell shell= getShell();
- Point shellSize= shell.getSize();
- setShellSize(shellSize.x + hdiff, shellSize.y + vdiff);
- // Adjust the sash weights so that all of the increase in width
- // is given to the tab area
- if (newSashWeights != null) {
- getSashForm().setWeights(newSashWeights);
- }
- }
-
- setTabGroup(group);
- setTabType(configType);
- getEditArea().setVisible(true);
- }
-
- /**
- * Calculate & return a 2 element integer array that specifies the relative
- * weights of the selection area and the edit area, based on the specified
- * increase in width of the owning shell. The point of this method is calculate
- * sash weights such that when the shell gets wider, all of the increase in width
- * is given to the edit area (tab folder), and the selection area (tree) stays
- * the same width.
- */
- protected int[] calculateNewSashWeights(int widthIncrease) {
- int[] newWeights = new int[2];
- newWeights[0] = getSelectionArea().getBounds().width;
- newWeights[1] = getEditArea().getBounds().width + widthIncrease;
- return newWeights;
- }
-
- /**
- * Increase the size of this dialog's <code>Shell</code> by the specified amounts.
- * Do not increase the size of the Shell beyond the bounds of the Display.
- */
- private void setShellSize(int width, int height) {
- Rectangle bounds = getShell().getDisplay().getBounds();
- getShell().setSize(Math.min(width, bounds.width), Math.min(height, bounds.height));
- }
-
- protected void disposeExistingTabs() {
- setDisposingTabs(true);
- TabItem[] oldTabs = getTabFolder().getItems();
- for (int i = 0; i < oldTabs.length; i++) {
- oldTabs[i].dispose();
- }
- if (getTabGroup() != null) {
- getTabGroup().dispose();
- }
- setTabGroup(null);
- setTabType(null);
- setDisposingTabs(false);
- }
-
- /**
- * Sets the current launch configuration that is being
- * displayed/edited.
- */
- protected void setWorkingCopy(ILaunchConfigurationWorkingCopy workingCopy) {
- fWorkingCopy = workingCopy;
- }
-
- protected boolean isWorkingCopyDirty() {
- ILaunchConfigurationWorkingCopy workingCopy = getLaunchConfiguration();
- if (workingCopy == null) {
- return false;
- }
-
- // Working copy hasn't been saved
- if (workingCopy.getOriginal() == null) {
- return true;
- }
-
- // Name has changed. Normally, this would be caught in the 'contentsEqual'
- // check below, however there are some circumstances where this fails, such as
- // when the name is invalid
- if (isNameDirty()) {
- return true;
- }
-
- updateWorkingCopyFromPages();
- ILaunchConfiguration original = workingCopy.getOriginal();
- return !original.contentsEqual(workingCopy);
- }
-
- /**
- * Return <code>true</code> if the name has been modified since the last time it was saved.
- */
- protected boolean isNameDirty() {
- String currentName = getNameTextWidget().getText().trim();
- return !currentName.equals(getLastSavedName());
- }
-
- protected void setContext(Object context) {
- fContext = context;
- }
-
- protected Object getContext() {
- return fContext;
- }
-
- protected void setMode(String mode) {
- fMode = mode;
- }
-
- /**
- * @see ILaunchConfigurationDialog#getMode()
- */
- public String getMode() {
- return fMode;
- }
-
- /**
- * Sets the text widget used to display the name
- * of the configuration being displayed/edited
- *
- * @param widget the text widget used to display the name
- * of the configuration being displayed/edited
- */
- private void setNameTextWidget(Text widget) {
- fNameText = widget;
- }
-
- /**
- * Returns the text widget used to display the name
- * of the configuration being displayed/edited
- *
- * @return the text widget used to display the name
- * of the configuration being displayed/edited
- */
- protected Text getNameTextWidget() {
- return fNameText;
- }
-
- /**
- * Sets the 'apply' button.
- *
- * @param button the 'apply' button.
- */
- private void setApplyButton(Button button) {
- fApplyButton = button;
- }
-
- /**
- * Returns the 'apply' button
- *
- * @return the 'apply' button
- */
- protected Button getApplyButton() {
- return fApplyButton;
- }
-
- /**
- * Sets the 'revert' button.
- *
- * @param button the 'revert' button.
- */
- private void setRevertButton(Button button) {
- fRevertButton = button;
- }
-
- /**
- * Returns the 'revert' button
- *
- * @return the 'revert' button
- */
- protected Button getRevertButton() {
- return fRevertButton;
- }
-
- private void setDisposingTabs(boolean disposing) {
- fDisposingTabs = disposing;
- }
-
- private boolean isDisposingTabs() {
- return fDisposingTabs;
- }
-
- /**
- * Sets the tab folder
- *
- * @param folder the tab folder
- */
- private void setTabFolder(TabFolder folder) {
- fTabFolder = folder;
- }
-
- /**
- * Returns the tab folder
- *
- * @return the tab folder
- */
- protected TabFolder getTabFolder() {
- return fTabFolder;
- }
-
- /**
- * Sets the current tab group being displayed
- *
- * @param group the current tab group being displayed
- */
- private void setTabGroup(ILaunchConfigurationTabGroup group) {
- fTabGroup = group;
- }
-
- /**
- * Returns the current tab group
- *
- * @return the current tab group, or <code>null</code> if none
- */
- public ILaunchConfigurationTabGroup getTabGroup() {
- return fTabGroup;
- }
-
- /**
- * @see ILaunchConfigurationDialog#getTabs()
- */
- public ILaunchConfigurationTab[] getTabs() {
- if (getTabGroup() == null) {
- return null;
- } else {
- return getTabGroup().getTabs();
- }
- }
-
- /**
- * @see ILaunchConfigurationListener#launchConfigurationAdded(ILaunchConfiguration)
- */
- public void launchConfigurationAdded(ILaunchConfiguration configuration) {
- setIgnoreSelectionChanges(true);
- try {
- setWorkingCopy(configuration.getWorkingCopy());
- fUnderlyingConfig = configuration;
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- }
- getTreeViewer().refresh();
- updateButtons();
- setIgnoreSelectionChanges(false);
- }
-
- /**
- * @see ILaunchConfigurationListener#launchConfigurationChanged(ILaunchConfiguration)
- */
- public void launchConfigurationChanged(ILaunchConfiguration configuration) {
- }
-
- /**
- * @see ILaunchConfigurationListener#launchConfigurationRemoved(ILaunchConfiguration)
- */
- public void launchConfigurationRemoved(ILaunchConfiguration configuration) {
- getTreeViewer().remove(configuration);
- }
-
- protected void setIgnoreSelectionChanges(boolean ignore) {
- fIgnoreSelectionChanges = ignore;
- }
-
- protected boolean ignoreSelectionChanges() {
- return fIgnoreSelectionChanges;
- }
-
- /**
- * Return whether the current configuration can be discarded. This involves determining
- * if it is dirty, and if it is, asking the user what to do.
- */
- protected boolean canDiscardCurrentConfig() {
- // If there is no working copy, there's no problem, return true
- ILaunchConfigurationWorkingCopy workingCopy = getLaunchConfiguration();
- if (workingCopy == null) {
- return true;
- }
-
- if (isWorkingCopyDirty()) {
- return showUnsavedChangesDialog();
- } else {
- return true;
- }
- }
-
- /**
- * Show the user a dialog appropriate to whether the unsaved changes in the current config
- * can be saved or not. Return <code>true</code> if the user indicated that they wish to replace
- * the current config, either by saving changes or by discarding the, return <code>false</code>
- * otherwise.
- */
- protected boolean showUnsavedChangesDialog() {
- if (canSaveConfig()) {
- return showSaveChangesDialog();
- } else {
- return showDiscardChangesDialog();
- }
- }
-
- /**
- * Create and return a dialog that asks the user whether they want to save
- * unsaved changes. Return <code>true </code> if they chose to save changes,
- * <code>false</code> otherwise.
- */
- protected boolean showSaveChangesDialog() {
- StringBuffer buffer = new StringBuffer(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.The_configuration___29")); //$NON-NLS-1$
- buffer.append(getLaunchConfiguration().getName());
- buffer.append(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.__has_unsaved_changes.__Do_you_wish_to_save_them__30")); //$NON-NLS-1$
- MessageDialog dialog = new MessageDialog(getShell(),
- LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Save_changes__31"), //$NON-NLS-1$
- null,
- buffer.toString(),
- MessageDialog.QUESTION,
- new String[] {LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Yes_32"), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.No_33"), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Cancel_34")}, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- 0);
- // If user clicked 'Cancel' or closed dialog, return false
- int selectedButton = dialog.open();
- if ((selectedButton < 0) || (selectedButton == 2)) {
- return false;
- }
-
- // If they hit 'Yes', save the working copy
- if (selectedButton == 0) {
- saveConfig();
- }
-
- return true;
- }
-
- /**
- * Create and return a dialog that asks the user whether they want to discard
- * unsaved changes. Return <code>true</code> if they chose to discard changes,
- * <code>false</code> otherwise.
- */
- protected boolean showDiscardChangesDialog() {
- StringBuffer buffer = new StringBuffer(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.The_configuration___35")); //$NON-NLS-1$
- buffer.append(getNameTextWidget().getText());
- buffer.append(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.__has_unsaved_changes_that_CANNOT_be_saved_because_of_the_following_error_36")); //$NON-NLS-1$
- buffer.append(fCantSaveErrorMessage);
- buffer.append(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Do_you_wish_to_discard_changes_37")); //$NON-NLS-1$
- MessageDialog dialog = new MessageDialog(getShell(),
- LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Discard_changes__38"), //$NON-NLS-1$
- null,
- buffer.toString(),
- MessageDialog.QUESTION,
- new String[] {LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Yes_32"), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.No_33")}, //$NON-NLS-1$ //$NON-NLS-2$
- 1);
- // If user clicked 'Yes', return true
- int selectedButton = dialog.open();
- if (selectedButton == 0) {
- return true;
- }
- return false;
- }
-
- /**
- * Return <code>true</code> if the current configuration can be saved, <code>false</code>
- * otherwise. Note this is NOT the same thing as the config simply being valid. It is
- * possible to save a config that does not validate. This method determines whether the
- * config can be saved without causing a serious error. For example, a shared config that
- * has no specified location would cause this method to return <code>false</code>.
- */
- protected boolean canSaveConfig() {
-
- fCantSaveErrorMessage = null;
-
- // First make sure that name doesn't prevent saving the config
- try {
- verifyName();
- } catch (CoreException ce) {
- fCantSaveErrorMessage = ce.getStatus().getMessage();
- return false;
- }
-
- // Next, make sure none of the tabs object to saving the config
- ILaunchConfigurationTab[] tabs = getTabs();
- if (tabs == null) {
- fCantSaveErrorMessage = LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.No_tabs_found_41"); //$NON-NLS-1$
- return false;
- }
- for (int i = 0; i < tabs.length; i++) {
- if (!tabs[i].canSave()) {
- fCantSaveErrorMessage = tabs[i].getErrorMessage();
- return false;
- }
- }
- return true;
- }
-
- /**
- * Notification the 'New' action has been activated.
- */
- protected void handleNewAction() {
-
- // Take care of any unsaved changes
- if (!canDiscardCurrentConfig()) {
- return;
- }
-
- // The 'New' action should only be enabled if a single config type is selected
- Object selectedElement = getTreeViewerFirstSelectedElement();
- if (!(selectedElement instanceof ILaunchConfigurationType)) {
- return;
- }
-
- // Construct a new config of the selected type and select the result in the tree
- ILaunchConfigurationType configType = (ILaunchConfigurationType) selectedElement;
- constructNewConfig(configType);
- getTreeViewer().setSelection(new StructuredSelection(fUnderlyingConfig));
- }
-
- /**
- * Notification the 'Duplicate' action has been activated.
- */
- protected void handleDuplicateAction() {
-
- // Take care of any unsaved changes
- if (!canDiscardCurrentConfig()) {
- return;
- }
-
- // The 'Duplicate' action should only be enabled if a single config is selected
- Object selectedElement = getTreeViewerFirstSelectedElement();
- if (!(selectedElement instanceof ILaunchConfiguration)) {
- return;
- }
-
- // Duplicate the selected config and select the dupe in the tree
- ILaunchConfiguration copyFromConfig = (ILaunchConfiguration) selectedElement;
- String newName = getLaunchManager().generateUniqueLaunchConfigurationNameFrom(copyFromConfig.getName());
- try {
- ILaunchConfigurationWorkingCopy newWorkingCopy = copyFromConfig.copy(newName);
- setLaunchConfiguration(newWorkingCopy, false);
- doSave();
- getTreeViewer().setSelection(new StructuredSelection(fUnderlyingConfig));
- } catch (CoreException ce) {
- DebugUIPlugin.log(ce);
- }
- }
-
- /**
- * Create a new configuration of the specified type and select it in the tree.
- */
- protected void doHandleNewConfiguration(ILaunchConfigurationType configType) {
- constructNewConfig(configType);
- getTreeViewer().setSelection(new StructuredSelection(fUnderlyingConfig));
- }
-
- /**
- * Make a copy of the specified configuration and select it in the tree.
- */
- protected void doHandleCopyConfiguration(ILaunchConfiguration copyFromConfig) {
- String newName = getLaunchManager().generateUniqueLaunchConfigurationNameFrom(copyFromConfig.getName());
- try {
- ILaunchConfigurationWorkingCopy newWorkingCopy = copyFromConfig.copy(newName);
- setLaunchConfiguration(newWorkingCopy, false);
- doSave();
- getTreeViewer().setSelection(new StructuredSelection(fUnderlyingConfig));
- } catch (CoreException ce) {
- DebugUIPlugin.log(ce);
- }
- }
-
- /**
- * If a config type is selected, create a new config of that type initialized to
- * fWorkbenchSelection. If a config is selected, create of new config of the
- * same type as the selected config.
- * protected void constructNewConfig() {
- */
- protected void constructNewConfig(ILaunchConfigurationType configType) {
- try {
- ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(DEFAULT_NEW_CONFIG_NAME));
- setLastSavedName(null);
- setLaunchConfiguration(wc, true);
- doSave();
- } catch (CoreException ce) {
- DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Error_19"), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Exception_creating_new_launch_configuration_45"), ce); //$NON-NLS-1$ //$NON-NLS-2$
- clearLaunchConfiguration();
- return;
- }
- }
-
- /**
- * Notification the 'Delete' action has been activated
- */
- protected void handleDeleteAction() {
- IStructuredSelection selection = getTreeViewerSelection();
-
- // The 'Delete' button is disabled if the selection contains anything other than configurations (no types)
- ILaunchConfiguration firstSelectedConfig = (ILaunchConfiguration) selection.getFirstElement();
- ILaunchConfigurationType firstSelectedConfigType = null;
- try {
- firstSelectedConfigType = firstSelectedConfig.getType();
- } catch (CoreException ce) {
- DebugUIPlugin.log(ce);
- }
-
- // Initialize data used to set the selection after deletion
- int typeIndex= -1; // The index of the deleted configuration's type
- int configIndex= -1; // The index of the deleted configuration
- TreeItem[] items= getTreeViewer().getTree().getItems();
- TreeItem typeItem;
- for (int i= 0, numTypes= items.length; i < numTypes; i++) {
- typeItem= items[i];
- if (typeItem.getData() == firstSelectedConfigType) {
- typeIndex= i;
- TreeItem[] configs= typeItem.getItems();
- for (int j= 0, numConfigs= configs.length; j < numConfigs; j++) {
- if (configs[j].getData() == firstSelectedConfig) {
- configIndex= j;
- break;
- }
- }
- }
-
- }
-
- // Make the user confirm the deletion
- String dialogMessage = selection.size() > 1 ? LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Do_you_wish_to_delete_the_selected_launch_configurations__1") : LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Do_you_wish_to_delete_the_selected_launch_configuration__2"); //$NON-NLS-1$ //$NON-NLS-2$
- boolean ok = MessageDialog.openQuestion(this.getShell(), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Confirm_Launch_Configuration_Deletion_3"), dialogMessage); //$NON-NLS-1$
- if (!ok) {
- return;
- }
-
-
- Iterator iterator = selection.iterator();
- while (iterator.hasNext()) {
- clearLaunchConfiguration();
- Object selectedElement = iterator.next();
- if (selectedElement instanceof ILaunchConfiguration) {
- try {
- ((ILaunchConfiguration)selectedElement).delete();
- } catch (CoreException ce) {
- DebugUIPlugin.log(ce);
- }
- }
- }
-
- IStructuredSelection newSelection= null;
- if (typeIndex != -1 && configIndex != -1) {
- // Reset selection to the next config
- TreeItem[] configItems= getTreeViewer().getTree().getItems()[typeIndex].getItems();
- int numItems= configItems.length;
- if (numItems > configIndex) { // Select the item at the same index as the deleted
- newSelection= new StructuredSelection(configItems[configIndex].getData());
- } else if (numItems > 0) { // Deleted the last item(s). Select the last item
- newSelection= new StructuredSelection(configItems[numItems - 1].getData());
- }
- }
- if (newSelection == null) {
- // Reset selection to the config type of the first selected configuration
- newSelection = new StructuredSelection(firstSelectedConfigType);
- }
- getTreeViewer().setSelection(newSelection);
- }
-
- /**
- * Notification the 'Close' button has been pressed.
- */
- protected void handleClosePressed() {
- if (canDiscardCurrentConfig()) {
- disposeExistingTabs();
- cancelPressed();
- }
- }
-
- /**
- * Notification that the 'Apply' button has been pressed
- */
- protected void handleApplyPressed() {
- saveConfig();
- getTreeViewer().setSelection(new StructuredSelection(fUnderlyingConfig));
- }
-
- /**
- * Notification that the 'Revert' button has been pressed
- */
- protected void handleRevertPressed() {
- setLaunchConfiguration(getLaunchConfiguration().getOriginal(), false);
- }
-
- protected void saveConfig() {
- try {
- // trim name
- Text widget = getNameTextWidget();
- widget.setText(widget.getText().trim());
- doSave();
- } catch (CoreException e) {
- DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Launch_Configuration_Error_46"), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Exception_occurred_while_saving_launch_configuration_47"), e); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
-
- updateButtons();
- }
-
- /**
- * Notification that a tab has been selected
- *
- * Disallow tab changing when the current tab is invalid.
- * Update the config from the tab being left, and refresh
- * the tab being entered.
- */
- protected void handleTabSelected() {
- if (isDisposingTabs()) {
- return;
- }
- ILaunchConfigurationTab[] tabs = getTabs();
- if (fCurrentTabIndex == getTabFolder().getSelectionIndex() || tabs == null || tabs.length == 0 || fCurrentTabIndex > (tabs.length - 1)) {
- return;
- }
- if (fCurrentTabIndex != -1) {
- ILaunchConfigurationTab tab = tabs[fCurrentTabIndex];
- ILaunchConfigurationWorkingCopy wc = getLaunchConfiguration();
- if (wc != null) {
- // apply changes when leaving a tab
- tab.performApply(getLaunchConfiguration());
- // re-initialize a tab when entering it
- getActiveTab().initializeFrom(wc);
- }
- }
- fCurrentTabIndex = getTabFolder().getSelectionIndex();
- refreshStatus();
- }
-
- /**
- * Iterate over the pages to update the working copy
- */
- protected void updateWorkingCopyFromPages() {
- ILaunchConfigurationWorkingCopy workingCopy = getLaunchConfiguration();
- if (getTabGroup() != null) {
- getTabGroup().performApply(workingCopy);
- }
- }
-
- /**
- * Do the save
- */
- protected void doSave() throws CoreException {
- ILaunchConfigurationWorkingCopy workingCopy = getLaunchConfiguration();
- updateWorkingCopyFromPages();
- if (isWorkingCopyDirty()) {
- fUnderlyingConfig = workingCopy.doSave();
- setWorkingCopy(fUnderlyingConfig.getWorkingCopy());
- setLastSavedName(fUnderlyingConfig.getName());
- }
- }
-
- /**
- * Notification the 'launch' button has been pressed.
- * Save and launch.
- */
- protected void handleLaunchPressed() {
- int result = CANCEL;
- try {
- doSave();
- result = doLaunch(getLaunchConfiguration());
- } catch (CoreException e) {
- DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Launch_Configuration_Error_6"), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Exception_occurred_while_launching_configuration._See_log_for_more_information_49"), e); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- if (result == OK) {
- if (fUnderlyingConfig != null) {
- try {
- getPreferenceStore().setValue(IDebugPreferenceConstants.PREF_LAST_LAUNCH_CONFIGURATION_SELECTION, fUnderlyingConfig.getMemento());
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- }
- }
- disposeExistingTabs();
- close();
- } else {
- getShell().setFocus();
- }
- }
-
- /**
- * Save the working copy if necessary, then launch the underlying configuration.
- *
- * @return one of CANCEL or OK
- */
- protected int doLaunch(ILaunchConfiguration config) throws CoreException {
-
- if (!DebugUITools.saveAndBuildBeforeLaunch()) {
- return CANCEL;
- }
-
- // If the configuration is a working copy and is dirty or doesn't yet exist, save it
- if (config instanceof ILaunchConfigurationWorkingCopy) {
- ILaunchConfigurationWorkingCopy workingCopy = (ILaunchConfigurationWorkingCopy) config;
- if (isWorkingCopyDirty() || !workingCopy.exists()) {
- fUnderlyingConfig = workingCopy.doSave();
- }
- }
-
- // liftoff
- ILaunch launch = launchWithProgress();
-
- // If the launch was cancelled, get out. Otherwise, notify the tabs of the successful launch.
- if (cancelButtonPressed()) {
- launch.terminate();
- return CANCEL;
- } else if (launch != null) {
- ILaunchConfigurationTabGroup group = getTabGroup();
- boolean disposeTabs = false;
- if (group == null) {
- // when launching without realizing this dialog, the tabs
- // may not exist - create and then dispose so we can notify them of a launch
- disposeTabs = true;
- group = createGroup(config.getType());
- }
- group.launched(launch);
- if (disposeTabs) {
- group.dispose();
- }
- }
-
- return OK;
- }
-
- /**
- * @return the resulting launch, or <code>null</code> if cancelled.
- * @exception CoreException if an exception occurrs launching
- */
- private ILaunch launchWithProgress() throws CoreException {
- final ILaunch[] launchResult = new ILaunch[1];
- // Do the launch
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- try {
- launchResult[0] = fUnderlyingConfig.launch(getMode(), monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- };
- try {
- run(true, true, runnable);
- } catch (InterruptedException e) {
- return null;
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof CoreException) {
- throw (CoreException)t;
- } else {
- IStatus status = new Status(IStatus.ERROR, IDebugUIConstants.PLUGIN_ID, DebugException.INTERNAL_ERROR, LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Exception_occurred_while_launching_50"), t); //$NON-NLS-1$
- throw new CoreException(status);
- }
- } finally {
- //remove any "error" launch
- ILaunchManager manager= DebugPlugin.getDefault().getLaunchManager();
- ILaunch[] launches= manager.getLaunches();
+package org.eclipse.debug.internal.ui.launchConfigurations;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+
+import java.lang.reflect.InvocationTargetException;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationListener;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
+import org.eclipse.debug.internal.ui.PixelConverter;
+import org.eclipse.debug.internal.ui.SWTUtil;
+import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.dialogs.ControlEnableState;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.operation.ModalContext;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.wizard.ProgressMonitorPart;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.help.WorkbenchHelp;
+import org.eclipse.ui.model.WorkbenchViewerSorter;
+
+/**
+ * The dialog used to edit and launch launch configurations.
+ */
+public class LaunchConfigurationDialog extends TitleAreaDialog
+ implements ISelectionChangedListener,
+ ILaunchConfigurationListener,
+ ILaunchConfigurationDialog,
+ IDoubleClickListener {
+
+ /**
+ * The tree of launch configurations
+ */
+ private TreeViewer fConfigTree;
+
+ /**
+ * The workbench context present when this dialog is opened.
+ */
+ private Object fContext;
+
+ /**
+ * The IResource corresponding to <code>fContext</code>.
+ */
+ private IResource fResourceContext;
+
+ /**
+ * The mode (run or debug) for this dialog.
+ */
+ private String fMode;
+
+ /**
+ * The Composite used to insert an adjustable 'sash' between the tree and the tabs.
+ */
+ private SashForm fSashForm;
+
+ /**
+ * Default weights for the SashForm that specify how wide the selection and
+ * edit areas aree relative to each other.
+ */
+ private static final int[] DEFAULT_SASH_WEIGHTS = new int[] {11, 30};
+
+ /**
+ * The launch configuration selection area.
+ */
+ private Composite fSelectionArea;
+
+ /**
+ * The launch configuration edit area.
+ */
+ private Composite fEditArea;
+
+ /**
+ * The 'New configuration' action.
+ */
+ private ButtonAction fButtonActionNew;
+
+ /**
+ * The 'Duplicate configuration' action.
+ */
+ private ButtonAction fButtonActionDuplicate;
+
+ /**
+ * The 'Delete configuration' action.
+ */
+ private ButtonAction fButtonActionDelete;
+
+ /**
+ * The 'apply' button
+ */
+ private Button fApplyButton;
+
+ /**
+ * The 'revert' button
+ */
+ private Button fRevertButton;
+
+ /**
+ * The 'cancel' button that appears when the in-dialog progress monitor is shown.
+ */
+ private Button fProgressMonitorCancelButton;
+
+ /**
+ * Flag indicating if the progress monitor part's Cancel button has been pressed.
+ */
+ private boolean fCancelButtonPressed;
+
+ /**
+ * The text widget displaying the name of the
+ * launch configuration under edit
+ */
+ private Text fNameText;
+
+ private String fLastSavedName = null;
+
+ /**
+ * Container for the edit area <code>TabFolder</code>
+ */
+ private Composite fTabComposite;
+
+ /**
+ * The tab folder that contains tabs for the selected configuration
+ */
+ private TabFolder fTabFolder;
+
+ /**
+ * Flag that indicates when the tabs are being disposed.
+ */
+ private boolean fDisposingTabs = false;
+
+ /**
+ * The current (working copy) launch configuration
+ * being displayed/edited or <code>null</code> if
+ * none
+ */
+ private ILaunchConfigurationWorkingCopy fWorkingCopy;
+
+ /**
+ * The actual (non-working copy) launch configuration that underlies the current working copy
+ */
+ private ILaunchConfiguration fUnderlyingConfig;
+
+ /**
+ * Clients of this dialog may set an 'initial configuration type', which means that when
+ * the dialog is opened, a configuration of that type will be created, initialized, and
+ * saved. Note that the initial config type is ignored if single-click launching is enabled.
+ */
+ private ILaunchConfigurationType fInitialConfigType;
+
+ /**
+ * When this dialog is opened in <code>LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION</code>
+ * mode, this specifies the selection that is initially shown in the dialog.
+ */
+ private IStructuredSelection fInitialSelection;
+
+ /**
+ * The current tab group being displayed
+ */
+ private ILaunchConfigurationTabGroup fTabGroup;
+
+ /**
+ * The type of config tabs are currently displayed
+ * for
+ */
+ private ILaunchConfigurationType fTabType;
+
+ /**
+ * The index of the currently selected tab
+ */
+ private int fCurrentTabIndex;
+
+ private ProgressMonitorPart fProgressMonitorPart;
+ private Cursor waitCursor;
+ private Cursor arrowCursor;
+ private MessageDialog fWindowClosingDialog;
+
+ /**
+ * Whether initlialing tabs
+ */
+ private boolean fInitializingTabs = false;
+
+ /**
+ * Indicates if selection changes in the tree should be ignored
+ */
+ private boolean fIgnoreSelectionChanges = false;
+
+ /**
+ * Previously selected element in the tree
+ */
+ private Object fSelectedTreeObject;
+
+ /**
+ * The number of 'long-running' operations currently taking place in this dialog
+ */
+ private long fActiveRunningOperations = 0;
+
+ /**
+ * Id for 'Launch' button.
+ */
+ protected static final int ID_LAUNCH_BUTTON = IDialogConstants.CLIENT_ID + 1;
+
+ /**
+ * Id for 'Close' button.
+ */
+ protected static final int ID_CLOSE_BUTTON = IDialogConstants.CLIENT_ID + 2;
+
+ /**
+ * Id for 'Cancel' button.
+ */
+ protected static final int ID_CANCEL_BUTTON = IDialogConstants.CLIENT_ID + 3;
+
+ /**
+ * Constrant String used as key for setting and retrieving current Control with focus
+ */
+ private static final String FOCUS_CONTROL = "focusControl";//$NON-NLS-1$
+
+ /**
+ * The height in pixels of this dialog's progress indicator
+ */
+ private static int PROGRESS_INDICATOR_HEIGHT = 18;
+
+ /**
+ * Constant specifying how wide this dialog is allowed to get (as a percentage of
+ * total available screen width) as a result of tab labels in the edit area.
+ */
+ private static final float MAX_DIALOG_WIDTH_PERCENT = 0.75f;
+
+ /**
+ * Empty array
+ */
+ protected static final Object[] EMPTY_ARRAY = new Object[0];
+
+ protected static final String DEFAULT_NEW_CONFIG_NAME = LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.New_configuration_1"); //$NON-NLS-1$
+
+ /**
+ * Size of this dialog if there is no preference specifying a size.
+ */
+ protected static final Point DEFAULT_INITIAL_DIALOG_SIZE = new Point(620, 560);
+
+ /**
+ * Status area messages
+ */
+ protected static final String LAUNCH_STATUS_OK_MESSAGE = LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Ready_to_launch_2"); //$NON-NLS-1$
+ protected static final String LAUNCH_STATUS_STARTING_FROM_SCRATCH_MESSAGE
+ = LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Select_a_configuration_to_launch_or_a_config_type_to_create_a_new_configuration_3"); //$NON-NLS-1$
+
+ private String fCantSaveErrorMessage;
+
+ /**
+ * Constant specifying that the launch configuration dialog should not actually open,
+ * but instead should attempt to re-launch the last configuration that was sucessfully
+ * launched in the workspace. If there is no last launched configuration, just open the dialog.
+ */
+ public static final int LAUNCH_CONFIGURATION_DIALOG_LAUNCH_LAST = 0;
+
+ /**
+ * Constant specifying that this dialog should be opened with a new configuration of a type
+ * specified via <code>setInitialConfigType()</code> selected.
+ */
+ public static final int LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_NEW_CONFIG_OF_TYPE = 1;
+
+ /**
+ * Constant specifying that this dialog should be opened with the last configuration launched
+ * in the workspace selected.
+ */
+ public static final int LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_LAST_LAUNCHED = 2;
+
+ /**
+ * Constant specifying that this dialog should be opened with the value specified via
+ * <code>setInitialSelection()</code> selected.
+ */
+ public static final int LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION = 3;
+
+ /**
+ * Specifies how this dialog behaves when opened. Value is one of the
+ * 'LAUNCH_CONFIGURATION_DIALOG' constants defined in this class.
+ */
+ private int fOpenMode = LAUNCH_CONFIGURATION_DIALOG_LAUNCH_LAST;
+
+ /**
+ * Constructs a new launch configuration dialog on the given
+ * parent shell.
+ *
+ * @param shell the parent shell
+ * @param selection the selection used to initialize this dialog, typically the
+ * current workbench selection
+ * @param mode one of <code>ILaunchManager.RUN_MODE</code> or
+ * <code>ILaunchManager.DEBUG_MODE</code>
+ */
+ public LaunchConfigurationDialog(Shell shell, IStructuredSelection selection, String mode) {
+ super(shell);
+ setShellStyle(getShellStyle() | SWT.RESIZE);
+ setContext(resolveContext(selection));
+ setMode(mode);
+ }
+
+ /**
+ * Set the flag indicating how this dialog behaves when the <code>open()</code> method is called.
+ * Valid values are defined by the LAUNCH_CONFIGURATION_DIALOG... constants in this class.
+ */
+ public void setOpenMode(int mode) {
+ fOpenMode = mode;
+ }
+
+ protected int getOpenMode() {
+ return fOpenMode;
+ }
+
+ /**
+ * Returns the Object to be used as context for this dialog, derived from the specified selection.
+ * If the specified selection has as its first element an IFile whose extension matches
+ * <code>ILaunchConfiguration.LAUNCH_CONFIGURATION_FILE_EXTENSION</code>, then return
+ * the launch configuration declared in the IFile. Otherwise, return the first element
+ * in the specified selection.
+ */
+ protected Object resolveContext(IStructuredSelection selection) {
+
+ // Empty selection means no context
+ if ((selection == null) || (selection.isEmpty())) {
+ return null;
+ }
+
+ // If first element is a launch config file, create a launch configuration from it
+ // and make this the context, otherwise just return the first element
+ Object firstSelected = selection.getFirstElement();
+ if (firstSelected instanceof IFile) {
+ IFile file = (IFile) firstSelected;
+ if (ILaunchConfiguration.LAUNCH_CONFIGURATION_FILE_EXTENSION.equals(file.getFileExtension())) {
+ return getLaunchManager().getLaunchConfiguration(file);
+ }
+ }
+ return firstSelected;
+ }
+
+ /**
+ * A launch configuration dialog overrides this method
+ * to create a custom set of buttons in the button bar.
+ * This dialog has 'Launch' and 'Cancel'
+ * buttons.
+ *
+ * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(Composite)
+ */
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, ID_LAUNCH_BUTTON, getLaunchButtonText(), true);
+ createButton(parent, ID_CLOSE_BUTTON, LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Close_1"), false); //$NON-NLS-1$
+ }
+
+ /**
+ * Handle the 'save and launch' & 'launch' buttons here, all others are handled
+ * in <code>Dialog</code>
+ *
+ * @see Dialog#buttonPressed(int)
+ */
+ protected void buttonPressed(int buttonId) {
+ if (buttonId == ID_LAUNCH_BUTTON) {
+ handleLaunchPressed();
+ } else if (buttonId == ID_CLOSE_BUTTON) {
+ handleClosePressed();
+ } else {
+ super.buttonPressed(buttonId);
+ }
+ }
+
+ /**
+ * Returns the appropriate text for the launch button - run or debug.
+ */
+ protected String getLaunchButtonText() {
+ if (getMode() == ILaunchManager.DEBUG_MODE) {
+ return LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Deb&ug_4"); //$NON-NLS-1$
+ } else {
+ return LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.R&un_5"); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @see Dialog#createContents(Composite)
+ */
+ protected Control createContents(Composite parent) {
+ Control contents = super.createContents(parent);
+ initializeBounds();
+ initializeSashForm();
+ createContextMenu(getTreeViewer().getControl());
+ getLaunchManager().addLaunchConfigurationListener(this);
+ ensureSelectionAreaWidth();
+ doInitialTreeSelection();
+ return contents;
+ }
+
+ /**
+ * Initialize the relative weights (widths) of the 2 sides of the sash.
+ */
+ protected void initializeSashForm() {
+ int[] sashWeights = DEFAULT_SASH_WEIGHTS;
+ String sashWeightString = getPreferenceStore().getString(IDebugPreferenceConstants.PREF_LAUNCH_CONFIGURATION_DIALOG_SASH_WEIGHTS);
+ if (sashWeightString.length() > 0) {
+ Point sashWeightPoint = parseCoordinates(sashWeightString);
+ if (sashWeightPoint != null) {
+ sashWeights[0] = sashWeightPoint.x;
+ sashWeights[1] = sashWeightPoint.y;
+ }
+ }
+ getSashForm().setWeights(sashWeights);
+ }
+
+ /**
+ * Check if the selection area is currently wide enough so that both the 'New' &
+ * 'Delete' buttons are shown without truncation. If so, do nothing. Otherwise,
+ * increase the width of this dialog's Shell just enough so that both buttons
+ * are shown cleanly.
+ */
+ protected void ensureSelectionAreaWidth() {
+ Button newButton = getButtonActionNew().getButton();
+ Button deleteButton = getButtonActionDelete().getButton();
+ int requiredWidth = newButton.getBounds().width + deleteButton.getBounds().width;
+ int marginWidth = ((GridLayout)getSelectionArea().getLayout()).marginWidth;
+ int horizontalSpacing = ((GridLayout)getSelectionArea().getLayout()).horizontalSpacing;
+ requiredWidth += (2 * marginWidth) + horizontalSpacing;
+ int currentWidth = getSelectionArea().getBounds().width;
+
+ if (requiredWidth > currentWidth) {
+ int[] newSashWeights = new int[2];
+ newSashWeights[0] = requiredWidth;
+ newSashWeights[1] = getEditArea().getBounds().width;
+ Shell shell= getShell();
+ Point shellSize= shell.getSize();
+ setShellSize(shellSize.x + (requiredWidth - currentWidth), shellSize.y);
+ getSashForm().setWeights(newSashWeights);
+ }
+ }
+
+ /**
+ * Creates a pop-up menu on the specified control.
+ */
+ protected void createContextMenu(Control menuControl) {
+ MenuManager menuMgr= new MenuManager("#PopUp"); //$NON-NLS-1$
+ menuMgr.setRemoveAllWhenShown(true);
+ menuMgr.addMenuListener(new IMenuListener() {
+ public void menuAboutToShow(IMenuManager mgr) {
+ fillContextMenu(mgr);
+ }
+ });
+ Menu menu= menuMgr.createContextMenu(menuControl);
+ menuControl.setMenu(menu);
+ }
+
+ /**
+ * Fill the specified context menu with the basic launch configuration
+ * management actions - New, Duplicate & Delete.
+ */
+ protected void fillContextMenu(IMenuManager menu) {
+ if (getButtonActionNew().isEnabled()) {
+ menu.add(getButtonActionNew());
+ }
+ if (getButtonActionDuplicate().isEnabled()) {
+ menu.add(getButtonActionDuplicate());
+ }
+ if (getButtonActionDelete().isEnabled()) {
+ menu.add(getButtonActionDelete());
+ }
+ }
+
+ /**
+ * Set the initial selection in the tree.
+ */
+ protected void doInitialTreeSelection() {
+ getTreeViewer().setSelection(getInitialSelection());
+ }
+
+ /**
+ * Write out this dialog's Shell size, location & sash weights to the preference store.
+ */
+ protected void persistShellGeometry() {
+ Point shellLocation = getShell().getLocation();
+ Point shellSize = getShell().getSize();
+ int[] sashWeights = getSashForm().getWeights();
+ String locationString = serializeCoords(shellLocation);
+ String sizeString = serializeCoords(shellSize);
+ String sashWeightString = serializeCoords(new Point(sashWeights[0], sashWeights[1]));
+ getPreferenceStore().setValue(IDebugPreferenceConstants.PREF_LAUNCH_CONFIGURATION_DIALOG_LOCATION, locationString);
+ getPreferenceStore().setValue(IDebugPreferenceConstants.PREF_LAUNCH_CONFIGURATION_DIALOG_SIZE, sizeString);
+ getPreferenceStore().setValue(IDebugPreferenceConstants.PREF_LAUNCH_CONFIGURATION_DIALOG_SASH_WEIGHTS, sashWeightString);
+ }
+
+ /**
+ * @see Window#close()
+ */
+ public boolean close() {
+ getLaunchManager().removeLaunchConfigurationListener(this);
+ persistShellGeometry();
+ return super.close();
+ }
+
+ /**
+ * Determine the first configuration for this dialog. If single-click launching is
+ * enabled, launch the configuration WITHOUT realizing the dialog. If single-click
+ * launching was successful, this method returns
+ * <code>ILaunchConfigurationDialog.SINGLE_CLICK_LAUNCHED</code>. Otherwise, open the
+ * dialog in the specified mode.
+ *
+ * @see Window#open()
+ */
+ public int open() {
+ int mode = getOpenMode();
+ if (mode == LAUNCH_CONFIGURATION_DIALOG_LAUNCH_LAST) {
+ return doLastLaunchedConfig(true);
+ } else if (mode == LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_LAST_LAUNCHED) {
+ return doLastLaunchedConfig(false);
+ } else if (mode == LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_NEW_CONFIG_OF_TYPE) {
+ return openDialogOnNewConfigOfSpecifiedType();
+ } else if (mode == LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION) {
+ return openDialogOnSelection();
+ }
+ return super.open();
+ }
+
+ /**
+ * Retrieve the last launched configuration in the workspace. If <code>launch</code>
+ * is <code>true</code>, launch this configuration without showing the dialog, otherwise
+ * just set the initial selection in the dialog to the last launched configuration.
+ */
+ protected int doLastLaunchedConfig(boolean launch) {
+ ILaunchConfiguration lastLaunchedConfig = getLastLaunchedWorkbenchConfiguration();
+ if (launch) {
+ try {
+ if (lastLaunchedConfig != null) {
+ if (lastLaunchedConfig.supportsMode(getMode())) {
+ fUnderlyingConfig = lastLaunchedConfig;
+ doLaunch(lastLaunchedConfig);
+ } else {
+ // If we're trying to launch, but the last launched config doesn't
+ // support the current mode of the dialog, show an error dialog
+ String configName = lastLaunchedConfig.getName();
+ String title = LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Cannot_relaunch_1"); //$NON-NLS-1$
+ String message = MessageFormat.format(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Cannot_relaunch_[{1}]_because_it_does_not_support_{2}_mode_2"), new String[] {configName, getMode()}); //$NON-NLS-1$
+ MessageDialog.openError(getShell(), title, message);
+ }
+ return ILaunchConfigurationDialog.LAUNCHED_BEFORE_OPENING;
+ }
+ } catch(CoreException e) {
+ DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Launch_Configuration_Error_6"), LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Exception_occurred_processing_launch_configuration._See_log_for_more_information_7"), e); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ if (lastLaunchedConfig != null) {
+ setInitialSelection(new StructuredSelection(lastLaunchedConfig));
+ }
+ return super.open();
+ }
+
+ /**
+ * Realize this dialog so that a new configuration of the type that was specified via
+ * <code>setInitialConfigType()</code> is selected.
+ */
+ protected int openDialogOnNewConfigOfSpecifiedType() {
+ ILaunchConfigurationType configType = getInitialConfigType();
+ ILaunchConfiguration config = null;
+ if (configType != null) {
+ config = createConfigOfType(configType);
+ }
+ if (config != null) {
+ setInitialSelection(new StructuredSelection(config));
+ }
+ return super.open();
+ }
+
+ /**
+ * Open this dialog with the selection set to the value specified by
+ * <code>setInitialSelection()</code>.
+ */
+ protected int openDialogOnSelection() {
+ // Nothing special is required, the dialog will open and whatever was specified
+ // via setInitialSelection() will be selected in the tree
+ return super.open();
+ }
+
+ /**
+ * Return the last launched configuration in the workspace.
+ */
+ protected ILaunchConfiguration getLastLaunchedWorkbenchConfiguration() {
+ LaunchConfigurationHistoryElement historyElement = DebugUIPlugin.getLaunchConfigurationManager().getLastLaunch();
+ if (historyElement != null) {
+ return historyElement.getLaunchConfiguration();
+ }
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(Composite)
+ */
+ protected Control createDialogArea(Composite parent) {
+ GridData gd;
+ Composite dialogComp = (Composite)super.createDialogArea(parent);
+ Composite topComp = new Composite(dialogComp, SWT.NONE);
+ gd = new GridData(GridData.FILL_BOTH);
+ topComp.setLayoutData(gd);
+ GridLayout topLayout = new GridLayout();
+ topLayout.numColumns = 2;
+ topLayout.marginHeight = 5;
+ topLayout.marginWidth = 0;
+ topComp.setLayout(topLayout);
+
+ // Set the things that TitleAreaDialog takes care of
+ setTitle(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Create,_manage,_and_run_launch_configurations_8")); //$NON-NLS-1$
+ setMessage(LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Ready_to_launch_2")); //$NON-NLS-1$
+ setModeLabelState();
+
+ // Create the SashForm that contains the selection area on the left,
+ // and the edit area on the right
+ setSashForm(new SashForm(topComp, SWT.NONE));
+ getSashForm().setOrientation(SWT.HORIZONTAL);
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.horizontalSpan = 2;
+ getSashForm().setLayoutData(gd);
+
+ // Build the launch configuration selection area and put it into the composite.
+ Composite launchConfigSelectionArea = createLaunchConfigurationSelectionArea(getSashForm());
+ gd = new GridData(GridData.FILL_VERTICAL);
+ launchConfigSelectionArea.setLayoutData(gd);
+
+ // Build the launch configuration edit area and put it into the composite.
+ Composite editAreaComp = createLaunchConfigurationEditArea(getSashForm());
+ gd = new GridData(GridData.FILL_BOTH);
+ editAreaComp.setLayoutData(gd);
+
+ // Build the separator line that demarcates the button bar
+ Label separator = new Label(topComp, SWT.HORIZONTAL | SWT.SEPARATOR);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ separator.setLayoutData(gd);
+
+ dialogComp.layout(true);
+
+ return dialogComp;
+ }
+
+ /**
+ * Create and return a launch configuration of the specified type.
+ * This method is intended to be called before the UI has been realized, such as in
+ * the case of single-click launching or creating a config for an initial configuration
+ * type.
+ */
+ protected ILaunchConfiguration createConfigOfType(ILaunchConfigurationType configType) {
+ ILaunchConfigurationWorkingCopy workingCopy = null;
+ try {
+ workingCopy = configType.newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(DEFAULT_NEW_CONFIG_NAME));
+ } catch (CoreException ce) {
+ DebugUIPlugin.log(ce);
+ return null;
+ }
+
+ ILaunchConfiguration config = null;
+ try {
+ ILaunchConfigurationTabGroup group= createGroup(configType);
+ group.setDefaults(workingCopy);
+ group.dispose();
+
+ // Assign a name to the config if it doesn't already have one
+ if (workingCopy.getName().trim().length() == 0) {
+ IResource res = getResourceContext();
+ String name = ""; //$NON-NLS-1$
+ if (res != null) {
+ name = res.getName();
+ }
+ name = generateName(name);
+ workingCopy.rename(name);
+ }
+
+ config = workingCopy.doSave();
+ } catch (CoreException e) {
+ DebugUIPlugin.log(e);
+ return null;
+ }
+
+ return config;
+ }
+
+ /**
+ * Returns tab group for the given type of launch configuration.
+ * Tabs are initialized to be contained in this dialog.
+ *
+ * @exception CoreException if unable to instantiate a tab group
+ */
+ protected ILaunchConfigurationTabGroup createGroup(final ILaunchConfigurationType configType) throws CoreException {
+ // Use a final Object array to store the tab group and any exception that
+ // results from the Runnable
+ final Object[] finalArray = new Object[2];
+ Runnable runnable = new Runnable() {
+ public void run() {
+ ILaunchConfigurationTabGroup tabGroup = null;
+ try {
+ tabGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(configType);
+ finalArray[0] = tabGroup;
+ } catch (CoreException ce) {
+ finalArray[1] = ce;
+ return;
+ }
+ tabGroup.createTabs(LaunchConfigurationDialog.this, getMode());
+ ILaunchConfigurationTab[] tabs = tabGroup.getTabs();
+ for (int i = 0; i < tabs.length; i++) {
+ tabs[i].setLaunchConfigurationDialog(LaunchConfigurationDialog.this);
+ }
+ }
+ };
+
+ // Creating the tabs can result in plugin loading, so we show the busy cursor
+ BusyIndicator.showWhile(getDisplay(), runnable);
+
+ // Re-throw any CoreException if there was one
+ if (finalArray[1] != null) {
+ throw (CoreException)finalArray[1];
+ }
+
+ // Otherwise return the tab group
+ return (ILaunchConfigurationTabGroup)finalArray[0];
+ }
+
+ /**
+ * Returns the selected IResource context from the workbench,
+ * or <code>null</code> if there was no context in the workbench.
+ */
+ protected IResource getResourceContext() {
+ if (fResourceContext == null) {
+ Object workbenchSelection = getContext();
+ if (workbenchSelection instanceof IResource) {
+ fResourceContext = (IResource)workbenchSelection;
+ } else if (workbenchSelection instanceof IAdaptable) {
+ fResourceContext = (IResource) ((IAdaptable)workbenchSelection).getAdapter(IResource.class);
+ }
+ }
+ return fResourceContext;
+ }
+
+ /**
+ * Set the title area image based on the mode this dialog was initialized with
+ */
+ protected void setModeLabelState() {
+ Image image;
+ if (getMode().equals(ILaunchManager.DEBUG_MODE)) {
+ image = DebugUITools.getImage(IDebugUIConstants.IMG_WIZBAN_DEBUG);
+ } else {
+ image = DebugUITools.getImage(IDebugUIConstants.IMG_WIZBAN_RUN);
+ }
+ setTitleImage(image);
+ }
+
+ /**
+ * Convenience method to set the selection on the configuration tree.
+ */
+ protected void setTreeViewerSelection(ISelection selection) {
+ getTreeViewer().setSelection(selection);
+ }
+
+ private void setLastSavedName(String lastSavedName) {
+ this.fLastSavedName = lastSavedName;
+ }
+
+ private String getLastSavedName() {
+ return fLastSavedName;
+ }
+
+ /**
+ * Update buttons and message.
+ */
+ protected void refreshStatus() {
+ updateButtons();
+ updateMessage();
+ }
+
+ /**
+ * Verify the attributes common to all launch configuration.
+ * Indicate failure by throwing a <code>CoreException</code>.
+ */
+ protected void verifyStandardAttributes() throws CoreException {
+ verifyName();
+ }
+
+ /**
+ * Verify that the launch configuration name is valid.
+ */
+ protected void verifyName() throws CoreException {
+ String currentName = getNameTextWidget().getText().trim();
+
+ // If there is no name, complain
+ if (currentName.length() < 1) {
+ throw new CoreException(new Status(IStatus.ERROR,
+ DebugUIPlugin.getUniqueIdentifier(),
+ 0,
+ LaunchConfigurationsMessages.getString("LaunchConfigurationDialog.Name_required_for_launch_configuration_11"), //$NON-NLS-1$
+ null));
+ }
+
+ // If the name hasn't changed from the last saved name, do nothing
+ if (currentName.equals(getLastSavedName())) {
+ return;
+ }
+
+ // See if name contains any 'illegal' characters
+ IStatus status = ResourcesPlugin.getWorkspace().validateName(currentName, IResource.FILE);
+ if (status.getCode() != IStatus.OK) {
+ throw new CoreException(new Status(IStatus.ERROR,
+ DebugUIPlugin.getDefault().getDescriptor().getUniqueIdentifier(),
+ 0,
+ status.getMessage(),
+ null));
+ }
+
+ // Otherwise, if there's already a config with the same name, complain
+ if (getLaunchManager().isExistingLaunchConfigurationName(currentName)) {
+ throw new CoreException(new Status(IStatus.ERROR,
+ DebugUIPlugin.getDefault().getDescriptor().getUniqueIdentifier(),
+ 0,
+ LaunchConfigurationsMes