Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.debug.ui/.classpath1
-rw-r--r--org.eclipse.debug.ui/.project1
-rw-r--r--org.eclipse.debug.ui/icons/full/clcl16/clear_co.gifbin162 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/clcl16/pin.gifbin219 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/cview16/console_view.gifbin166 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/dlcl16/clear_co.gifbin91 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/dlcl16/pin.gifbin89 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/elcl16/clear_co.gifbin122 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/elcl16/pin.gifbin159 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/eview16/console_view.gifbin163 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/plugin.properties2
-rw-r--r--org.eclipse.debug.ui/plugin.xml20
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspectiveFactory.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java7
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java23
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java15
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ClearOutputAction.java59
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CopyVariablesToClipboardActionDelegate.java24
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TextViewerAction.java62
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TextViewerGotoLineAction.java113
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/AbstractConsole.java220
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleDropDownAction.java125
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleManager.java166
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleMessages.java36
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleMessages.properties23
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleView.java342
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleWorkbenchPart.java124
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/IConsole.java81
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/IConsoleListener.java39
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/IConsoleManager.java61
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/IConsoleView.java59
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsole.java119
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsolePage.java342
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsolePartition.java108
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsolePartitioner.java225
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsoleStream.java86
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsoleViewer.java153
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/PinConsoleAction.java58
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ShowConsoleAction.java50
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/BreakPartition.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleDocumentManager.java18
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleDocumentPartitioner.java27
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleDocumentProvider.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleViewer.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsolePage.java35
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/ConsoleColorProvider.java18
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/FileLink.java15
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleColorProvider.java4
54 files changed, 111 insertions, 2802 deletions
diff --git a/org.eclipse.debug.ui/.classpath b/org.eclipse.debug.ui/.classpath
index a443939bc..096d2c430 100644
--- a/org.eclipse.debug.ui/.classpath
+++ b/org.eclipse.debug.ui/.classpath
@@ -9,5 +9,6 @@
<classpathentry kind="src" path="/org.eclipse.core.boot"/>
<classpathentry kind="var" path="JRE_LIB" sourcepath="JRE_SRC"/>
<classpathentry kind="src" path="/org.eclipse.help"/>
+ <classpathentry kind="src" path="/org.eclipse.ui.console"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.debug.ui/.project b/org.eclipse.debug.ui/.project
index 8e9b07f54..fb9a16982 100644
--- a/org.eclipse.debug.ui/.project
+++ b/org.eclipse.debug.ui/.project
@@ -10,6 +10,7 @@
<project>org.eclipse.debug.core</project>
<project>org.eclipse.help</project>
<project>org.eclipse.ui</project>
+ <project>org.eclipse.ui.console</project>
</projects>
<buildSpec>
<buildCommand>
diff --git a/org.eclipse.debug.ui/icons/full/clcl16/clear_co.gif b/org.eclipse.debug.ui/icons/full/clcl16/clear_co.gif
deleted file mode 100644
index 255832653..000000000
--- a/org.eclipse.debug.ui/icons/full/clcl16/clear_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/clcl16/pin.gif b/org.eclipse.debug.ui/icons/full/clcl16/pin.gif
deleted file mode 100644
index 9997124ca..000000000
--- a/org.eclipse.debug.ui/icons/full/clcl16/pin.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/cview16/console_view.gif b/org.eclipse.debug.ui/icons/full/cview16/console_view.gif
deleted file mode 100644
index e6d5b138d..000000000
--- a/org.eclipse.debug.ui/icons/full/cview16/console_view.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/clear_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/clear_co.gif
deleted file mode 100644
index d873c49b8..000000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/clear_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/pin.gif b/org.eclipse.debug.ui/icons/full/dlcl16/pin.gif
deleted file mode 100644
index e2e1b463d..000000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/pin.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/clear_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/clear_co.gif
deleted file mode 100644
index 6faf8d66f..000000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/clear_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/pin.gif b/org.eclipse.debug.ui/icons/full/elcl16/pin.gif
deleted file mode 100644
index 9d247759c..000000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/pin.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/eview16/console_view.gif b/org.eclipse.debug.ui/icons/full/eview16/console_view.gif
deleted file mode 100644
index f60aba167..000000000
--- a/org.eclipse.debug.ui/icons/full/eview16/console_view.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/plugin.properties b/org.eclipse.debug.ui/plugin.properties
index 9120345c1..417b2f6fe 100644
--- a/org.eclipse.debug.ui/plugin.properties
+++ b/org.eclipse.debug.ui/plugin.properties
@@ -18,7 +18,7 @@ ConsoleFontDefinition.description= The debug console text font is used by the de
ConsoleFontDefinition.label= Debug Console Text Font
ConsoleLineTrackersExtensionName= Console Line Trackers
ConsolePreferencePage.name=Console
-ConsoleView.name=Console
+
CopyToClipboardAction.label=&Copy Stack
CopyVariablesToClipboardAction.label=Copy &Variables
DebugActionGroupsExtensionName= Debug Action Groups
diff --git a/org.eclipse.debug.ui/plugin.xml b/org.eclipse.debug.ui/plugin.xml
index f2b0dca8c..359a6a73a 100644
--- a/org.eclipse.debug.ui/plugin.xml
+++ b/org.eclipse.debug.ui/plugin.xml
@@ -16,6 +16,7 @@
<import plugin="org.apache.xerces"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.ui.console"/>
<import plugin="org.eclipse.help"/>
<import plugin="org.eclipse.debug.core"/>
</requires>
@@ -77,13 +78,6 @@
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.console.ConsoleView"
- id="org.eclipse.debug.ui.ConsoleView">
- </view>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
@@ -1005,8 +999,8 @@
</viewerContribution>
<!-- Contributions to Console View popup menu -->
<viewerContribution
- targetID="org.eclipse.debug.ui.ConsoleView"
- id="org.eclipse.debug.ui.consoleview.popupMenu">
+ targetID="org.eclipse.ui.console.ConsoleView"
+ id="org.eclipse.ui.console.ConsoleView.popupMenu">
<action
label="%TerminateAction.label"
icon="icons/full/clcl16/terminate_co.gif"
@@ -1102,14 +1096,6 @@
<extension
point="org.eclipse.ui.fontDefinitions">
<fontDefinition
- label="%ConsoleFontDefinition.label"
- defaultsTo="org.eclipse.jface.textfont"
- id="org.eclipse.debug.ui.ConsoleFont">
- <description>
- %ConsoleFontDefinition.description
- </description>
- </fontDefinition>
- <fontDefinition
label="%DetailPaneFontDefinition.label"
defaultsTo="org.eclipse.jface.textfont"
id="org.eclipse.debug.ui.DetailPaneFont">
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 8d945206d..90f671c90 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
@@ -15,6 +15,7 @@ import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
+import org.eclipse.ui.console.IConsoleConstants;
/**
* The debug perspective factory.
@@ -27,7 +28,7 @@ public class DebugPerspectiveFactory implements IPerspectiveFactory {
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(IConsoleConstants.ID_CONSOLE_VIEW);
consoleFolder.addView(IPageLayout.ID_TASK_LIST);
consoleFolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
consoleFolder.addPlaceholder(IPageLayout.ID_PROP_SHEET);
@@ -59,7 +60,7 @@ public class DebugPerspectiveFactory implements IPerspectiveFactory {
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(IConsoleConstants.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 3a6253012..ed2a2b228 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
@@ -87,14 +87,12 @@ public class DebugPluginImages {
declareRegistryImage(IDebugUIConstants.IMG_LCL_DETAIL_PANE_UNDER, LOCALTOOL + "det_pane_under.gif"); //$NON-NLS-1$
declareRegistryImage(IDebugUIConstants.IMG_LCL_DETAIL_PANE_RIGHT, LOCALTOOL + "det_pane_right.gif"); //$NON-NLS-1$
declareRegistryImage(IDebugUIConstants.IMG_LCL_DETAIL_PANE_HIDE, LOCALTOOL + "det_pane_hide.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_LCL_CLEAR, LOCALTOOL + "clear_co.gif"); //$NON-NLS-1$
declareRegistryImage(IDebugUIConstants.IMG_LCL_LOCK, LOCALTOOL + "lock_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$
declareRegistryImage(IDebugUIConstants.IMG_LCL_REMOVE_ALL, LOCALTOOL + "rem_all_co.gif"); //$NON-NLS-1$
declareRegistryImage(IDebugUIConstants.IMG_LCL_VARIABLES_CONTENT_PROVIDERS, LOCALTOOL + "var_cntnt_prvdr.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_LCL_COLLAPSE_ALL, LOCALTOOL + "collapseall.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_LCL_PIN, LOCALTOOL + "pin.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_LCL_TERMINATE, LOCALTOOL + "terminate_co.gif"); //$NON-NLS-1$
// disabled local toolbars
@@ -102,12 +100,10 @@ public class DebugPluginImages {
declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_UNDER, DLCL + "det_pane_under.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_RIGHT, DLCL + "det_pane_right.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_HIDE, DLCL + "det_pane_hide.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_CLEAR, DLCL + "clear_co.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_LOCK, DLCL + "lock_co.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_TYPE_NAMES, DLCL + "tnames_co.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_VARIABLES_CONTENT_PROVIDERS, DLCL + "var_cntnt_prvdr.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_COLLAPSE_ALL, DLCL + "collapseall.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_PIN, DLCL + "pin.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_TERMINATE, DLCL + "terminate_co.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_REMOVE_ALL, DLCL + "rem_all_co.gif"); //$NON-NLS-1$
@@ -116,12 +112,10 @@ public class DebugPluginImages {
declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_UNDER, ELCL + "det_pane_under.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_RIGHT, ELCL + "det_pane_right.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_HIDE, ELCL + "det_pane_hide.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_CLEAR, ELCL + "clear_co.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_LOCK, ELCL + "lock_co.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_TYPE_NAMES, ELCL + "tnames_co.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_VARIABLES_CONTENT_PROVIDERS, ELCL + "var_cntnt_prvdr.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_COLLAPSE_ALL, ELCL + "collapseall.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_PIN, ELCL + "pin.gif"); //$NON-NLS-1$
declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_TERMINATE, ELCL + "terminate_co.gif"); //$NON-NLS-1$
//Object
@@ -152,7 +146,6 @@ public class DebugPluginImages {
// 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$
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties
index 6a523c2b5..22b7a8cfe 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties
@@ -25,7 +25,7 @@ DefaultLabelProvider.12=\ (pending)
DefaultLabelProvider.13=\ <error(s)_during_the_evaluation>
DefaultLabelProvider.14=\ (obsolete)
DefaultLabelProvider.15=\ (disabled)
-DebugUIPlugin.13=Building before launching {0}
+
DebugUITools.3=Launching {0}
DebugUITools.Error_1=Error
DebugUITools.Exception_occurred_during_launch_2=Exception occurred during launch \ No newline at end of file
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 ef31b45b4..6fa2b5e6b 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
@@ -41,14 +41,11 @@ 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.console.ConsoleManager;
-import org.eclipse.debug.internal.ui.console.IConsoleManager;
import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
import org.eclipse.debug.internal.ui.launchConfigurations.PerspectiveManager;
import org.eclipse.debug.internal.ui.launchVariables.ContextVariableComponentManager;
import org.eclipse.debug.internal.ui.preferences.DebugActionGroupsManager;
import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
-import org.eclipse.debug.internal.ui.stringsubstitution.SelectedResourceManager;
import org.eclipse.debug.internal.ui.views.console.ConsoleDocumentManager;
import org.eclipse.debug.internal.ui.views.variables.ObjectBrowserManager;
import org.eclipse.debug.ui.IDebugModelPresentation;
@@ -111,11 +108,6 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener {
private ConsoleDocumentManager fConsoleDocumentManager = null;
/**
- * Singleton console manager
- */
- private IConsoleManager fConsoleManager = null;
-
- /**
* Perspective manager
*/
private PerspectiveManager fPerspectiveManager = null;
@@ -335,7 +327,7 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener {
public void run() {
//initialize the variable context manager
LaunchVariableContextManager.getDefault();
- SelectedResourceManager.getDefault();
+ //SelectedResourceManager.getDefault();
}
});
}
@@ -601,19 +593,6 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener {
}
/**
- * Returns the console manager. The manager will be created lazily on
- * the first access.
- *
- * @return IConsoleManager
- */
- public IConsoleManager getConsoleManager() {
- if (fConsoleManager == null) {
- fConsoleManager = new ConsoleManager();
- }
- return fConsoleManager;
- }
-
- /**
* Serializes a XML document into a string - encoded in UTF8 format,
* with platform line separators.
*
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 eaafe39b8..7800c5a76 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
@@ -27,7 +27,6 @@ public interface IDebugHelpContextIds {
// 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 CONSOLE_SCROLL_LOCK_ACTION = PREFIX + "console_scroll_lock_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$
@@ -48,7 +47,6 @@ public interface IDebugHelpContextIds {
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$
public static final String LAUNCH_CONFIGURATION_VIEW = PREFIX + "launch_configuration_view_context"; //$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 5b3173c22..1545ccb8d 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
@@ -28,11 +28,9 @@ public interface IInternalDebugUIConstants {
// tool images
public static final String IMG_LCL_COLLAPSE_ALL = "IMG_LCL_COLLAPSE_ALL"; //$NON-NLS-1$
- public static final String IMG_LCL_PIN = "IMG_LCL_PIN"; //$NON-NLS-1$
public static final String IMG_LCL_TERMINATE = "IMG_LCL_TERMINATE"; //$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_LOCK= "IMG_DLCL_LOCK"; //$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$
@@ -42,12 +40,10 @@ public interface IInternalDebugUIConstants {
public static final String IMG_DLCL_DETAIL_PANE_RIGHT= "IMG_DLCL_DETAIL_PANE_RIGHT"; //$NON-NLS-1$
public static final String IMG_DLCL_DETAIL_PANE_HIDE= "IMG_DLCL_DETAIL_PANE_HIDE"; //$NON-NLS-1$
public static final String IMG_DLCL_COLLAPSE_ALL = "IMG_DLCL_COLLAPSE_ALL"; //$NON-NLS-1$
- public static final String IMG_DLCL_PIN = "IMG_DLCL_PIN"; //$NON-NLS-1$
public static final String IMG_DLCL_TERMINATE = "IMG_DLCL_TERMINATE"; //$NON-NLS-1$
public static final String IMG_DLCL_REMOVE_ALL = "IMG_DLCL_REMOVE_ALL"; //$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_LOCK= "IMG_ELCL_LOCK"; //$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$
@@ -57,7 +53,6 @@ public interface IInternalDebugUIConstants {
public static final String IMG_ELCL_DETAIL_PANE_RIGHT= "IMG_ELCL_DETAIL_PANE_RIGHT"; //$NON-NLS-1$
public static final String IMG_ELCL_DETAIL_PANE_HIDE= "IMG_ELCL_DETAIL_PANE_HIDE"; //$NON-NLS-1$
public static final String IMG_ELCL_COLLAPSE_ALL = "IMG_ELCL_COLLAPSE_ALL"; //$NON-NLS-1$
- public static final String IMG_ELCL_PIN = "IMG_ELCL_PIN"; //$NON-NLS-1$
public static final String IMG_ELCL_TERMINATE = "IMG_ELCL_TERMINATE"; //$NON-NLS-1$
// object images
@@ -84,18 +79,10 @@ public interface IInternalDebugUIConstants {
public static final String ID_SOURCE_NOT_FOUND_EDITOR = "org.eclipse.debug.ui.NoSourceFoundEditor"; //$NON-NLS-1$
/**
- * The name of the font to use for the Console.
- * Since 2.1 this font is managed via the workbench font preference page
- * and is no longer stored as a debug preference.
- */
- public static final String CONSOLE_FONT= "org.eclipse.debug.ui.ConsoleFont"; //$NON-NLS-1$
-
- /**
* The name of the font to use for detail panes. This font is managed via
* the workbench font preference page.
*
* @since 2.1
*/
- public static final String DETAIL_PANE_FONT= "org.eclipse.debug.ui.DetailPaneFont"; //$NON-NLS-1$
-
+ public static final String DETAIL_PANE_FONT= "org.eclipse.debug.ui.DetailPaneFont"; //$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 fd35d23e3..32bfaf850 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
@@ -14,9 +14,6 @@ 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
-
CollapseAllAction.0=Collapse All
CopyToClipboardActionDelegate.Problem_Copying_to_Clipboard_1=Problem Copying to Clipboard
@@ -87,13 +84,6 @@ TerminateAndRemoveActionDelegate.Exceptions_occurred_attempting_to_terminate_and
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
-
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
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
deleted file mode 100644
index 9b5d1a4e0..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ClearOutputAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-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.action.Action;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Clears the output of the selected launches
- */
-public class ClearOutputAction extends Action {
-
- private ITextViewer fViewer;
-
- public ClearOutputAction(ITextViewer viewer) {
- super(ActionMessages.getString("ClearOutputAction.title")); //$NON-NLS-1$
- fViewer= 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() {
- BusyIndicator.showWhile(DebugUIPlugin.getStandardDisplay(), new Runnable() {
- public void run() {
- IDocument document = fViewer.getDocument();
- if (document != null) {
- document.set(""); //$NON-NLS-1$
- }
- fViewer.setSelectedRange(0, 0);
- }
- });
- }
-}
-
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 a22bbaeb7..f263cbe5a 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
@@ -11,8 +11,13 @@
package org.eclipse.debug.internal.ui.actions;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
import org.eclipse.debug.core.model.IDebugElement;
import org.eclipse.debug.ui.IDebugView;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
/**
@@ -21,6 +26,25 @@ import org.eclipse.jface.viewers.TreeViewer;
*/
public class CopyVariablesToClipboardActionDelegate extends CopyToClipboardActionDelegate {
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.actions.CopyToClipboardActionDelegate#pruneSelection()
+ */
+ 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();
+ }
+
/**
* Only append children that are visible in the tree viewer
*/
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
deleted file mode 100644
index 3c72643cd..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TextViewerAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-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
deleted file mode 100644
index 39130f361..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/TextViewerGotoLineAction.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import java.text.MessageFormat;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-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.jface.window.Window;
-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(ITextViewer 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() == Window.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/console/AbstractConsole.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/AbstractConsole.java
deleted file mode 100644
index d540ada80..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/AbstractConsole.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.ListenerList;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-
-/**
- * Common function for consoles.
- * <p>
- * Clients implementing consoles should subclass this class.
- * </p>
- * @since 3.0
- */
-public abstract class AbstractConsole implements IConsole {
-
- // property listeners
- private ListenerList fListeners;
-
- /**
- * Console name
- */
- private String fName = null;
-
- /**
- * Console image descriptor
- */
- private ImageDescriptor fImageDescriptor = null;
-
- /**
- * Used to notify this console of lifecycle methods <code>init()</code>
- * and <code>dispose()</code>.
- */
- class Lifecycle implements IConsoleListener {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsoleListener#consolesAdded(org.eclipse.debug.internal.ui.console.IConsole[])
- */
- public void consolesAdded(IConsole[] consoles) {
- for (int i = 0; i < consoles.length; i++) {
- IConsole console = consoles[i];
- if (console == AbstractConsole.this) {
- init();
- }
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsoleListener#consolesRemoved(org.eclipse.debug.internal.ui.console.IConsole[])
- */
- public void consolesRemoved(IConsole[] consoles) {
- for (int i = 0; i < consoles.length; i++) {
- IConsole console = consoles[i];
- if (console == AbstractConsole.this) {
- DebugUIPlugin.getDefault().getConsoleManager().removeConsoleListener(this);
- dispose();
- }
- }
- }
- }
-
- /**
- * Notifies listeners of property changes, handling any exceptions
- */
- class PropertyNotifier implements ISafeRunnable {
-
- private IPropertyChangeListener fListener;
- private PropertyChangeEvent fEvent;
-
- /**
- * @see org.eclipse.core.runtime.ISafeRunnable#handleException(java.lang.Throwable)
- */
- public void handleException(Throwable exception) {
- IStatus status = new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, ConsoleMessages.getString("AbstractConsole.0"), exception); //$NON-NLS-1$
- DebugUIPlugin.log(status);
- }
-
- /**
- * @see org.eclipse.core.runtime.ISafeRunnable#run()
- */
- public void run() throws Exception {
- fListener.propertyChange(fEvent);
- }
-
- /**
- * Notifies listeners of the property change
- *
- * @param property the property that has changed
- */
- public void notify(PropertyChangeEvent event) {
- if (fListeners == null) {
- return;
- }
- fEvent = event;
- Object[] copiedListeners= fListeners.getListeners();
- for (int i= 0; i < copiedListeners.length; i++) {
- fListener = (IPropertyChangeListener)copiedListeners[i];
- Platform.run(this);
- }
- fListener = null;
- }
- }
-
- /**
- * Constructs a new console with the given name and image.
- *
- * @param name console name, cannot be <code>null</code>
- * @param imageDescriptor image descriptor, or <code>null</code> if none
- */
- public AbstractConsole(String name, ImageDescriptor imageDescriptor) {
- setName(name);
- setImageDescriptor(imageDescriptor);
- DebugUIPlugin.getDefault().getConsoleManager().addConsoleListener(new Lifecycle());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsole#getName()
- */
- public String getName() {
- return fName;
- }
-
- /**
- * Sets the name of this console to the specified value and notifies
- * property listeners of the change.
- *
- * @param name the new name
- */
- protected void setName(String name) {
- String old = fName;
- fName = name;
- firePropertyChange(this, IBasicPropertyConstants.P_TEXT, old, name);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsole#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- return fImageDescriptor;
- }
-
- /**
- * Sets the image descriptor for this console to the specified value and notifies
- * property listeners of the change.
- *
- * @param imageDescriptor the new image descriptor
- */
- protected void setImageDescriptor(ImageDescriptor imageDescriptor) {
- ImageDescriptor old = fImageDescriptor;
- fImageDescriptor =imageDescriptor;
- firePropertyChange(this, IBasicPropertyConstants.P_IMAGE, old, imageDescriptor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsole#addPropertyChangeListener(IPropertyChangeListener)
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- if (fListeners == null) {
- fListeners = new ListenerList();
- }
- fListeners.add(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsole#removePropertyChangeListener(IPropertyChangeListener)
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- if (fListeners != null) {
- fListeners.remove(listener);
- }
- }
-
- /**
- * Notify all listeners that the given property has changed.
- *
- * @param source the object on which a property has changed
- * @param property identifier of the property that has changed
- * @param oldValue the old value of the property, or <code>null</code>
- * @param newValue the new value of the property, or <code>null</code>
- */
- protected void firePropertyChange(Object source, String property, Object oldValue, Object newValue) {
- if (fListeners == null) {
- return;
- }
- PropertyNotifier notifier = new PropertyNotifier();
- notifier.notify(new PropertyChangeEvent(source, property, oldValue, newValue));
- }
-
- /**
- * Called when this console is added to the console manager. Default
- * implementation does nothing. Subclasses may override.
- */
- protected void init() {
- }
-
- /**
- * Called when this console is removed from the console manager. Default
- * implementation does nothing. Subclasses may override.
- */
- protected void dispose() {
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleDropDownAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleDropDownAction.java
deleted file mode 100644
index b296c7497..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleDropDownAction.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.ui.texteditor.IUpdate;
-
-/**
- * Drop down action in the console to select the console to display.
- */
-class ConsoleDropDownAction extends Action implements IMenuCreator, IConsoleListener, IUpdate {
-
- private IConsoleView fView;
- private Menu fMenu;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.IUpdate#update()
- */
- public void update() {
- IConsole[] consoles = DebugUIPlugin.getDefault().getConsoleManager().getConsoles();
- setEnabled(consoles.length > 1);
- }
-
- public ConsoleDropDownAction(IConsoleView view) {
- fView= view;
- setText(ConsoleMessages.getString("ConsoleDropDownAction.0")); //$NON-NLS-1$
- setToolTipText(ConsoleMessages.getString("ConsoleDropDownAction.1")); //$NON-NLS-1$
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_VIEW_CONSOLE));
- setMenuCreator(this);
- DebugUIPlugin.getDefault().getConsoleManager().addConsoleListener(this);
- update();
- }
-
- public void dispose() {
- if (fMenu != null)
- fMenu.dispose();
-
- fView= null;
- DebugUIPlugin.getDefault().getConsoleManager().removeConsoleListener(this);
- }
-
- public Menu getMenu(Menu parent) {
- return null;
- }
-
- public Menu getMenu(Control parent) {
- if (fMenu != null)
- fMenu.dispose();
-
- fMenu= new Menu(parent);
- IConsole[] consoles= DebugUIPlugin.getDefault().getConsoleManager().getConsoles();
- IConsole current = fView.getConsole();
- for (int i = 0; i < consoles.length; i++) {
- IConsole console = consoles[i];
- Action action = new ShowConsoleAction(fView, console);
- action.setChecked(console.equals(current));
- addActionToMenu(fMenu, action);
- }
- return fMenu;
- }
-
- protected void addActionToMenu(Menu parent, Action action) {
- ActionContributionItem item= new ActionContributionItem(action);
- item.fill(parent, -1);
- }
-
- protected void addMenuSeparator() {
- new MenuItem(fMenu, SWT.SEPARATOR);
- }
-
- public void run() {
- // do nothing - this is a menu
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsoleListener#consolesAdded(org.eclipse.debug.internal.ui.console.IConsole[])
- */
- public void consolesAdded(IConsole[] consoles) {
- Display display = DebugUIPlugin.getStandardDisplay();
- display.asyncExec(new Runnable() {
- public void run() {
- update();
- }
- });
- }
-
- /* (non-Javadoc)
- *
- * Dispose the menu when a launch is removed, such that the actions in this
- * menu do not hang on to associated resources.
- *
- * @see org.eclipse.debug.internal.ui.console.IConsoleListener#consolesRemoved(org.eclipse.debug.internal.ui.console.IConsole[])
- */
- public void consolesRemoved(IConsole[] consoles) {
- Display display = DebugUIPlugin.getStandardDisplay();
- display.asyncExec(new Runnable() {
- public void run() {
- if (fMenu != null) {
- fMenu.dispose();
- }
- update();
- }
- });
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleManager.java
deleted file mode 100644
index 2c02fa024..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleManager.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.util.ListenerList;
-
-/**
- * The singleton console manager.
- *
- * @since 3.0
- */
-public class ConsoleManager implements IConsoleManager {
-
- /**
- * Console listeners
- */
- private ListenerList fListeners = null;
-
- /**
- * List of registered consoles
- */
- private List fConsoles = new ArrayList(10);
-
- // change notification constants
- private final static int ADDED = 1;
- private final static int REMOVED = 2;
-
- /**
- * Notifies a console listener of additions or removals
- */
- class ConsoleNotifier implements ISafeRunnable {
-
- private IConsoleListener fListener;
- private int fType;
- private IConsole[] fChanged;
-
- /**
- * @see org.eclipse.core.runtime.ISafeRunnable#handleException(java.lang.Throwable)
- */
- public void handleException(Throwable exception) {
- IStatus status = new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, ConsoleMessages.getString("ConsoleManager.0"), exception); //$NON-NLS-1$
- DebugUIPlugin.log(status);
- }
-
- /**
- * @see org.eclipse.core.runtime.ISafeRunnable#run()
- */
- public void run() throws Exception {
- switch (fType) {
- case ADDED:
- fListener.consolesAdded(fChanged);
- break;
- case REMOVED:
- fListener.consolesRemoved(fChanged);
- break;
- }
- }
-
- /**
- * Notifies the given listener of the adds/removes
- *
- * @param consoles the consoles that changed
- * @param update the type of change
- */
- public void notify(IConsole[] consoles, int update) {
- if (fListeners == null) {
- return;
- }
- fChanged = consoles;
- fType = update;
- Object[] copiedListeners= fListeners.getListeners();
- for (int i= 0; i < copiedListeners.length; i++) {
- fListener = (IConsoleListener)copiedListeners[i];
- Platform.run(this);
- }
- fChanged = null;
- fListener = null;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsoleManager#addConsoleListener(org.eclipse.debug.internal.ui.console.IConsoleListener)
- */
- public void addConsoleListener(IConsoleListener listener) {
- if (fListeners == null) {
- fListeners = new ListenerList(5);
- }
- fListeners.add(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsoleManager#removeConsoleListener(org.eclipse.debug.internal.ui.console.IConsoleListener)
- */
- public void removeConsoleListener(IConsoleListener listener) {
- if (fListeners != null) {
- fListeners.remove(listener);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsoleManager#addConsoles(org.eclipse.debug.internal.ui.console.IConsole[])
- */
- public synchronized void addConsoles(IConsole[] consoles) {
- List added = new ArrayList(consoles.length);
- for (int i = 0; i < consoles.length; i++) {
- IConsole console = consoles[i];
- if (!fConsoles.contains(console)) {
- fConsoles.add(console);
- added.add(console);
- }
- }
- if (!added.isEmpty()) {
- fireUpdate((IConsole[])added.toArray(new IConsole[added.size()]), ADDED);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsoleManager#removeConsoles(org.eclipse.debug.internal.ui.console.IConsole[])
- */
- public synchronized void removeConsoles(IConsole[] consoles) {
- List removed = new ArrayList(consoles.length);
- for (int i = 0; i < consoles.length; i++) {
- IConsole console = consoles[i];
- if (fConsoles.remove(console)) {
- removed.add(console);
- }
- }
- if (!removed.isEmpty()) {
- fireUpdate((IConsole[])removed.toArray(new IConsole[removed.size()]), REMOVED);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsoleManager#getConsoles()
- */
- public synchronized IConsole[] getConsoles() {
- return (IConsole[])fConsoles.toArray(new IConsole[fConsoles.size()]);
- }
-
- /**
- * Fires notification.
- *
- * @param consoles consoles added/removed
- * @param type ADD or REMOVE
- */
- private void fireUpdate(IConsole[] consoles, int type) {
- new ConsoleNotifier().notify(consoles, type);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleMessages.java
deleted file mode 100644
index 34e3ab2f9..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleMessages.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * ConsoleMessages
- */
-public class ConsoleMessages {
-
- private static final String BUNDLE_NAME = "org.eclipse.debug.internal.ui.console.ConsoleMessages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE =
- ResourceBundle.getBundle(BUNDLE_NAME);
-
- private ConsoleMessages() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleMessages.properties
deleted file mode 100644
index 969d2ff5b..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleMessages.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are 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
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-AbstractConsole.0=Exception occurred during console property change notification.
-
-ConsoleDropDownAction.0=Select Console
-ConsoleDropDownAction.1=Display Selected Console
-
-ConsoleManager.0=An exception occurred during console notification
-
-ConsoleView.0=Console
-ConsoleView.1=Console - {0}
-
-PinConsoleAction.0=Pi&n Console
-PinConsoleAction.1=Pin Console
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleView.java
deleted file mode 100644
index 90fe2bb08..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleView.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-import java.text.MessageFormat;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.ui.AbstractDebugView;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.IPage;
-import org.eclipse.ui.part.IPageBookViewPage;
-import org.eclipse.ui.part.MessagePage;
-import org.eclipse.ui.part.PageBook;
-
-/**
- * Page book console view.
- *
- * @since 3.0
- */
-public class ConsoleView extends AbstractDebugView implements IConsoleView, IConsoleListener, IPropertyChangeListener {
-
- /**
- * Whether this console is pinned.
- */
- private boolean fPinned = false;
-
- /**
- * The console being displayed, or <code>null</code> if none
- */
- private IConsole fActiveConsole = null;
-
- /**
- * Map of consoles to dummy console parts (used to close pages)
- */
- private Map fConsoleToPart;
-
- /**
- * Map of parts to consoles
- */
- private Map fPartToConsole;
-
- // actions
- private PinConsoleAction fPinAction = null;
- private ConsoleDropDownAction fDisplayConsoleAction = null;
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractDebugView#getControl()
- */
- protected Control getControl() {
- return getPageBook();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractDebugView#isAvailable()
- */
- public boolean isAvailable() {
- return getPageBook() != null && !getPageBook().isDisposed();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- Object source = event.getSource();
- if (source instanceof IConsole && event.getProperty().equals(IBasicPropertyConstants.P_TEXT)) {
- if (source.equals(getConsole())) {
- updateTitle();
- }
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener#partClosed(org.eclipse.ui.IWorkbenchPart)
- */
- public void partClosed(IWorkbenchPart part) {
- if (isPinned()) {
- // if closing the pinned console, un-pin
- IConsole console = (IConsole)fPartToConsole.get(part);
- if (console != null && console.equals(getConsole())) {
- pin(null);
- }
- }
- super.partClosed(part);
- fPinAction.update();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsoleView#getConsole()
- */
- public IConsole getConsole() {
- return fActiveConsole;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#showPageRec(org.eclipse.ui.part.PageBookView.PageRec)
- */
- protected void showPageRec(PageRec pageRec) {
- if (!isPinned()) {
- super.showPageRec(pageRec);
- fActiveConsole = (IConsole)fPartToConsole.get(pageRec.part);
- updateTitle();
- // update console actions
- if (fPinAction != null) {
- fPinAction.update();
- }
- }
- }
-
- /**
- * Updates the view title based on the active console
- */
- protected void updateTitle() {
- IConsole console = getConsole();
- if (console == null) {
- setTitle(ConsoleMessages.getString("ConsoleView.0")); //$NON-NLS-1$
- } else {
- setTitle(MessageFormat.format(ConsoleMessages.getString("ConsoleView.1"), new String[]{console.getName()})); //$NON-NLS-1$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#doDestroyPage(org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.part.PageBookView.PageRec)
- */
- protected void doDestroyPage(IWorkbenchPart part, PageRec pageRecord) {
- IPage page = pageRecord.page;
- page.dispose();
- pageRecord.dispose();
-
- IConsole console = (IConsole)fPartToConsole.get(part);
- console.removePropertyChangeListener(this);
-
- // empty cross-reference cache
- fPartToConsole.remove(part);
- fConsoleToPart.remove(console);
-
- // update console actions
- fPinAction.update();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#doCreatePage(org.eclipse.ui.IWorkbenchPart)
- */
- protected PageRec doCreatePage(IWorkbenchPart dummyPart) {
- ConsoleWorkbenchPart part = (ConsoleWorkbenchPart)dummyPart;
- IConsole console = part.getConsole();
- IPageBookViewPage page = console.createPage(this);
- initPage(page);
- page.createControl(getPageBook());
- console.addPropertyChangeListener(this);
- PageRec rec = new PageRec(dummyPart, page);
- return rec;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#isImportant(org.eclipse.ui.IWorkbenchPart)
- */
- protected boolean isImportant(IWorkbenchPart part) {
- return part instanceof ConsoleWorkbenchPart;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#dispose()
- */
- public void dispose() {
- super.dispose();
- DebugUIPlugin.getDefault().getConsoleManager().removeConsoleListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#createDefaultPage(org.eclipse.ui.part.PageBook)
- */
- protected IPage createDefaultPage(PageBook book) {
- MessagePage page = new MessagePage();
- page.createControl(getPageBook());
- initPage(page);
- return page;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsoleListener#consolesAdded(org.eclipse.debug.internal.ui.console.IConsole[])
- */
- public void consolesAdded(final IConsole[] consoles) {
- if (isAvailable()) {
- Runnable r = new Runnable() {
- public void run() {
- for (int i = 0; i < consoles.length; i++) {
- if (isAvailable()) {
- IConsole console = consoles[i];
- ConsoleWorkbenchPart part = new ConsoleWorkbenchPart(console, getSite());
- fConsoleToPart.put(console, part);
- fPartToConsole.put(part, console);
- partActivated(part);
- }
- }
- }
- };
- asyncExec(r);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsoleListener#consolesRemoved(org.eclipse.debug.internal.ui.console.IConsole[])
- */
- public void consolesRemoved(final IConsole[] consoles) {
- if (isAvailable()) {
- Runnable r = new Runnable() {
- public void run() {
- for (int i = 0; i < consoles.length; i++) {
- if (isAvailable()) {
- IConsole console = consoles[i];
- ConsoleWorkbenchPart part = (ConsoleWorkbenchPart)fConsoleToPart.get(console);
- if (part != null) {
- partClosed(part);
- }
- if (getConsole() == null) {
- IConsole[] available = DebugUIPlugin.getDefault().getConsoleManager().getConsoles();
- if (available.length > 0) {
- display(available[available.length - 1]);
- }
- }
- }
- }
- }
- };
- asyncExec(r);
- }
- }
-
- /**
- * Constructs a console view
- */
- public ConsoleView() {
- super();
- fConsoleToPart = new HashMap();
- fPartToConsole = new HashMap();
- }
-
- /**
- * This method is never called for this view.
- *
- * @see org.eclipse.debug.ui.AbstractDebugView#createViewer(org.eclipse.swt.widgets.Composite)
- */
- protected Viewer createViewer(Composite parent) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractDebugView#createActions()
- */
- protected void createActions() {
- fPinAction = new PinConsoleAction(this);
- fDisplayConsoleAction = new ConsoleDropDownAction(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractDebugView#getHelpContextId()
- */
- protected String getHelpContextId() {
- return IDebugHelpContextIds.CONSOLE_VIEW;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractDebugView#fillContextMenu(org.eclipse.jface.action.IMenuManager)
- */
- protected void fillContextMenu(IMenuManager menu) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractDebugView#configureToolBar(org.eclipse.jface.action.IToolBarManager)
- */
- protected void configureToolBar(IToolBarManager mgr) {
- mgr.add(new Separator(IDebugUIConstants.LAUNCH_GROUP));
- mgr.add(new Separator(IDebugUIConstants.OUTPUT_GROUP));
- mgr.add(fPinAction);
- mgr.add(fDisplayConsoleAction);
-
- // init for existing consoles
- IConsoleManager manager = DebugUIPlugin.getDefault().getConsoleManager();
- // create pages for consoles
- IConsole[] consoles = manager.getConsoles();
- consolesAdded(consoles);
- // add as a listener
- manager.addConsoleListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsoleView#display(org.eclipse.debug.internal.ui.console.IConsole)
- */
- public void display(IConsole console) {
- if (!isPinned()) {
- ConsoleWorkbenchPart part = (ConsoleWorkbenchPart)fConsoleToPart.get(console);
- if (part != null) {
- partActivated(part);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsoleView#pin(org.eclipse.debug.internal.ui.console.IConsole)
- */
- public void pin(IConsole console) {
- if (console == null) {
- fPinned = false;
- } else {
- display(console);
- fPinned = true;
- }
- if (fPinAction != null) {
- fPinAction.update();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsoleView#isPinned()
- */
- public boolean isPinned() {
- return fPinned;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleWorkbenchPart.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleWorkbenchPart.java
deleted file mode 100644
index df5eba591..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ConsoleWorkbenchPart.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IPropertyListener;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchPartSite;
-
-/**
- * Fake part to use as keys in page book for console pages
- */
-public class ConsoleWorkbenchPart implements IWorkbenchPart {
-
- private IConsole fConsole = null;
- private IWorkbenchPartSite fSite = null;
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- return (obj instanceof ConsoleWorkbenchPart) &&
- fConsole.equals(((ConsoleWorkbenchPart)obj).fConsole);
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return fConsole.hashCode();
- }
-
- /**
- * Constructs a part for the given console that binds to the given
- * site
- */
- public ConsoleWorkbenchPart(IConsole console, IWorkbenchPartSite site) {
- fConsole = console;
- fSite = site;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#addPropertyListener(org.eclipse.ui.IPropertyListener)
- */
- public void addPropertyListener(IPropertyListener listener) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
- public void createPartControl(Composite parent) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#dispose()
- */
- public void dispose() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getSite()
- */
- public IWorkbenchPartSite getSite() {
- return fSite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitle()
- */
- public String getTitle() {
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitleImage()
- */
- public Image getTitleImage() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitleToolTip()
- */
- public String getTitleToolTip() {
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#removePropertyListener(org.eclipse.ui.IPropertyListener)
- */
- public void removePropertyListener(IPropertyListener listener) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#setFocus()
- */
- public void setFocus() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- /**
- * Returns the console assocaited with this part.
- *
- * @return console assocaited with this part
- */
- protected IConsole getConsole() {
- return fConsole;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/IConsole.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/IConsole.java
deleted file mode 100644
index e09716fe0..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/IConsole.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.ui.part.IPageBookViewPage;
-
-/**
- * A logical console. A console is commonly used to display messages. For example,
- * a console may display the output streams of a system process. A console can be
- * displayed by one or more views.
- * <p>
- * Clients may implement this interface.
- * </p>
- * @since 3.0
- */
-public interface IConsole {
-
- /**
- * Returns the name of this console.
- *
- * @return the name of this console
- */
- public String getName();
-
- /**
- * Returns an image descriptor for this console, or <code>null</code>
- * if none.
- *
- * @return an image descriptor for this console, or <code>null</code>
- * if none
- */
- public ImageDescriptor getImageDescriptor();
-
- /**
- * Creates and returns a new page for this console. The page is displayed
- * for this console in the console given view.
- *
- * @param view the view in which the page is to be created
- * @return a page book view page representation of this console
- */
- public IPageBookViewPage createPage(IConsoleView view);
-
- /**
- * Adds a listener for changes to properties of this console.
- * Has no effect if an identical listener is already registered.
- * <p>
- * The changes supported by the console view are as follows:
- * <ul>
- * <li><code>IBasicPropertyConstants.P_TEXT</code> - indicates the name
- * of a console has changed</li>
- * <li><code>IBasicPropertyConstants.P_IMAGE</code> - indicates the image
- * of a console has changed</li>
- * </ul>
- * </p>
- * <p>
- * Clients may define additional properties as required.
- * </p>
- *
- * @param listener a property change listener
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener);
-
- /**
- * Removes the given property listener from this console page.
- * Has no effect if an identical listener is not alread registered.
- *
- * @param listener a property listener
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener);
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/IConsoleListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/IConsoleListener.java
deleted file mode 100644
index a9ef2e9b2..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/IConsoleListener.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-/**
- * A console listener is notified when consoles are added or removed from
- * the console manager.
- * <p>
- * Clients may implement this interface.
- * </p>
- * @since 3.0
- */
-public interface IConsoleListener {
-
- /**
- * Notification the given consoles have been added to the console
- * manager.
- *
- * @param consoles added consoles
- */
- public void consolesAdded(IConsole[] consoles);
-
- /**
- * Notification the given consoles have been removed from the
- * console manager.
- *
- * @param consoles removed consoles
- */
- public void consolesRemoved(IConsole[] consoles);
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/IConsoleManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/IConsoleManager.java
deleted file mode 100644
index 0d72c81f2..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/IConsoleManager.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-/**
- * Manages consoles.
- * <p>
- * Clients are not intended to implement this interface.
- * </p>
- * @since 3.0
- */
-public interface IConsoleManager {
-
- /**
- * Registers the given listener for console notifications. Has
- * no effect if an identical listener is already registered.
- *
- * @param listener listener to register
- */
- public void addConsoleListener(IConsoleListener listener);
-
- /**
- * Deregisters the given listener for console notifications. Has
- * no effect if an identical listener is not already registered.
- *
- * @param listener listener to deregister
- */
- public void removeConsoleListener(IConsoleListener listener);
-
- /**
- * Adds the given consoles to the console manager. Has no effect for
- * equivalent consoles already registered. The consoles will be added
- * to any existing console views.
- *
- * @param consoles consoles to add
- */
- public void addConsoles(IConsole[] consoles);
-
- /**
- * Removes the given consoles from the console manager. If the consoles are
- * being displayed in any console views, the associated pages will be closed.
- *
- * @param consoles consoles to remove
- */
- public void removeConsoles(IConsole[] consoles);
-
- /**
- * Returns a collection of consoles registered with the console manager.
- *
- * @return a collection of consoles registered with the console manager
- */
- public IConsole[] getConsoles();
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/IConsoleView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/IConsoleView.java
deleted file mode 100644
index b87510aaa..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/IConsoleView.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-import org.eclipse.ui.IViewPart;
-
-/**
- * A view that displays consoles registered with the console manager.
- * <p>
- * Clients are not intended to implement this interface.
- * </p>
- * @since 3.0
- */
-public interface IConsoleView extends IViewPart {
-
- /**
- * Displays the page for the given console in this console view.
- * Has no effect if this console view has a pinned console.
- *
- * @param console console to display, cannot be <code>null</code>
- */
- public void display(IConsole console);
-
- /**
- * Displays and pins the given console in this console view. No
- * other console can be displayed until this console view is
- * un-pinned. Specifying <code>null</code> un-pins this console
- *
- * @param console console to pin, or <code>null</code> to un-pin
- */
- public void pin(IConsole console);
-
- /**
- * Returns whether this console view is currently pinned to a
- * specific console.
- *
- * @return whether this console view is currently pinned to a
- * specific console
- */
- public boolean isPinned();
-
- /**
- * Returns the console currently being displayed, or <code>null</code>
- * if none
- *
- * @return the console currently being displayed, or <code>null</code>
- * if none
- */
- public IConsole getConsole();
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsole.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsole.java
deleted file mode 100644
index b868446ed..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsole.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.ui.part.IPageBookViewPage;
-
-/**
- * A console that displays messages.
- * <p>
- * Clients may instantiate this class.
- * </p>
- * @since 3.0
- */
-public class MessageConsole extends AbstractConsole {
-
- /**
- * The font used by this console
- */
- private Font fFont = null;
-
- /**
- * Property constant indicating the font of this console has changed.
- */
- public static final String P_FONT = DebugUIPlugin.getUniqueIdentifier() + ".P_FONT"; //$NON-NLS-1$
-
- /**
- * Property constant indicating the color of a stream has changed.
- */
- public static final String P_STREAM_COLOR = DebugUIPlugin.getUniqueIdentifier() + ".P_STREAM_COLOR"; //$NON-NLS-1$
-
- // document partitioner
- private MessageConsolePartitioner fPartitioner = null;
-
- /**
- * Constructs a new message console.
- *
- * @param name console name
- * @param imageDescriptor console image descriptor or <code>null</code>
- * if none
- */
- public MessageConsole(String name, ImageDescriptor imageDescriptor) {
- super(name, imageDescriptor);
- fPartitioner = new MessageConsolePartitioner();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsole#createPage(org.eclipse.debug.internal.ui.console.IConsoleView)
- */
- public IPageBookViewPage createPage(IConsoleView view) {
- return new MessageConsolePage(view, this);
- }
-
- /**
- * Sets the font used by this console
- *
- * @param font font
- */
- public void setFont(Font font) {
- Font old = fFont;
- fFont = font;
- firePropertyChange(this, P_FONT, old, font);
- }
-
- /**
- * Returns the font for this console
- *
- * @return font for this console
- */
- public Font getFont() {
- if (fFont == null) {
- return JFaceResources.getTextFont();
- } else {
- return fFont;
- }
- }
-
- /**
- * Returns a new message stream connected to this console.
- *
- * @return a new message stream connected to this console
- */
- public MessageConsoleStream newMessageStream() {
- return new MessageConsoleStream(this);
- }
-
- /**
- * Appends the given message to this console, from the specified stream.
- *
- * @param text message
- * @param stream stream the message belongs to
- */
- protected synchronized void appendToDocument(final String text, final MessageConsoleStream stream) {
- fPartitioner.appendToDocument(text, stream);
- }
-
- /**
- * Returns the document this console writes to.
- *
- * @return the document this console wites to
- */
- protected IDocument getDocument() {
- return fPartitioner.getDocument();
- }
-
-}
- \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsolePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsolePage.java
deleted file mode 100644
index 985c46cc5..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsolePage.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.actions.ClearOutputAction;
-import org.eclipse.debug.internal.ui.actions.TextViewerAction;
-import org.eclipse.debug.internal.ui.actions.TextViewerGotoLineAction;
-import org.eclipse.debug.internal.ui.views.DebugUIViewsMessages;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.text.IFindReplaceTarget;
-import org.eclipse.jface.text.ITextOperationTarget;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.VerifyKeyListener;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.IPageBookViewPage;
-import org.eclipse.ui.part.IPageSite;
-import org.eclipse.ui.texteditor.FindReplaceAction;
-import org.eclipse.ui.texteditor.ITextEditorActionConstants;
-import org.eclipse.ui.texteditor.IUpdate;
-
-/**
- * A page for a console connected to I/O streams of a process
- *
- * @since 3.0
- */
-public class MessageConsolePage implements IPageBookViewPage, IAdaptable, IPropertyChangeListener {
-
- //page site
- private IPageSite fSite = null;
-
- // viewer
- private MessageConsoleViewer fViewer = null;
-
- // the view this page is contained in
- private IConsoleView fView;
-
- // the console this page displays
- private MessageConsole fConsole;
-
- // text selection listener
- private ISelectionChangedListener fTextListener = new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateSelectionDependentActions();
- }};
-
- // actions
- private ClearOutputAction fClearOutputAction;
- private Map fGlobalActions= new HashMap(10);
- private List fSelectionActions = new ArrayList(3);
-
- // menus
- private Menu fMenu;
-
- /**
- * Constructs a new process page
- */
- public MessageConsolePage(IConsoleView view, MessageConsole console) {
- fView = view;
- fConsole = console;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPageBookViewPage#getSite()
- */
- public IPageSite getSite() {
- return fSite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPageBookViewPage#init(org.eclipse.ui.part.IPageSite)
- */
- public void init(IPageSite site) throws PartInitException {
- fSite = site;
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- fViewer = new MessageConsoleViewer(parent);
- fViewer.setDocument(getConsole().getDocument());
-
- MenuManager manager= new MenuManager("#MessageConsole", "#MessageConsole"); //$NON-NLS-1$ //$NON-NLS-2$
- manager.setRemoveAllWhenShown(true);
- manager.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager m) {
- contextMenuAboutToShow(m);
- }
- });
- fMenu= manager.createContextMenu(getControl());
- getControl().setMenu(fMenu);
-
- IPageSite site= getSite();
- site.registerContextMenu(DebugUIPlugin.getUniqueIdentifier() + ".messageConsole", manager, getViewer()); //$NON-NLS-1$
- site.setSelectionProvider(getViewer());
-
- createActions();
- configureToolBar(getSite().getActionBars().getToolBarManager());
-
- fViewer.getSelectionProvider().addSelectionChangedListener(fTextListener);
- setFont(getConsole().getFont());
- getConsole().addPropertyChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- Object source = event.getSource();
- if (source.equals(getConsole()) && event.getProperty().equals(MessageConsole.P_FONT)) {
- setFont(getConsole().getFont());
- }
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#dispose()
- */
- public void dispose() {
- getConsole().removePropertyChangeListener(this);
- fViewer.getSelectionProvider().removeSelectionChangedListener(fTextListener);
-
- if (fMenu != null && !fMenu.isDisposed()) {
- fMenu.dispose();
- fMenu= null;
- }
-
- if (fViewer != null) {
- fViewer.dispose();
- fViewer = null;
- }
- fSite = null;
- fSelectionActions.clear();
- }
-
-
- /**
- * Fill the context menu
- *
- * @param menu menu
- */
- protected void contextMenuAboutToShow(IMenuManager menu) {
- menu.add((IAction)fGlobalActions.get(IWorkbenchActionConstants.COPY));
- menu.add((IAction)fGlobalActions.get(IWorkbenchActionConstants.SELECT_ALL));
- menu.add(new Separator("FIND")); //$NON-NLS-1$
- menu.add((IAction)fGlobalActions.get(IWorkbenchActionConstants.FIND));
- menu.add((IAction)fGlobalActions.get(ITextEditorActionConstants.GOTO_LINE));
- menu.add(fClearOutputAction);
- menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#getControl()
- */
- public Control getControl() {
- if (fViewer != null) {
- return fViewer.getControl();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#setActionBars(org.eclipse.ui.IActionBars)
- */
- public void setActionBars(IActionBars actionBars) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#setFocus()
- */
- public void setFocus() {
- Control control = getControl();
- if (control != null) {
- control.setFocus();
- }
- updateSelectionDependentActions();
- }
-
- protected void createActions() {
- fClearOutputAction= new ClearOutputAction(getViewer());
-
- // In order for the clipboard actions to accessible via their shortcuts
- // (e.g., Ctrl-C, Ctrl-V), we *must* set a global action handler for
- // each action
- IActionBars actionBars= getSite().getActionBars();
- TextViewerAction action= new TextViewerAction(getViewer(), ITextOperationTarget.COPY);
- action.configureAction(DebugUIViewsMessages.getString("ConsoleView.&Copy@Ctrl+C_6"), DebugUIViewsMessages.getString("ConsoleView.Copy_7"), DebugUIViewsMessages.getString("ConsoleView.Copy_7")); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
- action.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
- action.setDisabledImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
- action.setHoverImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY_HOVER));
- setGlobalAction(actionBars, IWorkbenchActionConstants.COPY, action);
- action= new TextViewerAction(getViewer(), ITextOperationTarget.SELECT_ALL);
- action.configureAction(DebugUIViewsMessages.getString("ConsoleView.Select_&All@Ctrl+A_12"), DebugUIViewsMessages.getString("ConsoleView.Select_All"), DebugUIViewsMessages.getString("ConsoleView.Select_All")); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
- setGlobalAction(actionBars, IWorkbenchActionConstants.SELECT_ALL, action);
-
- //XXX Still using "old" resource access
- ResourceBundle bundle= ResourceBundle.getBundle("org.eclipse.debug.internal.ui.views.DebugUIViewsMessages"); //$NON-NLS-1$
- setGlobalAction(actionBars, IWorkbenchActionConstants.FIND, new FindReplaceAction(bundle, "find_replace_action.", getConsoleView())); //$NON-NLS-1$
-
- action= new TextViewerGotoLineAction(getViewer());
- setGlobalAction(actionBars, ITextEditorActionConstants.GOTO_LINE, action);
-
- actionBars.updateActionBars();
-
- getViewer().getTextWidget().addVerifyKeyListener(new VerifyKeyListener() {
- public void verifyKey(VerifyEvent event) {
- if (event.stateMask == SWT.CTRL && event.keyCode == 0 && event.character == 0x0C) {
- IAction gotoLine= (IAction)fGlobalActions.get(ITextEditorActionConstants.GOTO_LINE);
- if (gotoLine.isEnabled()) {
- gotoLine.run();
- event.doit= false;
- }
- }
- }
- });
-
- fSelectionActions.add(IWorkbenchActionConstants.COPY);
- fSelectionActions.add(IWorkbenchActionConstants.FIND);
- }
-
- protected void updateSelectionDependentActions() {
- Iterator iterator= fSelectionActions.iterator();
- while (iterator.hasNext()) {
- updateAction((String)iterator.next());
- }
- }
-
- protected void updateAction(String actionId) {
- IAction action= (IAction)fGlobalActions.get(actionId);
- if (action instanceof IUpdate) {
- ((IUpdate) action).update();
- }
- }
-
- protected void setGlobalAction(IActionBars actionBars, String actionID, IAction action) {
- fGlobalActions.put(actionID, action);
- actionBars.setGlobalActionHandler(actionID, action);
- }
-
- /**
- * Returns the viewer in this page.
- *
- * @return the viewer in this page
- */
- protected MessageConsoleViewer getViewer() {
- return fViewer;
- }
-
- /**
- * @see AbstractDebugView#configureToolBar(IToolBarManager)
- */
- protected void configureToolBar(IToolBarManager mgr) {
- mgr.appendToGroup(IDebugUIConstants.OUTPUT_GROUP, fClearOutputAction);
- }
-
- /**
- * Returns the view this page is contained in
- *
- * @return the view this page is contained in
- */
- protected IConsoleView getConsoleView() {
- return fView;
- }
-
- /**
- * Returns the console this page is displaying
- *
- * @return the console this page is displaying
- */
- protected MessageConsole getConsole() {
- return fConsole;
- }
-
- /**
- * @see WorkbenchPart#getAdapter(Class)
- */
- public Object getAdapter(Class required) {
- if (IFindReplaceTarget.class.equals(required)) {
- return getViewer().getFindReplaceTarget();
- }
- if (Widget.class.equals(required)) {
- return getViewer().getTextWidget();
- }
- return null;
- }
-
- /**
- * Sets the font for this page.
- *
- * @param font font
- */
- protected void setFont(Font font) {
- getViewer().getTextWidget().setFont(font);
- }
-
- /**
- * Refreshes this page
- */
- protected void refresh() {
- getViewer().refresh();
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsolePartition.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsolePartition.java
deleted file mode 100644
index 99d36f690..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsolePartition.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.text.TypedRegion;
-
-/**
- * A partition from a message stream connected to a message console.
- */
-public class MessageConsolePartition extends TypedRegion {
-
- /**
- * Associated stream
- */
- private MessageConsoleStream fStream;
-
- /**
- * Partition type
- */
- public static final String MESSAGE_PARTITION_TYPE = DebugUIPlugin.getUniqueIdentifier() + ".MESSAGE_PARTITION_TYPE"; //$NON-NLS-1$
-
- public MessageConsolePartition(MessageConsoleStream stream, int offset, int length) {
- super(offset, length, MESSAGE_PARTITION_TYPE);
- fStream = stream;
- }
-
-
- /**
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object partition) {
- if (super.equals(partition)) {
- fStream.equals(((MessageConsolePartition)partition).getStream());
- }
- return false;
- }
-
- /**
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return super.hashCode() + fStream.hashCode();
- }
-
- /**
- * Returns this partition's stream
- *
- * @return this partition's stream
- */
- public MessageConsoleStream getStream() {
- return fStream;
- }
-
- /**
- * Returns whether this partition is allowed to be combined with the
- * given partition.
- *
- * @param partition
- * @return boolean
- */
- public boolean canBeCombinedWith(MessageConsolePartition partition) {
- int start = getOffset();
- int end = start + getLength();
- int otherStart = partition.getOffset();
- int otherEnd = otherStart + partition.getLength();
- boolean overlap = (otherStart >= start && otherStart <= end) || (start >= otherStart && start <= otherEnd);
- return overlap && getType().equals(partition.getType()) && getStream().equals(partition.getStream());
- }
-
- /**
- * Returns a new partition representing this and the given parition
- * combined.
- *
- * @param partition
- * @return partition
- */
- public MessageConsolePartition combineWith(MessageConsolePartition partition) {
- int start = getOffset();
- int end = start + getLength();
- int otherStart = partition.getOffset();
- int otherEnd = otherStart + partition.getLength();
- int theStart = Math.min(start, otherStart);
- int theEnd = Math.max(end, otherEnd);
- return createNewPartition(theStart, theEnd - theStart);
- }
-
- /**
- * Creates a new patition of this type with the given color, offset,
- * and length.
- *
- * @param offset
- * @param length
- * @return a new partition with the given range
- */
- public MessageConsolePartition createNewPartition(int offset, int length) {
- return new MessageConsolePartition(getStream(), offset, length);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsolePartitioner.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsolePartitioner.java
deleted file mode 100644
index 38d7600df..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsolePartitioner.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.console;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.jface.text.IDocumentPartitionerExtension;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.Region;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * A console that displays text messages.
- *
- * @since 3.0
- */
-public class MessageConsolePartitioner implements IDocumentPartitioner, IDocumentPartitionerExtension {
-
- /**
- * The associated docuemnt
- */
- private IDocument fDocument = null;
-
- /**
- * List of partitions
- */
- private List fPartitions = new ArrayList(5);
-
- /**
- * The stream that was last appended to
- */
- private MessageConsoleStream fLastStream = null;
-
- /**
- * @see org.eclipse.jface.text.IDocumentPartitioner#connect(org.eclipse.jface.text.IDocument)
- */
- public void connect(IDocument document) {
- fDocument = document;
- document.setDocumentPartitioner(this);
- }
-
- /**
- * @see org.eclipse.jface.text.IDocumentPartitioner#disconnect()
- */
- public void disconnect() {
- fDocument.setDocumentPartitioner(null);
- }
-
- /**
- * @see org.eclipse.jface.text.IDocumentPartitioner#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
- */
- public void documentAboutToBeChanged(DocumentEvent event) {
- }
-
- /**
- * @see org.eclipse.jface.text.IDocumentPartitioner#documentChanged(org.eclipse.jface.text.DocumentEvent)
- */
- public boolean documentChanged(DocumentEvent event) {
- return documentChanged2(event) != null;
- }
-
- /**
- * @see org.eclipse.jface.text.IDocumentPartitioner#getLegalContentTypes()
- */
- public String[] getLegalContentTypes() {
- return new String[] {MessageConsolePartition.MESSAGE_PARTITION_TYPE};
- }
-
- /**
- * @see org.eclipse.jface.text.IDocumentPartitioner#getContentType(int)
- */
- public String getContentType(int offset) {
- ITypedRegion partition = getPartition(offset);
- if (partition != null) {
- return partition.getType();
- }
- return null;
- }
-
- /**
- * @see org.eclipse.jface.text.IDocumentPartitioner#computePartitioning(int, int)
- */
- public ITypedRegion[] computePartitioning(int offset, int length) {
- if (offset == 0 && length == fDocument.getLength()) {
- return (ITypedRegion[])fPartitions.toArray(new ITypedRegion[fPartitions.size()]);
- } else {
- int end = offset + length;
- List list = new ArrayList();
- for (int i = 0; i < fPartitions.size(); i++) {
- ITypedRegion partition = (ITypedRegion)fPartitions.get(i);
- int partitionStart = partition.getOffset();
- int partitionEnd = partitionStart + partition.getLength();
- if ((offset >= partitionStart && offset <= partitionEnd) ||
- (offset < partitionStart && end >= partitionStart)) {
- list.add(partition);
- }
- }
- return (ITypedRegion[])list.toArray(new ITypedRegion[list.size()]);
- }
- }
-
- /**
- * @see org.eclipse.jface.text.IDocumentPartitioner#getPartition(int)
- */
- public ITypedRegion getPartition(int offset) {
- for (int i = 0; i < fPartitions.size(); i++) {
- ITypedRegion partition = (ITypedRegion)fPartitions.get(i);
- int start = partition.getOffset();
- int end = start + partition.getLength();
- if (offset >= start && offset < end) {
- return partition;
- }
- }
- return null;
- }
-
- /**
- * @see org.eclipse.jface.text.IDocumentPartitionerExtension#documentChanged2(org.eclipse.jface.text.DocumentEvent)
- */
- public IRegion documentChanged2(DocumentEvent event) {
- String text = event.getText();
- if (getDocument().getLength() == 0) {
- // cleared
- fPartitions.clear();
- return new Region(0,0);
- }
- addPartition(new MessageConsolePartition(fLastStream, event.getOffset(), text.length()));
- ITypedRegion[] affectedRegions = computePartitioning(event.getOffset(), text.length());
- if (affectedRegions.length == 0) {
- return null;
- }
- if (affectedRegions.length == 1) {
- return affectedRegions[0];
- }
- int affectedLength = affectedRegions[0].getLength();
- for (int i = 1; i < affectedRegions.length; i++) {
- ITypedRegion region = affectedRegions[i];
- affectedLength += region.getLength();
- }
- return new Region(affectedRegions[0].getOffset(), affectedLength);
- }
-
- /**
- * Adds a new colored input partition, combining with the previous partition if
- * possible.
- */
- protected MessageConsolePartition addPartition(MessageConsolePartition partition) {
- if (fPartitions.isEmpty()) {
- fPartitions.add(partition);
- } else {
- int index = fPartitions.size() - 1;
- MessageConsolePartition last = (MessageConsolePartition)fPartitions.get(index);
- if (last.canBeCombinedWith(partition)) {
- // replace with a single partition
- partition = last.combineWith(partition);
- fPartitions.set(index, partition);
- } else {
- // different kinds - add a new parition
- fPartitions.add(partition);
- }
- }
- return partition;
- }
-
- /**
- * Creates a new paritioner and document, and connects this partitioner
- * to the document.
- */
- public MessageConsolePartitioner() {
- IDocument doc = new Document();
- connect(doc);
- }
-
- /**
- * Adds the new text to the document.
- *
- * @param text the text to append
- * @param stream the stream to append to
- */
- protected synchronized void appendToDocument(final String text, final MessageConsoleStream stream) {
- Runnable r = new Runnable() {
- public void run() {
- fLastStream = stream;
- try {
- fDocument.replace(fDocument.getLength(), 0, text);
- } catch (BadLocationException e) {
- }
- }
- };
- Display display = DebugUIPlugin.getStandardDisplay();
- if (display != null) {
- display.asyncExec(r);
- }
- }
-
- /**
- * Returns the document this partitioner is connected to, or <code>null</code>
- * if none.
- *
- * @return the document this partitioner is connected to, or <code>null</code>
- * if none
- */
- protected IDocument getDocument() {
- return fDocument;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsoleStream.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsoleStream.java
deleted file mode 100644
index 1cdd4828c..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsoleStream.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-import org.eclipse.swt.graphics.Color;
-
-/**
- * Used to write messages to a message console. A message console may have more
- * than one stream connected to it. Each stream may be displayed in a different
- * color.
- *
- * @since 3.0
- */
-public class MessageConsoleStream {
-
- private MessageConsole fConsole = null;
-
- private Color fColor = null;
-
- /**
- * Constructs a new stream connected to the given console.
- *
- * @param partitioner the partitioner to write messages to
- */
- protected MessageConsoleStream(MessageConsole console) {
- fConsole = console;
- }
-
- /**
- * Appends the specified message to this stream.
- *
- * @param message message to append
- */
- public void print(String message) {
- fConsole.appendToDocument(message, this);
- }
-
-
- /**
- * Appends a line separator string to this stream.
- */
- public void println() {
- print("\n"); //$NON-NLS-1$
- }
-
- /**
- * Appends the specified message to this stream, followed by a line
- * separator string.
- *
- * @param message message to print
- */
- public void println(String message) {
- print(message);
- println();
- }
-
- /**
- * Sets the color of this message stream
- *
- * @param color color of this message stream, possibly <code>null</code>
- */
- public void setColor(Color color) {
- Color old = fColor;
- fColor = color;
- fConsole.firePropertyChange(this, MessageConsole.P_STREAM_COLOR, old, color);
- }
-
- /**
- * Returns the color of this message stream, or <code>null</code>
- * if default.
- *
- * @return the color of this message stream, or <code>null</code>
- */
- public Color getColor() {
- return fColor;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsoleViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsoleViewer.java
deleted file mode 100644
index 3cd812ef5..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/MessageConsoleViewer.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentListener;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.TextViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.LineStyleEvent;
-import org.eclipse.swt.custom.LineStyleListener;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.widgets.Composite;
-
-public class MessageConsoleViewer extends TextViewer implements LineStyleListener {
-
- protected InternalDocumentListener fInternalDocumentListener= new InternalDocumentListener();
-
- /**
- * Internal document listener.
- */
- class InternalDocumentListener implements IDocumentListener {
- /**
- * @see IDocumentListener#documentAboutToBeChanged(DocumentEvent)
- */
- public void documentAboutToBeChanged(DocumentEvent e) {
- }
-
- /**
- * @see IDocumentListener#documentChanged(DocumentEvent)
- */
- public void documentChanged(DocumentEvent e) {
- revealEndOfDocument();
- }
- }
-
- /**
- * Creates a new console viewer and adds verification checking
- * to only allow text modification if the text is being modified
- * in the editable portion of the underlying document.
- *
- * @see org.eclipse.swt.events.VerifyListener
- */
- public MessageConsoleViewer(Composite parent) {
- super(parent, getSWTStyles());
- getTextWidget().setDoubleClickEnabled(true);
- getTextWidget().setFont(parent.getFont());
- getTextWidget().addLineStyleListener(this);
- getTextWidget().setEditable(false);
- }
-
- /**
- * Returns the SWT style flags used when instantiating this viewer
- */
- private static int getSWTStyles() {
- int styles= SWT.H_SCROLL | SWT.V_SCROLL;
- return styles;
- }
-
- /**
- * Reveals (makes visible) the end of the current document
- */
- protected void revealEndOfDocument() {
- IDocument doc = getDocument();
- int lines = doc.getNumberOfLines();
- try {
- // lines are 0-based
- int lineStartOffset = doc.getLineOffset(lines - 1);
- StyledText widget= getTextWidget();
- if (lineStartOffset > 0) {
- widget.setCaretOffset(lineStartOffset);
- widget.showSelection();
- }
- int lineEndOffset = lineStartOffset + doc.getLineLength(lines - 1);
- if (lineEndOffset > 0) {
- widget.setCaretOffset(lineEndOffset);
- }
- } catch (BadLocationException e) {
- }
- }
-
- /**
- * @see ITextViewer#setDocument(IDocument)
- */
- public void setDocument(IDocument doc) {
- IDocument oldDoc= getDocument();
- IDocument document= doc;
- if (oldDoc == null && document == null) {
- return;
- }
- if (oldDoc != null) {
- oldDoc.removeDocumentListener(fInternalDocumentListener);
- if (oldDoc.equals(document)) {
- document.addDocumentListener(fInternalDocumentListener);
- return;
- }
- }
-
- super.setDocument(document);
- if (document != null) {
- revealEndOfDocument();
- document.addDocumentListener(fInternalDocumentListener);
- }
- }
-
- /**
- * @see IFindReplaceTarget#canPerformFind()
- */
- protected boolean canPerformFind() {
- return (getTextWidget() != null && getVisibleDocument() != null && getVisibleDocument().getLength() > 0);
- }
-
- /**
- * Dispose this viewer and resources
- */
- public void dispose() {
- }
-
- /**
- * @see org.eclipse.swt.custom.LineStyleListener#lineGetStyle(org.eclipse.swt.custom.LineStyleEvent)
- */
- public void lineGetStyle(LineStyleEvent event) {
- IDocument document = getDocument();
- if (document != null) {
- MessageConsolePartitioner partitioner = (MessageConsolePartitioner)document.getDocumentPartitioner();
- if (partitioner != null) {
- ITypedRegion[] regions = partitioner.computePartitioning(event.lineOffset, event.lineOffset + event.lineText.length());
- StyleRange[] styles = new StyleRange[regions.length];
- for (int i = 0; i < regions.length; i++) {
- MessageConsolePartition partition = (MessageConsolePartition)regions[i];
- Color color = partition.getStream().getColor();
- styles[i] = new StyleRange(partition.getOffset(), partition.getLength(), color, null);
- }
- event.styles = styles;
- }
- }
- }
-
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/PinConsoleAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/PinConsoleAction.java
deleted file mode 100644
index a2c82d7b8..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/PinConsoleAction.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.ui.texteditor.IUpdate;
-
-/**
- * Pins the currently visible console in a console view.
- */
-public class PinConsoleAction extends Action implements IUpdate {
-
- private IConsoleView fView = null;
-
- /**
- * Constructs a 'pin console' action
- */
- public PinConsoleAction(IConsoleView view) {
- super(ConsoleMessages.getString("PinConsoleAction.0"), IAction.AS_CHECK_BOX); //$NON-NLS-1$
- setToolTipText(ConsoleMessages.getString("PinConsoleAction.1")); //$NON-NLS-1$
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_PIN));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_PIN));
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_LCL_PIN));
- fView = view;
- update();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- if (isChecked()) {
- fView.pin(fView.getConsole());
- } else {
- fView.pin(null);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.IUpdate#update()
- */
- public void update() {
- setEnabled(fView.getConsole() != null);
- setChecked(fView.isPinned());
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ShowConsoleAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ShowConsoleAction.java
deleted file mode 100644
index 3bc66599b..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/console/ShowConsoleAction.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.console;
-
-import org.eclipse.jface.action.Action;
-
-/**
- * Shows a specific console in the console view
- */
-public class ShowConsoleAction extends Action {
-
- private IConsole fConsole;
- private IConsoleView fView;
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- if (!fConsole.equals(fView.getConsole())) {
- // only change if required (and un-pin the console if pinned)
- fView.pin(null);
- fView.display(fConsole);
- }
- }
-
- /**
- * Constructs an action to display the given console.
- *
- * @param view the console view in which the given console is contained
- * @param console the console
- */
- public ShowConsoleAction(IConsoleView view, IConsole console) {
- super();
- fConsole = console;
- fView = view;
- setText(console.getName());
- setImageDescriptor(console.getImageDescriptor());
- }
-
-
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/BreakPartition.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/BreakPartition.java
index 5233effdb..30a078cc6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/BreakPartition.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/BreakPartition.java
@@ -15,7 +15,7 @@ import org.eclipse.debug.internal.ui.DebugUIPlugin;
/**
* A partition in a console document that represents a break after an input
- * partition. This represents a hard break that the user cannot backsapce/delete.
+ * partition. This represents a hard break that the user cannot backspace/delete.
*/
public class BreakPartition extends StreamPartition {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleDocumentManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleDocumentManager.java
index d1aaa4893..6accb6bd0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleDocumentManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleDocumentManager.java
@@ -28,9 +28,6 @@ import org.eclipse.debug.core.ILaunchListener;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.console.IConsole;
-import org.eclipse.debug.internal.ui.console.IConsoleManager;
-import org.eclipse.debug.internal.ui.console.IConsoleView;
import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.debug.ui.console.IConsoleColorProvider;
@@ -41,6 +38,11 @@ import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleConstants;
+import org.eclipse.ui.console.IConsoleManager;
+import org.eclipse.ui.console.IConsoleView;
import org.eclipse.ui.texteditor.IDocumentProvider;
/**
@@ -73,7 +75,7 @@ public class ConsoleDocumentManager implements ILaunchListener {
protected void removeLaunch(ILaunch launch) {
IProcess[] processes= launch.getProcesses();
- IConsoleManager manager = DebugUIPlugin.getDefault().getConsoleManager();
+ IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
for (int i= 0; i < processes.length; i++) {
IProcess iProcess = processes[i];
IConsole console = getConsole(iProcess);
@@ -93,7 +95,7 @@ public class ConsoleDocumentManager implements ILaunchListener {
* @return the console for the given process, or <code>null</code> if none
*/
private IConsole getConsole(IProcess process) {
- IConsoleManager manager = DebugUIPlugin.getDefault().getConsoleManager();
+ IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
IConsole[] consoles = manager.getConsoles();
for (int i = 0; i < consoles.length; i++) {
IConsole console = consoles[i];
@@ -131,7 +133,7 @@ public class ConsoleDocumentManager implements ILaunchListener {
} catch (CoreException e) {
}
ProcessConsole pc = new ProcessConsole(process);
- DebugUIPlugin.getDefault().getConsoleManager().addConsoles(new IConsole[]{pc});
+ ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[]{pc});
}
}
}
@@ -226,11 +228,11 @@ public class ConsoleDocumentManager implements ILaunchListener {
if (window != null) {
IWorkbenchPage page= window.getActivePage();
if (page != null) {
- IViewPart consoleView= page.findView(IDebugUIConstants.ID_CONSOLE_VIEW);
+ IViewPart consoleView= page.findView(IConsoleConstants.ID_CONSOLE_VIEW);
if (consoleView == null) {
IWorkbenchPart activePart= page.getActivePart();
try {
- consoleView = page.showView(IDebugUIConstants.ID_CONSOLE_VIEW);
+ consoleView = page.showView(IConsoleConstants.ID_CONSOLE_VIEW);
} catch (PartInitException pie) {
DebugUIPlugin.log(pie);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleDocumentPartitioner.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleDocumentPartitioner.java
index ab0f6772c..6917713ff 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleDocumentPartitioner.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleDocumentPartitioner.java
@@ -164,7 +164,7 @@ public class ConsoleDocumentPartitioner implements IDocumentPartitioner, IDocume
private boolean fPoll = false;
/**
- * The associated docuemnt
+ * The associated document
*/
private IDocument fDocument = null;
@@ -762,7 +762,7 @@ public class ConsoleDocumentPartitioner implements IDocumentPartitioner, IDocume
}
/**
- * Sets whether a runnable has been submitted to update the console
+ * Returns whether a runnable has been submitted to update the console
* document.
*/
protected boolean isAppendInProgress() {
@@ -808,8 +808,8 @@ public class ConsoleDocumentPartitioner implements IDocumentPartitioner, IDocume
return fSortedLineDelimiters;
}
- /**
- * @see org.eclipse.debug.internal.ui.views.console.IConsoleDocumentPartitioner#connect(org.eclipse.debug.core.model.IStreamMonitor, java.lang.String)
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.console.IConsole#connect(org.eclipse.debug.core.model.IStreamMonitor, java.lang.String)
*/
public void connect(IStreamMonitor streamMonitor, String streamIdentifer) {
if (streamMonitor != null) {
@@ -821,8 +821,8 @@ public class ConsoleDocumentPartitioner implements IDocumentPartitioner, IDocume
}
}
- /**
- * @see org.eclipse.debug.internal.ui.views.console.IConsoleDocumentPartitioner#connect(org.eclipse.debug.core.model.IStreamsProxy)
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.console.IConsole#connect(org.eclipse.debug.core.model.IStreamsProxy)
*/
public void connect(IStreamsProxy streamsProxy) {
fProxy = streamsProxy;
@@ -838,8 +838,8 @@ public class ConsoleDocumentPartitioner implements IDocumentPartitioner, IDocume
return fColorProvider;
}
- /**
- * @see IConsole#addLink(IConsoleHyperlink, int, int)
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.console.IConsole#addLink(org.eclipse.debug.ui.console.IConsoleHyperlink, int, int)
*/
public void addLink(IConsoleHyperlink link, int offset, int length) {
HyperlinkPosition hyperlinkPosition = new HyperlinkPosition(link, offset, length);
@@ -854,14 +854,14 @@ public class ConsoleDocumentPartitioner implements IDocumentPartitioner, IDocume
}
}
- /**
- * @see org.eclipse.debug.internal.ui.views.console.IConsole#getDocument()
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.console.IConsole#getDocument()
*/
public IDocument getDocument() {
return fDocument;
}
- /**
+ /* (non-Javadoc)
* @see org.eclipse.debug.ui.console.IConsole#getProcess()
*/
public IProcess getProcess() {
@@ -878,7 +878,7 @@ public class ConsoleDocumentPartitioner implements IDocumentPartitioner, IDocume
lineNotifier.connect(this);
}
- /**
+ /* (non-Javadoc)
* @see org.eclipse.debug.ui.console.IConsole#getRegion(org.eclipse.debug.ui.console.IConsoleHyperlink)
*/
public IRegion getRegion(IConsoleHyperlink link) {
@@ -894,5 +894,4 @@ public class ConsoleDocumentPartitioner implements IDocumentPartitioner, IDocume
}
return null;
}
-
-}
+} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleDocumentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleDocumentProvider.java
index 8c0249a02..c1d55f5b8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleDocumentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleDocumentProvider.java
@@ -23,7 +23,7 @@ import org.eclipse.ui.texteditor.AbstractDocumentProvider;
/**
* Default document provider for the processes. By default a document is created
- * which is contected to the streams proxy of the associated process.
+ * which is connected to the streams proxy of the associated process.
*/
public class ConsoleDocumentProvider extends AbstractDocumentProvider {
@@ -114,4 +114,4 @@ public class ConsoleDocumentProvider extends AbstractDocumentProvider {
private ConsoleDocumentManager getConsoleDocumentManager() {
return DebugUIPlugin.getDefault().getConsoleDocumentManager();
}
-}
+} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleViewer.java
index d406455f3..bd255d697 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleViewer.java
@@ -12,7 +12,6 @@ package org.eclipse.debug.internal.ui.views.console;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
import org.eclipse.debug.ui.console.IConsoleColorProvider;
import org.eclipse.debug.ui.console.IConsoleHyperlink;
@@ -49,6 +48,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
+import org.eclipse.ui.console.IConsoleConstants;
public class ConsoleViewer extends TextViewer implements IPropertyChangeListener, MouseTrackListener, MouseMoveListener, MouseListener, PaintListener, LineStyleListener, Listener {
@@ -113,7 +113,7 @@ public class ConsoleViewer extends TextViewer implements IPropertyChangeListener
DebugUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
JFaceResources.getFontRegistry().addListener(this);
- getTextWidget().setFont(JFaceResources.getFont(IInternalDebugUIConstants.CONSOLE_FONT));
+ getTextWidget().setFont(JFaceResources.getFont(IConsoleConstants.CONSOLE_FONT));
getTextWidget().addMouseTrackListener(this);
getTextWidget().addPaintListener(this);
getTextWidget().addLineStyleListener(this);
@@ -185,8 +185,8 @@ public class ConsoleViewer extends TextViewer implements IPropertyChangeListener
propertyName.equals(IDebugPreferenceConstants.CONSOLE_SYS_OUT_RGB) ||
propertyName.equals(IDebugPreferenceConstants.CONSOLE_SYS_ERR_RGB)) {
getTextWidget().redraw();
- } else if (propertyName.equals(IInternalDebugUIConstants.CONSOLE_FONT)) {
- getTextWidget().setFont(JFaceResources.getFont(IInternalDebugUIConstants.CONSOLE_FONT));
+ } else if (propertyName.equals(IConsoleConstants.CONSOLE_FONT)) {
+ getTextWidget().setFont(JFaceResources.getFont(IConsoleConstants.CONSOLE_FONT));
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java
index c5abe9a25..454b4a396 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java
@@ -21,9 +21,9 @@ import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.debug.internal.ui.DebugPluginImages;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.console.AbstractConsole;
-import org.eclipse.debug.internal.ui.console.IConsoleView;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.console.AbstractConsole;
+import org.eclipse.ui.console.IConsoleView;
import org.eclipse.ui.part.IPageBookViewPage;
/**
@@ -39,7 +39,7 @@ public class ProcessConsole extends AbstractConsole implements IDebugEventSetLis
private IProcess fProcess = null;
/* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.IConsole#createPage(org.eclipse.debug.internal.ui.console.IConsoleView)
+ * @see org.eclipse.ui.console.IConsole#createPage(org.eclipse.ui.console.IConsoleView)
*/
public IPageBookViewPage createPage(IConsoleView view) {
return new ProcessConsolePage(view, this);
@@ -105,7 +105,7 @@ public class ProcessConsole extends AbstractConsole implements IDebugEventSetLis
}
/* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.AbstractConsole#dispose()
+ * @see org.eclipse.ui.console.AbstractConsole#dispose()
*/
protected void dispose() {
super.dispose();
@@ -113,7 +113,7 @@ public class ProcessConsole extends AbstractConsole implements IDebugEventSetLis
}
/* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.console.AbstractConsole#init()
+ * @see org.eclipse.ui.console.AbstractConsole#init()
*/
protected void init() {
super.init();
@@ -138,4 +138,4 @@ public class ProcessConsole extends AbstractConsole implements IDebugEventSetLis
}
}
}
-}
+} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsolePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsolePage.java
index fa0fab8b1..ba37908c1 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsolePage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsolePage.java
@@ -24,12 +24,8 @@ import org.eclipse.debug.core.IDebugEventSetListener;
import org.eclipse.debug.core.model.IDebugTarget;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.actions.ClearOutputAction;
import org.eclipse.debug.internal.ui.actions.FollowHyperlinkAction;
import org.eclipse.debug.internal.ui.actions.KeyBindingFollowHyperlinkAction;
-import org.eclipse.debug.internal.ui.actions.TextViewerAction;
-import org.eclipse.debug.internal.ui.actions.TextViewerGotoLineAction;
-import org.eclipse.debug.internal.ui.console.IConsoleView;
import org.eclipse.debug.internal.ui.views.DebugUIViewsMessages;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugUIConstants;
@@ -61,6 +57,11 @@ import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.console.IConsoleConstants;
+import org.eclipse.ui.console.IConsoleView;
+import org.eclipse.ui.console.actions.ClearOutputAction;
+import org.eclipse.ui.console.actions.TextViewerAction;
+import org.eclipse.ui.console.actions.TextViewerGotoLineAction;
import org.eclipse.ui.part.IPageBookViewPage;
import org.eclipse.ui.part.IPageSite;
import org.eclipse.ui.part.IShowInSource;
@@ -346,15 +347,12 @@ public class ProcessConsolePage implements IPageBookViewPage, ISelectionListener
return fViewer;
}
- /**
- * @see AbstractDebugView#configureToolBar(IToolBarManager)
- */
protected void configureToolBar(IToolBarManager mgr) {
- mgr.appendToGroup(IDebugUIConstants.LAUNCH_GROUP, fTerminate);
- mgr.appendToGroup(IDebugUIConstants.LAUNCH_GROUP, fRemoveTerminated);
+ mgr.appendToGroup(IConsoleConstants.LAUNCH_GROUP, fTerminate);
+ mgr.appendToGroup(IConsoleConstants.LAUNCH_GROUP, fRemoveTerminated);
//mgr.add(fProcessDropDownAction);
- mgr.appendToGroup(IDebugUIConstants.OUTPUT_GROUP, fScrollLockAction);
- mgr.appendToGroup(IDebugUIConstants.OUTPUT_GROUP, fClearOutputAction);
+ mgr.appendToGroup(IConsoleConstants.OUTPUT_GROUP, fScrollLockAction);
+ mgr.appendToGroup(IConsoleConstants.OUTPUT_GROUP, fClearOutputAction);
}
/**
@@ -393,8 +391,8 @@ public class ProcessConsolePage implements IPageBookViewPage, ISelectionListener
}
}
- /**
- * @see WorkbenchPart#getAdapter(Class)
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
public Object getAdapter(Class required) {
if (IFindReplaceTarget.class.equals(required)) {
@@ -412,8 +410,8 @@ public class ProcessConsolePage implements IPageBookViewPage, ISelectionListener
return null;
}
- /**
- * @see IShowInSource#getShowInContext()
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.IShowInSource#getShowInContext()
*/
public ShowInContext getShowInContext() {
IProcess process = getProcess();
@@ -431,8 +429,8 @@ public class ProcessConsolePage implements IPageBookViewPage, ISelectionListener
}
}
- /**
- * @see IShowInTargetList#getShowInTargetIds()
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.IShowInTargetList#getShowInTargetIds()
*/
public String[] getShowInTargetIds() {
return new String[] {IDebugUIConstants.ID_DEBUG_VIEW};
@@ -480,5 +478,4 @@ public class ProcessConsolePage implements IPageBookViewPage, ISelectionListener
findReplace.update();
}
}
-
-}
+} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java
index ab07992d3..2b2fd5b5b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java
@@ -35,7 +35,6 @@ import org.eclipse.debug.internal.ui.VariablesViewModelPresentation;
import org.eclipse.debug.internal.ui.actions.ChangeVariableValueAction;
import org.eclipse.debug.internal.ui.actions.CollapseAllAction;
import org.eclipse.debug.internal.ui.actions.ShowTypesAction;
-import org.eclipse.debug.internal.ui.actions.TextViewerAction;
import org.eclipse.debug.internal.ui.actions.ToggleDetailPaneAction;
import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
import org.eclipse.debug.internal.ui.views.AbstractDebugEventHandler;
@@ -98,6 +97,7 @@ import org.eclipse.ui.INullSelectionListener;
import org.eclipse.ui.ISelectionListener;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.console.actions.TextViewerAction;
import org.eclipse.ui.texteditor.FindReplaceAction;
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
import org.eclipse.ui.texteditor.IUpdate;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java
index 1c08f9f81..017965115 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java
@@ -238,6 +238,8 @@ public interface IDebugUIConstants {
/**
* Console view identifier (value <code>"org.eclipse.debug.ui.ConsoleView"</code>).
+ * @deprecated Use org.eclipse.ui.console.IConsoleConstants.ID_CONSOLE_VIEW
+ * @since 3.0
*/
public static final String ID_CONSOLE_VIEW= "org.eclipse.debug.ui.ConsoleView"; //$NON-NLS-1$
@@ -282,7 +284,8 @@ public interface IDebugUIConstants {
/** "Link with View" action image identifier. */
public static final String IMG_ACT_SYNCED= "IMG_ACT_SYNCED"; //$NON-NLS-1$
- /** Clear action image identifier. */
+ /** Clear action image identifier.
+ * @deprecated */
public static final String IMG_LCL_CLEAR= "IMG_LCL_CLEAR"; //$NON-NLS-1$
/** Display variable type names action image identifier. */
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/ConsoleColorProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/ConsoleColorProvider.java
index 6f158f014..557e5699d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/ConsoleColorProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/ConsoleColorProvider.java
@@ -31,8 +31,8 @@ public class ConsoleColorProvider implements IConsoleColorProvider {
private IProcess fProcess;
private IConsole fConsole;
- /**
- * @see IConsoleColorProvider#connect(IProcess, IConsole)
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.console.IConsoleColorProvider#connect(org.eclipse.debug.core.model.IProcess, org.eclipse.debug.ui.console.IConsole)
*/
public void connect(IProcess process, IConsole console) {
fProcess = process;
@@ -43,23 +43,23 @@ public class ConsoleColorProvider implements IConsoleColorProvider {
}
}
- /**
- * @see IConsoleColorProvider#disconnect()
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.console.IConsoleColorProvider#disconnect()
*/
public void disconnect() {
fConsole = null;
fProcess = null;
}
- /**
- * @see IConsoleColorProvider#isReadOnly()
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.console.IConsoleColorProvider#isReadOnly()
*/
public boolean isReadOnly() {
return fProcess == null || fProcess.isTerminated();
}
- /**
- * @see IConsoleColorProvider#getColor(String)
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.console.IConsoleColorProvider#getColor(java.lang.String)
*/
public Color getColor(String streamIdentifer) {
if (IDebugUIConstants.ID_STANDARD_OUTPUT_STREAM.equals(streamIdentifer)) {
@@ -95,4 +95,4 @@ public class ConsoleColorProvider implements IConsoleColorProvider {
protected IConsole getConsole() {
return fConsole;
}
-}
+} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/FileLink.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/FileLink.java
index f8b5ccdb5..c5abf9c95 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/FileLink.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/FileLink.java
@@ -60,8 +60,8 @@ public class FileLink implements IConsoleHyperlink {
fEditorId = editorId;
}
- /**
- * @see IConsoleHyperlink#linkActivated()
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.console.IConsoleHyperlink#linkActivated()
*/
public void linkActivated() {
IWorkbenchWindow window = DebugUIPlugin.getActiveWorkbenchWindow();
@@ -104,16 +104,15 @@ public class FileLink implements IConsoleHyperlink {
}
}
- /**
- * @see IConsoleHyperlink#linkEntered()
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.console.IConsoleHyperlink#linkEntered()
*/
public void linkEntered() {
}
- /**
- * @see IConsoleHyperlink#linkExited()
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.console.IConsoleHyperlink#linkExited()
*/
public void linkExited() {
}
-
-}
+} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleColorProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleColorProvider.java
index 035e929d4..b49392d5c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleColorProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleColorProvider.java
@@ -17,9 +17,9 @@ import org.eclipse.swt.graphics.Color;
/**
* Provides coloring for a console document. When a process is added to a
* registered launch the debug plug-in creates a console document for the
- * process. By default, a document is created which is contected to the standard
+ * process. By default, a document is created which is connected to the standard
* input, output, and error streams associated with the process. A client may
- * override the default coloring by specifying a custom content providier for a
+ * override the default coloring by specifying a custom content provider for a
* process type. A proccess type is defined via the process attribute
* <code>IProcess. ATTR_PROCESS_TYPE</code>.
* <p>

Back to the top