Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.debug.core/.classpath11
-rw-r--r--org.eclipse.debug.core/.cvsignore1
-rw-r--r--org.eclipse.debug.core/.options1
-rw-r--r--org.eclipse.debug.core/.vcm_meta7
-rw-r--r--org.eclipse.debug.core/build.properties10
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/DebugEvent.java203
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/DebugException.java39
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java225
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/IBreakpointListener.java62
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/IBreakpointManager.java121
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/IDebugConstants.java74
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/IDebugEventListener.java29
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/IDebugStatusConstants.java60
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunch.java78
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchListener.java35
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchManager.java150
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/ILauncher.java106
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/IStreamListener.java33
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/Launch.java258
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java74
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/IBreakpoint.java104
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/IDebugElement.java173
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/IDebugTarget.java50
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/IDisconnect.java50
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/ILauncherDelegate.java135
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/ILineBreakpoint.java36
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/IProcess.java73
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/ISourceLocator.java67
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/IStackFrame.java61
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/IStep.java90
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/IStreamMonitor.java49
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/IStreamsProxy.java57
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/ISuspendResume.java63
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/ITerminate.java46
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/IThread.java56
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/IValue.java99
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/IValueModification.java60
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/IVariable.java76
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/LineBreakpoint.java49
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/package.html57
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/package.html175
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java445
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreResources.properties70
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreUtils.java75
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java159
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java245
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Launcher.java120
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ListenerList.java141
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java102
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ProcessMonitor.java75
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/RuntimeProcess.java218
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/StreamsProxy.java85
-rw-r--r--org.eclipse.debug.core/doc/hglegal.htm13
-rw-r--r--org.eclipse.debug.core/doc/ngibmcpy.gifbin814 -> 0 bytes
-rw-r--r--org.eclipse.debug.core/doc/org_eclipse_debug_core.html36
-rw-r--r--org.eclipse.debug.core/doc/org_eclipse_debug_core_launchers.html101
-rw-r--r--org.eclipse.debug.core/exportplugin.xml32
-rw-r--r--org.eclipse.debug.core/plugin.jars1
-rw-r--r--org.eclipse.debug.core/plugin.xml56
-rw-r--r--org.eclipse.debug.ui/.cvsignore1
-rw-r--r--org.eclipse.debug.ui/.options1
-rw-r--r--org.eclipse.debug.ui/.vcm_meta8
-rw-r--r--org.eclipse.debug.ui/build.properties14
-rw-r--r--org.eclipse.debug.ui/doc/hglegal.htm13
-rw-r--r--org.eclipse.debug.ui/doc/ngibmcpy.gifbin814 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/doc/org_eclipse_debug_ui.html32
-rw-r--r--org.eclipse.debug.ui/doc/org_eclipse_debug_ui_debugModelPresentations.html56
-rw-r--r--org.eclipse.debug.ui/exportplugin.xml36
-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/disconnect_co.gifbin227 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/clcl16/inspect_co.gifbin157 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/clcl16/qnames_co.gifbin132 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/clcl16/rem_all_co.gifbin117 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/clcl16/rem_co.gifbin97 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/clcl16/resume_co.gifbin128 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/clcl16/stepinto_co.gifbin144 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/clcl16/stepover_co.gifbin159 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/clcl16/stepreturn_co.gifbin144 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/clcl16/suspend_co.gifbin102 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/clcl16/terminate_co.gifbin109 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/clcl16/tnames_co.gifbin181 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/ctool16/debug_exc.gifbin166 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/ctool16/run_exc.gifbin125 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/cview16/breakpoint_view.gifbin165 -> 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/cview16/debug_persp.gifbin245 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/cview16/debug_view.gifbin180 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/cview16/process_view.gifbin167 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/cview16/variable_view.gifbin159 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/cview16/watchlist_view.gifbin169 -> 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/disconnect_co.gifbin97 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/dlcl16/inspect_co.gifbin90 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/dlcl16/qnames_co.gifbin95 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/dlcl16/rem_all_co.gifbin80 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/dlcl16/rem_co.gifbin66 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/dlcl16/resume_co.gifbin79 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/dlcl16/stepinto_co.gifbin85 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/dlcl16/stepover_co.gifbin96 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/dlcl16/stepreturn_co.gifbin85 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/dlcl16/suspend_co.gifbin76 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/dlcl16/terminate_co.gifbin85 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/dlcl16/tnames_co.gifbin101 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/dtool16/debug_exc.gifbin104 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/dtool16/run_exc.gifbin94 -> 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/disconnect_co.gifbin162 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/elcl16/inspect_co.gifbin153 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/elcl16/qnames_co.gifbin122 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/elcl16/rem_all_co.gifbin111 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/elcl16/rem_co.gifbin97 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/elcl16/resume_co.gifbin97 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/elcl16/stepinto_co.gifbin144 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/elcl16/stepover_co.gifbin159 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/elcl16/stepreturn_co.gifbin144 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/elcl16/suspend_co.gifbin102 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/elcl16/terminate_co.gifbin88 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/elcl16/tnames_co.gifbin145 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/etool16/debug_exc.gifbin138 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/etool16/run_exc.gifbin122 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/eview16/breakpoint_view.gifbin131 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/eview16/console_view.gifbin163 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/eview16/debug_persp.gifbin181 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/eview16/debug_view.gifbin187 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/eview16/process_view.gifbin171 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/eview16/variable_view.gifbin134 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/eview16/watchlist_view.gifbin146 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/obj16/brkp_obj.gifbin140 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/obj16/brkpd_obj.gifbin136 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/obj16/debugt_obj.gifbin179 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/obj16/debugtt_obj.gifbin161 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/obj16/expression_obj.gifbin909 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/obj16/ldebug_obj.gifbin166 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/obj16/lrun_obj.gifbin141 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/obj16/osprc_obj.gifbin184 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/obj16/osprct_obj.gifbin248 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/obj16/stckframe_obj.gifbin100 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/obj16/thread_obj.gifbin215 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/obj16/threads_obj.gifbin162 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/obj16/threadt_obj.gifbin212 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/ovr16/stcksync_ov.gifbin79 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/wizban/debug_wiz.gifbin2515 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/icons/full/wizban/run_wiz.gifbin1910 -> 0 bytes
-rw-r--r--org.eclipse.debug.ui/plugin.jars1
-rw-r--r--org.eclipse.debug.ui/plugin.properties36
-rw-r--r--org.eclipse.debug.ui/plugin.xml236
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugView.java121
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AddToInspectorAction.java38
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/BasicContentProvider.java115
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/BreakpointsContentProvider.java98
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/BreakpointsView.java243
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ChangeVariableValueAction.java192
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ClearOutputAction.java39
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java38
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleDocument.java397
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleGotoLineAction.java103
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleOutputTextStore.java62
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsolePreferencePage.java82
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleView.java244
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleViewer.java192
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleViewerAction.java47
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ControlAction.java54
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ControlActionDelegate.java172
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/CopyToClipboardActionDelegate.java169
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/CopyVariablesToClipboardActionDelegate.java109
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugAction.java35
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugContentProvider.java285
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugDropDownAction.java34
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugMenuManager.java25
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspective.java55
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java219
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPreferencePage.java53
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java1410
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIResources.properties261
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIUtils.java75
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugView.java532
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java486
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DisconnectActionDelegate.java51
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/EnableDisableBreakpointAction.java134
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ExecutionAction.java301
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java68
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugPreferenceConstants.java41
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java50
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectItem.java40
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorAction.java58
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorContentProvider.java232
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorList.java37
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorView.java144
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorViewAddToInspectorAction.java61
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchDropDownAction.java97
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchHistoryElement.java107
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchSelectionAction.java102
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWithAction.java131
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizard.java209
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizardDialog.java35
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizardNode.java104
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizardProjectSelectionPage.java306
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizardSelectionPage.java284
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LauncherPropertyPage.java259
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchesView.java223
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchesViewer.java90
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchesViewerFilter.java65
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java158
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/OpenBreakpointMarkerAction.java65
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/OpenMarkerAction.java58
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ProcessesContentProvider.java60
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchActionDelegate.java102
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchHistoryLaunchAction.java46
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchLastAction.java63
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveAllBreakpointsAction.java86
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveAllFromInspectorAction.java40
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveBreakpointAction.java81
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveFromInspectorAction.java63
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveTerminatedAction.java85
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ResumeActionDelegate.java69
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RunAction.java34
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RunDropDownAction.java31
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ShowQualifiedAction.java73
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ShowTypesAction.java75
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepActionDelegate.java56
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepIntoActionDelegate.java50
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepOverActionDelegate.java50
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepReturnActionDelegate.java50
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StringMatcher.java404
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SuspendActionDelegate.java64
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/TerminateActionDelegate.java52
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/TerminateAllAction.java65
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/TerminateAndRemoveActionDelegate.java68
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariablesContentProvider.java99
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariablesView.java164
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java114
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugModelPresentation.java160
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java388
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIEventFilter.java55
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugViewAdapter.java56
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchWizard.java60
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/package.html86
237 files changed, 0 insertions, 18055 deletions
diff --git a/org.eclipse.debug.core/.classpath b/org.eclipse.debug.core/.classpath
deleted file mode 100644
index a6332293f..000000000
--- a/org.eclipse.debug.core/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="Eclipse Debug Core"/>
- <classpathentry kind="var" path="JRE_LIB" rootpath="src" sourcepath="JRE_SRC"/>
- <classpathentry kind="lib" path="/org.apache.xerces/xerces.jar"/>
- <classpathentry kind="lib"
- path="/org.eclipse.core.resources/resources.jar" sourcepath="/org.eclipse.core.resources/resourcessrc.zip"/>
- <classpathentry kind="lib"
- path="/org.eclipse.core.runtime/runtime.jar" sourcepath="/org.eclipse.core.runtime/runtimesrc.zip"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.debug.core/.cvsignore b/org.eclipse.debug.core/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/org.eclipse.debug.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/org.eclipse.debug.core/.options b/org.eclipse.debug.core/.options
deleted file mode 100644
index a3e35f6ef..000000000
--- a/org.eclipse.debug.core/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.debug.core/debug=true \ No newline at end of file
diff --git a/org.eclipse.debug.core/.vcm_meta b/org.eclipse.debug.core/.vcm_meta
deleted file mode 100644
index 7655f8db4..000000000
--- a/org.eclipse.debug.core/.vcm_meta
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project-description>
- <comment></comment>
- <nature id="org.eclipse.jdt.core.javanature"/>
- <builder name="org.eclipse.jdt.core.javabuilder">
- </builder>
-</project-description>
diff --git a/org.eclipse.debug.core/build.properties b/org.eclipse.debug.core/build.properties
deleted file mode 100644
index 637c89ad6..000000000
--- a/org.eclipse.debug.core/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-bin.includes = .options,\
- plugin.xml,\
- *.jar
-build.includes = .options,\
- plugin.jars,\
- plugin.xml,\
- doc/,\
- build.properties
-build.vaj.Eclipse\ Debug\ Core = Eclipse Debug Core
-source.dtcore.jar = Eclipse Debug Core
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugEvent.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugEvent.java
deleted file mode 100644
index e1537bf9e..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugEvent.java
+++ /dev/null
@@ -1,203 +0,0 @@
-package org.eclipse.debug.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.EventObject;
-
-/**
- * A debug event describes an event in a program being debugged.
- * Debug model implementations are required to generate debug events as
- * specified by this class. Debug events also describe the creation and
- * termiation of system processes.
- * <p>
- * The following list defines the events that are required to
- * be generated for each element type, and when the event should be created.
- * The object that an event is associated
- * with is available from the event's <code>getSource</code> method. Creation
- * events are guaranteed to occur in a top down order - that is, parents are created
- * before children. Termination events are guaranteed to occur in a bottom up order -
- * that is, children before parents. However, termination events are not guaranteed
- * for all elements that are created. That is, terminate events can be coalesced - a
- * terminate event for a parent signals that all children have been terminated.
- * </p>
- * <p>
- * The generic <code>CHANGE</code> event can be fired at any time by any element.
- * Generally, a client of a debug model, such as as a UI, can get sufficient
- * information to update by listening/responding to the other event kinds. However,
- * if a debug model needs to inform clients of a change that is not specified
- * by create/terminate/suspend/resume, the <code>CHANGE</code> event may be used.
- * For example, generally, the only way a thread or any of its children can change
- * state between a suspend and resume operation, is if the thread or owning debug
- * target is termianted. However, if a debug model supports some other operation
- * that would allow a debug element to change state while suspended, the debug model
- * would fire a change event for that element.
- * </p>
- * <ul>
- * <li><code>IDebugTarget</code>
- * <ul>
- * <li><code>CREATE</code> - a debug target has been created and is ready
- * to begin a debug session.</li>
- * <li><code>TERMINATE</code> - a debug target has terminated and the debug
- * session has ended.</li>
- * </ul>
- * </li>
- * <li><code>IThread</code>
- * <ul>
- * <li><code>CREATE</code> - a thread has been created in a debug target.</li>
- * <li><code>TERMINATE</code> - a thread has ended.</li>
- * <li><code>SUSPEND</code> - a thread has suspended. Event detail provides
- * the reason for the suspension, or -1 if unknown:<ul>
- * <li>STEP_END - a request to step has completed</li>
- * <li>BREAKPOINT - a breakpoint has been hit</li>
- * <li>CLIENT_REQUEST - a user request has caused the thread to suspend</li>
- * </ul>
- * </li>
- * <li><code>RESUME</code> - a thread has resumed. Event detail provides
- * the reason for the resume, or -1 if unknown:<ul>
- * <li>STEP_START - a thread is being resumed because of a request to step</li>
- * <li>CLIENT_REQUEST - a thread is being resumed</li>
- * </ul>
- * </li>
- * </ul>
- * </li>
- * <li><code>IStackFrame</code> - no events are specified for stack frames.
- * When a thread is suspended, it has children (stack frames). When a thread resumes,
- * stack frames are unavailable.
- * </li>
- * <li><code>IVariable</code> - no events are specified for variables.
- * When a thread is suspended, stack frames have variables. When a thread resumes,
- * variables are unavailable.
- * </li>
- * <li><code>IValue</code> - no events are specified for values.
- * </li>
- * <li><code>IProcess</code>
- * <ul>
- * <li><code>CREATE</code> - a system process has been created.</li>
- * <li><code>TERMINATE</code> - a system process has terminated.</li>
- * </ul>
- * </li>
- * </ul>
- * <p>
- * Clients may instantiate this class. Clients are not intended to subclass this class.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public final class DebugEvent extends EventObject {
-
- /**
- * Resume event.
- */
- public static final int RESUME= 0x0001;
-
- /**
- * Suspend event.
- */
- public static final int SUSPEND= 0x0002;
-
- /**
- * Create event.
- */
- public static final int CREATE= 0x0004;
-
- /**
- * Terminate event.
- */
- public static final int TERMINATE= 0x0008;
-
- /**
- * Change event.
- */
- public static final int CHANGE= 0x0010;
-
- /**
- * Step start detail. Indicates a thread was resumed by a step action.
- */
- public static final int STEP_START= 0x0001;
-
- /**
- * Step end detail. Indicates a thread was suspended due
- * to the completion of a step action.
- */
- public static final int STEP_END= 0x0002;
-
- /**
- * Breakpoint detail. Indicates a thread was suspended by
- * a breakpoint.
- */
- public static final int BREAKPOINT= 0x0004;
-
- /**
- * Client request detail. Indicates a thread was suspended due
- * to a client request.
- */
- public static final int CLIENT_REQUEST= 0x0008;
-
- /**
- * The kind of event - one of the kind constants defined by
- * this class.
- */
- private int fKind= 0;
-
- /**
- * The detail of the event - one of the detail constants defined by
- * this class.
- */
- private int fDetail= -1;
- /**
- * Constructs a new debug event of the given kind with a detail code of -1.
- *
- * @param eventSource the object that generated the event
- * @param kind the kind of debug envent (one of the
- * constants in <code>IDebugEventConstants</code>)
- */
- public DebugEvent(Object eventSource, int kind) {
- this(eventSource, kind, -1);
- }
-
- /**
- * Constructs a new debug event of the given kind with the given detail.
- *
- * @param eventSource the object that generated the event
- * @param kind the kind of debug envent (one of the
- * kine constants defined by this class)
- * @param detail extra information about the event (one of the
- * detail constants defined by this class), or -1 if
- * unspecified
- */
- public DebugEvent(Object eventSource, int kind, int detail) {
- super(eventSource);
- if ((kind & (RESUME | SUSPEND | CREATE | TERMINATE | CHANGE)) == 0)
- throw new IllegalArgumentException("kind is not one of the allowed constants, see IDebugEventConstants");
- if (detail != -1 && (detail & (STEP_END | STEP_START | BREAKPOINT | CLIENT_REQUEST)) == 0)
- throw new IllegalArgumentException("detail is not one of the allowed constants, see IDebugEventConstants");
- fKind= kind;
- fDetail= detail;
- }
-
- /**
- * Returns a constant describing extra detail about the event - one
- * of the detail constants defined by this class, or -1 if unspecified.
- *
- * @return the detail code
- */
- public int getDetail() {
- return fDetail;
- }
-
- /**
- * Returns this event's kind - one of the kind constants defined by this class.
- */
- public int getKind() {
- return fKind;
- }
-
-}
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugException.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugException.java
deleted file mode 100644
index 23ffe130f..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.eclipse.debug.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-
-/**
- * A checked exception representing a failure.
- * <p>
- * Clients may instantiate this class. Clients are not intended to subclass this class.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see IStatus
- */
-public class DebugException extends CoreException {
-
- /**
- * Constructs a new debug exception with the given status object.
- *
- * @param status the status object to be associated with this exception
- * @see IStatus
- */
- public DebugException(IStatus status) {
- super(status);
- }
-
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
deleted file mode 100644
index 9923a0fad..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
+++ /dev/null
@@ -1,225 +0,0 @@
-package org.eclipse.debug.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.internal.core.*;
-
-/**
- * There is one instance of the debug plugin available from
- * <code>DebugPlugin.getDefault()</code>. The debug plugin provides:
- * <ul>
- * <li>access to the breakpoint manager</li>
- * <li>access to the launch manager</li>
- * <li>access to the registered launcher extensions</li>
- * <li>registration for debug events</li>
- * <li>notification of debug events</li>
- * </ul>
- * <p>
- * Clients may not instantiate or subclass this class.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public class DebugPlugin extends Plugin {
-
- /**
- * The singleton debug plug-in instance.
- */
- private static DebugPlugin fgDebugPlugin= null;
-
- /**
- * The collection of launcher extensions.
- */
- private Launcher[] fLaunchers= new Launcher[0];
-
- /**
- * The singleton breakpoint manager.
- */
- private BreakpointManager fBreakpointManager;
-
- /**
- * The singleton launch manager.
- */
- private LaunchManager fLaunchManager;
-
- /**
- * The collection of debug event listeners.
- */
- private ListenerList fEventListeners= new ListenerList(20);
-
- /**
- * Internal state...<code>true</code> if this plugin is in the
- * process of shutting down.
- */
- private boolean fShuttingDown= false;
-
- /**
- * Returns the singleton instance of the debug plug-in.
- */
- public static DebugPlugin getDefault() {
- return fgDebugPlugin;
- }
-
- /**
- * Constructs the debug plug-in.
- * <p>
- * An instance of this plug-in runtime class is automatically created
- * when the facilities provided by the Resources plug-in are required.
- * <b>Clients must never explicitly instantiate a plug-in runtime class.</b>
- * </p>
- *
- * @param pluginDescriptor the plug-in descriptor for the
- * debug plug-in
- */
- public DebugPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
- fgDebugPlugin= this;
- }
-
- /**
- * Adds the given listener to the collection of registered debug
- * event listeners. Has no effect if an identical listener is already
- * registered.
- *
- * @param listener the listener to add
- */
- public void addDebugEventListener(IDebugEventListener listener) {
- fEventListeners.add(listener);
- }
-
- /**
- * Notifies all registered debug event listeners of the given event.
- *
- * @param event the debug event to fire
- */
- public void fireDebugEvent(DebugEvent event) {
- if (fShuttingDown || event == null)
- return;
-
- Object[] listeners= fEventListeners.getListeners();
- for (int i= 0; i < listeners.length; i++) {
- ((IDebugEventListener) listeners[i]).handleDebugEvent(event);
- }
- }
-
- /**
- * Returns the breakpoint manager.
- *
- * @return the breakpoint manager
- * @see IBreakpointManager
- */
- public IBreakpointManager getBreakpointManager() {
- return fBreakpointManager;
- }
-
- /**
- * Returns a collection of launcher extensions. Launchers represent
- * and provide access to launcher extensions, delaying instantiation of
- * the underlying launcher delegates until required.
- *
- * @return an array of launchers
- * @see org.eclipse.debug.core.model.ILauncherDelegate
- */
- public ILauncher[] getLaunchers() {
- return fLaunchers;
- }
-
- /**
- * Returns the launch manager.
- *
- * @return the launch manager
- * @see ILaunchManager
- */
- public ILaunchManager getLaunchManager() {
- return fLaunchManager;
- }
-
- /**
- * Loads all launcher extensions.
- *
- * @exception CoreException if creation of a launcher extension fails
- */
- protected void loadLaunchers() throws CoreException {
- IPluginDescriptor descriptor= getDescriptor();
- IExtensionPoint extensionPoint= descriptor.getExtensionPoint(IDebugConstants.EXTENSION_POINT_LAUNCHER);
- IConfigurationElement[] infos= extensionPoint.getConfigurationElements();
- fLaunchers= new Launcher[infos.length];
- for (int i= 0; i < infos.length; i++) {
- fLaunchers[i]= new Launcher(infos[i]);
- }
- }
-
- /**
- * Removes the given listener from the collection of registered debug
- * event listeners. Has no effect if an identical listener is not already
- * registered.
- *
- * @param listener the listener to remove
- */
- public void removeDebugEventListener(IDebugEventListener listener) {
- fEventListeners.remove(listener);
- }
-
- /**
- * Shuts down this debug plug-in and discards all plug-in state.
- * <p>
- * This method will be automatically invoked by the platform when
- * the platform is shut down.
- * </p>
- * <b>Clients must never explicitly call this method.</b>
- *
- * @exception CoreException if this plug-in fails to shut down
- */
- public void shutdown() throws CoreException {
- fShuttingDown= true;
- super.shutdown();
- fLaunchManager.shutdown();
- fBreakpointManager.shutdown();
- fgDebugPlugin= null;
- }
-
- /**
- * Starts up the debug plug-in. This involves creating the launch and
- * breakpoint managers, creating proxies to all launcher extensions,
- * and restoring all persisted breakpoints.
- * <p>
- * This method is automatically invoked by the platform
- * the first time any code in this plug-in is executed.
- * </p>
- * <b>Clients must never explicitly call this method.</b>
- *
- * @see Plugin#startup
- * @exception CoreException if this plug-in fails to start up
- */
- public void startup() throws CoreException {
- fLaunchManager= new LaunchManager();
- fBreakpointManager= new BreakpointManager();
- loadLaunchers();
- fBreakpointManager.startup();
- }
-
- /**
- * Creates and returns a new process representing the given
- * <code>java.lang.Process</code>. A streams proxy is created
- * for the I/O streams in the system process.
- *
- * @param process the system process to wrap
- * @param label the label assigned to the process
- * @return the process
- * @see IProcess
- */
- public static IProcess newProcess(Process process, String label) {
- return new RuntimeProcess(process, label);
- }
-}
-
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/IBreakpointListener.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/IBreakpointListener.java
deleted file mode 100644
index 0b4ef04dd..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/IBreakpointListener.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.eclipse.debug.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-
-import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.debug.core.model.IBreakpoint;
-
-/**
- * A breakpoint listener is notified of breakpoint additions,
- * removals, and changes. Listeners register and deregister with the
- * breakpoint manager.
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see IBreakpointManager
- */
-
-public interface IBreakpointListener {
-
- /**
- * Notifies this listener that the given breakpoint has been added.
- *
- * @param breakpoint the added breakpoint
- */
- public void breakpointAdded(IBreakpoint breakpoint);
- /**
- * Notifies this listener that the given breakpoint has been removed.
- * If the given breakpoint has been removed because it has been deleted,
- * the associated marker delta is also provided such that any attributes
- * of the breakpoint can still be accessed.
- *
- * @param breakpoint the removed breakpoint
- * @param delta the associated marker delta, or <code>null</code> when
- * the breakpoint is removed from the breakpoint manager without
- * being deleted
- *
- * @see org.eclipse.core.resources.IMarkerDelta
- */
- public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta);
-
- /**
- * Notifies this listener that an attribute of the given breakpoint has
- * changed, as described by the delta.
- *
- * @param breakpoint the changed breakpoint
- * @param delta the marker delta that describes the change
- *
- * @see org.eclipse.core.resources.IMarkerDelta
- */
- public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta);
-
-} \ No newline at end of file
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/IBreakpointManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/IBreakpointManager.java
deleted file mode 100644
index 24c979918..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/IBreakpointManager.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package org.eclipse.debug.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.model.IBreakpoint;
-
-/**
- * The breakpoint manager manages the collection of breakpoints
- * in the workspace. A breakpoint suspends the execution of a
- * program being debugged. The kinds of breakpoint supported by each
- * debug architecture and the information required to create those
- * breakpoints is dictated by each debug architecture.
- * <p>
- * Breakpoint creation is a client responsibility. Breakpoints
- * are only considered active when registered with the breakpoint manager.
- * </p>
- * <p>
- * Clients interested in breakpoint change notification may
- * register with the breakpoint manager - see
- * <code>IBreakpointListener</code>.
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public interface IBreakpointManager {
- /**
- * Adds the given breakpoint to the collection of active breakpoints
- * in the workspace and notifies all registered listeners. This has no effect
- * if the given breakpoint is already registered.
- *
- * @param breakpoint the breakpoint to add
- *
- * @exception DebugException if adding fails. Reasons include:<ul>
- * <li>CONFIGURATION_INVALID - the required <code>MODEL_IDENTIFIER</code> attribute
- * is not set on the breakpoint marker.</li>
- * <li>A <code>CoreException</code> occurred while verifying the <code>MODEL_IDENTIFIER</code>
- * attribute.</li>
- * </ul>
- */
- void addBreakpoint(IBreakpoint breakpoint) throws DebugException;
-
- /**
- * Returns the breakpoint that is associated with marker or
- * <code>null</code> if no such breakpoint exists
- *
- * @param marker the marker
- * @return the breakpoint associated with the marker or null if none exists
- */
- IBreakpoint getBreakpoint(IMarker marker);
-
- /**
- * Returns a collection of all existing breakpoints.
- * Returns an empty array if no breakpoints exist.
- *
- * @return an array of breakpoints
- */
- IBreakpoint[] getBreakpoints();
-
- /**
- * Returns a collection of all breakpoints registered for the
- * given debug model. Answers an empty array if no breakpoints are registered
- * for the given debug model.
- *
- * @param modelIdentifier identifier of a debug model plug-in
- * @return an array of breakpoints
- */
- IBreakpoint[] getBreakpoints(String modelIdentifier);
-
- /**
- * Returns whether the given breakpoint is currently
- * registered with this breakpoint manager.
- *
- * @return whether the breakpoint is registered
- */
- boolean isRegistered(IBreakpoint breakpoint);
-
- /**
- * Removes the given breakpoint from the breakpoint manager, invokes
- * <code>delete()</code> on the breakpoint if the <code>delete</code> flag
- * is <code>true</code>, and notifies all registered
- * listeners. Has no effect if the given breakpoint is not currently
- * registered.
- *
- * @param breakpoint the breakpoint to remove
- * @param delete whether to delete the given breakpoint
- * @exception CoreException if an exception occurs while deleting the
- * underlying marker.
- */
- void removeBreakpoint(IBreakpoint breakpoint, boolean delete) throws CoreException;
-
- /**
- * Adds the given listener to the collection of registered breakpoint listeners.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener the listener to add
- */
- void addBreakpointListener(IBreakpointListener listener);
-
- /**
- * Removes the given listener from the collection of registered breakpoint listeners.
- * Has no effect if an identical listener is not already registered.
- *
- * @param listener the listener to remove
- */
- void removeBreakpointListener(IBreakpointListener listener);
-
-}
-
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/IDebugConstants.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/IDebugConstants.java
deleted file mode 100644
index 21a68175f..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/IDebugConstants.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.eclipse.debug.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- * Defines constants for the debug tools infrastructure plug-in.
- * <p>
- * Constants only; not intended to be implemented.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public interface IDebugConstants {
-
- /**
- * Debug infrastructure plug-in identifier
- * (value <code>"org.eclipse.debug.core"</code>).
- */
- public static final String PLUGIN_ID = "org.eclipse.debug.core";
-
- /**
- * Launcher extension point identifier
- * (value <code>"launchers"</code>).
- */
- public static final String EXTENSION_POINT_LAUNCHER= "launchers";
-
- /**
- * Breakpoint extension point identifier
- * (value <code>"breakpoints"</code>).
- */
- public static final String EXTENSION_POINT_BREAKPOINTS= "breakpoints";
-
- /**
- * Root breakpoint marker type
- * (value <code>"org.eclipse.debug.core.breakpoint"</code>).
- */
- public static final String BREAKPOINT_MARKER = PLUGIN_ID + ".breakpointMarker";
-
- /**
- * Line breakpoint marker type.
- * (value <code>"org.eclipse.debug.core.lineBreakpoint"</code>).
- */
- public static final String LINE_BREAKPOINT_MARKER = PLUGIN_ID + ".lineBreakpointMarker";
-
- /**
- * Enabled breakpoint marker attribute (value <code>"enabled"</code>).
- * The attribute is a <code>boolean</code> corresponding to the
- * enabled state of a breakpoint.
- *
- * @see org.eclipse.core.resources.IMarker#getAttribute(String, boolean)
- */
- public final static String ENABLED= "enabled";
-
- /**
- * Breakpoint marker attribute (value <code>"id"</code>).
- * The attribute is a <code>String</code> corresponding to the
- * id of a breakpoint type
- */
- public final static String ID= "id";
-
- /**
- * Attribute name for the <code>"markerType"</code> attribute of
- * a breakpoint extension.
- */
- public final static String MARKER_TYPE= "markerType";
-
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/IDebugEventListener.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/IDebugEventListener.java
deleted file mode 100644
index 3ecd883da..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/IDebugEventListener.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.eclipse.debug.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- * A debug event listener registers with the debug model manager
- * to receive event notification from all programs being debugged.
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see DebugEvent
- */
-public interface IDebugEventListener {
- /**
- * Notifies this listener of the given debug event.
- *
- * @param event the debug event
- */
- public void handleDebugEvent(DebugEvent event);
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/IDebugStatusConstants.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/IDebugStatusConstants.java
deleted file mode 100644
index b1e21e31b..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/IDebugStatusConstants.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.eclipse.debug.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- * Defines status codes relevant to the debug plug-in. When a
- * debug exception is thrown, it contain a status object describing
- * the cause of the exception. The status objects originating from the
- * debug plug-in use the codes defined in this interface.
- * <p>
- * Constants only; not intended to be implemented.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see IStatus
- */
-public interface IDebugStatusConstants {
-
- /**
- * Indicates a request made of a debug element has failed
- * on the target side.
- */
- public static final int TARGET_REQUEST_FAILED = 5010;
-
- /**
- * Indicates a request is not supported by the capabilities of a debug element.
- * For example, a request was made to terminate an element that does not
- * support termination.
- */
- public static final int NOT_SUPPORTED = 5011;
-
- /**
- * Indicates that a request made of a debug element or manager has failed
- * on the client side (that is, before the request was sent to the debug target).
- */
- public static final int REQUEST_FAILED = 5012;
-
- /**
- * Indicates an internal error. This is an unexpected state.
- */
- public static final int INTERNAL_ERROR = 5013;
-
- /**
- * Indicates an improperly configured breakpoint. Breakpoints have a minimal
- * set of required attributes as defined by the breakpoint manager.
- *
- * @see IBreakpointManager
- */
- public static final int CONFIGURATION_INVALID = 5014;
-
-}
-
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunch.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunch.java
deleted file mode 100644
index 8829e5cee..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunch.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.eclipse.debug.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.model.*;
-import org.eclipse.core.runtime.IAdaptable;
-
-/**
- * A launch is the result of launching a debug session
- * and/or one or more system processes.
- * <p>
- * This interface is not intended to be implemented by clients. Clients
- * should create instances of this interface by using the implementation
- * provided by the class <code>Launch</code>.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see Launch
- */
-public interface ILaunch extends ITerminate, IAdaptable {
- /**
- * Returns the children of this launch - at least one of a debug target
- * and/or one or more processes.
- *
- * @return an array (element type:<code>IDebugTarget</code> or <code>IProcess</code>)
- */
- Object[] getChildren();
- /**
- * Returns the debug target associated with this launch, or <code>null</code>
- * if no debug target is associated with this launch.
- *
- * @return the debug target associated with this launch, or <code>null</code>
- */
- IDebugTarget getDebugTarget();
- /**
- * Returns the object that was launched. Cannot return <code>null</code>.
- *
- * @return the launched object
- */
- Object getElement();
- /**
- * Returns the launcher that was used to launch. Cannot return <code>null</code>.
- *
- * @return the launcher
- */
- ILauncher getLauncher();
- /**
- * Returns the processes that were launched,
- * or an empty collection if no processes were launched.
- *
- * @return array of processes
- */
- IProcess[] getProcesses();
- /**
- * Returns the source locator to use for locating source elements for
- * the debug target associated with this launch, or <code>null</code>
- * if source mapping is not supported.
- *
- * @return the source locator
- */
- ISourceLocator getSourceLocator();
- /**
- * Returns the mode of this launch - one of the mode constants defined by
- * the launch manager.
- *
- * @return the launch mode
- * @see ILaunchManager
- */
- public String getLaunchMode();
-
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchListener.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchListener.java
deleted file mode 100644
index 3524c7942..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchListener.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.eclipse.debug.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- * A launch listener is notified of launches as they
- * are registered and deregistered with the launch manager.
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see ILaunch
- */
-public interface ILaunchListener {
- /**
- * Notifies this listener that the specified launch has been deregistered.
- *
- * @param launch the deregistered launch
- */
- void launchDeregistered(ILaunch launch);
- /**
- * Notifies this listener that the specified launch has been registered.
- *
- * @param launch the registered launch
- */
- void launchRegistered(ILaunch launch);
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchManager.java
deleted file mode 100644
index fccfc5c0f..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchManager.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package org.eclipse.debug.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-
-/**
- * The launch manager manages the set of registered launches, maintaining
- * a collection of active processes and debug targets. Clients interested
- * in launch notification may register with the launch manager.
- * <p>
- * For convenience, a default launcher may be associated with a project.
- * The preference is stored as a persistent property with the project.
- * The debug UI plug-in uses this preference to help determine which
- * launcher to invoke when the the run or debug button is pressed, based on
- * the selection in the workbench. If a launcher cannot be determined,
- * the user is prompted to choose a launcher.
- * </p>
- * <p>
- * Clients are not intended to implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see ILaunch
- * @see ILaunchListener
- */
-public interface ILaunchManager extends IAdaptable {
- /**
- * A launch in a normal, non-debug mode(value <code>"run"</code>).
- */
- public static final String RUN_MODE= "run";
- /**
- * A launch in a special debug mode (value <code>"debug"</code>).
- */
- public static final String DEBUG_MODE= "debug";
-
- /**
- * Adds the given listener to the collection of registered launch listeners.
- * Has no effect if an identical listener is already registerd.
- *
- * @param listener the listener to register
- */
- void addLaunchListener(ILaunchListener listener);
- /**
- * Deregisters the specified launch and notifies listeners. Has no effect
- * if an identical launch is not already registered.
- *
- * @param launch the launch to deregister
- */
- void deregisterLaunch(ILaunch launch);
- /**
- * Returns the launch the given process is contained in, or <code>null</code>
- * no registered launches contains the process.
- *
- * @param process the process for which to find a launch
- * @return the launch containing the process, or <code>null</code> if none
- */
- ILaunch findLaunch(IProcess process);
- /**
- * Returns the launch the given debug target is contained
- * in, or <code>null</code> no registered launches contain the debug target.
- *
- * @param target the debug target for which to find a launch
- * @return the launch containing the debug target, or <code>null</code> if none
- */
- ILaunch findLaunch(IDebugTarget target);
- /**
- * Returns the collection of debug targets currently registered with this
- * launch manager.
- *
- * @return an array of debug targets
- */
- IDebugTarget[] getDebugTargets();
- /**
- * Returns the default launcher for the given project,
- * or <code>null</code> if no default launcher has been set.
- * The default launcher is stored as a persistent property
- * with a project.
- *
- * @param project the project for which to retrieve a default launcher
- * @return the defualt launcher, or <code>null</code> if none
- * @exception CoreException if an error occurs accessing the
- * persistent property
- */
- ILauncher getDefaultLauncher(IProject project) throws CoreException;
-
- /**
- * Returns the collection of registered launchers that can operate in the
- * specified mode - run or debug.
- *
- * @return an array of launchers
- */
- ILauncher[] getLaunchers(String mode);
-
- /**
- * Returns the collection of registered launchers.
- *
- * @return an array of launchers
- */
- ILauncher[] getLaunchers();
- /**
- * Returns the collection of launches currently registered
- * with this launch manager.
- *
- * @return an array of launches
- */
- ILaunch[] getLaunches();
- /**
- * Returns the collection of processes currently registered with this
- * launch manager.
- *
- * @return an array of processes
- */
- IProcess[] getProcesses();
- /**
- * Registers the specified launch with this launch manager.
- * Has no effect if an identical launch is already registered.
- *
- * @param launch the launch to register
- */
- void registerLaunch(ILaunch launch);
- /**
- * Removes the given listener from the collection of registered launch listeners.
- * Has no effect if an identical listener is not already registerd.
- *
- * @param listener the listener to deregister
- */
- void removeLaunchListener(ILaunchListener listener);
- /**
- * Sets the default launcher for the given project as a persistent property.
- *
- * @param project the project for which to set the preference
- * @param launcher the launcher preference
- * @exception CoreException if an error occurs setting the persistent property
- */
- void setDefaultLauncher(IProject project, ILauncher launcher) throws CoreException;
-}
-
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILauncher.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/ILauncher.java
deleted file mode 100644
index 3a066fc17..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/ILauncher.java
+++ /dev/null
@@ -1,106 +0,0 @@
-package org.eclipse.debug.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.debug.core.model.ILauncherDelegate;
-
-/**
- * A launcher is a proxy to a launcher extension (<code>"org.eclipse.debug.core.launchers"</code>).
- * It manages the attributes of a launcher extension, and lazily instantiates the
- * delegate when required.
- * <p>
- * This interface is not intended to be implemented by clients. Clients
- * that define a launcher extension implement the <code>ILauncherDelegate</code>
- * interface.
- * </p>
- * <p>
- * <b>NOTE:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see ILauncherDelegate
- */
-public interface ILauncher {
- /**
- * Returns the result of invoking this underlying launcher extension's launch
- * method. This causes the extension to be instantiated (if not already).
- *
- * @param elements the elements providing context for the launch
- * @param mode the mode in which to launch - run or debug
- * @return whether the launch was successful
- * @see ILauncherDelegate
- */
- boolean launch(Object[] elements, String mode);
-
- /**
- * Returns the modes that the underlying launcher extension
- * supports - run and/or debug. This will not cause the extension to
- * be instantiated.
- *
- * @return a set of <code>String</code> constants - one or both of
- * <code>ILaunchManager.RUN_MODE</code>, <code>ILaunchManager.DEBUG_MODE</code>
- * @see ILaunchManager
- */
- Set getModes();
-
- /**
- * Returns the identifier of the perspective associated with the
- * underlying launcher extension. This attribute determines the layout
- * used by the debug UI plug-in when presenting this launch.
- * This will not cause the extension to be instantiated.
- *
- * @return a perspective identifier, as defined by the
- * <code>"org.eclipse.ui.perspective"</code> extension point
- */
- String getPerspectiveIdentifier();
-
- /**
- * Returns the label defined by the underlying launcher extension.
- * This will not cause the extension to be instantiated.
- *
- * @return a human readable label
- */
- String getLabel();
-
- /**
- * Returns the configuration element associated with the underlying
- * extension. This will not cause the extension to be instantiated.
- *
- * @return the extension's configuration element
- */
- IConfigurationElement getConfigurationElement();
-
- /**
- * Returns the unique identifier of the underlying launcher extension.
- * This will not cause the extension to be instantiated.
- *
- * @return the extension's identifier attribute
- */
- String getIdentifier();
-
- /**
- * Returns the underlying launcher delegate associated with this
- * launcher. This causes the launcher delegate to be instantiated (if
- * not already).
- *
- * @return the underlying launcher extension
- */
- ILauncherDelegate getDelegate();
-
- /**
- * Returns the icon path defined by the underlying launcher extension.
- * The path is relative to the plugin.xml of the contributing plug-in.
- * This will not cause the extension to be instantiated. Returns
- * <code>null</code> if no icon attribute is specified.
- *
- * @return a relative path to an icon or <code>null</code>
- */
- String getIconPath();
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/IStreamListener.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/IStreamListener.java
deleted file mode 100644
index 11032436e..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/IStreamListener.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.eclipse.debug.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.model.IStreamMonitor;
-
-/**
- * An stream listener is notified of changes
- * to a stream monitor.
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see IStreamMonitor
- */
-public interface IStreamListener {
- /**
- * Notifies this listener that text has been appended to
- * the given stream monitor.
- *
- * @param text the appended text
- * @paran monitor the stream monitor to which text was appended
- */
- public void streamAppended(String text, IStreamMonitor monitor);
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/Launch.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/Launch.java
deleted file mode 100644
index a2539668e..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/Launch.java
+++ /dev/null
@@ -1,258 +0,0 @@
-package org.eclipse.debug.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.debug.core.model.*; import org.eclipse.debug.internal.core.DebugCoreUtils;
-
-/**
- * An implementation of <code>ILaunch</code>.
- * <p>
- * Clients may instantiate this class. Clients may subclass this class.
- * All of the methods in this class that are part of the launcher interface are
- * final. Clients that subclass this class are not intended to change the behavior
- * or implementation of the provided methods. Subclassing is only intended
- * to add additional information to a specific launch. For example, a client that
- * implements a launch object representing a Java launch might store a classpath
- * with the launch.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see ILaunch
- * @see ILaunchManager
- */
-
-public class Launch extends PlatformObject implements ILaunch {
-
- private final String TERMINATE_FAILED= "launch.terminate_failed";
- /**
- * Shared, immutable empty collection used for efficiency.
- */
- private static List fgEmptyChildren= Collections.EMPTY_LIST;
-
- /**
- * The target being debugged, or <code>null</code> if
- * there is no debug target.
- */
- private IDebugTarget fTarget= null;
-
- /**
- * The element that was launched.
- */
- private Object fElement= null;
-
- /**
- * The launcher that was used.
- */
- private ILauncher fLauncher= null;
-
- /**
- * The system processes resulting from the launch.
- */
- private IProcess[] fProcesses= null;
-
- /**
- * The source locator to use in the debug session
- * or <code>null</code> if not available.
- */
- private ISourceLocator fLocator= null;
-
- /**
- * The mode this launch was launched in.
- */
- private String fMode;
-
- /**
- * Collection of children.
- */
- private List fChildren= null;
-
- /**
- * Constructs a launch based on the specified attributes. A launch must
- * have at least one of a process or debug target.
- *
- * @param launcher the launcher that created this launch
- * @param mode the mode of this launch - run or debug
- * @param launchedElement the element that was launched
- * @param locator the source locator to use for this debug session, or
- * <code>null</code> if not supported
- * @param processes the processes created by this launch, empty
- * or <code>null</code> if none
- * @param target the debug target created by this launch, or <code>null</code>
- * if none
- */
- public Launch(ILauncher launcher, String mode, Object launchedElement, ISourceLocator locator, IProcess[] processes, IDebugTarget target) {
- super();
- fLauncher= launcher;
- fElement= launchedElement;
- fLocator= locator;
- if (processes == null) {
- fProcesses= new IProcess[0];
- } else {
- fProcesses= processes;
- }
- fTarget= target;
- fMode= mode;
- initialize();
- }
-
- /**
- * @see ITerminate
- */
- public final boolean canTerminate() {
- return !isTerminated();
- }
-
- /**
- * @see ILaunch
- */
- public final Object[] getChildren() {
- return fChildren.toArray();
- }
-
- /**
- * @see ILaunch
- */
- public final IDebugTarget getDebugTarget() {
- return fTarget;
- }
-
- /**
- * @see ILaunch
- */
- public final Object getElement() {
- return fElement;
- }
-
- /**
- * @see ILaunch
- */
- public final ILauncher getLauncher() {
- return fLauncher;
- }
-
- /**
- * @see ILaunch
- */
- public final IProcess[] getProcesses() {
- return fProcesses;
- }
-
- /**
- * @see ILaunch
- */
- public final ISourceLocator getSourceLocator() {
- return fLocator;
- }
-
- /**
- * Build my children collection.
- */
- private final void initialize() {
-
- IProcess[] ps= getProcesses();
- if (ps != null) {
- fChildren= new ArrayList(ps.length + 1);
- for (int i= 0; i < ps.length; i++) {
- fChildren.add(ps[i]);
- }
- }
- if (getDebugTarget() != null) {
- if (fChildren == null) {
- fChildren= new ArrayList(1);
- }
- fChildren.add(getDebugTarget());
- }
- if (fChildren == null) {
- fChildren= fgEmptyChildren;
- }
- }
-
- /**
- * @see ITerminate
- */
- public final boolean isTerminated() {
- Iterator children= fChildren.iterator();
- while (children.hasNext()) {
- ITerminate t= (ITerminate) children.next();
- if (!t.isTerminated()) {
- if (t instanceof IDisconnect) {
- IDisconnect d= (IDisconnect)t;
- if (!d.isDisconnected()) {
- return false;
- }
- } else {
- return false;
- }
- }
-
- }
- return true;
- }
-
- /**
- * @see ITerminate
- */
- public final void terminate() throws DebugException {
- MultiStatus status=
- new MultiStatus(DebugPlugin.getDefault().getDescriptor().getUniqueIdentifier(), IDebugStatusConstants.REQUEST_FAILED, DebugCoreUtils.getResourceString(TERMINATE_FAILED), null);
- IProcess[] ps= getProcesses();
-
- // terminate the system processes
- if (ps != null) {
- for (int i = 0; i < ps.length; i++) {
- IProcess process = ps[i];
- if (process.canTerminate()) {
- try {
- process.terminate();
- } catch (DebugException e) {
- status.merge(e.getStatus());
- }
- }
- }
- }
-
- // disconnect debug target if it is still connected
- IDebugTarget target= getDebugTarget();
- if (target != null) {
- if (target.canTerminate()) {
- try {
- target.terminate();
- } catch (DebugException e) {
- status.merge(e.getStatus());
- }
- } else {
- if (target.canDisconnect()) {
- try {
- target.disconnect();
- } catch (DebugException de) {
- status.merge(de.getStatus());
- }
- }
- }
- }
- if (status.isOK())
- return;
- IStatus[] children= status.getChildren();
- if (children.length == 1) {
- throw new DebugException(children[0]);
- } else {
- throw new DebugException(status);
- }
- }
-
- /**
- * @see ILaunch
- */
- public final String getLaunchMode() {
- return fMode;
- }
-}
-
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java
deleted file mode 100644
index 19bfe199b..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.eclipse.debug.core.model;
-
-import java.util.Map;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.IDebugConstants;
-
-/**
- * Abstract implementation of a breakpoint. This class is
- * intended to be subclassed by implementations
- * of breakpoints.
- */
-
-public abstract class Breakpoint implements IBreakpoint {
-
- /**
- * Underlying marker.
- */
- protected IMarker fMarker= null;
-
- /**
- * Constructor for Breakpoint
- */
- public Breakpoint() {
- }
-
- public void setMarker(IMarker marker) throws CoreException {
- fMarker= marker;
- }
-
- public boolean equals(Object item) {
- if (item instanceof IBreakpoint) {
- return getMarker().equals(((IBreakpoint)item).getMarker());
- }
- return false;
- }
-
- public int hashCode() {
- return getMarker().hashCode();
- }
-
- /**
- * @see IBreakpoint#setEnabled(boolean)
- */
- public void setEnabled(boolean enabled) throws CoreException {
- if (enabled != isEnabled()) {
- fMarker.setAttribute(IDebugConstants.ENABLED, enabled);
- }
- }
-
- /**
- * Returns whether the breakpoint is enabled
- */
- public boolean isEnabled() throws CoreException {
- return fMarker.getAttribute(IDebugConstants.ENABLED, false);
- }
-
- /**
- * @see IBreakpoint#delete()
- */
- public void delete() throws CoreException {
- fMarker.delete();
- }
-
- /**
- * @see IBreakpoint#getMarker()
- */
- public IMarker getMarker() {
- return fMarker;
- }
-
-}
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IBreakpoint.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IBreakpoint.java
deleted file mode 100644
index 110a58364..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IBreakpoint.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package org.eclipse.debug.core.model;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * A breakpoint is capable of suspending the execution of a
- * program at a specific location when a program is running
- * in debug mode. Each breakpoint has an associated marker which
- * stores and persists all attributes associated with each breakpoint.
- * <p>
- * A breakpoint is defined in two parts:
- * <ol>
- * <li>By an extension of kind <code>"org.eclipse.debug.core.breakpoints"</li>
- * <li>By a marker definition that corresnponds to the above breakpoint extension</li>
- * </ol>
- * <p>
- * For example, following is a definition of corresponding breakpoint
- * and breakpoint marker defintions. Note that the <ocde>markerType</code>
- * attribute defined by the breakpoint extension corresponds to the
- * type of the marker definition.
- * <pre>
- * &lt;extension point="org.eclipse.debug.core.breakpoints"&gt;
- * &lt;breakpoint
- * id="com.example.Breakpoint"
- * class="com.example.Breakpoint"
- * markerType="com.example.BreakpointMarker"&gt;
- * &lt;/breakpoint&gt;
- * &lt;/extension&gt;
- * &lt;extension point="org.eclipse.core.resources.markers"&gt;
- * &lt;marker
- * id="com.example.BreakpointMarker"
- * super type="org.eclipse.debug.core.breakpointMarker"
- * attribute name ="exampleAttribute"&gt;
- * &lt;/marker&gt;
- * &lt;/extension&gt;
- * </pre>
- * <p>
- * The breakpoint manager instantiates persisted breakpoints by
- * traversing all markers that are a subtype of
- * <code>"org.eclipse.debug.core.breakpointMarker"</code>, and
- * instantiating the class defined by the <code>class</code> attribute
- * on the associated breakpoint extension. The method <code>setMarker</code>
- * is then called to associated a marker with the breakpoint.
- */
-
-public interface IBreakpoint {
-
-/**
- * Deletes this breakpoint's underlying marker, and removes
- * this breakpoint from the breakpoint manager.
- *
- * @exception CoreException if deleting the underlying marker throws
- * a <code>CoreException<code>.
- */
-public void delete() throws CoreException;
-
-/**
- * Returns the marker associated with this breakpoint, or
- * <code>null</code> if no marker is associated with this breakpoint.
- *
- * @return associated marker, or <code>null</code> if there is
- * no associated marker.
- */
-public IMarker getMarker();
-/**
- * Sets the marker associated with this breakpoint. This method is
- * only called at breakpoint creation, when restoring a persisted
- * marker.
- *
- * @param marker the marker to associate with this breakpoint
- * @exception CoreException if an error occurrs accessing the marker
- */
-public void setMarker(IMarker marker) throws CoreException;
-/**
- * Returns the identifier of the debug model this breakpoint is
- * asscoiated with.
- *
- * @return the identifier of the debug model this breakpoint is
- * associated with
- */
-public String getModelIdentifier();
-/**
- * Returns whether this breakpoint is enabled
- *
- * @exception CoreException if a <code>CoreException</code> is
- * thrown when retrieving the enabled attribute from the underlying marker
- * @return whether this breakpoint is enabled
- */
-public boolean isEnabled() throws CoreException;
-/**
- * Sets the enabled state of this breakpoint. This has no effect
- * if the current enabled state is the same as specified by the
- * enabled parameter.
- *
- * @param enabled whether this breakpoint should be enabled
- * @exception CoreException if a <code>CoreException</code> is thrown
- * when setting the attribute on the underlying marker.
- */
-public void setEnabled(boolean enabled) throws CoreException;
-
-}
-
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IDebugElement.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IDebugElement.java
deleted file mode 100644
index b3a587b33..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IDebugElement.java
+++ /dev/null
@@ -1,173 +0,0 @@
-package org.eclipse.debug.core.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.ILaunch;
-
-/**
- * A debug element represents an artifact in a program being
- * debugged.
- * <p>
- * Some methods on debug elements require communication
- * with the target program. Such methods may throw a <code>DebugException</code>
- * with a status code of <code>TARGET_REQUEST_FAILED</code>
- * when unable to complete a request due to a failure on the target.
- * Methods that require communication with the target program or require
- * the target to be in a specific state (for example, suspended), are declared
- * as such.
- * </p>
- * <p>
- * Debug elements are language independent. However, language specific
- * features can be made available via the adpater mechanism provided by
- * <code>IAdaptable</code>, or by extending the debug element interfaces.
- * A debug model is responsible for declaring any special adapters
- * its debug elements implement.
- * </p>
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public interface IDebugElement extends IAdaptable {
-
- /**
- * Debug target type.
- *
- * @see IDebugTarget
- */
- public static final int DEBUG_TARGET= 0x0002;
-
- /**
- * Thread type.
- *
- * @see IThread
- */
- public static final int THREAD= 0x0004;
-
- /**
- * Stack frame type.
- *
- * @see IStackFrame
- */
- public static final int STACK_FRAME= 0x0008;
-
- /**
- * Variable type.
- *
- * @see IVariable
- */
- public static final int VARIABLE= 0x0010;
-
- /**
- * Value type.
- *
- * @see IValue
- */
- public static final int VALUE= 0x0012;
-
- /**
- * Returns the children of this debug element, or an empty collection
- * if this element has no children.
- *
- * @return array of debug elements
- * @exception DebugException if unable to retrieve this element's children
- * from the target
- */
- IDebugElement[] getChildren() throws DebugException;
- /**
- * Returns the debug target this element originated from.
- *
- * @return a debug target
- */
- IDebugTarget getDebugTarget();
- /**
- * Returns the type of this element, encoded as an integer - one
- * of the constants defined in this interface.
- *
- * @return debug element type constant
- */
- int getElementType();
- /**
- * Returns the launch this element originated from, or
- * <code>null</code> if this element is not registered with
- * a launch. This is a convenience method for
- * <code>ILaunchManager.findLaunch(getDebugTarget())</code>.
- *
- * @return this element's launch, or <code>null</code> if not registered
- */
- ILaunch getLaunch();
- /**
- * Returns the name of this element. Name format is debug model
- * specific, and should be specified by a debug model.
- *
- * @return this element's name
- * @exception DebugException if unable to retrieve this element's name from
- * the target
- */
- String getName() throws DebugException;
- /**
- * Returns the parent of this debug element, or <code>null</code>
- * if this element has no parent.
- *
- * @return this element's parent, or <code>null</code> if none
- */
- IDebugElement getParent();
- /**
- * Returns the process associated with this debug element,
- * or <code>null</code> if no process is associated with this element.
- * This is a convenience method - it returns the process associated with
- * this element's debug target, if any.
- *
- * @return this element's process, or <code>null</code> if none
- */
- IProcess getProcess();
- /**
- * Returns the source locator that can be used to locate source elements
- * associated with this element or <code>null</code> if source lookup
- * is not supported. This is a convenience method - it
- * returns the source locator associated with this element's launch.
- *
- * @return this element's source locator, or <code>null</code> if none
- */
- ISourceLocator getSourceLocator();
- /**
- * Returns the stack frame containing this element,
- * or <code>null</code> if this element is not contained in a stack frame.
- *
- * @return this element's stack frame, or <code>null</code> if none
- */
- IStackFrame getStackFrame();
- /**
- * Returns the thread containing this element,
- * or <code>null</code> if this element is not contained in a thread.
- *
- * @return this element's thread, or <code>null</code> if none
- */
- IThread getThread();
- /**
- * Returns whether this element has children.
- *
- * @return whether this element has children
- * @exception DebugException if unable to determine if this element has children
- */
- boolean hasChildren() throws DebugException;
- /**
- * Returns the unique identifier of the plug-in
- * this debug element originated from.
- *
- * @return plug-in identifier
- */
- String getModelIdentifier();
-}
-
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IDebugTarget.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IDebugTarget.java
deleted file mode 100644
index f2545624b..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IDebugTarget.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.debug.core.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.IBreakpointListener;
-
-/**
- * A debug target is a debuggable execution context. For example, a debug target
- * may represent a debuggable process or a virtual machine. A debug target is the root
- * of the debug element hierarchy. A debug target has element type <code>DEBUG_TARGET</code>,
- * children of type <code>THREAD</code>, and no parent. Minimally, a debug target supports
- * the following capabilities:
- * <ul>
- * <li>terminate
- * <li>suspend/resume
- * <li>breakpoints
- * <li>diconnect
- * </ul>
- * <p>
- * Generally, launching a debug session results in the creation of a
- * debug target. Launching is a client responsibility, as is debug target
- * creation.
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see ITerminate
- * @see ISuspendResume
- * @see IBreakpointSupport
- * @see IDisconnect
- * @see org.eclipse.debug.core.ILaunch
- */
-public interface IDebugTarget extends IDebugElement, ITerminate, ISuspendResume, IBreakpointListener, IDisconnect {
- /**
- * Returns the system process associated with this debug target
- * or <code>null</code> if no system process is associated with
- * this debug target.
- */
- IProcess getProcess();
-}
-
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IDisconnect.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IDisconnect.java
deleted file mode 100644
index 6b0355bdd..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IDisconnect.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.debug.core.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-
-/**
- * Provides the ability to end a debug session with a target program
- * and allow the target to continue running.
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see IDebugTarget
- */
-public interface IDisconnect {
- /**
- * Returns whether this element can currently disconnect.
- *
- * @return whether this element can currently disconnect
- */
- boolean canDisconnect();
- /**
- * Disconnects this element from its target. Generally, disconnecting
- * ends a debug session with a debug target, but allows the target
- * program to continue running.
- *
- * @exception DebugException on failure. Reasons include:<ul>
- * <li>TARGET_REQUEST_FAILED - The request failed in the target
- * <li>NOT_SUPPORTED - The capability is not supported by the target
- * </ul>
- */
- public void disconnect() throws DebugException;
- /**
- * Returns whether this element is disconnected.
- *
- * @return whether this element is disconnected
- */
- public boolean isDisconnected();
-}
-
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ILauncherDelegate.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ILauncherDelegate.java
deleted file mode 100644
index e3314efdb..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ILauncherDelegate.java
+++ /dev/null
@@ -1,135 +0,0 @@
-package org.eclipse.debug.core.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.ILauncher;
-
-/**
- * A launcher delegate is an implementation of the
- * <code>org.eclipse.debug.core.launchers</code> extension point. The
- * debug plug-in creates a proxy to each launcher extension, and
- * lazily instantiates an extension when required. A launch delegate
- * starts a debug session with a specific debug model, and/or
- * launches one or more system processes, registering the result
- * with the launch manager. A launch delegate is also capable
- * of persisting and restoring elements that it can launch.
- * <p>
- * A launcher extension is defined in <code>plugin.xml</code>.
- * Following is an example definition of a launcher extension.
- * <pre>
- * &lt;extension point="org.eclipse.debug.core.launchers"&gt;
- * &lt;launcher
- * id="com.example.ExampleIdentifier"
- * class="com.example.ExmapleLauncher"
- * modes="run, debug"
- * label="Example Launcher"
- * wizard="com.example.ExampleLaunchWizard"
- * layout="com.example.JavaLayout"&gt;
- * &lt;/launcher&gt;
- * &lt;/extension&gt;
- * </pre>
- * The attributes are specified as follows:
- * <ul>
- * <li><code>id</code> specifies a unique identifier for this launcher.</li>
- * <li><code>class</code> specifies the fully qualified name of the java class
- * that implements this interface.</li>
- * <li><code>modes</code> specifies a comma separated list of the modes this
- * launcher supports - <code>"run"</code> and/or <code>"debug</code>.</li>
- * <li><code>label</code> specifies a human readable label for this launcher
- * extension.</li>
- * <li><code>wizard</code> specifies the fully qualified name of the java class
- * that implements <code>org.eclipse.debug.ui.ILaunchWizard</code>. The debug UI
- * may invoke the wizard to perform a launch, or this launcher extension
- * may present the wizard when asked to launch.</li>
- * <li></code>layout</code> specifies the identifier of a layout that should be
- * used to present the resulting launch.</li>
- * </ul>
- * </p>
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see org.eclipse.debug.core.ILaunch
- * @see org.eclipse.debug.core.Launch
- * @see org.eclipse.debug.core.ILaunchManager
- * @see org.eclipse.debug.core.ILauncher
- */
-public interface ILauncherDelegate {
- /**
- * Notifies this launcher delegate to launch in the given mode,
- * register the resulting launch with the launch manager.
- * Returns <code>true</code> if successful, otherwise <code>false</code>.
- * This typically results in the creation of one or more processes and/or
- * a debug target. The collection of elements provides context for
- * launch. The determination of which or how many objects to launch
- * is launcher dependent. This method blocks until the launch is
- * complete. The given launcher is the owner of this delegate.
- * <p>
- * For example, when the debug UI invokes a launcher, the
- * collection of elements passed in represent the selected elements
- * in the UI, and the mode specified will be run or debug (depending on
- * which launch button was pressed). A launcher will generally examine the
- * element collection to determine what to launch. For example, if the
- * collection contains one launchable program, or one runnable program
- * can be inferred from the collection, the launcher will launch
- * that program. If the collection contains more than one runnable
- * program, or more than one runnable program can be inferred from the
- * collection, the launcher may ask the user to select a program to launch.
- * </p>
- * <p>
- * Launching the program itself usually requires running an external
- * program specific to a debug architecture/debug model, and wrapping the
- * result in a debug target or process that can be registered in a launch object.
- * </p>
- *
- * @param elements an array of objects providing a context for the launch
- * @param mode run or debug (as defined by <code>ILaunchManager.RUN_MODE</code>,
- * <code>ILaunchManager.DEBUG_MODE</code>)
- * @param launcher the proxy to this lazily instantiated extension which needs
- * to be supplied in the resulting launch object
- * @return whether the launch succeeded
- *
- * @see org.eclipse.debug.core.ILaunch
- * @see org.eclipse.debug.core.Launch
- * @see IDebugTarget
- * @see IProcess
- * @see org.eclipse.debug.core.ILaunchManager#registerLaunch
- */
- boolean launch(Object[] elements, String mode, ILauncher launcher);
-
- /**
- * Returns a memento for an object that this delegate has launched, such
- * that launched elements can be persisted across workspace invocations.
- * The memento is used to re-create the launched element.
- *
- * @param element an element this delegate has launched
- * @return a String representing a memento for the given element,
- * or <code>null</code> if unable to create a memento for
- * the element
- *
- * @see #getObject
- */
- String getLaunchMemento(Object element);
-
- /**
- * Returns the object represented by the given memento, or <code>null</code>
- * if unable to re-create an element from the given memento, or if
- * the given object no longer exists.
- *
- * @param memento a memento created by this delegate
- * @return the object represented by the memento, or <code>null</code>
- *
- * @see #getMemento
- */
- Object getLaunchObject(String memento);
-}
-
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ILineBreakpoint.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ILineBreakpoint.java
deleted file mode 100644
index 67626b680..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ILineBreakpoint.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.debug.core.model;
-
-import org.eclipse.core.runtime.CoreException;
-
-public interface ILineBreakpoint extends IBreakpoint {
-
-/**
- * Returns the line number in the original source that corresponds
- * to the location of this breakpoint, or -1 if the attribute is not
- * present.
- *
- * @return this breakpoint's line number, or -1 if unknown
- * @exception CoreException if a <code>CoreException</code> is thrown
- * while accessing the underlying <code>LINE_NUMBER</code> marker attribute
- */
-public int getLineNumber() throws CoreException;
-/**
- * Returns starting source index in the original source that corresponds
- * to the location of this breakpoint, or -1 if the attribute is not present.
- *
- * @return this breakpoint's char start value, or -1 if unknown
- * @exception CoreException if a <code>CoreException</code> is thrown
- * while accessing the underlying <code>CHAR_START</code> marker attribute
- */
-public int getCharStart() throws CoreException;
-/**
- * Returns ending source index in the original source that corresponds
- * to the location of this breakpoint, or -1 if the attribute is not present.
- *
- * @return this breakpoint's char end value, or -1 if unknown
- * @exception CoreException if a <code>CoreException</code> is thrown
- * while accessing the underlying <code>CHAR_END</code> marker attribute
- */
-public int getCharEnd() throws CoreException;
-}
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IProcess.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IProcess.java
deleted file mode 100644
index ca185d5ef..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IProcess.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package org.eclipse.debug.core.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.core.runtime.IAdaptable;
-
-/**
- * A process represents a program running in normal (non-debug) mode.
- * Processes support setting and getting of client defined attributes.
- * This way, clients can annotate a process with any extra information
- * important to them. For example, classpath annotations, or command
- * line arguments used to launch the process may be important to a client.
- * <p>
- * Clients may implement this interface, however, the debug plug-in
- * provides an implementation of this interface for a
- * <code>java.lang.Process</code>.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see org.eclipse.debug.core.DebugPlugin#newProcess(Process, String)
- */
-public interface IProcess extends IAdaptable, ITerminate {
-
- /**
- * Returns a human-readable label for this process.
- *
- * @return a label
- */
- String getLabel();
- /**
- * Returns the <code>ILaunch</code> this element originated from, or
- * <code>null</code> if this element has not yet been registered with
- * an <code>ILaunch</code>. This is a convenience method for
- * <code>ILaunchManager.findLaunch(IProcess)</code>.
- *
- * @return the launch this process is contained in
- */
- ILaunch getLaunch();
- /**
- * Returns a proxy to the standard input, output, and error streams
- * for this process, or <code>null</code> if not supported.
- *
- * @return a streams proxy, or <code>null</code> if not supported
- */
- IStreamsProxy getStreamsProxy();
-
- /**
- * Sets the value of a client defined attribute.
- *
- * @param key the attribute key
- * @param value the attribute value
- */
- void setAttribute(String key, String value);
-
- /**
- * Returns the value of a client defined attribute.
- *
- * @param key the attribute key
- * @return value the attribute value, or <code>null</code> if undefined
- */
- String getAttribute(String key);
-
-}
-
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ISourceLocator.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ISourceLocator.java
deleted file mode 100644
index ff1bf1e82..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ISourceLocator.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package org.eclipse.debug.core.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.model.IStackFrame;
-
-/**
- * A source locator locates source elements for stack frames. Each
- * debug session launch (optionally) specifies a source locator which is
- * used to locate source for that debug session. If a launch does not
- * provide a source locator, source cannot be displayed.
- * Abstraction of source lookup allows clients to hide implementation
- * details of source location and representation.
- * <p>
- * Generally, an implementor of a debug model will also implement launchers
- * and source locators that work together as a whole. That is, the implementation
- * if a source locator will have knowledge of how to locate a source element
- * for a stack frame. For example, a Java stack frame could define API which
- * specifies a source file name. A Java source locator would use this information
- * to locate the associated file in the workspace.
- * </p>
- * <p>
- * Source is displayed by the debug UI plug-in. The debug UI uses a source locator
- * to resolve an object representing the source for a stack frame, and then uses
- * a debug model presentation to determine the editor and editor input to use to
- * display the actual source in an editor.
- * </p>
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see org.eclipse.debug.core.ILaunch
- * @see IStackFrame
- * @see org.eclipse.debug.ui.IDebugModelPresentation
- */
-public interface ISourceLocator {
-
- /**
- * Returns a source element that corresponds to the given stack frame, or
- * <code>null</code> if a source element could not be located. The object returned
- * by this method will be used by the debug UI plug-in to display source.
- * The debug UI uses the debug model presentation associated
- * with the given stack frame's debug model to translate a source object into an
- * {editor input, editor id} pair in which to display source.
- * <p>
- * For example, a java source locator could return an object representing a
- * compilation unit or class file. The java debug model presentation would
- * then be responsible for providing an editor input and editor id for each
- * compilation unit and class file such that the debug UI could display source.
- * </p>
- *
- * @param stackFrame the stack frame for which to locate source
- * @return an object representing a source element.
- */
- Object getSourceElement(IStackFrame stackFrame);
-
-}
-
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IStackFrame.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IStackFrame.java
deleted file mode 100644
index 9665a190e..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IStackFrame.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.debug.core.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-
-/**
- * A stack frame represents a stack frame in a suspended thread. A
- * stack frame has element type <code>STACK_FRAME</code>, and a parent
- * of type <code>THREAD</code>. The children of a stack frame are of
- * type <code>VARIABLE</code>, and represent the visible variables in
- * the stack frame. Minimally, a stack frame supports
- * the following capabilities:
- * <ul>
- * <li>suspend/resume (convenience to resume this stack frame's thread)
- * <li>stepping
- * <li>termination (convience to terminate this stack frame's thread or debug target)
- * </ul>
- * <p>
- * An implementation may choose to re-use or discard
- * stack frames on iterative thread suspensions. Clients
- * cannot assume that stack frames are identical or equal across
- * iterative thread suspensions and must check for equality on iterative
- * suspensions if they wish to re-use the objects.
- * </p>
- * <p>
- * An implementation that preserves equality
- * across iterative suspensions may display more desirable behavior in
- * some clients. For example, if stack frames are preserved
- * while stepping, a UI client would be able to update the UI incrementally,
- * rather than collapse and redraw the entire list.
- * </p>
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see IStep
- * @see ISuspendResume
- * @see ITerminate
- */
-public interface IStackFrame extends IDebugElement, IStep, ISuspendResume, ITerminate {
- /**
- * Returns the line number of the instruction pointer in
- * this stack frame that corresponds to a line in an associated source
- * element, or <code>-1</code> if line number information
- * is unavailable.
- *
- * @return line number of instruction pointer in this stack frame
- * @exception DebugException if unable to retrieve this stack frame's line number
- * from the target
- */
- int getLineNumber() throws DebugException;
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IStep.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IStep.java
deleted file mode 100644
index e95428e46..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IStep.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package org.eclipse.debug.core.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-
-/**
- * Provides the ability to step into, over, and return
- * from the current statement in a thread.
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public interface IStep {
- /**
- * Returns whether this element can currently perform a step into.
- *
- * @return whether this element can currently perform a step into
- */
- boolean canStepInto();
- /**
- * Returns whether this element can currently perform a step over.
- *
- * @return whether this element can currently perform a step over
- */
- boolean canStepOver();
- /**
- * Returns whether this element can currently perform a step return.
- *
- * @return whether this element can currently perform a step return
- */
- boolean canStepReturn();
- /**
- * Returns whether this element is currently stepping.
- * <p>
- * For example, a thread is considered to be stepping
- * after the <code>stepOver</code> call until the step over is completed,
- * a breakpoint is reached, an exception is thrown, or the thread or is
- * terminated.
- * </p>
- *
- * @return whether this element is currently stepping
- */
- public boolean isStepping();
- /**
- * Steps into the current statement, generating <code>RESUME</code>
- * and <code>SUSPEND</code> events for this thread. Can only be called
- * when this thread is suspended. Implementations may choose to implement
- * stepping as blocking or non-blocking.
- *
- * @exception DebugException on failure. Reasons include:<ul>
- * <li>TARGET_REQUEST_FAILED - The request failed in the target</li>
- * <li>NOT_SUPPORTED - The capability is not supported by the target</li>
- * </ul>
- */
- void stepInto() throws DebugException;
- /**
- * Steps over the current statement, generating <code>RESUME</code>
- * and <code>SUSPEND</code> events for this thread. Can only be called
- * when this thread is suspended. Implementations may choose to implement
- * stepping as blocking or non-blocking.
- *
- * @exception DebugException on failure. Reasons include:<ul>
- * <li>TARGET_REQUEST_FAILED - The request failed in the target</li>
- * <li>NOT_SUPPORTED - The capability is not supported by the target</li>
- * </ul>
- */
- void stepOver() throws DebugException;
- /**
- * Steps to the next return statement in the current scope,
- * generating <code>RESUME</code> and <code>SUSPEND</code> events for
- * this thread. Can only be called when this thread is suspended.
- * Implementations may choose to implement stepping as blocking or non-blocking.
- *
- * @exception DebugException on failure. Reasons include:<ul>
- * <li>TARGET_REQUEST_FAILED - The request failed in the target</li>
- * <li>NOT_SUPPORTED - The capability is not supported by the target</li>
- * </ul>
- */
- void stepReturn() throws DebugException;
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IStreamMonitor.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IStreamMonitor.java
deleted file mode 100644
index e4f76bdf7..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IStreamMonitor.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.eclipse.debug.core.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.IStreamListener;
-
-/**
- * A stream monitor manages the contents of a stream a process
- * is writing to, and notifies registered listeners of changes in
- * the stream.
- * <p>
- * Clients may implement this interface. Generally, a client that
- * provides an implementation of the <code>IStreamsProxy</code>
- * interface must also provide an implementation of this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see IStreamsProxy
- */
-public interface IStreamMonitor {
- /**
- * Adds the given listener to the registered listeners.
- * Has no effect if an identical listener is already registered.
- *
- * @param the listener to add
- */
- public void addListener(IStreamListener listener);
- /**
- * Returns the current contents of the stream. An empty
- * String is returned if the stream is empty.
- *
- * @return the stream contents as a <code>String</code>
- */
- public String getContents();
- /**
- * Removes the given listener from the registered listeners.
- * Has no effect if the listener is not already registered.
- *
- * @param the listener to remove
- */
- public void removeListener(IStreamListener listener);
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IStreamsProxy.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IStreamsProxy.java
deleted file mode 100644
index 151ff7e84..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IStreamsProxy.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.eclipse.debug.core.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.IOException;
-
-/**
- * A streams proxy acts as proxy between the streams of an
- * process and interested clients. This abstraction allows
- * implementations of <code>IProcess</code> to handle I/O related
- * to the standard input, output, and error streams associated
- * with a process.
- * <p>
- * Clients implementing the <code>IProcess</code> interface must also
- * provide an implementation of this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see IProcess
- * @see org.eclipse.debug.core.DebugPlugin#newProcess(Process, String)
- */
-public interface IStreamsProxy {
- /**
- * Returns a monitor for the error stream of this proxy's process,
- * or <code>null</code> if not supported.
- * The monitor is connected to the error stream of the
- * associated process.
- *
- * @return an input stream monitor, or <code>null</code> if none
- */
- public IStreamMonitor getErrorStreamMonitor();
- /**
- * Returns a monitor for the output stream of this proxy's process,
- * or <code>null</code> if not supported.
- * The monitor is connected to the output stream of the
- * associated process.
- *
- * @return an input stream monitor, or <code>null</code> if none
- */
- public IStreamMonitor getOutputStreamMonitor();
- /**
- * Writes the given text to the output stream connected to the
- * standard input stream of a this proxy's process.
- *
- * @exception IOException when an error occurs writing to the
- * underlying <code>OutputStream</code>.
- *
- */
- public void write(String input) throws IOException;
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ISuspendResume.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ISuspendResume.java
deleted file mode 100644
index 359171e34..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ISuspendResume.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.eclipse.debug.core.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-
-/**
- * Provides the ability to suspend and resume a thread
- * or debug target.
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public interface ISuspendResume {
- /**
- * Returns whether this element can currently be resumed.
- *
- * @return whether this element can currently be resumed
- */
- public boolean canResume();
- /**
- * Returns whether this element can currently be suspended.
- *
- * @return whether this element can currently be suspended
- */
- public boolean canSuspend();
- /**
- * Returns whether this element is currently suspened.
- *
- * @return whether this element is currently suspened
- */
- public boolean isSuspended();
- /**
- * Causes this element to resume its execution. Has no effect
- * on an element that is not suspended. This call is non-blocking.
- *
- * @exception DebugException on failure. Reasons include:<ul>
- * <li>TARGET_REQUEST_FAILED - The request failed in the target
- * <li>NOT_SUPPORTED - The capability is not supported by the target
- * </ul>
- */
- public void resume() throws DebugException;
- /**
- * Causes this element to suspend its execution.
- * Has no effect on an already suspened element.
- * Implementations may be blocking or non-blocking.
- *
- * @exception DebugException on failure. Reasons include:<ul>
- * <li>TARGET_REQUEST_FAILED - The request failed in the target
- * <li>NOT_SUPPORTED - The capability is not supported by the target
- * </ul>
- */
- public void suspend() throws DebugException;
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ITerminate.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ITerminate.java
deleted file mode 100644
index 17dcbed00..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ITerminate.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.eclipse.debug.core.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-
-/**
- * Provides the ability to terminate an execution
- * context - for example, a thread, debug target or process.
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public interface ITerminate {
- /**
- * Returns whether this element can be terminated.
- *
- * @return whether this element can be terminated
- */
- boolean canTerminate();
- /**
- * Returns whether this element is terminated.
- *
- * @return whether this element is terminated
- */
- public boolean isTerminated();
- /**
- * Causes this element to terminate. Implementations may be
- * blocking or non-blocking.
- *
- * @exception DebugException on failure. Reasons include:<ul>
- * <li>TARGET_REQUEST_FAILED - The request failed in the target
- * <li>NOT_SUPPORTED - The capability is not supported by the target
- * </ul>
- */
- public void terminate() throws DebugException;
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IThread.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IThread.java
deleted file mode 100644
index 75d77556e..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IThread.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.eclipse.debug.core.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-
-/**
- * A thread represents a thread of execution in a debug target. A
- * thread has element type <code>THREAD</code>, and a parent
- * of type <code>DEBUG_TARGET</code>. The children of a thread are of
- * type <code>STACK_FRAME</code>. A thread only has children when
- * suspended, and children are returned in top-down order.
- * Minimally, a thread supports the following capabilities:
- * <ul>
- * <li>suspend/resume
- * <li>stepping
- * <li>termiante
- * </ul>
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see ISuspendResume
- * @see IStep
- * @see ITerminate
- * @see IStackFrame
- */
-
-public interface IThread extends IDebugElement, ISuspendResume, IStep, ITerminate {
- /**
- * Returns the priority of this thread. The meaning of this
- * number is operating-system dependent.
- *
- * @return thread priority
- * @exception DebugException if unable to retrieve this thread's priority from
- * the target
- */
- int getPriority() throws DebugException;
- /**
- * Returns the top stack frame or <code>null</code> if there is
- * currently no top stack frame.
- *
- * @return the top stack frame, or <code>null</code> if none
- * @exception DebugException if unable to retrieve this thread's top stack frame
- * from the target
- */
- IStackFrame getTopStackFrame() throws DebugException;
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IValue.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IValue.java
deleted file mode 100644
index 9e81b6de9..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IValue.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package org.eclipse.debug.core.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-
-/**
- * A value represents the value of a variable.
- * A value does not have a parent - instead it has an associated variable.
- * A value representing a complex data structure has
- * children of type <code>VARIABLE</code>.
- * <p>
- * An implementation may choose to re-use or discard
- * values on iterative thread suspensions. Clients
- * cannot assume that values are identical or equal across
- * iterative thread suspensions and must check for equality on iterative
- * suspensions if they wish to re-use the objects.
- * </p>
- * <p>
- * An implementation that preserves equality
- * across iterative suspensions may display more desirable behavior in
- * some clients. For example, if variables are preserved
- * while stepping, a UI client would be able to update the UI incrementally,
- * rather than collapse and redraw the entire list or tree.
- * </p>
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see IVariable
- */
-
-
-public interface IValue extends IDebugElement {
-
- /**
- * Returns a description of the type of data this value contains
- * or references.
- *
- * @return reference type
- * @exception DebugException if unable to retrieve this value's reference type
- * name from the target
- */
- String getReferenceTypeName() throws DebugException;
-
- /**
- * Returns this value as a <code>String</code>.
- *
- * @return value
- * @exception DebugException if unable to retrieve this value's value description
- * from the target
- */
- String getValueString() throws DebugException;
-
- /**
- * Returns the name of this element. Implementations of <code>IValue</code>
- * return <code>null</code>. Values do not have names.
- *
- * @return <code>null</code>
- */
- String getName();
-
- /**
- * Returns the variable this value is bound to, or <code>null</code>
- * if this value is not bound to a variable.
- *
- * @return a variable, or <code>null</code> if none
- */
- IVariable getVariable();
-
- /**
- * Returns the parent of this element. Implementations of <code>IVariable</code>
- * return <code>null</code>. Values do not have parents.
- *
- * @return <code>null</code>
- */
- IDebugElement getParent();
-
- /**
- * Returns whether this value is currently allocated.
- * <p>
- * For example, if this value represents
- * an object that has been garbage collected, <code>false</code> would
- * be returned.
- * </p>
- * @return whether this value is currently allocated
- * @exception DebugException if unable to determine if this value is currently
- * allocated on the target
- */
- boolean isAllocated() throws DebugException;
-} \ No newline at end of file
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IValueModification.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IValueModification.java
deleted file mode 100644
index e3f422933..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IValueModification.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.eclipse.debug.core.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-
-/**
- * Provides the ability to modify the value of a variable in
- * the target.
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see IVariable
- */
-public interface IValueModification {
-
- /**
- * Attempts to set the value of this variable to the
- * value of the given expression.
- *
- * @param expression an expression to generate a new value
- * @exception DebugException on failure. Reasons include:<ul>
- * <li>TARGET_REQUEST_FAILED - The request failed in the target
- * <li>NOT_SUPPORTED - The capability is not supported by the target
- * </ul>
- */
- public void setValue(String expression) throws DebugException;
-
- /**
- * Returns whether this varaible supports value modification.
- *
- * @return whether this varaible supports value modification
- */
- public boolean supportsValueModification();
-
- /**
- * Returns whether the given expression is valid to be used in
- * setting a new value for this variable.
- *
- * @param expression an expression to generate a new value
- * @return whether the expression is acceptable
- * @exception DebugException on failure. Reasons include:<ul>
- * <li>TARGET_REQUEST_FAILED - The request failed in the target
- * <li>NOT_SUPPORTED - The capability is not supported by the target
- * </ul>
- */
- public boolean verifyValue(String expression) throws DebugException;
-
-}
-
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IVariable.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IVariable.java
deleted file mode 100644
index 513c17800..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/IVariable.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.eclipse.debug.core.model;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-
-/**
- * A variable represents a visible variable in a stack frame,
- * or the child of a value. A variable has a type of <code>VARIABLE</code>.
- * A variable's parent may be of type
- * <code>STACK_FRAME</code> or <code>VALUE</code>.
- * Each variable has a value which may in turn
- * have children. A variable itself does not have children.
- * A variable may support value modification.
- * <p>
- * An implementation may choose to re-use or discard
- * variables on iterative thread suspensions. Clients
- * cannot assume that variables are identical or equal across
- * iterative thread suspensions and must check for equality on iterative
- * suspensions if they wish to re-use the objects.
- * </p>
- * <p>
- * An implementation that preserves equality
- * across iterative suspensions may display more desirable behavior in
- * some clients. For example, if variables are preserved
- * while stepping, a UI client would be able to update the UI incrementally,
- * rather than collapse and redraw the entire list or tree.
- * </p>
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see IValue
- * @see IStackFrame
- * @see IValueModification
- */
-public interface IVariable extends IDebugElement, IValueModification {
- /**
- * Returns the children of this elemnet. Implementations of
- * <code>IVariable</code> return an empty collection.
- *
- * @return an empty collection
- * @see IDebugElement
- * @exception DebugException if an unable to retrieve children from
- * the target
- */
- IDebugElement[] getChildren() throws DebugException;
-
- /**
- * Returns the value of this variable.
- *
- * @return variable value
- * @exception DebugException if unable to retrieve this variable's value
- * from the target
- */
- IValue getValue() throws DebugException;
-
- /**
- * Returns a description of the type of data this variable is
- * declared to reference. Note that the type of a variable
- * and the type of its value are not always the same.
- *
- * @return declared type of variable
- * @exception DebugException if unable to retrieve this variables reference type
- * name from the target
- */
- String getReferenceTypeName() throws DebugException;
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/LineBreakpoint.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/LineBreakpoint.java
deleted file mode 100644
index bd2536da3..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/LineBreakpoint.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.eclipse.debug.core.model;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-
-
-/**
- * Abstract implementation of a line breakpoint. This class is
- * intended to be subclassed by debug model specific implementations
- * of line breakpoints.
- */
-
-public abstract class LineBreakpoint extends Breakpoint implements ILineBreakpoint {
-
-
- /**
- * @see ILineBreakpoint#getLineNumber()
- */
- public int getLineNumber() throws CoreException {
- IMarker m = getMarker();
- if (m != null) {
- return m.getAttribute(IMarker.LINE_NUMBER, -1);
- }
- return -1;
- }
-
- /**
- * @see ILineBreakpoint#getCharStart()
- */
- public int getCharStart() throws CoreException {
- IMarker m = getMarker();
- if (m != null) {
- return m.getAttribute(IMarker.CHAR_START, -1);
- }
- return -1;
- }
-
- /**
- * @see ILineBreakpoint#getCharEnd()
- */
- public int getCharEnd() throws CoreException {
- IMarker m = getMarker();
- if (m != null) {
- return m.getAttribute(IMarker.CHAR_END, -1);
- }
- return -1;
- }
-}
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/package.html b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/package.html
deleted file mode 100644
index 4b091a06d..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/package.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Eclipse Debug Tools</title>
-</head>
-
-<body bgcolor="#FFFFFF">
-
-<h3>The Debug Model</h3>
-
-<p><strong>Note:</strong> this package is part of an interim API that is still under
-development and expected to change significantly before reaching stability. It is being
-made available at this early stage to soloicit feedback from pioneering adopters on the
-understanding that any code that uses this API will almost certainly be broken
-(repeatedly) as the API evolves.</p>
-
-<p>A language independent &quot;debug model&quot; is represented by the set of interfaces
-defined in <b>org.eclipse.debug.core.model</b>. A client implements a debug
-model by providing an implementation of these interfaces in a plug-in. (There is no
-explicit extension point that represents a debug model). Each debug architecture will have
-its own way of initiating a debug session. Generally, each debug model will provide one or
-more launchers capable of initiating a debug session. A &quot;launcher&quot; is an
-extension point defined by the debug plug-in. A launcher is responsible for starting a
-debug session, and registering the result with the debug plug-in. Launching is a client
-responsibility.</p>
-
-<p>The common elements defined by the debug plug-in are:
-
-<ul>
- <li>Debug Target - a debug target represents a debuggable program - for example, a virtual
- machine or a process.</li>
- <li>Thread - a debug target may contain one or more threads</li>
- <li>Stack Frame - a thread that is suspended may contain one or more stack frames</li>
- <li>Variable - a stack frame may contain variables</li>
- <li>Value - each variable has a value, and a value may contain more variables (to represent
- complex data structures and objects)</li>
- <li>Process - a program running in normal (non-debug) mode</li>
-</ul>
-
-<h4>Rendering &amp; Presentation</h4>
-
-<p>Debug model elements and breakpoints are displayed in the workbench. To support
-configurable and extensible presentation, the debug UI plug-in defines the <b>
-debugModelPresentations</b> extension point. Extensions of this kind
-register for a specific debug model. It is intended that an implementation of a debug
-model will also provide an implementation of a debug model presentation. The presentation
-provides:
-
-<ul>
- <li>an image for a debug element or breakpoint</li>
- <li>a label for a debug element or breakpoint</li>
- <li>an editor input that should be used to display the debug element or breakpoint</li>
-</ul>
-</body>
-</html>
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/package.html b/org.eclipse.debug.core/core/org/eclipse/debug/core/package.html
deleted file mode 100644
index 41340ca70..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/package.html
+++ /dev/null
@@ -1,175 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Eclipse Debug Tools</title>
-</head>
-
-<body bgcolor="#FFFFFF">
-
-<p>Provides support for launching programs and defines interfaces for a debug model to
-support an extensible set debug architectures.</p>
-
-<h2>Package Specification</h2>
-
-<p><strong>Note</strong>: this package is part of an interim API that is still under
-development and expected to change significantly before reaching stability. It is being
-made available at this early stage to soloicit feedback from pioneering adopters on the
-understanding that any code that uses this API will almost certainly be broken
-(repeatedly) as the API evolves.</p>
-
-<p>Eclipse Debug Tools provides classes and interfaces to support the launching,
-registration, and manipulation of debuggable and non-debuggable programs. An extensible
-set of debug architectures and languages are supported by the definition of a &quot;debug
-model&quot; - a set of interfaces representing common artifacts in debuggable programs.
-The debug plug-in itself does not provide any implementations of a debug model. It is
-intended that third parties providing an integrated set of development tools for a
-specific language will also implement a debug model for that language, using an underlying
-debug architecture of their choice. For example, Java Tooling provides an implementation
-of a debug model based on the standard Java Debug Interface (JDI).</p>
-
-<h4>The Debug Model</h4>
-
-<p>The &quot;debug model&quot; is represented by the set of interfaces defined in <b>
-org.eclipse.debug.core.model</b>. A client implements a debug model by
-providing an implementation of these interfaces in a plug-in. (There is no explicit
-extension point that represents a debug model). Each debug architecture will have its own
-way of initiating a debug session. Generally, each debug model will provide one or more
-launchers capable of initiating a debug session. A &quot;launcher&quot; is an extension
-point defined by the debug plug-in. A launcher is responsible for starting a debug
-session, and registering the result with the debug plug-in. Launching is a client
-responsibility.</p>
-
-<p>The common elements defined by the debug plug-in are:
-
-<ul>
- <li>Debug Target - a debug target represents a debuggable program - for example, a virtual
- machine or a process.</li>
- <li>Thread - a debug target may contain one or more threads</li>
- <li>Stack Frame - a thread that is suspended may contain one or more stack frames</li>
- <li>Variable - a stack frame may contain variables</li>
- <li>Value - each variable has a value, and a value may contain more variables (to represent
- complex data structures and objects)</li>
-</ul>
-
-<h5>Rendering &amp; Presentation</h5>
-
-<p>Debug model elements and breakpoints are displayed in the workbench. To support
-configurable and extensible presentation, the<b> debugModelPresentations</b>
-extension point is used. Extensions may be registered for a specific debug model. It is
-intended that an implementation of a debug model will also provide an implementation of a
-debug model presentation. The presentation provides:
-
-<ul>
- <li>an image for a debug element or breakpoint</li>
- <li>a label for a debug element or breakpoint</li>
- <li>an editor input that should be used to display the debug element or breakpoint</li>
-</ul>
-
-<h4>Breakpoints</h4>
-
-<p>Breakpoints are used to suspend the execution of a program being debugged. There are
-many kinds of breakpoints - line breakpoints, conditional line breakpoints, hit count
-breakpoints, exception breakpoints, etc. The kinds of breakpoints supported by each debug
-architecture (for example, JDI), and the information required to create those breakpoints
-is dictated by each debug architecture. Thus, Eclipse Debug Tools supports an extensible
-set of breakpoint types.</p>
-
-<p>Eclipse Debug Tools provides a breakpoint manager that maintains the collection of all
-known breakpoints. Clients add and remove breakpoints via this manager. Breakpoints are
-represented by markers in the workspace, providing persistence and an extensible set of
-breakpoint attributes. Eclipse Debug Tools defines the root breakpoint marker and the
-common line breakpoint marker, as well as the attributes for these markers. Breakpoint
-creation is a client responsibility - that is, choosing which resource to associate a
-breakpoint with.</p>
-
-<p>The breakpoint definitions in plug-in <b>org.eclipse.debug.core</b>
-are as follows: </p>
-
-<p>&lt;extension id=&quot;breakpoint&quot;
-point=&quot;org.eclipse.core.resources.markers&quot;&gt;<br>
-&nbsp;&nbsp;&nbsp; &lt;super type=&quot;org.eclipse.core.resources.marker&quot;/&gt;<br>
-&nbsp;&nbsp;&nbsp; &lt;persisted value=&quot;true&quot;/&gt;</font></font><br>
-<font face="Courier" SIZE="2">&nbsp;&nbsp;&nbsp; &lt;attribute
-name=&quot;modelIdentifier&quot;/&gt;<br>
-&nbsp;&nbsp;&nbsp; &lt;attribute name=&quot;enabled&quot;/&gt;<br>
-&lt;/extension&gt;</p>
-
-<p>&lt;extension id=&quot;lineBreakpoint&quot;
-point=&quot;org.eclipse.core.resources.markers&quot;&gt;<br>
-&nbsp;&nbsp;&nbsp; &lt;super type=&quot;org.eclipse.debug.core.breakpoint&quot;/&gt;<br>
-&nbsp;&nbsp;&nbsp; &lt;super type=&quot;org.eclipse.core.resources.textmarker&quot;/&gt;<br>
-&nbsp;&nbsp;&nbsp; &lt;persisted value=&quot;true&quot;/&gt;<br>
-&lt;/extension&gt;</p>
-
-<h5>Breakpoint Creation</h5>
-
-<p>The breakpoint lifecycle begins with breakpoint creation. The location in which a
-breakpoint may be placed, and the attributes that its debug target requires to install the
-breakpoint is specific to each debug model. For this reason, breakpoint creation is a
-client responsibility. Generically, the breakpoint creation scenario involves the
-following steps:
-
-<ol>
- <li>Creation of a (subtype of the) breakpoint marker. This requires that a marker be created
- with all appropriate attributes. For convenience, the breakpoint manager has API for
- configuring default values for required attributes on markers.</li>
- <li>Registration of the breakpoint marker with the breakpoint manager. A breakpoint is not
- considered active until it is registered with the breakpoint manager.</li>
-</ol>
-
-<p>Note that verifying the location of the breakpoint is valid is also a client
-responsibility.</p>
-
-<h5>Persistence</h5>
-
-<p>Breakpoints are persisted via the standard marker mechanism. Breakpoints defined with
-the <b>persisted</b> attribute as <b>false</b>
-will not be persisted. Breakpoints are restored at workspace startup time by the
-breakpoint manager - that is, all persisted markers which are a subtype of the root
-breakpoint marker are added to the breakpoint manager. To allow for selective persistence
-of breakpoints, the root breakpoint marker defines a &quot;persisted&quot; attribute. If
-this value is set to false, the breakpoint will not be persisted.</p>
-
-<h5>Change Notification</h5>
-
-<p>As breakpoint markers are modified (created, removed, and attribute values are
-changed), resource deltas are created by the platform. The breakpoint manager translates
-pertinent resource deltas into breakpoint change notifications (breakpoint
-added/removed/changed messages). Interested listeners may register with the breakpoint
-manager. The breakpoint manager only fires change notifications for registered
-breakpoints. This simplifies breakpoint processing for clients, as resource delta
-traversal and analysis is not required. Thus clients have two options - listening to
-resource deltas from the platform, or listening to change notification from the breakpoint
-manager. However, clients should be careful to note that breakpoints marker deltas should
-only be considered as breakpoint changes if a breakpoint is currently active (registered
-with the breakpoint manager).</p>
-
-<h5>Deletion</h5>
-
-<p>Removing a breakpoint from the breakpoint manager signals the end of the breakpoint
-lifecycle. A breakpoint may be removed with the method <b>org.eclipse.debug.core.IBreakpointManager.removeBreakpoint(IMarker)</b>,
-or by deleting the underlying marker (in the later case, the breakpoint manager notices a
-breakpoint has been deleted, and automatically removes it).</p>
-
-<h5>Extensibility</h5>
-
-<p>Clients can define new kinds of breakpoints with the appropriate plug-in XML and
-subtyping any of the defined breakpoint markers. For example, a client may define an
-exception breakpoint as a subtype of the root breakpoint, or a client might define a
-conditional breakpoint as a subtype of the line breakpoint. The breakpoint manager does
-not define generic breakpoints of these types since the attributes required are debug
-model dependent.</p>
-
-<h5>Target Notification</h5>
-
-<p>Debug targets are notified of breakpoints via the <b>IBreakpointListener</b>
-mechanism. The breakpoint manager only notifies debug targets of breakpoints
-added/changed/removed, after a target has been created. Since breakpoints are often in
-existence before a debug target is launched, a debug target is responsible for querying
-the breakpoint manager for breakpoints in existence when it is created - see <b>
-org.eclipse.debug.core.IBreakpointManager.getBreakpoints(String)</b>,
-which provides a list of active breakpoints for a specific debug model.</p>
-</body>
-</html>
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
deleted file mode 100644
index cb3cce4e4..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
+++ /dev/null
@@ -1,445 +0,0 @@
-package org.eclipse.debug.internal.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.*;
-
-/**
- * The breakpoint manager manages all registered breakpoints
- * for the debug plugin. It is instantiated by the debug plugin.
- *
- * @see IBreakpointManager
- */
-public class BreakpointManager implements IBreakpointManager, IResourceChangeListener {
-
- private final static String PREFIX= "breakpoint_manager.";
- private final static String ERROR= PREFIX + "error.";
- private final static String OLD_MARKER= ERROR + "old_marker";
- private final static String ADAPTER= ERROR + "adapter";
- private final static String LABEL_PROPERTY= ERROR + "label_property";
- private final static String EXTENSION= ERROR + "extension";
- private final static String ASSOCIATED_RESOURCE= ERROR + "associated_resource";
- private final static String REQUIRED_ATTRIBUTES= ERROR + "required_attributes";
- private final static String MISSING_BREAKPOINT_DEFINITION= ERROR + "missing_breakpoint_definition";
- private final static String LINE_NUMBER= ERROR + "line_number";
- private final static String CREATION_FAILED= ERROR + "creation_failed";
- private final static String UNSUPPORTED_EXTENSION= ERROR + "unsupported_extension";
- private final static String INSTALLATION_FAILED= ERROR + "installation_failed";
- private final static String REMOVE_FAILED= ERROR + "remove_failed";
- private final static String ENABLE= ERROR + "enable";
- private final static String HIT_COUNT= ERROR + "hit_count";
- private final static String TARGET= ERROR + "target";
-
- /**
- * Constants for breakpoint add/remove/change updates
- */
- private final static int ADDED = 0;
- private final static int REMOVED = 1;
- private final static int CHANGED = 2;
-
- /**
- * A collection of breakpoint registered with this manager.
- *
- */
- protected Vector fBreakpoints;
-
- /**
- * A table of breakpoint extension points, keyed by
- * marker type
- */
- protected HashMap fBreakpointExtensions;
-
- /**
- * Collection of markers that associates markers to breakpoints
- */
- protected HashMap fMarkers;
-
- /**
- * Collection of breakpoint listeners.
- */
- protected ListenerList fBreakpointListeners= new ListenerList(6);
-
- /**
- * Singleton resource delta visitor
- */
- protected static BreakpointManagerVisitor fgVisitor;
-
- /**
- * Constructs a new breakpoint manager.
- */
- public BreakpointManager() {
- fBreakpoints= new Vector(15);
- fMarkers= new HashMap(15);
- fBreakpointExtensions = new HashMap(15);
- }
-
- /**
- * Registers this manager as a resource change listener.
- * Loads the list of breakpoints from the breakpoint markers in the
- * workspace. This method should only be called on initial startup of
- * the debug plugin.
- *
- * @exception CoreException if an error occurrs retreiving breakpoint markers
- */
- public void startup() throws CoreException {
- initBreakpointExtensions();
- getWorkspace().addResourceChangeListener(this);
-
- IMarker[] breakpoints= null;
- IWorkspaceRoot root= getWorkspace().getRoot();
- breakpoints= root.findMarkers(IDebugConstants.BREAKPOINT_MARKER, true, IResource.DEPTH_INFINITE);
-
- for (int i = 0; i < breakpoints.length; i++) {
- IMarker marker= breakpoints[i];
- try {
- createBreakpoint(marker);
- } catch (DebugException e) {
- logError(e);
- }
- }
- }
-
- /**
- * Removes this manager as a resource change listener
- */
- public void shutdown() {
- getWorkspace().removeResourceChangeListener(this);
- }
-
- protected void initBreakpointExtensions() {
- IExtensionPoint ep= DebugPlugin.getDefault().getDescriptor().getExtensionPoint(IDebugConstants.EXTENSION_POINT_BREAKPOINTS);
- IConfigurationElement[] elements = ep.getConfigurationElements();
- for (int i= 0; i < elements.length; i++) {
- fBreakpointExtensions.put(elements[i].getAttribute(IDebugConstants.MARKER_TYPE), elements[i]);
- }
-
- }
-
- /**
- * Convenience method to get the launch manager.
- */
- protected ILaunchManager getLaunchManager() {
- return DebugPlugin.getDefault().getLaunchManager();
- }
-
- /**
- * Convenience method to get the workspace
- */
- protected IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- /**
- * @see IBreakpointManager
- */
- public IBreakpoint getBreakpoint(IMarker marker) {
- return (IBreakpoint)fMarkers.get(marker);
- }
-
- /**
- * @see IBreakpointManager
- */
- public IBreakpoint[] getBreakpoints() {
- Breakpoint[] temp= new Breakpoint[fBreakpoints.size()];
- fBreakpoints.copyInto(temp);
- return temp;
- }
-
- /**
- * @see IBreakpointManager
- */
- public IBreakpoint[] getBreakpoints(String modelIdentifier) {
- Vector temp= new Vector(fBreakpoints.size());
- if (!fBreakpoints.isEmpty()) {
- Iterator breakpoints= fBreakpoints.iterator();
- while (breakpoints.hasNext()) {
- IBreakpoint breakpoint= (IBreakpoint) breakpoints.next();
- String id= breakpoint.getModelIdentifier();
- if (id != null && id.equals(modelIdentifier)) {
- temp.add(breakpoint);
- }
- }
- }
- Breakpoint[] m= new Breakpoint[temp.size()];
- temp.copyInto(m);
- return m;
- }
-
- /**
- * @see IBreakpointManager
- */
- public boolean isRegistered(IBreakpoint breakpoint) {
- return fBreakpoints.contains(breakpoint);
- }
-
-
- /**
- * Remove the given breakpoint
- */
- public void removeBreakpoint(IBreakpoint breakpoint, boolean delete) throws CoreException {
- if (fBreakpoints.remove(breakpoint)) {
- fMarkers.remove(breakpoint.getMarker());
- fireUpdate(breakpoint, null, REMOVED);
- if (delete) {
- breakpoint.delete();
- }
- }
- }
-
- /**
- * @see IBreakpointManager
- */
- public IBreakpoint createBreakpoint(IMarker marker) throws DebugException {
- if (fMarkers.containsKey(marker)) {
- return (IBreakpoint) fMarkers.get(marker);
- }
- IBreakpoint breakpoint= null;
- try {
- IConfigurationElement config = (IConfigurationElement)fBreakpointExtensions.get(marker.getType());
- if (config == null) {
- throw new DebugException(new Status(IStatus.ERROR, DebugPlugin.getDefault().getDescriptor().getUniqueIdentifier(),
- IDebugStatusConstants.CONFIGURATION_INVALID, DebugCoreUtils.getFormattedString(MISSING_BREAKPOINT_DEFINITION, marker.getType()), null));
- }
- IBreakpoint bp = (IBreakpoint)config.createExecutableExtension("class");
- bp.setMarker(marker);
- addBreakpoint(bp);
- return bp;
- } catch (CoreException e) {
- throw new DebugException(e.getStatus());
- }
- }
-
- /**
- * @see IBreakpointManager
- */
- public void addBreakpoint(IBreakpoint breakpoint) throws DebugException {
- if (!fBreakpoints.contains(breakpoint)) {
- verifyBreakpoint(breakpoint);
- fBreakpoints.add(breakpoint);
- fMarkers.put(breakpoint.getMarker(), breakpoint);
- fireUpdate(breakpoint, null, ADDED);
- }
- }
-
- /**
- * Verifies that the breakpoint marker has the minimal required attributes,
- * and throws a debug exception if not.
- */
- protected void verifyBreakpoint(IBreakpoint breakpoint) throws DebugException {
- try {
- String id= breakpoint.getModelIdentifier();
- if (id == null) {
- throw new DebugException(new Status(IStatus.ERROR, DebugPlugin.getDefault().getDescriptor().getUniqueIdentifier(),
- IDebugStatusConstants.CONFIGURATION_INVALID, DebugCoreUtils.getResourceString(REQUIRED_ATTRIBUTES), null));
- }
- } catch (CoreException e) {
- throw new DebugException(e.getStatus());
- }
- }
-
- /**
- * A resource has changed. Traverses the delta for breakpoint changes.
- */
- public void resourceChanged(IResourceChangeEvent event) {
- IResourceDelta delta= event.getDelta();
- if (delta != null) {
- try {
- if (fgVisitor == null) {
- fgVisitor= new BreakpointManagerVisitor();
- }
- delta.accept(fgVisitor);
- } catch (CoreException ce) {
- logError(ce);
- }
- }
- }
-
- /**
- * A project has been opened or closed. Updates the breakpoints for
- * that project
- */
- protected void handleProjectResourceOpenStateChange(IResource project) {
- if (!project.isAccessible()) {
- //closed
- Enumeration breakpoints= fBreakpoints.elements();
- while (breakpoints.hasMoreElements()) {
- IBreakpoint breakpoint= (IBreakpoint) breakpoints.nextElement();
- IResource markerResource= breakpoint.getMarker().getResource();
- if (project.getFullPath().isPrefixOf(markerResource.getFullPath())) {
- try {
- removeBreakpoint(breakpoint, false);
- } catch (CoreException e) {
- logError(e);
- }
- }
- }
- return;
- } else {
- IMarker[] markers= null;
- try {
- markers= project.findMarkers(IDebugConstants.BREAKPOINT_MARKER, true, IResource.DEPTH_INFINITE);
- } catch (CoreException e) {
- logError(e);
- return;
- }
-
- if (markers != null) {
- for (int i= 0; i < markers.length; i++) {
- try {
- createBreakpoint(markers[i]);
- } catch (DebugException e) {
- logError(e);
- }
- }
- }
- }
- }
-
- /**
- * Logs errors
- */
- protected void logError(Exception e) {
- DebugCoreUtils.logError(e);
- }
-
- /**
- * Visitor for handling resource deltas
- */
- class BreakpointManagerVisitor implements IResourceDeltaVisitor {
- /**
- * @see IResourceDeltaVisitor
- */
- public boolean visit(IResourceDelta delta) {
- if (0 != (delta.getFlags() & IResourceDelta.OPEN)) {
- handleProjectResourceOpenStateChange(delta.getResource());
- return true;
- }
- IMarkerDelta[] markerDeltas= delta.getMarkerDeltas();
- for (int i= 0; i < markerDeltas.length; i++) {
- IMarkerDelta markerDelta= markerDeltas[i];
- if (markerDelta.isSubtypeOf(IDebugConstants.BREAKPOINT_MARKER)) {
- switch (markerDelta.getKind()) {
- case IResourceDelta.ADDED :
- handleAddBreakpoint(delta, markerDelta.getMarker(), markerDelta);
- break;
- case IResourceDelta.REMOVED :
- handleRemoveBreakpoint(markerDelta.getMarker(), markerDelta);
- break;
- case IResourceDelta.CHANGED :
- handleChangeBreakpoint(markerDelta.getMarker(), markerDelta);
- break;
- }
- }
- }
-
- return true;
- }
-
- /**
- * Wrapper for handling adds
- */
- protected void handleAddBreakpoint(IResourceDelta rDelta, final IMarker marker, IMarkerDelta mDelta) {
- if (0 != (rDelta.getFlags() & IResourceDelta.MOVED_FROM)) {
- // this breakpoint has actually been moved - removed from the Breakpoint manager and deleted
- final IWorkspace workspace= getWorkspace();
- final IWorkspaceRunnable wRunnable= new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
- try {
- IBreakpoint breakpoint= getBreakpoint(marker);
- if (breakpoint != null) {
- breakpoint.delete();
- }
- } catch (CoreException ce) {
- logError(ce);
- }
- }
- };
- fork(wRunnable);
- } else {
- // do nothing - we do not add until explicitly added
- }
- }
-
- protected void fork(final IWorkspaceRunnable wRunnable) {
- Runnable runnable= new Runnable() {
- public void run() {
- try {
- getWorkspace().run(wRunnable, null);
- } catch (CoreException ce) {
- logError(ce);
- }
- }
- };
- new Thread(runnable).start();
- }
-
- /**
- * Wrapper for handling removes
- */
- protected void handleRemoveBreakpoint(IMarker marker, IMarkerDelta delta) {
- IBreakpoint breakpoint= getBreakpoint(marker);
- if (breakpoint != null) {
- try {
- removeBreakpoint(breakpoint, false);
- } catch (CoreException e) {
- logError(e);
- }
- }
- }
-
- /**
- * Wrapper for handling changes
- */
- protected void handleChangeBreakpoint(IMarker marker, IMarkerDelta delta) {
- final IBreakpoint breakpoint= getBreakpoint(marker);
- if (isRegistered(breakpoint)) {
- fireUpdate(breakpoint, delta, CHANGED);
- }
- }
- }
-
- /**
- * @see IBreakpointManager
- */
- public void addBreakpointListener(IBreakpointListener listener) {
- fBreakpointListeners.add(listener);
- }
-
- /**
- * @see IBreakpointManager
- */
- public void removeBreakpointListener(IBreakpointListener listener) {
- fBreakpointListeners.remove(listener);
- }
-
- /**
- * Notifies listeners of the add/remove/change
- */
- protected void fireUpdate(IBreakpoint breakpoint, IMarkerDelta delta, int update) {
- Object[] copiedListeners= fBreakpointListeners.getListeners();
- for (int i= 0; i < copiedListeners.length; i++) {
- IBreakpointListener listener = (IBreakpointListener)copiedListeners[i];
- switch (update) {
- case ADDED:
- listener.breakpointAdded(breakpoint);
- break;
- case REMOVED:
- listener.breakpointRemoved(breakpoint, delta);
- break;
- case CHANGED:
- listener.breakpointChanged(breakpoint, delta);
- break;
- }
- }
- }
-
-}
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreResources.properties b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreResources.properties
deleted file mode 100644
index 740e6a084..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreResources.properties
+++ /dev/null
@@ -1,70 +0,0 @@
-##############################################################
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-##############################################################
-
-##############################################################
-# BreakpointManager
-##############################################################
-breakpoint_manager.error.adapter=IDesktopElement adapter required to set a breakpoint.
-breakpoint_manager.error.label_property=Label property required to set a breakpoint.
-breakpoint_manager.error.extension=File extension required to set a breakpoint.
-breakpoint_manager.error.associated_resource=Breakpoint creator did not specify associated resource.
-breakpoint_manager.error.required_attributes= Breakpoint creator did not configure required attributes.
-breakpoint_manager.error.missing_breakpoint_definition= Missing breakpoint definition for marker type {0}.
-breakpoint_manager.error.line_number=Breakpoint already exists at line number {0}.
-breakpoint_manager.error.creation_failed=Breakpoint creation failed.
-breakpoint_manager.error.unsupported_extension=Unsupported file extension {0}.
-breakpoint_manager.error.installation_failed=Breakpoint installation failed - attempt to re-install breakpoint.
-breakpoint_manager.error.remove_failed=Breakpoint remove failed.
-breakpoint_manager.error.enable=Attempt to enable breakpoint that does not exist.
-breakpoint_manager.error.hitcount=Attempt to set hit count on a breakpoint that does not exist.
-breakpoint_manager.error.target=Debug target breakpoint set failed.
-
-##############################################################
-# ExceptionManager
-##############################################################
-exception_manager.error.state=Illegal value for exception state.
-exception_manager.error.duplicate=Failed to create exception - it already exists.
-exception_manager.error.persisting=Error persisting exceptions.
-exception_manager.error.restoring=Error restoring exceptions.
-
-##############################################################
-# InputStreamMonitor
-##############################################################
-input_stream_monitor.label=Input Stream Monitor
-
-##############################################################
-# OutputStreamMonitor
-##############################################################
-output_stream_monitor.label=Output Stream Monitor
-
-##############################################################
-# Launch
-##############################################################
-launch.terminate_failed=Terminate failed
-
-##############################################################
-# LaunchManager
-##############################################################
-launch_manager.error.termination=Unable to terminate launch.
-
-##############################################################
-# ProcessMonitor
-##############################################################
-process_monitor.label=Process Monitor
-
-##############################################################
-# RuntimeProcess
-##############################################################
-runtime_process.error.terminate_failed=Terminate failed.
-
-##############################################################
-# SourceLocation
-##############################################################
-source_location.undetermined=undetermined
-
-##############################################################
-# TargetException
-##############################################################
-target_exception.error.state=Illegal value for exception state \ No newline at end of file
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreUtils.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreUtils.java
deleted file mode 100644
index 67a66b862..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreUtils.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package org.eclipse.debug.internal.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.debug.core.DebugPlugin;
-
-/**
- * Utility methods for the debug core plugin.
- */
-public class DebugCoreUtils {
-
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Utility method
- */
- public static String getResourceString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle= getResourceBundle();
- }
- if (fgResourceBundle != null) {
- return fgResourceBundle.getString(key);
- } else {
- return "!" + key + "!";
- }
- }
-
- /**
- * Returns the resource bundle used by the core debug plugin.
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("org.eclipse.debug.internal.core.DebugCoreResources");
- } catch (MissingResourceException e) {
- logError(e);
- }
- return null;
- }
-
- /**
- * Convenience method to log internal errors
- */
- public static void logError(Exception e) {
- if (DebugPlugin.getDefault().isDebugging()) {
- // this message is intentionally not internationalized, as an exception may
- // be due to the resource bundle itself
- System.out.println("Internal error logged from debug core: ");
- e.printStackTrace();
- System.out.println();
- }
- }
-
- /**
- * Plug in the single argument to the resource String for the key to get a formatted resource String
- */
- public static String getFormattedString(String key, String arg) {
- String string= getResourceString(key);
- return MessageFormat.format(string, new String[] { arg });
- }
-
- /**
- * Plug in the arguments to the resource String for the key to get a formatted resource String
- */
- public static String getFormattedString(String key, String[] args) {
- String string= getResourceString(key);
- return MessageFormat.format(string, args);
- }
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java
deleted file mode 100644
index 46e45860f..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java
+++ /dev/null
@@ -1,159 +0,0 @@
-package org.eclipse.debug.internal.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.IStreamListener;
-import org.eclipse.debug.core.model.IStreamMonitor;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Monitors an input stream (connected to the output stream of
- * a system process). An notifies listeners of additions to the
- * stream.
- *
- * @see IStreamMonitor
- */
-public class InputStreamMonitor implements IStreamMonitor {
-
- private final static String PREFIX= "input_stream_monitor.";
- private final static String LABEL= PREFIX + "label";
-
- /**
- * The input stream being monitored.
- */
- protected InputStream fStream;
-
- /**
- * A collection of listeners
- */
- protected ListenerList fListeners= new ListenerList(1);
-
- /**
- * The local copy of the stream contents
- */
- protected StringBuffer fContents;
-
- /**
- * The thread which reads from the stream
- */
- protected Thread fThread;
-
- /**
- * The size of the read buffer
- */
- protected static final int BUFFER_SIZE= 8192;
-
- /**
- * The number of milliseconds to pause
- * between reads.
- */
- protected static final long DELAY= 50L;
- /**
- * Creates an input stream monitor on the
- * given input stream.
- */
- public InputStreamMonitor(InputStream stream) {
- fStream= stream;
- fContents= new StringBuffer();
- }
-
- /**
- * @see IStreamMonitor
- */
- public void addListener(IStreamListener listener) {
- fListeners.add(listener);
- }
-
- /**
- * Causes the monitor to close all
- * communications between it and the
- * underlying stream.
- */
- public void close() {
- if (fThread != null) {
- Thread thread= fThread;
- fThread= null;
- try {
- thread.join();
- } catch (InterruptedException ie) {
- }
- }
- }
-
- /**
- * Notifies the listeners that text has
- * been appended to the stream.
- */
- public void fireStreamAppended(String text) {
- if (text == null)
- return;
- Object[] copiedListeners= fListeners.getListeners();
- for (int i= 0; i < copiedListeners.length; i++) {
- ((IStreamListener) copiedListeners[i]).streamAppended(text, this);
- }
- }
-
- /**
- * @see IStreamMonitor
- */
- public String getContents() {
- return fContents.toString();
- }
-
- /**
- * Continually reads from the stream.
- * <p>
- * This method, along with the <code>startReading</code>
- * method is used to allow <code>InputStreamMonitor</code>
- * to implement <code>Runnable</code> without publicly
- * exposing a <code>run</code> method.
- */
- private void read() {
- byte[] bytes= new byte[BUFFER_SIZE];
- while (true) {
- try {
- if (fStream.available() == 0) {
- if (fThread == null)
- break;
- } else {
- int read= fStream.read(bytes);
- if (read > 0) {
- String text= new String(bytes, 0, read);
- fContents.append(text);
- fireStreamAppended(text);
- }
- }
- } catch (IOException ioe) {
- }
- try {
- Thread.sleep(DELAY);
- } catch (InterruptedException ie) {
- }
- }
- }
-
- /**
- * @see IStreamMonitor
- */
- public void removeListener(IStreamListener listener) {
- fListeners.remove(listener);
- }
-
- /**
- * Starts a <code>Thread</code> which reads the stream.
- */
- public void startMonitoring() {
- if (fThread == null) {
- fThread= new Thread(new Runnable() {
- public void run() {
- read();
- }
- }, DebugCoreUtils.getResourceString(LABEL));
- fThread.start();
- }
- }
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
deleted file mode 100644
index fa79f4762..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
+++ /dev/null
@@ -1,245 +0,0 @@
-package org.eclipse.debug.internal.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
-import java.util.*;
-
-/**
- * Manages registered launches.
- *
- * @see ILaunchManager
- */
-public class LaunchManager extends PlatformObject implements ILaunchManager {
-
- private final static String PREFIX= "launch_manager.";
- private final static String ERROR= PREFIX + "error.";
- private final static String TERMINATION= ERROR + "termination";
-
- /**
- * Constant for use as local name part of <code>QualifiedName</code>
- * for persisting the default launcher.
- */
- private static final String DEFAULT_LAUNCHER= "launcher";
-
- /**
- * Types of notifications
- */
- private static final int REGISTERED = 0;
- private static final int DEREGISTERED = 1;
-
- /**
- * Collection of launches
- */
- protected Vector fLaunches= new Vector(10);
-
- /**
- * Collection of listeners
- */
- protected ListenerList fListeners= new ListenerList(5);
-
- /**
- * @see ILaunchManager
- */
- public void addLaunchListener(ILaunchListener listener) {
- fListeners.add(listener);
- }
-
- /**
- * @see ILaunchManager
- */
- public void deregisterLaunch(ILaunch launch) {
- if (launch == null) {
- return;
- }
- fLaunches.remove(launch);
- fireUpdate(launch, DEREGISTERED);
- }
-
- /**
- * @see ILaunchManager
- */
- public ILaunch findLaunch(IProcess process) {
- synchronized (fLaunches) {
- for (int i= 0; i < fLaunches.size(); i++) {
- ILaunch l= (ILaunch) fLaunches.elementAt(i);
- IProcess[] ps= l.getProcesses();
- for (int j= 0; j < ps.length; j++) {
- if (ps[j].equals(process)) {
- return l;
- }
- }
- }
- }
- return null;
- }
-
- /**
- * @see ILaunchManager
- */
- public ILaunch findLaunch(IDebugTarget target) {
- synchronized (fLaunches) {
- for (int i= 0; i < fLaunches.size(); i++) {
- ILaunch l= (ILaunch) fLaunches.elementAt(i);
- if (target.equals(l.getDebugTarget())) {
- return l;
- }
- }
- }
- return null;
- }
-
- /**
- * Fires notification to the listeners that a launch has been (de)registered.
- */
- public void fireUpdate(ILaunch launch, int update) {
- Object[] copiedListeners= fListeners.getListeners();
- for (int i= 0; i < copiedListeners.length; i++) {
- ILaunchListener listener = (ILaunchListener)copiedListeners[i];
- switch (update) {
- case REGISTERED:
- listener.launchRegistered(launch);
- break;
- case DEREGISTERED:
- listener.launchDeregistered(launch);
- break;
- }
- }
- }
-
- /**
- * @see ILaunchManager
- */
- public IDebugTarget[] getDebugTargets() {
- List targets= new ArrayList(fLaunches.size());
- if (fLaunches.size() > 0) {
- Iterator e= fLaunches.iterator();
- while (e.hasNext()) {
- IDebugTarget target= ((ILaunch) e.next()).getDebugTarget();
- if (target != null)
- targets.add(target);
- }
- }
- return (IDebugTarget[])targets.toArray(new IDebugTarget[targets.size()]);
- }
-
- /**
- * @see ILaunchManager
- */
- public ILauncher getDefaultLauncher(IProject project) throws CoreException {
- ILauncher launcher= null;
- if ((project != null) && project.isOpen()) {
- String launcherID = project.getPersistentProperty(new QualifiedName(IDebugConstants.PLUGIN_ID, DEFAULT_LAUNCHER));
- if (launcherID != null) {
- launcher= getLauncher(launcherID);
- }
- }
- return launcher;
- }
-
- /**
- * Returns the launcher with the given id, or <code>null</code>.
- */
- public ILauncher getLauncher(String id) {
- ILauncher[] launchers= getLaunchers();
- for (int i= 0; i < launchers.length; i++) {
- if (launchers[i].getIdentifier().equals(id)) {
- return launchers[i];
- }
- }
- return null;
- }
-
- /**
- * @see ILaunchManager
- */
- public ILauncher[] getLaunchers() {
- return DebugPlugin.getDefault().getLaunchers();
- }
-
- /**
- * @see ILaunchManager
- */
- public ILauncher[] getLaunchers(String mode) {
- ILauncher[] launchers = getLaunchers();
- ArrayList list = new ArrayList();
- for (int i = 0; i < launchers.length; i++) {
- if (launchers[i].getModes().contains(mode)) {
- list.add(launchers[i]);
- }
- }
- return (ILauncher[])list.toArray(new ILauncher[list.size()]);
- }
-
- /**
- * @see ILaunchManager
- */
- public ILaunch[] getLaunches() {
- return (ILaunch[])fLaunches.toArray(new ILaunch[fLaunches.size()]);
- }
-
- /**
- * @see ILaunchManager
- */
- public IProcess[] getProcesses() {
- List allProcesses= new ArrayList(fLaunches.size());
- if (fLaunches.size() > 0) {
- Iterator e= fLaunches.iterator();
- while (e.hasNext()) {
- IProcess[] processes= ((ILaunch) e.next()).getProcesses();
- for (int i= 0; i < processes.length; i++) {
- allProcesses.add(processes[i]);
- }
- }
- }
- return (IProcess[])allProcesses.toArray(new IProcess[allProcesses.size()]);
- }
-
- /**
- * @see ILaunchManager
- */
- public void registerLaunch(ILaunch launch) {
- fLaunches.add(launch);
- fireUpdate(launch, REGISTERED);
- }
-
- /**
- * @see ILaunchManager
- */
- public void removeLaunchListener(ILaunchListener listener) {
- fListeners.remove(listener);
- }
-
- /**
- * @see ILaunchManager
- */
- public void setDefaultLauncher(IProject resource, ILauncher launcher) throws CoreException {
- String id = null;
- if (launcher != null) {
- id = launcher.getIdentifier();
- }
- resource.setPersistentProperty(new QualifiedName(IDebugConstants.PLUGIN_ID, DEFAULT_LAUNCHER), id);
- }
-
- /**
- * Terminates/Disconnects any active debug targets/processes.
- */
- public void shutdown() {
- ILaunch[] launches = getLaunches();
- for (int i= 0; i < launches.length; i++) {
- ILaunch launch= launches[i];
- try {
- launch.terminate();
- } catch (DebugException e) {
- DebugCoreUtils.logError(e);
- }
- }
- }
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Launcher.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Launcher.java
deleted file mode 100644
index e27922cc4..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Launcher.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package org.eclipse.debug.internal.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.debug.core.ILauncher;
-import org.eclipse.debug.core.model.ILauncherDelegate;
-
-/**
- * A handle to a launcher extension that instantiates the actual
- * extension lazily.
- */
-public class Launcher implements ILauncher {
-
- /**
- * The configuration element that defines this launcher handle
- */
- protected IConfigurationElement fConfigElement = null;
-
- /**
- * The underlying launcher, which is <code>null</code> until the
- * it needs to be instantiated.
- */
- protected ILauncherDelegate fDelegate = null;
-
- /**
- * Cache of the modes this launcher supports
- */
- protected Set fModes;
-
- /**
- * Constructs a handle for a launcher extension.
- */
- public Launcher(IConfigurationElement element) {
- fConfigElement = element;
- }
-
- /**
- * @see ILauncher
- */
- public String getIdentifier() {
- return fConfigElement.getAttribute("id");
- }
-
- /**
- * Returns the set of modes specified in the configuration data.
- * The set contains "mode" constants defined in <code>ILaunchManager</code>
- */
- public Set getModes() {
- if (fModes == null) {
- String modes= fConfigElement.getAttribute("modes");
- if (modes == null) {
- return null;
- }
- StringTokenizer tokenizer= new StringTokenizer(modes, ",");
- fModes = new HashSet(tokenizer.countTokens());
- while (tokenizer.hasMoreTokens()) {
- fModes.add(tokenizer.nextToken().trim());
- }
- }
- return fModes;
- }
-
- /**
- * @see ILauncher.
- */
- public String getLabel() {
- return fConfigElement.getAttribute("label");
- }
-
- /**
- * @see ILauncher
- */
- public String getPerspectiveIdentifier() {
- return fConfigElement.getAttribute("perspective");
- }
-
- /**
- * Returns the launcher for this handle, instantiating it if required.
- */
- public ILauncherDelegate getDelegate() {
- if (fDelegate == null) {
- try {
- fDelegate = (ILauncherDelegate)fConfigElement.createExecutableExtension("class");
- } catch (CoreException e) {
- //status logged in the #createExecutableExtension code
- }
- }
- return fDelegate;
- }
-
- /**
- * @see ILauncher
- */
- public boolean launch(Object[] elements, String mode) {
- return getDelegate().launch(elements, mode, this);
- }
-
- /**
- * Returns the configuration element for this extension
- */
- public IConfigurationElement getConfigurationElement() {
- return fConfigElement;
- }
-
- /**
- * @see ILanucher.
- */
- public String getIconPath() {
- return fConfigElement.getAttribute("icon");
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ListenerList.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ListenerList.java
deleted file mode 100644
index 8688726fd..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ListenerList.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package org.eclipse.debug.internal.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- * Local version of org.eclipse.jface.util.ListenerList
- */
-public class ListenerList {
- /**
- * The initial capacity of the list. Always >= 1.
- */
- private int fCapacity;
-
- /**
- * The current number of listeners.
- * Maintains invariant: 0 <= fSize <= listeners.length.
- */
- private int fSize;
-
- /**
- * The list of listeners. Initially <code>null</code> but initialized
- * to an array of size capacity the first time a listener is added.
- * Maintains invariant: listeners != null IFF fSize != 0
- */
- private Object[] fListeners= null;
-
- /**
- * The empty array singleton instance, returned by getListeners()
- * when size == 0.
- */
- private static final Object[] EmptyArray= new Object[0];
- /**
- * Creates a listener list with an initial capacity of 3.
- */
- public ListenerList() {
- this(3);
- }
-
- /**
- * Creates a listener list with the given initial capacity.
- *
- * @param capacity the number of listeners which this list can initially accept
- * without growing its internal representation; must be at least 1
- */
- public ListenerList(int capacity) {
- if (capacity < 1) {
- throw new IllegalArgumentException();
- }
- fCapacity= capacity;
- }
-
- /**
- * Adds a listener to the list.
- * Has no effect if an identical listener is already registered.
- *
- * @param listener a listener
- */
- public synchronized void add(Object listener) {
- if (listener == null) {
- throw new IllegalArgumentException();
- }
- if (fSize == 0) {
- fListeners= new Object[fCapacity];
- } else {
- // check for duplicates using identity
- for (int i= 0; i < fSize; ++i) {
- if (fListeners[i] == listener) {
- return;
- }
- }
- // grow array if necessary
- if (fSize == fListeners.length) {
- System.arraycopy(fListeners, 0, fListeners= new Object[fSize * 2 + 1], 0, fSize);
- }
- }
- fListeners[fSize++]= listener;
- }
-
- /**
- * Returns an array containing all the registered listeners.
- * The resulting array is unaffected by subsequent adds or removes.
- * If there are no listeners registered, the result is an empty array
- * singleton instance (no garbage is created).
- * Use this method when notifying listeners, so that any modifications
- * to the listener list during the notification will have no effect on the
- * notification itself.
- */
- public synchronized Object[] getListeners() {
- if (fSize == 0)
- return EmptyArray;
- Object[] result= new Object[fSize];
- System.arraycopy(fListeners, 0, result, 0, fSize);
- return result;
- }
-
- /**
- * Returns <code>true</code> if there are no registered listeners,
- * <code>false</code> otherwise.
- */
- public boolean isEmpty() {
- return fSize == 0;
- }
-
- /**
- * Removes a listener from the list.
- * Has no effect if an identical listener was not already registered.
- *
- * @param listener a listener
- */
- public synchronized void remove(Object listener) {
- if (listener == null) {
- throw new IllegalArgumentException();
- }
-
- for (int i= 0; i < fSize; ++i) {
- if (fListeners[i] == listener) {
- if (fSize == 1) {
- fListeners= null;
- fSize= 0;
- } else {
- System.arraycopy(fListeners, i + 1, fListeners, i, --fSize - i);
- fListeners[fSize]= null;
- }
- return;
- }
- }
- }
-
- /**
- * Returns the number of registered listeners
- *
- * @return the number of registered listeners
- */
- public int size() {
- return fSize;
- }
-}
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java
deleted file mode 100644
index b05b0104d..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package org.eclipse.debug.internal.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- * Writes to an output stream, queueing output if the
- * output stream is blocked.
- */
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Vector;
-
-public class OutputStreamMonitor {
-
- private final static String PREFIX= "output_stream_monitor.";
- private final static String LABEL= PREFIX + "label";
-
- protected OutputStream fStream;
- protected Vector fQueue;
- protected Thread fThread;
- protected Object fLock;
-
- /**
- * Creates an output stream monitor on the
- * given output stream.
- */
- public OutputStreamMonitor(OutputStream stream) {
- fStream= stream;
- fQueue= new Vector();
- fLock= new Object();
- }
-
- /**
- * Appends the given text to the stream, or
- * queues the text to be written at a later time
- * if the stream is blocked.
- */
- public void write(String text) {
- synchronized(fLock) {
- fQueue.add(text);
- fLock.notifyAll();
- }
- }
-
- /**
- * Starts a <code>Thread</code> which writes the stream.
- */
- public void startMonitoring() {
- if (fThread == null) {
- fThread= new Thread(new Runnable() {
- public void run() {
- write();
- }
- }, DebugCoreUtils.getResourceString(LABEL));
- fThread.start();
- }
- }
-
- /**
- * Causes the monitor to close all
- * communications between it and the
- * underlying stream.
- */
- public void close() {
- if (fThread != null) {
- Thread thread= fThread;
- fThread= null;
- thread.interrupt();
- }
- }
-
- protected void write() {
- while (fThread != null) {
- writeNext();
- }
- }
-
- protected void writeNext() {
- while (!fQueue.isEmpty()) {
- String text = (String)fQueue.firstElement();
- fQueue.removeElementAt(0);
- try {
- if (fStream != null) {
- fStream.write(text.getBytes());
- fStream.flush();
- }
- } catch (IOException e) {
- }
- }
- try {
- synchronized(fLock) {
- fLock.wait();
- }
- } catch (InterruptedException e) {
- }
- }
-}
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ProcessMonitor.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ProcessMonitor.java
deleted file mode 100644
index e329171ae..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ProcessMonitor.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package org.eclipse.debug.internal.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.*;
-
-/**
- * Monitors a system process, wiating for it to terminate, and
- * then notifies the associated runtime process.
- */
-
-public class ProcessMonitor {
-
- private final static String PREFIX= "process_monitor.";
- private final static String LABEL= PREFIX + "label";
- /**
- * The <code>IProcess</code> being monitored.
- */
- protected RuntimeProcess fProcess;
- /**
- * The <code>java.lang.Process</code> being monitored.
- */
- protected Process fOSProcess;
- /**
- * The <code>Thread</code> which is monitoring the process.
- */
- protected Thread fThread;
- /**
- * Creates a new process monitor and starts monitoring the process
- * for termination.
- */
- public ProcessMonitor(RuntimeProcess process) {
- fProcess= process;
- fOSProcess= process.getSystemProcess();
- startMonitoring();
- }
-
- /**
- * Monitors the process for termination
- */
- private void monitorProcess() {
- while (fOSProcess != null) {
- try {
- fOSProcess.waitFor();
- fOSProcess= null;
- fProcess.terminated();
- } catch (InterruptedException ie) {
- }
- }
- }
-
- /**
- * Starts monitoring the process to determine
- * if it has terminated.
- */
- private void startMonitoring() {
- if (fThread == null) {
- fThread= new Thread(new Runnable() {
- public void run() {
- monitorProcess();
- }
- }, DebugCoreUtils.getResourceString(LABEL));
- fThread.start();
- }
- }
-
- protected void stopMonitoring() {
- fOSProcess = null;
- fThread.interrupt();
- fProcess.terminated();
- }
-}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/RuntimeProcess.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/RuntimeProcess.java
deleted file mode 100644
index ce491085e..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/RuntimeProcess.java
+++ /dev/null
@@ -1,218 +0,0 @@
-package org.eclipse.debug.internal.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.InputStream; import java.io.OutputStream; import java.util.HashMap; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.PlatformObject; import org.eclipse.core.runtime.Status; import org.eclipse.debug.core.DebugEvent; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.IDebugConstants; import org.eclipse.debug.core.IDebugStatusConstants; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.model.IProcess; import org.eclipse.debug.core.model.IStreamsProxy;
-
-
-/**
- * A runtime process is a wrapper for a non-debuggable
- * system process. The process will appear in the debug UI with
- * console and termination support. The process creates a streams
- * proxy for itself, and a process monitor that monitors the
- * underlying system process for terminataion.
- */
-public class RuntimeProcess extends PlatformObject implements IProcess {
-
- private final static String PREFIX= "runtime_process.";
-
- private final static String ERROR = PREFIX + "error.";
- private final static String TERMINATE_FAILED = ERROR + "terminate_failed";
-
- private static final int MAX_WAIT_FOR_DEATH_ATTEMPTS = 10;
-
- /**
- * The system process
- */
- protected Process fProcess;
-
- /**
- * Process monitor
- */
- protected ProcessMonitor fMonitor;
-
- /**
- * The streams proxy for this process
- */
- protected StreamsProxy fStreamsProxy;
-
- /**
- * The name of the process
- */
- protected String fName;
-
- /**
- * <code>true</code> when this process has been termianted
- */
- protected boolean fTerminated;
-
- /**
- * Table of cleint defined attributes
- */
- protected HashMap fAttributes;
-
- /**
- * Constructs a RuntimeProcess on the given system process
- * with the given name.
- */
- public RuntimeProcess(Process process, String name) {
- fProcess= process;
- fName= name;
- fTerminated= true;
- try {
- process.exitValue();
- } catch (IllegalThreadStateException e) {
- fTerminated= false;
- }
- fStreamsProxy = new StreamsProxy(this);
- fMonitor = new ProcessMonitor(this);
- fireCreationEvent();
- }
-
- /**
- * @see IProcess
- */
- public boolean canTerminate() {
- return !fTerminated;
- }
-
- /**
- * Returns the error stream of the underlying system process (connected
- * to the standard error of the process).
- */
- public InputStream getErrorStream() {
- return fProcess.getErrorStream();
- }
-
- /**
- * Returns the input stream of the underlying system process (connected
- * to the standard out of the process).
- */
- public InputStream getInputStream() {
- return fProcess.getInputStream();
- }
-
- /**
- * @see IProcess
- */
- public String getLabel() {
- return fName;
- }
-
- /**
- * @see IProcess
- */
- public ILaunch getLaunch() {
- return DebugPlugin.getDefault().getLaunchManager().findLaunch(this);
- }
-
- /**
- * Returns the output stream of the underlying system process (connected
- * to the standard in of the process).
- */
- public OutputStream getOutputStream() {
- return fProcess.getOutputStream();
- }
-
- public Process getSystemProcess() {
- return fProcess;
- }
-
- /**
- * @see IProcess
- */
- public boolean isTerminated() {
- return fTerminated;
- }
-
- /**
- * @see IProcess
- */
- public void terminate() throws DebugException {
- if (!isTerminated()) {
- fProcess.destroy();
- int attempts = 0;
- while (attempts < MAX_WAIT_FOR_DEATH_ATTEMPTS) {
- try {
- if (fProcess != null) {
- fProcess.exitValue();
- }
- return;
- } catch (IllegalThreadStateException ie) {
- }
- try {
- Thread.sleep(500);
- } catch (InterruptedException e) {
- }
- attempts++;
- }
- // clean-up
- fMonitor.stopMonitoring();
- IStatus status = new Status(IStatus.ERROR, IDebugConstants.PLUGIN_ID, IDebugStatusConstants.TARGET_REQUEST_FAILED, DebugCoreUtils.getResourceString(TERMINATE_FAILED), null);
- throw new DebugException(status);
- }
- }
-
- /**
- * Notification that the system process associated with this process
- * has terminated.
- */
- public void terminated() {
- fStreamsProxy.close();
- fTerminated= true;
- fProcess= null;
- fireTerminateEvent();
- }
-
- public IStreamsProxy getStreamsProxy() {
- return fStreamsProxy;
- }
-
- /**
- * Fire a debug event marking the creation of this element.
- */
- public void fireCreationEvent() {
- fireEvent(new DebugEvent(this, DebugEvent.CREATE));
- }
-
- /**
- * Fire a debug event
- */
- public void fireEvent(DebugEvent event) {
- DebugPlugin manager= DebugPlugin.getDefault();
- if (manager != null) {
- manager.fireDebugEvent(event);
- }
- }
-
- /**
- * Fire a debug event marking the termination of this process.
- */
- public void fireTerminateEvent() {
- fireEvent(new DebugEvent(this, DebugEvent.TERMINATE));
- }
-
- /**
- * @see IProcess
- */
- public void setAttribute(String key, String value) {
- if (fAttributes == null) {
- fAttributes = new HashMap(5);
- }
- fAttributes.put(key, value);
- }
-
- /**
- * @see IProcess
- */
- public String getAttribute(String key) {
- if (fAttributes == null) {
- return null;
- }
- return (String)fAttributes.get(key);
- }
-}
-
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/StreamsProxy.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/StreamsProxy.java
deleted file mode 100644
index 81f827f0e..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/StreamsProxy.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package org.eclipse.debug.internal.core;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.model.IStreamMonitor;
-import org.eclipse.debug.core.model.IStreamsProxy;
-import java.io.IOException;
-
-/**
- * @see IStreamsProxy
- */
-public class StreamsProxy implements IStreamsProxy {
- /**
- * The monitor for the input stream (connected to standard out of the process)
- */
- protected InputStreamMonitor fInputMonitor;
- /**
- * The monitor for the error stream.
- */
- protected InputStreamMonitor fErrorMonitor;
- /**
- * The monitor for the output stream (connected to standard in of the process).
- */
- protected OutputStreamMonitor fOutputMonitor;
- /**
- * Records the open/closed state of communications with
- * the underlying streams.
- */
- protected boolean fClosed= false;
- /**
- * Creates a <code>StreamsProxy</code> on the streams
- * of the given <code>IProcess</code>.
- */
- public StreamsProxy(RuntimeProcess process) {
- if (process != null) {
- fInputMonitor= new InputStreamMonitor(process.getInputStream());
- fErrorMonitor= new InputStreamMonitor(process.getErrorStream());
- fOutputMonitor= new OutputStreamMonitor(process.getOutputStream());
- fInputMonitor.startMonitoring();
- fErrorMonitor.startMonitoring();
- fOutputMonitor.startMonitoring();
- }
- }
-
- /**
- * Causes the proxy to close all
- * communications between it and the
- * underlying streams.
- */
- public void close() {
- fClosed= true;
- fInputMonitor.close();
- fErrorMonitor.close();
- fOutputMonitor.close();
- }
-
- /**
- * @see IStreamsProxy
- */
- public IStreamMonitor getErrorStreamMonitor() {
- return fErrorMonitor;
- }
-
- /**
- * @see IStreamsProxy
- */
- public IStreamMonitor getOutputStreamMonitor() {
- return fInputMonitor;
- }
-
- /**
- * @see IStreamsProxy
- */
- public void write(String input) throws IOException {
- if (!fClosed) {
- fOutputMonitor.write(input);
- } else {
- throw new IOException();
- }
- }
-
-}
diff --git a/org.eclipse.debug.core/doc/hglegal.htm b/org.eclipse.debug.core/doc/hglegal.htm
deleted file mode 100644
index d9e453f84..000000000
--- a/org.eclipse.debug.core/doc/hglegal.htm
+++ /dev/null
@@ -1,13 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-(c) Copyright IBM Corp. 2000, 2001. All Rights Reserved.
-</body>
-</html>
diff --git a/org.eclipse.debug.core/doc/ngibmcpy.gif b/org.eclipse.debug.core/doc/ngibmcpy.gif
deleted file mode 100644
index 360f8e998..000000000
--- a/org.eclipse.debug.core/doc/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.core/doc/org_eclipse_debug_core.html b/org.eclipse.debug.core/doc/org_eclipse_debug_core.html
deleted file mode 100644
index 811a99124..000000000
--- a/org.eclipse.debug.core/doc/org_eclipse_debug_core.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>README Debug User Interface Extension Points</title>
-</head>
-
-<body link="#0000FF" vlink="#800080">
-
-<h1 align="center">Eclipse Debug Tools Infrastructure</h1>
-
-<p>The debug tools infrastructure plug-in, <b>org.eclipse.debug.core</b>,
-defines a model for language independent debugging. A set of common debug artifacts and
-actions are defined by interfaces, for which specific debug architectures may provide
-implementations. For example, some common artifacts are threads, stack frames, and
-variables; some common actions are terminate, suspend, step, and resume. A debug
-architecture, such as JDI (Java Debug Interface), can provide an implementation of the
-artifacts and actions. The debug plug-in also defines and provides an implementation of
-managers to support breakpoints and launching.<br>
-</p>
-
-<hr>
-
-<h1>Extension Points</h1>
-
-<p>The following extension points are used to support and extend the debug infrastructure:
-
-<ul>
- <li><a href="org_eclipse_debug_core_launchers.html">org.eclipse.debug.core.launchers</a></li>
-</ul>
-
-<p><a href="hglegal.htm"><img src="ngibmcpy.gif" alt="Copyright IBM Corp. 2000, 2001. All Rights Reserved."
-border="0" width="195" height="12"></a></p>
-</body>
-</html>
diff --git a/org.eclipse.debug.core/doc/org_eclipse_debug_core_launchers.html b/org.eclipse.debug.core/doc/org_eclipse_debug_core_launchers.html
deleted file mode 100644
index 189e467e8..000000000
--- a/org.eclipse.debug.core/doc/org_eclipse_debug_core_launchers.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>README Launcher Extension Points</title>
-</head>
-
-<body link="#0000FF" vlink="#800080">
-
-<h1 align="center">Launcher</h1>
-
-<p><b><i>Identifier: </i></b>org.eclipse.debug.core.launchers </p>
-
-<p><b><i>Description: </i></b>This extension point allows tools to contribute launchers. A
-launcher is responsible for initiating a debug session or running a program and
-registering the result with the launch manager.</p>
-
-<p><b><i>Configuration Markup:</i></b> </p>
-
-<pre><tt>&nbsp;&nbsp; &lt;!ATTLIST launcher</tt>
- id CDATA #REQUIRED<tt>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class CDATA #REQUIRED</tt>
-<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; modes CDATA #REQUIRED
-</tt> label CDATA #REQUIRED
- wizard CDATA #IMPLIED
- icon CDATA #IMPLIED
- public CDATA #IMPLIED
- description CDATA #IMPLIED
- <tt>perspective CDATA #IMPLIED
- &gt;</tt> </pre>
-
-<ul>
- <li><strong>id </strong>- a unique identifier that can be used to reference this
- launcher.</li>
- <li><b>class</b> - fully qualified name of the class that implements
- <b>org.eclipse.debug.core.ILauncherDelegate</b>.</li>
- <li><b>modes</b> - A comma separated list of modes this launcher supports. The two
- supported modes are &quot;run&quot; and &quot;debug&quot; - as defined in <b>
- org.eclipse.debug.core.ILaunchManager.</b>A launcher may be capable
- of launching in one or both modes.</li>
- <li><strong>label </strong>- a label to use for the launcher. This attribute is used by
- the debug UI.</li>
- <li><strong>wizard </strong>- fully qualified name of the class that implements
- <b>org.eclipse.debug.ui.ILaunchWizard</b>. This attribute is used by
- the debug UI. A launcher may contribute a wizard that allows users to configure and launch
- specific attributes.</li>
- <li><strong>icon </strong>- a relative path for an icon that will be used to visually
- represent the launcher. If omitted, no icon will be used for this launcher.
- The path is relative to the location of the plugin.xml file of the contributing
- plug-in.</li>
- <li><strong>public</strong> - whether a launcher is publically visible in the debug UI.
- &nbsp; If &quot;true&quot;,&nbsp; the launcher will be available from the debug UI - the
- launcher will appear as a choice for a default launcher, launches created by this launcher
- will appear in the launch history, and the launcher will be available from the drop-down
- run/debug toolbar actions.</li>
- <li><strong>description</strong> - a description of the launcher.&nbsp; Currently only
- used if the <em>wizard</em> attribute is specified.</li>
- <li><strong>perspective</strong> - the identifier of the perspective that will be
- switched to on a successful launch.&nbsp; Default value is the identifier for the debug
- perspective. This attribute is used by the debug UI.</li>
-</ul>
-
-<p><b><i>Examples:</i></b> </p>
-
-<p>The following is an example of a launcher extension point: </p>
-
-<pre><tt>&nbsp;&nbsp; &lt;extension</tt>
-<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; point = &quot;org.eclipse.debug.core.launchers&quot;&gt;</tt>
-<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;launcher</tt>
- id = &quot;com.example.ExampleLauncher&quot;
-<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; class = &quot;com.example.launchers.ExampleLauncher&quot;</tt>
-<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; modes = &quot;run, debug&quot;
- label = &quot;Example Launcher&quot;
- wizard = &quot;com.example.launchers.ui.ExampleLaunchWizard&quot;
- icon = &quot;icons/exampleLauncher.gif&quot;
- public = &quot;true&quot;
- description = &quot;Launches example programs&quot;
- perspective= &quot;com.example.JavaPerspective&quot;&gt;</tt>
-<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/launcher&gt;</tt>
-<tt>&nbsp;&nbsp; &lt;/extension&gt;</tt> </pre>
-
-<p>In the example above, the specified launcher supports both run and debug modes.
-Following a successful launch, the debug UI will change to the Java perspective. When the
-debug UI presents the user with a list of launchers to choose from, &quot;Example
-Launcher&quot; will appear as one of the choices with the &quot;Launches example
-programs&quot; as the description, and the wizard specified by <b>com.example.launchers.ui.ExampleLaunchWizard</b>
-will be used to configure any launch specific details.</p>
-
-<p><b><i>API Information: </i></b>Value of the attribute <b>class</b> must be a fully
-qualified class name of a Java class that implements the interface <b>
-org.eclipse.debug.core.ILauncherDelegate</b>. Value of the attribute
-<strong>wizard</strong> must be a fully qualified class name of a Java class that
-implements <b>org.eclipse.debug.ui.ILaunchWizard</b>.<br>
-<br>
-</p>
-
-<p><a href="hglegal.htm"><img src="ngibmcpy.gif" alt="Copyright IBM Corp. 2000, 2001. All Rights Reserved."
-border="0" width="195" height="12"></a></p>
-</body>
-</html>
diff --git a/org.eclipse.debug.core/exportplugin.xml b/org.eclipse.debug.core/exportplugin.xml
deleted file mode 100644
index cd37b2f29..000000000
--- a/org.eclipse.debug.core/exportplugin.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<!-- Export a jar of .class files for the org.eclipse.debug.core Eclipse plugin
- along with other important plugin files to the "plugin-export" subdirectory
- of the target Eclipse installation -->
-<project name="org.eclipse.debug.core" default="export" basedir=".">
-
- <!-- Set the timestamp and important properties -->
- <target name="init">
- <tstamp/>
- <property name="destdir" value="../../plugin-export" />
- <property name="dest" value="${destdir}/org.eclipse.debug.core" />
- </target>
-
- <!-- Create the jar of .class files, and copy other important files to export dir -->
- <target name="export" depends="init">
- <mkdir dir="${destdir}" />
- <delete dir="${dest}" />
- <mkdir dir="${dest}" />
- <jar
- jarfile="${dest}/dtcore.jar"
- basedir="bin"
- />
- <!-- Create the source zip -->
- <zip zipfile="${dest}/dtcoresrc.zip">
- <fileset dir="Eclipse Debug Core"/>
- </zip>
- <copy file="plugin.xml" todir="${dest}"/>
- <copy file="plugin.jars" todir="${dest}"/>
- <copy file=".classpath" todir="${dest}"/>
- <copy file=".options" todir="${dest}"/>
- </target>
-
-</project>
diff --git a/org.eclipse.debug.core/plugin.jars b/org.eclipse.debug.core/plugin.jars
deleted file mode 100644
index e50828df4..000000000
--- a/org.eclipse.debug.core/plugin.jars
+++ /dev/null
@@ -1 +0,0 @@
-dtcore.jar=Eclipse Debug Core \ No newline at end of file
diff --git a/org.eclipse.debug.core/plugin.xml b/org.eclipse.debug.core/plugin.xml
deleted file mode 100644
index bfcfe448d..000000000
--- a/org.eclipse.debug.core/plugin.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- File written by PDE 1.0 -->
-<plugin
- id="org.eclipse.debug.core"
- name="DebugTools"
- version="0.9"
- provider-name="Object Technology International, Inc."
- class="org.eclipse.debug.core.DebugPlugin">
-<!-- Required plugins -->
-<requires>
- <import plugin="org.apache.xerces"/>
- <import plugin="org.eclipse.core.resources"/>
-</requires>
-
-<!-- Runtime -->
-<runtime>
- <library name="dtcore.jar">
- <export name="*"/>
- </library>
-</runtime>
-
-<!-- Extension points -->
-<extension-point id="launchers" name="Launcher"/>
-<extension-point id="breakpoints" name="Breakpoint"/>
-
-<!-- Extensions -->
-<extension
- id="breakpointMarker"
- point="org.eclipse.core.resources.markers">
- <super
- type="org.eclipse.core.resources.marker">
- </super>
- <persistent
- value="true">
- </persistent>
- <attribute
- name="modelIdentifier">
- </attribute>
- <attribute
- name="enabled">
- </attribute>
-</extension>
-<extension
- id="lineBreakpointMarker"
- point="org.eclipse.core.resources.markers">
- <super
- type="org.eclipse.debug.core.breakpointMarker">
- </super>
- <super
- type="org.eclipse.core.resources.textmarker">
- </super>
- <persistent
- value="true">
- </persistent>
-</extension>
-</plugin>
diff --git a/org.eclipse.debug.ui/.cvsignore b/org.eclipse.debug.ui/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/org.eclipse.debug.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/org.eclipse.debug.ui/.options b/org.eclipse.debug.ui/.options
deleted file mode 100644
index 03af25da9..000000000
--- a/org.eclipse.debug.ui/.options
+++ /dev/null
@@ -1 +0,0 @@
- org.eclipse.debug.ui/debug=true \ No newline at end of file
diff --git a/org.eclipse.debug.ui/.vcm_meta b/org.eclipse.debug.ui/.vcm_meta
deleted file mode 100644
index 73e054753..000000000
--- a/org.eclipse.debug.ui/.vcm_meta
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project-description>
- <nature id="org.eclipse.jdt.core.javanature"/>
- <reference project-name="org.eclipse.debug.core"/>
- <reference project-name="org.eclipse.ui"/>
- <builder name="org.eclipse.jdt.core.javabuilder">
- </builder>
-</project-description>
diff --git a/org.eclipse.debug.ui/build.properties b/org.eclipse.debug.ui/build.properties
deleted file mode 100644
index 19c89bcea..000000000
--- a/org.eclipse.debug.ui/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-bin.includes = icons/,\
- .options,\
- plugin.xml,\
- plugin.properties,\
- *.jar
-build.includes = .options,\
- plugin.jars,\
- plugin.xml,\
- plugin.properties,\
- icons/,\
- doc/,\
- build.properties
-build.vaj.Eclipse\ Debug\ UI = Eclipse Debug UI
-source.dtui.jar = Eclipse Debug UI
diff --git a/org.eclipse.debug.ui/doc/hglegal.htm b/org.eclipse.debug.ui/doc/hglegal.htm
deleted file mode 100644
index d9e453f84..000000000
--- a/org.eclipse.debug.ui/doc/hglegal.htm
+++ /dev/null
@@ -1,13 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-(c) Copyright IBM Corp. 2000, 2001. All Rights Reserved.
-</body>
-</html>
diff --git a/org.eclipse.debug.ui/doc/ngibmcpy.gif b/org.eclipse.debug.ui/doc/ngibmcpy.gif
deleted file mode 100644
index 360f8e998..000000000
--- a/org.eclipse.debug.ui/doc/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/doc/org_eclipse_debug_ui.html b/org.eclipse.debug.ui/doc/org_eclipse_debug_ui.html
deleted file mode 100644
index dc7198526..000000000
--- a/org.eclipse.debug.ui/doc/org_eclipse_debug_ui.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>README Debug User Interface Extension Points</title>
-</head>
-
-<body link="#0000FF" vlink="#800080">
-
-<h1 align="center">Eclipse Debug Tools User-Interface</h1>
-
-<p>This debug tools UI plug-in, <b>org.eclipse.debug.ui</b>, implements a
-debug user-interface, allowing the user to view and manipulate debug targets, processes,
-threads, stack frames, and variables. It provides standard debug functionality such as
-stepping, setting breakpoints, etc. <br>
-</p>
-
-<hr>
-
-<h1>Extension Points</h1>
-
-<p>The following extension points are used to support and extend the debug UI.:
-
-<ul>
- <li><a href="org_eclipse_debug_ui_debugModelPresentations.html">org.eclipse.debug.ui.debugModelPresentations</a></li>
-</ul>
-
-<p><a href="hglegal.htm"><img src="ngibmcpy.gif" alt="Copyright IBM Corp. 2000, 2001. All Rights Reserved."
-border="0" width="195" height="12"></a></p>
-</body>
-</html>
diff --git a/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_debugModelPresentations.html b/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_debugModelPresentations.html
deleted file mode 100644
index 5b1317eea..000000000
--- a/org.eclipse.debug.ui/doc/org_eclipse_debug_ui_debugModelPresentations.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>README Viewer Label Provider Extension Points</title>
-</head>
-
-<body link="#0000FF" vlink="#800080">
-
-<h1 align="center">Debug Model Presentation</h1>
-
-<p><b><i>Identifier: </i></b>org.eclipse.debug.ui.debugModelPresentations</p>
-
-<p><b><i>Description: </i></b>This extension point allows tools to handle the presentation
-aspects of a debug model. A debug model presentation is responsible for providing labels,
-images, and editors for elements in a specific debug model.</p>
-
-<p><b><i>Configuration Markup:</i></b> </p>
-
-<p><tt>&nbsp;&nbsp; &lt;!ATTLIST sectionParser</tt> <br>
-<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp; &nbsp;&nbsp;CDATA #REQUIRED</tt> <tt>
-<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id &nbsp; &nbsp; &nbsp;&nbsp; CDATA #REQUIRED</tt>
-
-<ul>
- <li><b>class</b> - fully qualifed name of a Java class that implements the <b>
- org.eclipse.debug.ui.IDebugModelPresentation</b></li>
- <li><strong>id</strong> - the identifier of the debug model this presentation is
- responsible for</li>
-</ul>
-
-<p><b><i>Examples:</i></b> </p>
-
-<p>The following is an example of a view filter extension point: </p>
-
-<pre><tt>&nbsp;&nbsp; &lt;extension</tt>
-<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; point = &quot;org.eclipse.debug.ui.debugModelPresentations&quot;&gt;</tt>
-<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;debugModelPresentation</tt>
-<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class = &quot;com.example.JavaModelPresentation&quot;&gt;</tt>
-<tt> id = &quot;com.example.JavaDebugModel&quot;
- &lt;/debugLabelProvider</tt>
-<tt>&nbsp;&nbsp; &lt;/extension&gt;</tt></pre>
-
-<p>In the example above, the class <tt>com.example.JavaModelPresentation</tt> will be used
-to render and present debug elements originating from the debug model identified by <b>
-com.example.JavaDebugModel</b>.</p>
-
-<p><b><i>API Information: </i></b>Value of the action attribute <b>class</b> must be a
-fully qualified class name of a Java class that implements <b>
-org.eclipse.debug.ui.IDebugModelPresentation.</b></p>
-
-<p><a href="hglegal.htm"><img src="ngibmcpy.gif" alt="Copyright IBM Corp. 2000, 2001. All Rights Reserved."
-border="0" width="195" height="12"></a></p>
-</body>
-</html>
diff --git a/org.eclipse.debug.ui/exportplugin.xml b/org.eclipse.debug.ui/exportplugin.xml
deleted file mode 100644
index 870996e7a..000000000
--- a/org.eclipse.debug.ui/exportplugin.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<!-- Export a jar of .class files for the org.eclipse.debug.ui Eclipse plugin
- along with other important plugin files to the "plugin-export" subdirectory
- of the target Eclipse installation -->
-<project name="org.eclipse.debug.ui" default="export" basedir=".">
-
- <!-- Set the timestamp and important properties -->
- <target name="init">
- <tstamp/>
- <property name="destdir" value="../../plugin-export" />
- <property name="dest" value="${destdir}/org.eclipse.debug.ui" />
- </target>
-
- <!-- Create the jar of .class files, and copy other important files to export dir -->
- <target name="export" depends="init">
- <mkdir dir="${destdir}" />
- <delete dir="${dest}" />
- <mkdir dir="${dest}" />
- <jar
- jarfile="${dest}/dtui.jar"
- basedir="bin"
- />
- <!-- Create the source zip -->
- <zip zipfile="${dest}/dtuisrc.zip">
- <fileset dir="Eclipse Debug UI"/>
- </zip>
- <copy file="plugin.xml" todir="${dest}"/>
- <copy file="plugin.jars" todir="${dest}"/>
- <copy file="plugin.properties" todir="${dest}"/>
- <copy file=".classpath" todir="${dest}"/>
- <copy file=".options" todir="${dest}"/>
- <copy todir="${dest}/icons">
- <fileset dir="icons" />
- </copy>
- </target>
-
-</project>
diff --git a/org.eclipse.debug.ui/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/disconnect_co.gif b/org.eclipse.debug.ui/icons/full/clcl16/disconnect_co.gif
deleted file mode 100644
index 57cffb229..000000000
--- a/org.eclipse.debug.ui/icons/full/clcl16/disconnect_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/clcl16/inspect_co.gif b/org.eclipse.debug.ui/icons/full/clcl16/inspect_co.gif
deleted file mode 100644
index 2b645a88f..000000000
--- a/org.eclipse.debug.ui/icons/full/clcl16/inspect_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/clcl16/qnames_co.gif b/org.eclipse.debug.ui/icons/full/clcl16/qnames_co.gif
deleted file mode 100644
index a765a7b18..000000000
--- a/org.eclipse.debug.ui/icons/full/clcl16/qnames_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/clcl16/rem_all_co.gif b/org.eclipse.debug.ui/icons/full/clcl16/rem_all_co.gif
deleted file mode 100644
index 2c069ab3f..000000000
--- a/org.eclipse.debug.ui/icons/full/clcl16/rem_all_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/clcl16/rem_co.gif b/org.eclipse.debug.ui/icons/full/clcl16/rem_co.gif
deleted file mode 100644
index 12a9167c5..000000000
--- a/org.eclipse.debug.ui/icons/full/clcl16/rem_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/clcl16/resume_co.gif b/org.eclipse.debug.ui/icons/full/clcl16/resume_co.gif
deleted file mode 100644
index 2088548a4..000000000
--- a/org.eclipse.debug.ui/icons/full/clcl16/resume_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/clcl16/stepinto_co.gif b/org.eclipse.debug.ui/icons/full/clcl16/stepinto_co.gif
deleted file mode 100644
index cc1378e0e..000000000
--- a/org.eclipse.debug.ui/icons/full/clcl16/stepinto_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/clcl16/stepover_co.gif b/org.eclipse.debug.ui/icons/full/clcl16/stepover_co.gif
deleted file mode 100644
index 5e24fb9b8..000000000
--- a/org.eclipse.debug.ui/icons/full/clcl16/stepover_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/clcl16/stepreturn_co.gif b/org.eclipse.debug.ui/icons/full/clcl16/stepreturn_co.gif
deleted file mode 100644
index 6081cba13..000000000
--- a/org.eclipse.debug.ui/icons/full/clcl16/stepreturn_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/clcl16/suspend_co.gif b/org.eclipse.debug.ui/icons/full/clcl16/suspend_co.gif
deleted file mode 100644
index 457893c1b..000000000
--- a/org.eclipse.debug.ui/icons/full/clcl16/suspend_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/clcl16/terminate_co.gif b/org.eclipse.debug.ui/icons/full/clcl16/terminate_co.gif
deleted file mode 100644
index d47876f68..000000000
--- a/org.eclipse.debug.ui/icons/full/clcl16/terminate_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/clcl16/tnames_co.gif b/org.eclipse.debug.ui/icons/full/clcl16/tnames_co.gif
deleted file mode 100644
index 1bbbb95c8..000000000
--- a/org.eclipse.debug.ui/icons/full/clcl16/tnames_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/ctool16/debug_exc.gif b/org.eclipse.debug.ui/icons/full/ctool16/debug_exc.gif
deleted file mode 100644
index 3052a80cd..000000000
--- a/org.eclipse.debug.ui/icons/full/ctool16/debug_exc.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/ctool16/run_exc.gif b/org.eclipse.debug.ui/icons/full/ctool16/run_exc.gif
deleted file mode 100644
index 8174dade2..000000000
--- a/org.eclipse.debug.ui/icons/full/ctool16/run_exc.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/cview16/breakpoint_view.gif b/org.eclipse.debug.ui/icons/full/cview16/breakpoint_view.gif
deleted file mode 100644
index a03a7a29c..000000000
--- a/org.eclipse.debug.ui/icons/full/cview16/breakpoint_view.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/cview16/debug_persp.gif b/org.eclipse.debug.ui/icons/full/cview16/debug_persp.gif
deleted file mode 100644
index a81a38412..000000000
--- a/org.eclipse.debug.ui/icons/full/cview16/debug_persp.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/cview16/debug_view.gif b/org.eclipse.debug.ui/icons/full/cview16/debug_view.gif
deleted file mode 100644
index 0a7e30ccb..000000000
--- a/org.eclipse.debug.ui/icons/full/cview16/debug_view.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/cview16/process_view.gif b/org.eclipse.debug.ui/icons/full/cview16/process_view.gif
deleted file mode 100644
index e72be97db..000000000
--- a/org.eclipse.debug.ui/icons/full/cview16/process_view.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/cview16/variable_view.gif b/org.eclipse.debug.ui/icons/full/cview16/variable_view.gif
deleted file mode 100644
index e770104d2..000000000
--- a/org.eclipse.debug.ui/icons/full/cview16/variable_view.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/cview16/watchlist_view.gif b/org.eclipse.debug.ui/icons/full/cview16/watchlist_view.gif
deleted file mode 100644
index 99783a247..000000000
--- a/org.eclipse.debug.ui/icons/full/cview16/watchlist_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/disconnect_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/disconnect_co.gif
deleted file mode 100644
index cb53f4b61..000000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/disconnect_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/inspect_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/inspect_co.gif
deleted file mode 100644
index 27b96a72a..000000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/inspect_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/qnames_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/qnames_co.gif
deleted file mode 100644
index 519d6d1eb..000000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/qnames_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/rem_all_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/rem_all_co.gif
deleted file mode 100644
index e0cfa6dc7..000000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/rem_all_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/rem_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/rem_co.gif
deleted file mode 100644
index 7e0ad4aed..000000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/rem_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/resume_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/resume_co.gif
deleted file mode 100644
index a281bc119..000000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/resume_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/stepinto_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/stepinto_co.gif
deleted file mode 100644
index 7be251906..000000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/stepinto_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/stepover_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/stepover_co.gif
deleted file mode 100644
index 02cf5d3b9..000000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/stepover_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/stepreturn_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/stepreturn_co.gif
deleted file mode 100644
index 644da8ec8..000000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/stepreturn_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/suspend_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/suspend_co.gif
deleted file mode 100644
index 47f329936..000000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/suspend_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/terminate_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/terminate_co.gif
deleted file mode 100644
index bf1546066..000000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/terminate_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/tnames_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/tnames_co.gif
deleted file mode 100644
index 764201b37..000000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/tnames_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dtool16/debug_exc.gif b/org.eclipse.debug.ui/icons/full/dtool16/debug_exc.gif
deleted file mode 100644
index 23dfce0ca..000000000
--- a/org.eclipse.debug.ui/icons/full/dtool16/debug_exc.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dtool16/run_exc.gif b/org.eclipse.debug.ui/icons/full/dtool16/run_exc.gif
deleted file mode 100644
index 087dd571a..000000000
--- a/org.eclipse.debug.ui/icons/full/dtool16/run_exc.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/disconnect_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/disconnect_co.gif
deleted file mode 100644
index 11de2e14b..000000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/disconnect_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/inspect_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/inspect_co.gif
deleted file mode 100644
index bcd5f2211..000000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/inspect_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/qnames_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/qnames_co.gif
deleted file mode 100644
index 12e1f7be7..000000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/qnames_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/rem_all_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/rem_all_co.gif
deleted file mode 100644
index 33908b126..000000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/rem_all_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/rem_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/rem_co.gif
deleted file mode 100644
index 310510ee5..000000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/rem_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/resume_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/resume_co.gif
deleted file mode 100644
index 053738cf6..000000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/resume_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/stepinto_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/stepinto_co.gif
deleted file mode 100644
index 951fb909a..000000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/stepinto_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/stepover_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/stepover_co.gif
deleted file mode 100644
index d84e6106c..000000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/stepover_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/stepreturn_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/stepreturn_co.gif
deleted file mode 100644
index 7f9a6acbe..000000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/stepreturn_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/suspend_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/suspend_co.gif
deleted file mode 100644
index c570ac0d2..000000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/suspend_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/terminate_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/terminate_co.gif
deleted file mode 100644
index 8ea6ff73d..000000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/terminate_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/tnames_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/tnames_co.gif
deleted file mode 100644
index c63f59ece..000000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/tnames_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/etool16/debug_exc.gif b/org.eclipse.debug.ui/icons/full/etool16/debug_exc.gif
deleted file mode 100644
index 6ce053259..000000000
--- a/org.eclipse.debug.ui/icons/full/etool16/debug_exc.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/etool16/run_exc.gif b/org.eclipse.debug.ui/icons/full/etool16/run_exc.gif
deleted file mode 100644
index 95f87eaa0..000000000
--- a/org.eclipse.debug.ui/icons/full/etool16/run_exc.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/eview16/breakpoint_view.gif b/org.eclipse.debug.ui/icons/full/eview16/breakpoint_view.gif
deleted file mode 100644
index 51f1b5bd3..000000000
--- a/org.eclipse.debug.ui/icons/full/eview16/breakpoint_view.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/icons/full/eview16/debug_persp.gif b/org.eclipse.debug.ui/icons/full/eview16/debug_persp.gif
deleted file mode 100644
index 14fd1932a..000000000
--- a/org.eclipse.debug.ui/icons/full/eview16/debug_persp.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/eview16/debug_view.gif b/org.eclipse.debug.ui/icons/full/eview16/debug_view.gif
deleted file mode 100644
index 032a3dcb5..000000000
--- a/org.eclipse.debug.ui/icons/full/eview16/debug_view.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/eview16/process_view.gif b/org.eclipse.debug.ui/icons/full/eview16/process_view.gif
deleted file mode 100644
index df296ed04..000000000
--- a/org.eclipse.debug.ui/icons/full/eview16/process_view.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/eview16/variable_view.gif b/org.eclipse.debug.ui/icons/full/eview16/variable_view.gif
deleted file mode 100644
index 18df5a9f4..000000000
--- a/org.eclipse.debug.ui/icons/full/eview16/variable_view.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/eview16/watchlist_view.gif b/org.eclipse.debug.ui/icons/full/eview16/watchlist_view.gif
deleted file mode 100644
index c92154e4b..000000000
--- a/org.eclipse.debug.ui/icons/full/eview16/watchlist_view.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/brkp_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/brkp_obj.gif
deleted file mode 100644
index 06d007905..000000000
--- a/org.eclipse.debug.ui/icons/full/obj16/brkp_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/brkpd_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/brkpd_obj.gif
deleted file mode 100644
index 8e8cac5a9..000000000
--- a/org.eclipse.debug.ui/icons/full/obj16/brkpd_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/debugt_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/debugt_obj.gif
deleted file mode 100644
index d139cde9d..000000000
--- a/org.eclipse.debug.ui/icons/full/obj16/debugt_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/debugtt_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/debugtt_obj.gif
deleted file mode 100644
index e9b7ecec6..000000000
--- a/org.eclipse.debug.ui/icons/full/obj16/debugtt_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/expression_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/expression_obj.gif
deleted file mode 100644
index 870df5c47..000000000
--- a/org.eclipse.debug.ui/icons/full/obj16/expression_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/ldebug_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/ldebug_obj.gif
deleted file mode 100644
index 93105b34f..000000000
--- a/org.eclipse.debug.ui/icons/full/obj16/ldebug_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/lrun_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/lrun_obj.gif
deleted file mode 100644
index 2123a447e..000000000
--- a/org.eclipse.debug.ui/icons/full/obj16/lrun_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/osprc_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/osprc_obj.gif
deleted file mode 100644
index 615fb4071..000000000
--- a/org.eclipse.debug.ui/icons/full/obj16/osprc_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/osprct_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/osprct_obj.gif
deleted file mode 100644
index da227b39b..000000000
--- a/org.eclipse.debug.ui/icons/full/obj16/osprct_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/stckframe_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/stckframe_obj.gif
deleted file mode 100644
index b9783c814..000000000
--- a/org.eclipse.debug.ui/icons/full/obj16/stckframe_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/thread_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/thread_obj.gif
deleted file mode 100644
index fb5175f5c..000000000
--- a/org.eclipse.debug.ui/icons/full/obj16/thread_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/threads_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/threads_obj.gif
deleted file mode 100644
index 7e4a43cd7..000000000
--- a/org.eclipse.debug.ui/icons/full/obj16/threads_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/threadt_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/threadt_obj.gif
deleted file mode 100644
index f2a16394e..000000000
--- a/org.eclipse.debug.ui/icons/full/obj16/threadt_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/ovr16/stcksync_ov.gif b/org.eclipse.debug.ui/icons/full/ovr16/stcksync_ov.gif
deleted file mode 100644
index 9baffaea2..000000000
--- a/org.eclipse.debug.ui/icons/full/ovr16/stcksync_ov.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/wizban/debug_wiz.gif b/org.eclipse.debug.ui/icons/full/wizban/debug_wiz.gif
deleted file mode 100644
index 0205fd155..000000000
--- a/org.eclipse.debug.ui/icons/full/wizban/debug_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/wizban/run_wiz.gif b/org.eclipse.debug.ui/icons/full/wizban/run_wiz.gif
deleted file mode 100644
index af6a02eec..000000000
--- a/org.eclipse.debug.ui/icons/full/wizban/run_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/plugin.jars b/org.eclipse.debug.ui/plugin.jars
deleted file mode 100644
index 2b4b80cb5..000000000
--- a/org.eclipse.debug.ui/plugin.jars
+++ /dev/null
@@ -1 +0,0 @@
-dtui.jar=Eclipse Debug UI \ No newline at end of file
diff --git a/org.eclipse.debug.ui/plugin.properties b/org.eclipse.debug.ui/plugin.properties
deleted file mode 100644
index 877ec546a..000000000
--- a/org.eclipse.debug.ui/plugin.properties
+++ /dev/null
@@ -1,36 +0,0 @@
- DebugPerspective.name=Debug
-
- LauncherPropertyPage.name=Launcher
-
- DebugView.name=Debug
- ProcessesView.name=Processes
- BreakpointsView.name=Breakpoints
- VariablesView.name=Variables
- InspectorView.name=Inspector
- ConsoleView.name=Console
-
- DebugPreferencePage.name=Debug
- ConsolePreferencePage.name=Console
-
- DebugActionSet.label=Run/Debug
-
- DebugMenu.label=&Debug
-
- DebugModelPresentationExtensionName=Debug Model Presentation
-
- RunAction.label=Run
- RunAction.tooltip=Run
- DebugAction.label=Debug
- DebugAction.tooltip=Debug
- StepIntoAction.label=Step &Into@F5
- StepIntoAction.tooltip=Step into
- StepOverAction.label=Step &Over@F6
- StepOverAction.tooltip=Step over
- StepReturnAction.label=Step Re&turn@F7
- StepReturnAction.tooltip=Run to return
- SuspendAction.label=&Suspend
- SuspendAction.tooltip=Suspend
- ResumeAction.label=&Resume@F8
- ResumeAction.tooltip=Resume
- RelaunchLastAction.label=Relaunch &Last@F10
- RelaunchLastAction.tooltip=Relaunch last \ No newline at end of file
diff --git a/org.eclipse.debug.ui/plugin.xml b/org.eclipse.debug.ui/plugin.xml
deleted file mode 100644
index f97adbe94..000000000
--- a/org.eclipse.debug.ui/plugin.xml
+++ /dev/null
@@ -1,236 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- File written by PDE 1.0 -->
-<plugin
- id="org.eclipse.debug.ui"
- name="DebugToolsUI"
- version="0.9"
- provider-name="Object Technology International, Inc."
- class="org.eclipse.debug.internal.ui.DebugUIPlugin">
-<!-- Required plugins -->
-<requires>
- <import plugin="org.apache.xerces"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.debug.core"/>
-</requires>
-
-<!-- Runtime -->
-<runtime>
- <library name="dtui.jar">
- <export name="*"/>
- </library>
-</runtime>
-
-<!-- Extension points -->
-<extension-point id="debugModelPresentations" name="%DebugModelPresentationExtensionName"/>
-
-<!-- Extensions -->
-<extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="%DebugPerspective.name"
- icon="icons/full/cview16/debug_persp.gif"
- class="org.eclipse.debug.internal.ui.DebugPerspective"
- id="org.eclipse.debug.ui.DebugPerspective">
- </perspective>
-</extension>
-<extension
- point="org.eclipse.ui.propertyPages">
- <page
- objectClass="org.eclipse.core.resources.IProject"
- name="%LauncherPropertyPage.name"
- class="org.eclipse.debug.internal.ui.LauncherPropertyPage"
- id="org.eclipse.debug.internal.ui.LauncherPropertyPage">
- </page>
- <page
- objectClass="org.eclipse.jdt.core.IJavaProject"
- name="%LauncherPropertyPage.name"
- class="org.eclipse.debug.internal.ui.LauncherPropertyPage"
- id="org.eclipse.debug.internal.ui.LauncherPropertyPage">
- </page>
-</extension>
-<extension
- point="org.eclipse.ui.views">
- <category
- name="&amp;Debug"
- id="org.eclipse.debug.ui">
- </category>
- <view
- name="%DebugView.name"
- icon="icons/full/cview16/debug_view.gif"
- category="org.eclipse.debug.ui"
- class="org.eclipse.debug.internal.ui.DebugView"
- id="org.eclipse.debug.ui.DebugView">
- </view>
- <view
- name="%ProcessesView.name"
- icon="icons/full/cview16/process_view.gif"
- category="org.eclipse.debug.ui"
- class="org.eclipse.debug.internal.ui.LaunchesView"
- id="org.eclipse.debug.ui.ProcessView">
- </view>
- <view
- name="%BreakpointsView.name"
- icon="icons/full/cview16/breakpoint_view.gif"
- category="org.eclipse.debug.ui"
- class="org.eclipse.debug.internal.ui.BreakpointsView"
- id="org.eclipse.debug.ui.BreakpointView">
- </view>
- <view
- name="%VariablesView.name"
- icon="icons/full/cview16/variable_view.gif"
- category="org.eclipse.debug.ui"
- class="org.eclipse.debug.internal.ui.VariablesView"
- id="org.eclipse.debug.ui.VariableView">
- </view>
- <view
- name="%InspectorView.name"
- icon="icons/full/cview16/watchlist_view.gif"
- category="org.eclipse.debug.ui"
- class="org.eclipse.debug.internal.ui.InspectorView"
- id="org.eclipse.debug.ui.InspectorView">
- </view>
- <view
- name="%ConsoleView.name"
- icon="icons/full/cview16/console_view.gif"
- category="org.eclipse.debug.ui"
- class="org.eclipse.debug.internal.ui.ConsoleView"
- id="org.eclipse.debug.ui.ConsoleView">
- </view>
-</extension>
-<extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%DebugPreferencePage.name"
- class="org.eclipse.debug.internal.ui.DebugPreferencePage"
- id="org.eclipse.debug.ui.DebugPreferencePage">
- </page>
- <page
- name="%ConsolePreferencePage.name"
- category="org.eclipse.debug.ui.DebugPreferencePage"
- class="org.eclipse.debug.internal.ui.ConsolePreferencePage"
- id="org.eclipse.debug.ui.ConsolePreferencePage">
- </page>
-</extension>
-<extension
- point="org.eclipse.ui.actionSets">
- <actionSet
- label="%DebugActionSet.label"
- visible="false"
- id="org.eclipse.debug.ui.debugActionSet">
- <menu
- label="%DebugMenu.label"
- id="org.eclipse.debug.ui.DebugMenu">
- <separator
- name="stepGroup">
- </separator>
- <separator
- name="relaunchGroup">
- </separator>
- </menu>
- <action
- label="%RunAction.label"
- pulldown="true"
- icon="icons/full/ctool16/run_exc.gif"
- helpContextId="run_action_context"
- tooltip="%RunAction.tooltip"
- class="org.eclipse.debug.internal.ui.RunDropDownAction"
- toolbarPath="debug"
- id="org.eclipse.debug.internal.ui.RunDropDownAction">
- </action>
- <action
- label="%DebugAction.label"
- pulldown="true"
- icon="icons/full/ctool16/debug_exc.gif"
- helpContextId="debug_action_context"
- tooltip="%DebugAction.tooltip"
- class="org.eclipse.debug.internal.ui.DebugDropDownAction"
- toolbarPath="debug"
- id="org.eclipse.debug.internal.ui.DebugDropDownAction">
- </action>
- <action
- label="%StepReturnAction.label"
- icon="icons/full/clcl16/stepreturn_co.gif"
- helpContextId="step_return_action_context"
- tooltip="%StepReturnAction.tooltip"
- class="org.eclipse.debug.internal.ui.StepReturnActionDelegate"
- menubarPath="org.eclipse.debug.ui.DebugMenu/stepGroup"
- enablesFor="1"
- id="org.eclipse.debug.internal.ui.StepReturnActionDelegate">
- <selection
- class="org.eclipse.debug.core.model.IStep">
- </selection>
- </action>
- <action
- label="%StepOverAction.label"
- icon="icons/full/clcl16/stepover_co.gif"
- helpContextId="step_over_action_context"
- tooltip="%StepOverAction.tooltip"
- class="org.eclipse.debug.internal.ui.StepOverActionDelegate"
- menubarPath="org.eclipse.debug.ui.DebugMenu/stepGroup"
- enablesFor="1"
- id="org.eclipse.debug.internal.ui.StepOverActionDelegate">
- <selection
- class="org.eclipse.debug.core.model.IStep">
- </selection>
- </action>
- <action
- label="%StepIntoAction.label"
- icon="icons/full/clcl16/stepinto_co.gif"
- helpContextId="step_into_action_context"
- tooltip="%StepIntoAction.tooltip"
- class="org.eclipse.debug.internal.ui.StepIntoActionDelegate"
- menubarPath="org.eclipse.debug.ui.DebugMenu/stepGroup"
- enablesFor="1"
- id="org.eclipse.debug.internal.ui.StepIntoActionDelegate">
- <selection
- class="org.eclipse.debug.core.model.IStep">
- </selection>
- </action>
- <action
- label="%SuspendAction.label"
- icon="icons/full/clcl16/suspend_co.gif"
- helpContextId="suspend_action_context"
- tooltip="%SuspendAction.tooltip"
- class="org.eclipse.debug.internal.ui.SuspendActionDelegate"
- menubarPath="org.eclipse.debug.ui.DebugMenu/stepGroup"
- enablesFor="+"
- id="org.eclipse.debug.internal.ui.SuspendActionDelegate">
- <selection
- class="org.eclipse.debug.core.model.ISuspendResume">
- </selection>
- </action>
- <action
- label="%ResumeAction.label"
- icon="icons/full/clcl16/resume_co.gif"
- helpContextId="resume_action_context"
- tooltip="%ResumeAction.tooltip"
- class="org.eclipse.debug.internal.ui.ResumeActionDelegate"
- menubarPath="org.eclipse.debug.ui.DebugMenu/stepGroup"
- enablesFor="+"
- id="org.eclipse.debug.internal.ui.ResumeActionDelegate">
- <selection
- class="org.eclipse.debug.core.model.ISuspendResume">
- </selection>
- </action>
- <action
- label="%RelaunchLastAction.label"
- helpContextId="relaunch_last_action_context"
- tooltip="%RelaunchLastAction.tooltip"
- class="org.eclipse.debug.internal.ui.RelaunchLastAction"
- menubarPath="org.eclipse.debug.ui.DebugMenu/relaunchGroup"
- id="org.eclipse.debug.internal.ui.RelaunchLastAction">
- </action>
- </actionSet>
-</extension>
-<extension
- id="instructionPointer"
- point="org.eclipse.core.resources.markers">
- <super
- type="org.eclipse.core.resources.textmarker">
- </super>
- <persistent
- value="false">
- </persistent>
-</extension>
-</plugin>
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugView.java
deleted file mode 100644
index 58b0160d3..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugView.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IDebugViewAdapter;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.ViewPart;
-
-/**
- * Functionality common to views in the debugger
- */
-
-public abstract class AbstractDebugView extends ViewPart implements IDebugViewAdapter {
-
- protected final static String TITLE_TOOLTIPTEXT= "title_toolTipText";
-
- protected StructuredViewer fViewer = null;
-
- /**
- * @see IAdaptable
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IDebugViewAdapter.class) {
- return this;
- }
- return super.getAdapter(adapter);
- }
- public void dispose() {
- fViewer= null;
- super.dispose();
- }
-
- /**
- * @see IDebugViewAdapter
- */
- public StructuredViewer getViewer() {
- return fViewer;
- }
-
- /**
- * @see IDebugViewAdapter
- */
- public IDebugModelPresentation getPresentation(String id) {
- return ((DelegatingModelPresentation)fViewer.getLabelProvider()).getPresentation(id);
- }
-
- protected void createContextMenu(Control menuControl) {
- MenuManager menuMgr= new MenuManager("#PopUp");
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager mgr) {
- fillContextMenu(mgr);
- }
- });
- Menu menu= menuMgr.createContextMenu(menuControl);
- menuControl.setMenu(menu);
-
- // register the context menu such that other plugins may contribute to it
- getSite().registerContextMenu(menuMgr, fViewer);
- }
- /**
- * Configures the toolBar
- */
- protected void initializeToolBar() {
- final IToolBarManager tbm= getViewSite().getActionBars().getToolBarManager();
- configureToolBar(tbm);
- getViewSite().getActionBars().updateActionBars();
-
- // this is in a runnable to be run after this view's pane
- // is created
- Runnable r = new Runnable() {
- public void run() {
- if (fViewer.getControl().isDisposed()) {
- return;
- }
- IContributionItem[] items = tbm.getItems();
- if (items != null) {
- for (int i = 0; i < items.length; i++) {
- if (items[i] instanceof ActionContributionItem) {
- IAction action = ((ActionContributionItem)items[i]).getAction();
- if (action.isChecked()) {
- action.run();
- }
- }
- }
- }
- }
- };
- if (fViewer.getControl().isDisposed()) {
- return;
- }
- fViewer.getControl().getDisplay().asyncExec(r);
- }
-
- /**
- * @see IWorkbenchPart
- */
- public void setFocus() {
- fViewer.getControl().setFocus();
- }
-
- /**
- * Returns the title tooltip for the View icon of this view part.
- */
- protected String getTitleToolTipText(String prefix) {
- return DebugUIUtils.getResourceString(prefix + TITLE_TOOLTIPTEXT);
- }
-
- protected abstract void fillContextMenu(IMenuManager mgr);
-
- protected abstract void configureToolBar(IToolBarManager tbm);
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AddToInspectorAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AddToInspectorAction.java
deleted file mode 100644
index 22bac25c1..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AddToInspectorAction.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Iterator; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.model.IVariable; import org.eclipse.debug.ui.DebugUITools; import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.help.WorkbenchHelp;
-
-public class AddToInspectorAction extends InspectorAction {
-
- private static final String PREFIX= "add_to_inspector_action.";
-
- public AddToInspectorAction(ISelectionProvider sp) {
- super(sp, DebugUIUtils.getResourceString(PREFIX + TEXT));
- setToolTipText(DebugUIUtils.getResourceString(PREFIX + TOOL_TIP_TEXT));
- setEnabled(!getStructuredSelection().isEmpty());
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_INSPECT));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_INSPECT));
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_INSPECT));
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.INSPECT_ACTION });
- }
-
- /**
- * @see InspectorAction
- */
- protected void doAction(InspectorView view) throws DebugException {
- IStructuredSelection s = getStructuredSelection();
- Iterator vars = s.iterator();
- while (vars.hasNext()) {
- IVariable var = (IVariable)vars.next();
- DebugUITools.inspect(var.getName(), var.getValue());
- }
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/BasicContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/BasicContentProvider.java
deleted file mode 100644
index 4e367204a..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/BasicContentProvider.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugEvent; import org.eclipse.jface.viewers.*; import org.eclipse.swt.widgets.Control;
-
-public abstract class BasicContentProvider implements IStructuredContentProvider {
-
- protected StructuredViewer fViewer;
- protected boolean fDisposed= false;
-
- /**
- * @see IContentProvider#dispose
- */
- public void dispose() {
- fDisposed= true;
- }
-
- /**
- * Returns whether this content provider has already
- * been disposed.
- */
- protected boolean isDisposed() {
- return fDisposed;
- }
-
- /**
- * @see IContentProvider#inputChanged
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- fViewer= (StructuredViewer) viewer;
- }
-
- /**
- * @see Display.asyncExec(Runnable)
- */
- protected void asyncExec(Runnable r) {
- if (fViewer != null) {
- Control ctrl= fViewer.getControl();
- if (ctrl != null && !ctrl.isDisposed()) {
- ctrl.getDisplay().asyncExec(r);
- }
- }
- }
-
- /**
- * @see Display.syncExec(Runnable)
- */
- protected void syncExec(Runnable r) {
- if (fViewer != null) {
- Control ctrl= fViewer.getControl();
- if (ctrl != null && !ctrl.isDisposed()) {
- ctrl.getDisplay().syncExec(r);
- }
- }
- }
-
- /**
- * Refreshes the viewer - must be called in UI thread.
- */
- protected void refresh() {
- if (fViewer != null) {
- fViewer.refresh();
- }
- }
-
- /**
- * Refresh the given element in the viewer - must be called in UI thread.
- */
- protected void refresh(Object element) {
- if (fViewer != null) {
- fViewer.refresh(element);
- }
- }
-
- /**
- * @see IDebugEventListener
- */
- public void handleDebugEvent(final DebugEvent event) {
- if (fViewer == null) {
- return;
- }
- Object element= event.getSource();
- if (element == null) {
- return;
- }
- Runnable r= new Runnable() {
- public void run() {
- if (!isDisposed()) {
- doHandleDebugEvent(event);
- }
- }
- };
-
- asyncExec(r);
- }
-
- /**
- * @see ITreeContentProvider
- */
- public Object[] getChildren(final Object parent) {
- return doGetChildren(parent);
- }
-
- /**
- * Performs an update based on the event
- */
- protected abstract void doHandleDebugEvent(DebugEvent event);
-
- protected abstract Object[] doGetChildren(Object parent);
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/BreakpointsContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/BreakpointsContentProvider.java
deleted file mode 100644
index d898cdb39..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/BreakpointsContentProvider.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.jface.viewers.TableViewer;
-
-/**
- * Provides the contents for a breakpoints viewer
- */
-public class BreakpointsContentProvider extends BasicContentProvider implements IBreakpointListener {
-
- /**
- * Creates this content provider
- */
- public BreakpointsContentProvider() {
- DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this);
- }
-
- /**
- * Returns all the breakpoint markers in the current open workspace
- */
- public Object[] getElements(Object parent) {
- return ((IBreakpointManager) parent).getBreakpoints();
- }
-
- /**
- * @see IContentProvider
- */
- public void dispose() {
- super.dispose();
- DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);
- }
-
- /**
- * @see IBreakpointListener
- */
- public void breakpointAdded(final IBreakpoint breakpoint) {
- if (breakpoint.getMarker().exists()) {
- asyncExec(new Runnable() {
- public void run() {
- if (!isDisposed()) {
- ((TableViewer)fViewer).add(breakpoint);
- }
- }
- });
- }
- }
-
- /**
- * @see IBreakpointListener
- */
- public void breakpointRemoved(final IBreakpoint breakpoint, IMarkerDelta delta) {
- asyncExec(new Runnable() {
- public void run() {
- if (!isDisposed()) {
- ((TableViewer)fViewer).remove(breakpoint);
- }
- }
- });
- }
-
- /**
- * @see IBreakpointListener
- */
- public void breakpointChanged(final IBreakpoint breakpoint, IMarkerDelta delta) {
- if (breakpoint.getMarker().exists()) {
- asyncExec(new Runnable() {
- public void run() {
- if (!isDisposed()) {
- refresh(breakpoint);
- }
- }
- });
- }
- }
-
- /**
- * @see BasicContentProvider#doHandleDebug(Event)
- */
- protected void doHandleDebugEvent(DebugEvent event) {
- //not a registered debug event listener
- }
-
- /**
- * @see BasicContentProvider#doGetChildren(Object)
- */
- protected Object[] doGetChildren(Object parent) {
- //not a tree content provider
- return null;
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/BreakpointsView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/BreakpointsView.java
deleted file mode 100644
index 991527358..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/BreakpointsView.java
+++ /dev/null
@@ -1,243 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Vector;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.*;
-import org.eclipse.ui.help.ViewContextComputer;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.model.WorkbenchViewerSorter;
-
-/**
- * This view shows the breakpoints registered with the breakpoint manager
- */
-public class BreakpointsView extends AbstractDebugView implements IDoubleClickListener {
-
- protected final static String PREFIX= "breakpoints_view.";
-
- /**
- * The various actions of the context menu of this view
- */
- private OpenMarkerAction fOpenMarkerAction;
- private RemoveBreakpointAction fRemoveBreakpointAction;
- private RemoveAllBreakpointsAction fRemoveAllBreakpointsAction;
- private EnableDisableBreakpointAction fEnableDisableBreakpointAction;
- private ShowQualifiedAction fShowQualifiedNamesAction;
- private Vector fBreakpointListenerActions;
-
- /**
- * @see IWorkbenchPart
- */
- public void createPartControl(Composite parent) {
- fViewer= new TableViewer(parent, SWT.MULTI| SWT.H_SCROLL | SWT.V_SCROLL);
- fViewer.setContentProvider(new BreakpointsContentProvider());
- fViewer.setLabelProvider(new DelegatingModelPresentation());
- fViewer.setSorter(new WorkbenchViewerSorter());
- initializeActions();
- initializeToolBar();
-
- createContextMenu(((TableViewer)fViewer).getTable());
-
- fViewer.setInput(DebugPlugin.getDefault().getBreakpointManager());
- fViewer.addDoubleClickListener(this);
- fViewer.getControl().addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- handleKeyPressed(e);
- }
- });
-
- setTitleToolTip(getTitleToolTipText(PREFIX));
- WorkbenchHelp.setHelp(
- parent,
- new ViewContextComputer(this, IDebugHelpContextIds.BREAKPOINT_VIEW));
- }
-
- /**
- * @see IWorkbenchPart
- */
- public void dispose() {
- super.dispose();
- if (fViewer != null) {
- fViewer.removeDoubleClickListener(this);
- }
- cleanupActions();
- }
-
- /**
- * Initializes the actions of this view
- */
- protected void initializeActions() {
- fBreakpointListenerActions = new Vector(2);
- fRemoveBreakpointAction= new RemoveBreakpointAction(fViewer);
-
- fRemoveAllBreakpointsAction= new RemoveAllBreakpointsAction();
- boolean enable= DebugPlugin.getDefault().getBreakpointManager().getBreakpoints().length == 0 ? false : true;
- fRemoveAllBreakpointsAction.setEnabled(enable);
-
- fShowQualifiedNamesAction = new ShowQualifiedAction(fViewer);
- fShowQualifiedNamesAction.setChecked(true);
-
- fOpenMarkerAction= new OpenBreakpointMarkerAction(fViewer);
-
- fEnableDisableBreakpointAction= new EnableDisableBreakpointAction(fViewer);
- addBreakpointListenerAction(fEnableDisableBreakpointAction);
- addBreakpointListenerAction(fRemoveAllBreakpointsAction);
- }
-
- /**
- * Cleans up the actions when this part is disposed
- */
- protected void cleanupActions() {
- if (fBreakpointListenerActions == null) {
- return;
- }
- DebugPlugin dp= DebugPlugin.getDefault();
- IBreakpointManager bm= dp.getBreakpointManager();
-
- for (int i=0; i < fBreakpointListenerActions.size(); i++) {
- bm.removeBreakpointListener((IBreakpointListener)fBreakpointListenerActions.get(i));
- }
- }
-
- /**
- * Opens a marker for the current selection.
- * This will only occur for selections containing a single existing breakpoint.
- */
- public void openMarkerForCurrentSelection() {
- IStructuredSelection selection= (IStructuredSelection) fViewer.getSelection();
- if (selection.size() != 1) {
- //Single selection only
- return;
- }
- //Get the selected marker
- IMarker breakpoint= (IMarker) selection.getFirstElement();
- if (!breakpoint.exists()) {
- return;
- }
- IWorkbenchWindow dwindow= getSite().getWorkbenchWindow();
- IWorkbenchPage page= dwindow.getActivePage();
- if (page == null) {
- return;
- }
-
- openEditorForBreakpoint(breakpoint, page);
- }
-
- /**
- * Open an editor for the breakpoint.
- */
- protected void openEditorForBreakpoint(IMarker marker, IWorkbenchPage page) {
- IBreakpoint breakpoint= getBreakpointManager().getBreakpoint(marker);
- String id= breakpoint.getModelIdentifier();
- IDebugModelPresentation presentation= getPresentation(id);
- IEditorInput input= presentation.getEditorInput(marker);
- String editorId= presentation.getEditorId(input, marker);
- if (input != null) {
- try {
- IEditorPart editor;
- editor= page.openEditor(input, editorId);
- editor.gotoMarker(marker);
- } catch (PartInitException e) {
- DebugUIUtils.logError(e);
- }
- }
- }
-
- /**
- * Adds items to the context menu
- */
- protected void fillContextMenu(IMenuManager menu) {
- menu.add(new Separator(IDebugUIConstants.EMPTY_NAVIGATION_GROUP));
- menu.add(new Separator(IDebugUIConstants.NAVIGATION_GROUP));
- menu.add(fOpenMarkerAction);
- menu.add(new Separator(IDebugUIConstants.EMPTY_BREAKPOINT_GROUP));
- menu.add(new Separator(IDebugUIConstants.BREAKPOINT_GROUP));
- menu.add(fEnableDisableBreakpointAction);
- menu.add(fRemoveBreakpointAction);
- menu.add(fRemoveAllBreakpointsAction);
- menu.add(new Separator(IDebugUIConstants.EMPTY_RENDER_GROUP));
- menu.add(new Separator(IDebugUIConstants.RENDER_GROUP));
- menu.add(fShowQualifiedNamesAction);
- menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
-
- /**
- * Add an action to the contributed actions collection
- */
- public void addBreakpointListenerAction(IBreakpointListener action) {
- fBreakpointListenerActions.add(action);
- DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(action);
- }
-
- /**
- * @see IDoubleClickListener
- */
- public void doubleClick(DoubleClickEvent event) {
- openMarkerForCurrentSelection();
- }
-
- /**
- * Returns whether an editor is open on this breakpoint's
- * resource
- */
- protected IEditorPart getOpenEditor(IMarker marker, IWorkbenchPage page) {
- //attempt to find the editor for the input
- IBreakpoint breakpoint= getBreakpointManager().getBreakpoint(marker);
- String id= breakpoint.getModelIdentifier();
- IDebugModelPresentation presentation= getPresentation(id);
- IEditorInput editorElement = presentation.getEditorInput(marker);
- IEditorPart[] editors= page.getEditors();
- for (int i= 0; i < editors.length; i++) {
- IEditorPart part= editors[i];
- if (part.getEditorInput().equals(editorElement)) {
- page.bringToTop(part);
- return part;
- }
- }
- //did not find an open editor
- return null;
- }
-
- /**
- * Configures the toolBar
- */
- protected void configureToolBar(IToolBarManager tbm) {
- tbm.add(fRemoveBreakpointAction);
- tbm.add(fRemoveAllBreakpointsAction);
- tbm.add(fOpenMarkerAction);
- tbm.add(fShowQualifiedNamesAction);
- }
-
- /**
- * Convience method to retrieve the breakpoint manager
- */
- protected IBreakpointManager getBreakpointManager() {
- return DebugPlugin.getDefault().getBreakpointManager();
- }
-
- /**
- * Handles key events in viewer. Specifically interested in
- * the Delete key.
- */
- protected void handleKeyPressed(KeyEvent event) {
- if (event.character == SWT.DEL && event.stateMask == 0
- && fRemoveBreakpointAction.isEnabled()) {
- fRemoveBreakpointAction.run();
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ChangeVariableValueAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ChangeVariableValueAction.java
deleted file mode 100644
index 6c673f77e..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ChangeVariableValueAction.java
+++ /dev/null
@@ -1,192 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Iterator; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.model.IValueModification; import org.eclipse.debug.core.model.IVariable; import org.eclipse.jface.viewers.*; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.TreeEditor; import org.eclipse.swt.events.*; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.*; import org.eclipse.ui.actions.SelectionProviderAction; import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Action for changing the value of primitives and <code>String</code> variables.
- */
-public class ChangeVariableValueAction extends SelectionProviderAction {
-
- // Fields for inline editing
- protected Composite fComposite;
- protected Tree fTree;
- protected Label fEditorLabel;
- protected Text fEditorText;
- protected TreeEditor fTreeEditor;
- protected IVariable fVariable;
- protected boolean fKeyReleased= false;
-
- private static final String PREFIX= "change_variable_value_action.";
- private static final String ERROR= PREFIX + "error.";
- private static final String DIALOG_TITLE= PREFIX + "dialog.title";
- private static final String DIALOG_MESSAGE= PREFIX + "dialog.message";
- private static final String DIALOG_INVALID= PREFIX + "dialog.invalid";
-
- public ChangeVariableValueAction(Viewer viewer) {
- super(viewer, DebugUIUtils.getResourceString(PREFIX + TEXT));
- setDescription(DebugUIUtils.getResourceString(PREFIX + DESCRIPTION));
- fTree= ((TreeViewer)viewer).getTree();
- fTreeEditor= new TreeEditor(fTree);
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.CHANGE_VALUE_ACTION });
- }
-
- /**
- * Edit the variable value with an inline text editor.
- */
- protected void doActionPerformed(final IVariable variable) {
- final Shell activeShell= DebugUIPlugin.getActiveWorkbenchWindow().getShell();
-
- // If a previous edit is still in progress, finish it
- if (fEditorText != null) {
- saveChangesAndCleanup(fVariable, activeShell);
- }
- fVariable = variable;
-
- // Use a Composite containing a Label and a Text. This allows us to edit just
- // the value, while still showing the variable name.
- fComposite = new Composite(fTree, SWT.NONE);
- fComposite.setBackground(fTree.getBackground());
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- fComposite.setLayout(layout);
-
- fEditorLabel = new Label(fComposite, SWT.LEFT);
- fEditorLabel.setLayoutData(new GridData(GridData.FILL_VERTICAL));
- fEditorText = new Text(fComposite, SWT.BORDER | SWT.SINGLE | SWT.LEFT);
- fEditorText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL));
- String valueString= "";
- try {
- valueString= fVariable.getValue().getValueString();
- } catch (DebugException de) {
- DebugUIUtils.errorDialog(activeShell, ERROR, de.getStatus());
- }
- TreeItem[] selectedItems = fTree.getSelection();
- fTreeEditor.horizontalAlignment = SWT.LEFT;
- fTreeEditor.grabHorizontal = true;
- fTreeEditor.setEditor(fComposite, selectedItems[0]);
-
- // There is no API on the model presentation to get just the variable name,
- // so we have to make do with just calling IVariable.getName()
- String varName = "";
- try {
- varName = fVariable.getName();
- } catch (DebugException de) {
- }
- fEditorLabel.setText(varName + "=");
-
- fEditorText.setText(valueString);
- fEditorText.selectAll();
-
- fComposite.layout(true);
- fComposite.setVisible(true);
- fEditorText.setFocus();
-
- // CR means commit the changes, ESC means abort changing the value
- fEditorText.addKeyListener(new KeyAdapter() {
- public void keyReleased(KeyEvent event) {
- if (event.character == SWT.CR) {
- if (fKeyReleased) {
- saveChangesAndCleanup(fVariable, activeShell);
- } else {
- cleanup();
- return;
- }
- }
- if (event.character == SWT.ESC) {
- cleanup();
- return;
- }
- fKeyReleased= true;
- }
- });
-
- // If the focus is lost, then act as if user hit CR and commit changes
- fEditorText.addFocusListener(new FocusAdapter() {
- public void focusLost(FocusEvent fe) {
- if (fKeyReleased) {
- saveChangesAndCleanup(fVariable, activeShell);
- } else {
- cleanup();
- }
- }
- });
- }
-
- /**
- * If the new value validates, save it, and dispose the text widget,
- * otherwise sound the system bell and leave the user in the editor.
- */
- protected void saveChangesAndCleanup(IVariable variable, Shell shell) {
- String newValue= fEditorText.getText();
- try {
- if (!variable.verifyValue(newValue)) {
- shell.getDisplay().beep();
- return;
- }
- variable.setValue(newValue);
- } catch (DebugException de) {
- DebugUIUtils.errorDialog(shell, ERROR, de.getStatus());
- }
- cleanup();
- }
-
- /**
- * Tidy up the widgets that were used
- */
- private void cleanup() {
- fKeyReleased= false;
- if (fEditorText != null) {
- fEditorText.dispose();
- fEditorText = null;
- fVariable = null;
- fTreeEditor.setEditor(null, null);
- fComposite.setVisible(false);
- }
- }
-
- /**
- * Updates the enabled state of this action based
- * on the selection
- */
- protected void update(IStructuredSelection sel) {
- Iterator iter= sel.iterator();
- if (iter.hasNext()) {
- Object object= iter.next();
- if (object instanceof IValueModification) {
- IValueModification varMod= (IValueModification)object;
- if (!varMod.supportsValueModification()) {
- setEnabled(false);
- return;
- }
- setEnabled(!iter.hasNext());
- return;
- }
- }
- setEnabled(false);
- }
-
- /**
- * @see Action
- */
- public void run() {
- Iterator iterator= getStructuredSelection().iterator();
- doActionPerformed((IVariable)iterator.next());
- }
-
- /**
- * @see SelectionProviderAction
- */
- public void selectionChanged(IStructuredSelection sel) {
- update(sel);
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ClearOutputAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ClearOutputAction.java
deleted file mode 100644
index dcbb366c3..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ClearOutputAction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Clears the output of the selected launches
- */
-public class ClearOutputAction extends Action {
-
- private final static String PREFIX= "clear_output_action.";
- private ConsoleViewer fConsoleViewer;
-
- public ClearOutputAction(ConsoleViewer viewer) {
- super(DebugUIUtils.getResourceString(PREFIX + TEXT));
- fConsoleViewer= viewer;
- setToolTipText(DebugUIUtils.getResourceString(PREFIX + TOOL_TIP_TEXT));
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_CLEAR));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_CLEAR));
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_CLEAR));
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.CLEAR_CONSOLE_ACTION });
- }
-
- /**
- * @see Action
- */
- public void run() {
- fConsoleViewer.clearDocument();
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java
deleted file mode 100644
index 8ef47a7d9..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Generic color manager.
- */
-public class ColorManager {
-
- protected Map fColorTable= new HashMap(10);
-
- public Color getColor(RGB rgb) {
- Color color= (Color) fColorTable.get(rgb);
- if (color == null) {
- color= new Color(Display.getCurrent(), rgb);
- fColorTable.put(rgb, color);
- }
- return color;
- }
-
- public void dispose() {
- Iterator e= fColorTable.values().iterator();
- while (e.hasNext())
- ((Color) e.next()).dispose();
- }
-}
-
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleDocument.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleDocument.java
deleted file mode 100644
index bb57180c9..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleDocument.java
+++ /dev/null
@@ -1,397 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.IStreamMonitor;
-import org.eclipse.debug.core.model.IStreamsProxy;
-import org.eclipse.jface.text.*;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.widgets.Display;
-
-public class ConsoleDocument extends AbstractDocument implements IDebugEventListener {
-
- private boolean fClosed= false;
-
- protected IProcess fProcess;
- private IStreamsProxy fProxy;
- private int fLastStreamWriteEnd= 0;
- private int fLastWritePosition= 0;
- private int fNewStreamWriteEnd= 0;
- protected boolean fNeedsToStartReading= true;
-
- public static final int OUT= 0;
- public static final int ERR= 1;
-
- protected List fStyleRanges= new ArrayList(2);
-
- protected ConsoleViewer fConsoleViewer= null;
-
- protected IStreamListener fSystemOutListener= new IStreamListener() {
- public void streamAppended(String newText, IStreamMonitor monitor) {
- systemOutAppended(newText);
- }
- };
-
- protected IStreamListener fSystemErrListener= new IStreamListener() {
- public void streamAppended(String newText, IStreamMonitor monitor) {
- systemErrAppended(newText);
- }
- };
-
- public ConsoleDocument(IProcess process) {
- super();
- fProcess= process;
- setTextStore(new ConsoleOutputTextStore(2500));
- setLineTracker(new DefaultLineTracker());
-
- if (process != null) {
- fProxy= process.getStreamsProxy();
- DebugPlugin.getDefault().addDebugEventListener(this);
- }
- completeInitialization();
- }
-
- public void close() {
- stopReading();
- DebugPlugin.getDefault().removeDebugEventListener(this);
- fClosed= true;
- fStyleRanges= Collections.EMPTY_LIST;
- set("");
- }
-
- /**
- * Fires the <code>DocumentEvent</code>, but also
- * writes to the proxy if the user is entering input and
- * has hit "Enter".
- */
- protected void fireDocumentChanged(DocumentEvent event) {
- super.fireDocumentChanged(event);
- String eventText= event.getText();
- if (eventText == null || 0 >= eventText.length() || eventText.length() > 2) {
- return;
- }
- String[] lineDelimiters= event.getDocument().getLegalLineDelimiters();
- for (int i= 0; i < lineDelimiters.length; i++) {
- if (lineDelimiters[i].equals(eventText)) {
- try {
- String inText= event.getDocument().get();
- fLastWritePosition = fLastStreamWriteEnd;
- inText= inText.substring(fLastWritePosition, inText.length());
- if (inText.length() == 0) {
- return;
- }
- fProxy.write(inText);
- fLastStreamWriteEnd= getLength();
- return;
- } catch (IOException ioe) {
- DebugUIUtils.logError(ioe);
- }
- }
- }
- }
-
- public boolean isClosed() {
- return fClosed;
- }
-
- public void replace(int pos, int replaceLength, String text) {
- if (isReadOnly() || pos < getStartOfEditableContent()) {
- return;
- }
-
- replace0(pos, replaceLength, text);
- int docLength= getLength();
- if (docLength == fNewStreamWriteEnd) {
- //removed all of the user input text
- fStyleRanges.remove(fStyleRanges.size() - 1);
- } else {
- updateInputStyleRange(docLength);
- //notify the viewer that the style ranges have changed.
- fireDocumentChanged(new DocumentEvent(this, 0, 0, ""));
- }
- }
-
- /**
- * Replace text used to add content from streams even though
- * the process is terminated (and therefore the doc is "read only")
- */
- protected void replace0(int pos, int replaceLength, String text) {
- try {
- super.replace(pos, replaceLength, text);
- } catch (BadLocationException ble) {
- DebugUIUtils.logError(ble);
- }
-
- }
-
- public void set(String text) {
- fNewStreamWriteEnd= text.length();
- super.set(text);
- fLastStreamWriteEnd= fNewStreamWriteEnd;
- }
-
- protected void startReading() {
- if (fProxy == null) {
- return;
- }
-
- if (!fNeedsToStartReading) {
- return;
- }
- fNeedsToStartReading= false;
- IStreamMonitor monitor= fProxy.getOutputStreamMonitor();
- if (monitor != null) {
- monitor.addListener(fSystemOutListener);
- String contents= monitor.getContents();
- if (contents.length() > 0) {
- systemOutAppended(contents);
- }
- }
- monitor= fProxy.getErrorStreamMonitor();
- if (monitor != null) {
- monitor.addListener(fSystemErrListener);
- String contents= monitor.getContents();
- if (contents.length() > 0) {
- systemErrAppended(contents);
- }
- }
- }
-
- protected void stopReading() {
- if (fProxy == null) {
- return;
- }
- fNeedsToStartReading= true;
- IStreamMonitor monitor= fProxy.getOutputStreamMonitor();
- monitor.removeListener(fSystemOutListener);
- monitor= fProxy.getErrorStreamMonitor();
- monitor.removeListener(fSystemErrListener);
- }
-
- /**
- * System out or System error has had text append to it.
- * Adds the new text to the document.
- */
- protected void streamAppended(final String text, final int source) {
- update(new Runnable() {
- public void run() {
- int appendedLength= text.length();
- fNewStreamWriteEnd= fLastStreamWriteEnd + appendedLength;
- ConsoleDocument.this.replace0(fLastStreamWriteEnd, 0, text);
- updateOutputStyleRanges(source);
- fLastStreamWriteEnd= fNewStreamWriteEnd;
- }
- });
- }
-
- /**
- * @see IInputStreamListener
- */
- protected void systemErrAppended(String text) {
- streamAppended(text, ERR);
- }
-
- /**
- * @see IInputStreamListener
- */
- protected void systemOutAppended(String text) {
- streamAppended(text, OUT);
- }
-
- public boolean equals(Object obj) {
- boolean correctInstance= obj instanceof ConsoleDocument;
- if (fProcess != null) {
- return correctInstance && fProcess.equals(((ConsoleDocument)obj).fProcess);
- } else {
- return correctInstance && ((ConsoleDocument)obj).fProcess == null;
- }
- }
-
- public int hashCode() {
- return (fProcess != null) ? fProcess.hashCode() : super.hashCode();
- }
-
- protected StyleRange[] getStyleRanges() {
- if (fStyleRanges.isEmpty()) {
- return new StyleRange[]{};
- }
- StyleRange[] sRanges= new StyleRange[fStyleRanges.size()];
- return (StyleRange[])fStyleRanges.toArray(sRanges);
- }
-
- /**
- * Coalese that last two style ranges if they are similar
- */
- protected void coaleseRanges() {
- int size= fStyleRanges.size();
- if (size > 1) {
- StyleRange last= (StyleRange) fStyleRanges.get(size - 1);
- StyleRange nextToLast= (StyleRange) fStyleRanges.get(size - 2);
- if (last.similarTo(nextToLast)) {//same color?
- StyleRange newRange= new StyleRange(nextToLast.start, last.length + nextToLast.length, last.foreground, null);
- fStyleRanges.remove(size - 1);
- fStyleRanges.remove(size - 2);
- addNewStyleRange(newRange);
- }
- }
- }
-
- /**
- * Returns whether the document's underlying process is
- * terminated.
- */
- protected boolean isReadOnly() {
- return (fProcess != null) ? fProcess.isTerminated() : true;
- }
-
- /**
- * Updates the current input style range.
- */
- protected void updateInputStyleRange(int docLength) {
- if (fClosed) {
- return;
- }
- if (docLength != fNewStreamWriteEnd) {
- StyleRange input=
- new StyleRange(fNewStreamWriteEnd, docLength - fNewStreamWriteEnd,
- ConsolePreferencePage.getPreferenceColor(ConsolePreferencePage.CONSOLE_SYS_IN_RGB),
- null);
- if (!fStyleRanges.isEmpty()) {
- if (((StyleRange)fStyleRanges.get(fStyleRanges.size() - 1)).similarTo(input)) {
- //remove the top "input" range...continuing input
- fStyleRanges.remove(fStyleRanges.size() - 1);
- }
- }
-
- addNewStyleRange(input);
- }
- }
-
- protected void updateOutputStyleRanges(int sourceStream) {
- if (fClosed) {
- return;
- }
- int docLength= getLength();
- if (docLength == 0) {
- return;
- }
-
- if ((fNewStreamWriteEnd == 0) && (0 == fLastStreamWriteEnd)) {
- return;
- }
-
- if (fNewStreamWriteEnd == fLastStreamWriteEnd) {
- return;
- }
-
- Color newRangeColor=
- (sourceStream == ConsoleDocument.OUT) ? ConsolePreferencePage.getPreferenceColor(ConsolePreferencePage.CONSOLE_SYS_OUT_RGB) : ConsolePreferencePage.getPreferenceColor(ConsolePreferencePage.CONSOLE_SYS_ERR_RGB);
-
- StyleRange newRange= new StyleRange(fLastStreamWriteEnd, fNewStreamWriteEnd - fLastStreamWriteEnd, newRangeColor, null);
- if (!fStyleRanges.isEmpty()) {
- if ((docLength != fNewStreamWriteEnd) &&
- ((StyleRange)fStyleRanges.get(fStyleRanges.size() - 1)).foreground ==
- ConsolePreferencePage.getPreferenceColor(ConsolePreferencePage.CONSOLE_SYS_IN_RGB)) {
- //remove the top "input" range..it will get recalculated in updateInputStyleRanges
- fStyleRanges.remove(fStyleRanges.size() - 1);
- }
- }
-
- addNewStyleRange(newRange);
- coaleseRanges();
- updateInputStyleRange(docLength);
- //notify the viewer that the style ranges have changed.
- fireDocumentChanged(new DocumentEvent(this, 0, 0, null));
- }
-
- /**
- * Adds a new style range if the document is not closed.
- * Note that the document can be closed by a separate thread.
- * This is the reason for the copy of the style ranges.
- */
- protected void addNewStyleRange(StyleRange newRange) {
- List tempRanges= fStyleRanges;
- if (fClosed) {
- return;
- }
- tempRanges.add(newRange);
- }
-
- protected void setStyleRanges(List ranges) {
- fStyleRanges= ranges;
- }
-
- protected void clearDocument() {
- fStyleRanges= new ArrayList(2);
- set("");
- }
-
- /**
- * Returns the position after which editing of the
- * content is allowable.
- */
- protected int getStartOfEditableContent() {
- return fLastStreamWriteEnd;
- }
-
- /**
- * Make visible to the ConsoleViewer
- */
- protected ITextStore getStore() {
- return super.getStore();
- }
-
- /**
- * @see IDebugEventListener
- */
- public void handleDebugEvent(DebugEvent event) {
- if (fProcess == null) {
- return;
- }
- if (event.getKind() == DebugEvent.TERMINATE) {
- Object element= event.getSource();
- if (element != null && element.equals(fProcess)) {
- update( new Runnable() {
- public void run() {
- fireDocumentChanged(new DocumentEvent(ConsoleDocument.this, 0, 0, null));
- }
- });
- }
- }
- }
-
- /**
- * Posts the update code "behind" the running operation if the
- * UI will be updated.
- */
- protected void update(Runnable runnable) {
- if (fConsoleViewer != null && !fConsoleViewer.getControl().isDisposed()) {
- fConsoleViewer.getControl().getDisplay().asyncExec(runnable);
- } else {
- Display display= DebugUIPlugin.getDefault().getDisplay();
- if (display != null && !display.isDisposed()) {
- display.asyncExec(runnable);
- }
- }
- }
-
- /**
- * Sets the console viewer that this document is viewed within.
- * Can be set to <code>null</code> if no longer currently being
- * viewed.
- */
- protected void setConsoleViewer(ConsoleViewer viewer) {
- fConsoleViewer = viewer;
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleGotoLineAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleGotoLineAction.java
deleted file mode 100644
index b127fdda5..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleGotoLineAction.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.ResourceBundle;
-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.swt.graphics.Point;
-import org.eclipse.swt.widgets.Shell;
-
-public class ConsoleGotoLineAction extends ConsoleViewerAction {
-
- /**
- * 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 fBundle.getString(fPrefix + "dialog.invalid_range");
-
- } catch (NumberFormatException x) {
- return fBundle.getString(fPrefix + "dialog.invalid_input");
- }
-
- return "";
- }
- };
-
- protected int fLastLine;
- protected ResourceBundle fBundle;
- protected String fPrefix;
- protected ConsoleViewer fConsoleViewer;
-
- /**
- * Constructs a goto line action for the console using the provided resource bundle
- */
- public ConsoleGotoLineAction(ResourceBundle bundle, String prefix, ConsoleViewer viewer) {
- super(bundle, prefix, viewer, -1);
- fBundle= bundle;
- fPrefix= prefix;
- fConsoleViewer= viewer;
- }
-
- /**
- * @see TextEditorAction
- */
- public void update() {
- }
-
- /**
- * Jumps to the line.
- */
- protected void gotoLine(int line) {
-
- IDocument document= fConsoleViewer.getDocument();
- try {
- int start= document.getLineOffset(line);
- int length= document.getLineLength(line);
-
- fConsoleViewer.getTextWidget().setSelection(start, start + length);
- fConsoleViewer.revealRange(start, length);
- } catch (BadLocationException x) {
- // ignore
- }
- }
-
- /**
- * @see Action
- */
- public void run() {
- try {
- Point selection= fConsoleViewer.getTextWidget().getSelection();
- IDocument document= fConsoleViewer.getDocument();
- fLastLine= document.getLineOfOffset(document.getLength()) + 1;
- int startLine= selection == null ? 1 : fConsoleViewer.getTextWidget().getLineAtOffset(selection.x) + 1;
- String title= fBundle.getString(fPrefix + "dialog.title");
- String message= fBundle.getString(fPrefix + "dialog.message");
- String value= Integer.toString(startLine);
- Shell activeShell= DebugUIPlugin.getActiveWorkbenchWindow().getShell();
- InputDialog d= new InputDialog(activeShell, title, message, value, new NumberValidator());
- d.open();
-
- try {
- int line= Integer.parseInt(d.getValue());
- gotoLine(line - 1);
- } catch (NumberFormatException x) {
- }
- } catch (BadLocationException x) {
- return;
- }
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleOutputTextStore.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleOutputTextStore.java
deleted file mode 100644
index b6b60d6f8..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleOutputTextStore.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.text.ITextStore;
-
-public class ConsoleOutputTextStore implements ITextStore {
-
- private StringBuffer fBuffer;
-
- public ConsoleOutputTextStore(int bufferSize) {
- fBuffer= new StringBuffer(bufferSize);
- }
-
- /**
- * @see ITextStore
- */
- public char get(int pos) {
- return fBuffer.charAt(pos);
- }
-
- /**
- * @see ITextStore
- */
- public String get(int pos, int length) {
- return fBuffer.substring(pos, pos + length);
- }
-
- /**
- * @see ITextStore
- */
- public int getLength() {
- return fBuffer.length();
- }
-
- /**
- * @see ITextStore
- */
- public void replace(int pos, int length, String text) {
- if (text == null) {
- text= "";
- }
- fBuffer.replace(pos, pos + length, text);
- }
-
- /**
- * @see ITextStore
- */
- public void set(String text) {
- fBuffer= new StringBuffer(text);
- }
-
- /**
- * @see StringBuffer#ensureCapacity
- */
- public void setMinimalBufferSize(int bufferSize) {
- fBuffer.ensureCapacity(bufferSize);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsolePreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsolePreferencePage.java
deleted file mode 100644
index c2c5cdc8f..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsolePreferencePage.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.preference.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * A page to set the preferences for the console
- */
-public class ConsolePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage, IDebugPreferenceConstants {
-
- private static final String PREFIX= "console_preferences.";
- private static final String DESCRIPTION= PREFIX + "description";
- private static final String OUT= PREFIX + "out";
- private static final String ERR= PREFIX + "err";
- private static final String IN= PREFIX + "in";
- private static final String FONT=PREFIX + "font";
-
- /**
- * Create the console page.
- */
- public ConsolePreferencePage() {
- super(GRID);
- setDescription(DebugUIUtils.getResourceString(DESCRIPTION));
- IPreferenceStore store= DebugUIPlugin.getDefault().getPreferenceStore();
- setPreferenceStore(store);
- }
-
- public void createControl(Composite parent) {
- super.createControl(parent);
- WorkbenchHelp.setHelp(
- parent,
- new Object[] { IDebugHelpContextIds.CONSOLE_PREFERENCE_PAGE });
- }
-
- /**
- * Create all field editors for this page
- */
- public void createFieldEditors() {
-
- // Note: first String value is the key for the preference bundle and second the
- // second String value is the label displayed in front of the editor.
- ColorFieldEditor sysout= new ColorFieldEditor(CONSOLE_SYS_OUT_RGB, DebugUIUtils.getResourceString(OUT), getFieldEditorParent());
- ColorFieldEditor syserr= new ColorFieldEditor(CONSOLE_SYS_ERR_RGB, DebugUIUtils.getResourceString(ERR), getFieldEditorParent());
- ColorFieldEditor sysin= new ColorFieldEditor(CONSOLE_SYS_IN_RGB, DebugUIUtils.getResourceString(IN), getFieldEditorParent());
-
- FontFieldEditor font= new FontFieldEditor(CONSOLE_FONT, DebugUIUtils.getResourceString(FONT), getFieldEditorParent());
- addField(sysout);
- addField(syserr);
- addField(sysin);
- addField(font);
- }
-
- /**
- * @see IWorkbenchPreferencePage#init
- */
- public void init(IWorkbench workbench) {
- }
-
- /**
- * Returns the a color based on the type.
- */
- protected static Color getPreferenceColor(String type) {
- IPreferenceStore pstore= DebugUIPlugin.getDefault().getPreferenceStore();
- RGB outRGB= PreferenceConverter.getColor(pstore, type);
- ColorManager colorManager= DebugUIPlugin.getDefault().getColorManager();
- return colorManager.getColor(outRGB);
- }
-
- /**
- * Returns the font data that describes the font to use for the console
- */
- protected static FontData getConsoleFontData() {
- IPreferenceStore pstore= DebugUIPlugin.getDefault().getPreferenceStore();
- FontData fontData= PreferenceConverter.getFontData(pstore, CONSOLE_FONT);
- return fontData;
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleView.java
deleted file mode 100644
index a9052814c..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleView.java
+++ /dev/null
@@ -1,244 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.*;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.text.*;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.help.ViewContextComputer;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.ui.texteditor.*;
-
-public class ConsoleView extends ViewPart implements IDocumentListener {
-
- protected final static String PREFIX= "console_view.";
-
- protected ConsoleViewer fConsoleViewer= null;
- protected ClearOutputAction fClearOutputAction= null;
-
- protected Map fGlobalActions= new HashMap(10);
- protected List fSelectionActions = new ArrayList(3);
-
- protected IDocument fCurrentDocument= null;
- /**
- * @see ViewPart#createChild(IWorkbenchPartContainer)
- */
- public void createPartControl(Composite parent) {
- fConsoleViewer= new ConsoleViewer(parent);
- initializeActions();
- initializeToolBar();
-
- // create context menu
- MenuManager menuMgr= new MenuManager("#PopUp", IDebugUIConstants.ID_CONSOLE_VIEW);
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager mgr) {
- fillContextMenu(mgr);
- }
- });
- Menu menu= menuMgr.createContextMenu(fConsoleViewer.getTextWidget());
- fConsoleViewer.getTextWidget().setMenu(menu);
- // register the context menu such that other plugins may contribute to it
- getSite().registerContextMenu(menuMgr, fConsoleViewer);
-
- fConsoleViewer.getSelectionProvider().addSelectionChangedListener(getSelectionChangedListener());
- fConsoleViewer.addTextInputListener(getTextInputListener());
- setViewerInput(DebugUIPlugin.getDefault().getCurrentProcess());
- setTitleToolTip(DebugUIUtils.getResourceString(PREFIX + AbstractDebugView.TITLE_TOOLTIPTEXT));
- WorkbenchHelp.setHelp(
- parent,
- new ViewContextComputer(this, IDebugHelpContextIds.CONSOLE_VIEW));
- }
-
- /**
- * @see IWorkbenchPart
- */
- public void setFocus() {
- fConsoleViewer.getControl().setFocus();
- }
-
- /**
- * Sets the input of the viewer of this view in the
- * UI thread.
- */
- protected void setViewerInput(final IAdaptable element) {
- setViewerInput(element, true);
- }
-
- /**
- * Sets the input of the viewer of this view in the
- * UI thread. The current input process is determined
- * if so specified.
- */
- protected void setViewerInput(final IAdaptable element, final boolean determineCurrentProcess) {
- if (fConsoleViewer == null || fConsoleViewer.getControl() == null || fConsoleViewer.getControl().isDisposed()) {
- return;
- }
- Display display= fConsoleViewer.getControl().getDisplay();
- if (display != null) {
- display.asyncExec(new Runnable() {
- public void run() {
- if (fConsoleViewer == null) {
- return;
- }
- Control viewerControl= fConsoleViewer.getControl();
- if (viewerControl == null || viewerControl.isDisposed()) {
- return;
- }
- IDocument doc= DebugUIPlugin.getDefault().getConsoleDocument((IProcess) element, determineCurrentProcess);
- fConsoleViewer.setDocument(doc);
- }
- });
- }
- }
-
- /**
- * Initialize the actions of this view
- */
- private void initializeActions() {
- fClearOutputAction= new ClearOutputAction(fConsoleViewer);
-
- ResourceBundle bundle= DebugUIUtils.getResourceBundle();
- // 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= getViewSite().getActionBars();
- setGlobalAction(actionBars, ITextEditorActionConstants.CUT, new ConsoleViewerAction(bundle, "cut_action.", fConsoleViewer, fConsoleViewer.CUT));
- setGlobalAction(actionBars, ITextEditorActionConstants.COPY, new ConsoleViewerAction(bundle, "copy_action.", fConsoleViewer, fConsoleViewer.COPY));
- setGlobalAction(actionBars, ITextEditorActionConstants.PASTE, new ConsoleViewerAction(bundle, "paste_action.", fConsoleViewer, fConsoleViewer.PASTE));
- setGlobalAction(actionBars, ITextEditorActionConstants.SELECT_ALL, new ConsoleViewerAction(bundle, "select_all_action.", fConsoleViewer, fConsoleViewer.SELECT_ALL));
- setGlobalAction(actionBars, ITextEditorActionConstants.FIND, new FindReplaceAction(bundle, "find_replace_action.", this));
- setGlobalAction(actionBars, ITextEditorActionConstants.GOTO_LINE, new ConsoleGotoLineAction(bundle, "goto_line_action.", fConsoleViewer));
-
- fSelectionActions.add(ITextEditorActionConstants.CUT);
- fSelectionActions.add(ITextEditorActionConstants.COPY);
- fSelectionActions.add(ITextEditorActionConstants.PASTE);
- updateAction(ITextEditorActionConstants.FIND);
- }
-
- protected void setGlobalAction(IActionBars actionBars, String actionID, IAction action) {
- fGlobalActions.put(actionID, action);
- actionBars.setGlobalActionHandler(actionID, action);
- }
-
- /**
- * Configures the toolBar.
- */
- private void initializeToolBar() {
- IToolBarManager tbm= getViewSite().getActionBars().getToolBarManager();
- tbm.add(fClearOutputAction);
- getViewSite().getActionBars().updateActionBars();
- }
- /**
- * Adds the text manipulation actions to the <code>ConsoleViewer</code>
- */
- protected void fillContextMenu(IMenuManager menu) {
- Point selectionRange= fConsoleViewer.getTextWidget().getSelection();
- ConsoleDocument doc= (ConsoleDocument) fConsoleViewer.getDocument();
- if (doc == null) {
- return;
- }
- if (doc.isReadOnly() || selectionRange.x < doc.getStartOfEditableContent()) {
- menu.add((IAction)fGlobalActions.get(ITextEditorActionConstants.COPY));
- menu.add((IAction)fGlobalActions.get(ITextEditorActionConstants.SELECT_ALL));
- } else {
- menu.add((IAction)fGlobalActions.get(ITextEditorActionConstants.CUT));
- menu.add((IAction)fGlobalActions.get(ITextEditorActionConstants.COPY));
- menu.add((IAction)fGlobalActions.get(ITextEditorActionConstants.PASTE));
- menu.add((IAction)fGlobalActions.get(ITextEditorActionConstants.SELECT_ALL));
- }
-
- menu.add(new Separator("FIND"));
- menu.add((IAction)fGlobalActions.get(ITextEditorActionConstants.FIND));
- menu.add((IAction)fGlobalActions.get(ITextEditorActionConstants.GOTO_LINE));
-
- menu.add(fClearOutputAction);
- menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
-
- /**
- * @see WorkbenchPart#getAdapter(Class)
- */
- public Object getAdapter(Class required) {
- if (IFindReplaceTarget.class.equals(required)) {
- return fConsoleViewer.getFindReplaceTarget();
- }
- return super.getAdapter(required);
- }
-
- protected final ISelectionChangedListener getSelectionChangedListener() {
- return new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateSelectionDependentActions();
- }
- };
- }
-
- protected final ITextInputListener getTextInputListener() {
- return new ITextInputListener() {
- public void inputDocumentAboutToBeChanged(IDocument old, IDocument nw) {
- if (old != null) {
- old.removeDocumentListener(ConsoleView.this);
- }
- fCurrentDocument = nw;
- if (nw != null) {
- nw.addDocumentListener(ConsoleView.this);
- }
- }
- public void inputDocumentChanged(IDocument doc, IDocument doc2) {
- updateAction(ITextEditorActionConstants.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();
- }
-
- public void dispose() {
- if (fConsoleViewer != null) {
- fConsoleViewer.dispose();
- fConsoleViewer= null;
- }
- if (fCurrentDocument != null) {
- fCurrentDocument.removeDocumentListener(this);
- }
- super.dispose();
- }
- /**
- * @see IDocumentListener#documentAboutToBeChanged(DocumentEvent)
- */
- public void documentAboutToBeChanged(DocumentEvent arg0) {
- }
-
- /**
- * @see IDocumentListener#documentChanged(DocumentEvent)
- */
- public void documentChanged(DocumentEvent arg0) {
- updateAction(ITextEditorActionConstants.FIND);
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleViewer.java
deleted file mode 100644
index 8b3bef01a..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleViewer.java
+++ /dev/null
@@ -1,192 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.text.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.widgets.Composite;
-
-public class ConsoleViewer extends TextViewer implements IPropertyChangeListener{
-
- /**
- * Font used in the underlying text widget
- */
- protected Font fFont;
-
- protected InternalDocumentListener fInternalDocumentListener= new InternalDocumentListener();
- /**
- * Internal document listener.
- */
- class InternalDocumentListener implements IDocumentListener {
- /*
- * @see IDocumentListener#documentAboutToBeChanged
- */
- public void documentAboutToBeChanged(DocumentEvent e) {
- }
-
- /*
- * @see IDocumentListener#documentChanged
- */
- public void documentChanged(DocumentEvent e) {
- ConsoleDocument doc= (ConsoleDocument) getDocument();
- if (doc == null || doc.isClosed()) {
- return;
- }
- revealEndOfDocument();
- if (doc.isReadOnly()) {
- StyledText widget= getTextWidget();
- widget.setEditable(false);
- }
- updateStyleRanges(doc);
- }
- }
-
- /**
- * 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 ConsoleViewer(Composite parent) {
- super(parent, SWT.H_SCROLL | SWT.V_SCROLL);
-
- getTextWidget().setDoubleClickEnabled(true);
-
- DebugUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
- FontData data= ConsolePreferencePage.getConsoleFontData();
- fFont= new Font(getControl().getDisplay(), data);
- getTextWidget().setFont(fFont);
- }
-
- /**
- * Reveals (makes visible) the end of the current document
- */
- protected void revealEndOfDocument() {
- IDocument doc= getDocument();
- int docLength= doc.getLength();
- if (docLength > 0) {
- revealRange(docLength - 1, 1);
- StyledText widget= getTextWidget();
- widget.setCaretOffset(docLength);
-
- }
- }
-
- protected void updateStyleRanges(ConsoleDocument doc) {
- StyleRange[] ranges= doc.getStyleRanges();
- int lastRangeIndex= ranges.length;
- if (lastRangeIndex > 0) {
- StyledText widget= getTextWidget();
- int storeLength= doc.getStore().getLength();
- StyleRange lastRange= ranges[lastRangeIndex - 1];
- if (!(storeLength - 1 < lastRange.start) &&
- lastRange.start + lastRange.length <= widget.getContent().getCharCount()) {
- widget.setStyleRanges(ranges);
- }
- }
- }
-
- /**
- * Clears the contents of the current document.
- */
- public void clearDocument() {
- IDocument doc= getDocument();
- if (doc != null) {
- ((ConsoleDocument) doc).clearDocument();
- }
- }
-
- /**
- * @see ITextViewer#setDocument(IDocument)
- */
- public void setDocument(IDocument doc) {
- ConsoleDocument oldDoc= (ConsoleDocument) getDocument();
- ConsoleDocument document= (ConsoleDocument)doc;
- if (oldDoc == null && document == null) {
- return;
- }
- if (oldDoc != null) {
- oldDoc.removeDocumentListener(fInternalDocumentListener);
- oldDoc.setConsoleViewer(null);
- if (oldDoc.equals(document)) {
- document.addDocumentListener(fInternalDocumentListener);
- document.setConsoleViewer(this);
- return;
- }
- }
-
- if (document != null) {
- super.setDocument(document);
- getTextWidget().setEditable(!document.isReadOnly());
- updateStyleRanges(document);
- revealEndOfDocument();
- document.addDocumentListener(fInternalDocumentListener);
- document.setConsoleViewer(this);
- }
- }
-
- /**
- * @see IFindReplaceTarget#canPerformFind
- */
- protected boolean canPerformFind() {
- return (getTextWidget() != null && getVisibleDocument() != null && getVisibleDocument().getLength() > 0);
- }
-
- /**
- * @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- String propertyName= event.getProperty();
- if (!propertyName.equals(IDebugPreferenceConstants.CONSOLE_FONT)) {
- return;
- }
- FontData data= ConsolePreferencePage.getConsoleFontData();
- Font temp= fFont;
- fFont= new Font(getControl().getDisplay(), data);
- getTextWidget().setFont(fFont);
- temp.dispose();
- }
-
- /**
- * Dispose this viewer and resources
- */
- protected void dispose() {
- DebugUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
- fFont.dispose();
- }
-
- /*
- * @see ITextViewer#isEditable
- */
- public boolean isEditable() {
- StyledText widget= getTextWidget();
- int caretPos= widget.getCaretOffset();
- ConsoleDocument doc= (ConsoleDocument) getDocument();
- if (doc != null && doc.getStartOfEditableContent() > caretPos) {
- return false;
- }
- return true;
- }
-
- /**
- * @see VerifyListener#verifyText
- */
- protected void handleVerifyEvent(VerifyEvent e) {
- ConsoleDocument doc= (ConsoleDocument) getDocument();
- if (doc != null && doc.getStartOfEditableContent() > e.start) {
- e.doit= false;
- }
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleViewerAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleViewerAction.java
deleted file mode 100644
index f32fe0e24..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ConsoleViewerAction.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.ResourceBundle;
-import org.eclipse.jface.text.ITextOperationTarget;
-import org.eclipse.ui.texteditor.TextEditorAction;
-
-public class ConsoleViewerAction extends TextEditorAction {
-
- private int fOperationCode= -1;
- private ITextOperationTarget fOperationTarget;
-
- public ConsoleViewerAction(ResourceBundle bundle, String prefix, ConsoleViewer viewer, int operationCode) {
- super(bundle, prefix, null);
- fOperationCode= operationCode;
- fOperationTarget= viewer.getTextOperationTarget();
- update();
- }
-
- /**
- * @see TextEditorAction
- */
- 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
- */
- public void run() {
- if (fOperationCode != -1 && fOperationTarget != null) {
- fOperationTarget.doOperation(fOperationCode);
- }
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ControlAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ControlAction.java
deleted file mode 100644
index 7f6ae62e5..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ControlAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.actions.SelectionProviderAction; import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Provides the common functionality of the control actions.
- * In order to avoid duplication of code, ControlActions defer to
- * delegates to perform all of the real work. This is necessary so that
- * these actions can be used as regular SelectionProviderActions,
- * but also be used as contributed IWorkbenchWindowActionDelegates,
- * which must have zero-argument constructors.
- */
-public class ControlAction extends SelectionProviderAction {
-
- /**
- * The delegate does all of the real work. This class only responds to
- * run() requests and selectionChanged notifications. In both cases,
- * it defers to the delegate.
- */
- protected ControlActionDelegate fDelegate;
-
- public ControlAction(ISelectionProvider selectionProvider, ControlActionDelegate delegate) {
- super(selectionProvider, "");
- fDelegate= delegate;
- fDelegate.initializeForOwner(this);
- setText(DebugUIUtils.getResourceString(fDelegate.getPrefix() + TEXT));
- setToolTipText(DebugUIUtils.getResourceString(fDelegate.getPrefix() + TOOL_TIP_TEXT));
- WorkbenchHelp.setHelp(
- this,
- new Object[] { fDelegate.getHelpContextId() });
- }
-
- /**
- * @see Action
- * The actual work is deferred to the delegate.
- */
- public void run() {
- fDelegate.run();
- }
-
- /**
- * @see SelectionProviderAction
- * Updates the enable state based on what and how much is selected.
- */
- public void selectionChanged(IStructuredSelection sel) {
- fDelegate.selectionChanged(this, sel);
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ControlActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ControlActionDelegate.java
deleted file mode 100644
index fbd3bbdd5..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ControlActionDelegate.java
+++ /dev/null
@@ -1,172 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Iterator; import org.eclipse.core.runtime.MultiStatus; import org.eclipse.debug.core.*; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.*; import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.IWorkbenchWindowActionDelegate; import org.eclipse.ui.actions.SelectionProviderAction;
-
-public abstract class ControlActionDelegate implements IWorkbenchWindowActionDelegate {
-
- protected static final String ERROR= "error.";
- protected static final String STATUS= "status";
-
- protected String fMode= ILaunchManager.DEBUG_MODE;
-
- /**
- * It's crucial that delegate actions have a zero-arg constructor so that
- * they can be reflected into existence when referenced in an action set
- * in the plugin's plugin.xml file.
- */
- public ControlActionDelegate() {
- }
-
- /**
- * Not all ControlActionDelegates have an owner, only those that aren't
- * specified as part of an action set in plugin.xml. For those delegates,
- * that do have a ControlAction owner, this is the place to do any
- * action specific initialization.
- */
- public void initializeForOwner(ControlAction controlAction) {
- setActionImages(controlAction);
- LaunchesViewer provider= (LaunchesViewer)controlAction.getSelectionProvider();
- IContentProvider contentProvider= provider.getContentProvider();
- fMode= ILaunchManager.DEBUG_MODE;
- if (contentProvider instanceof ProcessesContentProvider) {
- fMode= ILaunchManager.RUN_MODE;
- }
- }
-
- /**
- * Do the specific action using the current selection.
- */
- public void run() {
- LaunchesView view= getLaunchesView(fMode);
- if (view == null) {
- return;
- }
- IStructuredSelection selection= (IStructuredSelection)view.getSite().getSelectionProvider().getSelection();
-
- final Iterator enum= selection.iterator();
- String pluginId= DebugUIPlugin.getDefault().getDescriptor().getUniqueIdentifier();
- final MultiStatus ms=
- new MultiStatus(pluginId, IDebugStatusConstants.REQUEST_FAILED, DebugUIUtils.getResourceString(getPrefix() + STATUS), null);
- BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
- public void run() {
- while (enum.hasNext()) {
- Object element= enum.next();
- if (isEnabledFor(element)) {
- try {
- doAction(element);
- } catch (DebugException e) {
- ms.merge(e.getStatus());
- }
- }
- }
- }
- });
- if (!ms.isOK()) {
- DebugUIUtils.errorDialog(DebugUIPlugin.getActiveWorkbenchWindow().getShell(), getPrefix() + ERROR, ms);
- }
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate
- */
- public void dispose(){
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate
- */
- public void init(IWorkbenchWindow window){
- }
-
- /**
- * @see IActionDelegate
- */
- public void run(IAction action){
- run();
- }
-
- /**
- * Only interested in selection changes in the launches view.
- * Set the icons for this action on the first selection changed
- * event. This is necessary because the XML currently only
- * supports setting the enabled icon.
- * @see IActionDelegate
- */
- public void selectionChanged(IAction action, ISelection s) {
- LaunchesView view= getLaunchesView(fMode);
- if (view == null) {
- action.setEnabled(false);
- return;
- }
- IStructuredSelection selection= (IStructuredSelection)view.getSite().getSelectionProvider().getSelection();
- action.setEnabled(getEnableStateForSelection(selection));
- }
-
- /**
- * Return whether the action should be enabled or not based on the given selection.
- */
- public boolean getEnableStateForSelection(IStructuredSelection selection) {
- if (selection.size() == 0) {
- return false;
- }
- Iterator enum= selection.iterator();
- int count= 0;
- while (enum.hasNext()) {
- count++;
- if (count > 1 && !enableForMultiSelection()) {
- return false;
- }
- Object element= enum.next();
- if (!isEnabledFor(element)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Returns whether this action should be enabled if there is
- * multi selection.
- */
- protected boolean enableForMultiSelection() {
- return true;
- }
-
- protected LaunchesView getLaunchesView(String mode) {
- IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
- return
- DebugUIPlugin.getDefault().findDebugPart(window, mode);
-
- }
-
- /**
- * Does the specific action of this action to the process.
- */
- protected abstract void doAction(Object element) throws DebugException;
-
- /**
- * Returns the resource bundle prefix for this action
- */
- protected abstract String getPrefix();
-
- /**
- * Returns whether this action will work for the given element
- */
- public abstract boolean isEnabledFor(Object element);
-
- /**
- * Returns this action's help context id
- */
- protected abstract String getHelpContextId();
-
- /**
- * Set the enabled, disabled & hover icons for this action delegate
- */
- protected abstract void setActionImages(IAction action);
-
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/CopyToClipboardActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/CopyToClipboardActionDelegate.java
deleted file mode 100644
index e02f9709a..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/CopyToClipboardActionDelegate.java
+++ /dev/null
@@ -1,169 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.*;
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.widgets.Display;
-
-public class CopyToClipboardActionDelegate extends ControlActionDelegate {
-
- protected ContentViewer fViewer;
-
- private static final String PREFIX= "copy_to_clipboard_action.";
-
- /**
- * @see ControlActionDelegate
- */
- public void initializeForOwner(ControlAction controlAction) {
- controlAction.setEnabled(!controlAction.getStructuredSelection().isEmpty());
- fViewer = (ContentViewer)controlAction.getSelectionProvider();
- super.initializeForOwner(controlAction);
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected String getPrefix() {
- return PREFIX;
- }
- /**
- * @see ControlActionDelegate
- */
- public boolean isEnabledFor(Object element) {
- return element instanceof IDebugElement;
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected void doAction(Object element, StringBuffer buffer) {
- append(element, buffer, (ILabelProvider)fViewer.getLabelProvider(), 0);
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected void doAction(Object element) {
- StringBuffer buffer= new StringBuffer();
- doAction(element, buffer);
- RTFTransfer rtfTransfer = RTFTransfer.getInstance();
- TextTransfer plainTextTransfer = TextTransfer.getInstance();
- Clipboard clipboard= new Clipboard(fViewer.getControl().getDisplay());
- clipboard.setContents(
- new String[]{buffer.toString()},
- new Transfer[]{plainTextTransfer});
- }
-
-
- /**
- * Appends the representation of the specified element (using the label provider and indent)
- * to the buffer. For elements down to stack frames, children representations
- * are append to the buffer as well.
- */
- protected void append(Object e, StringBuffer buffer, ILabelProvider lp, int indent) {
- for (int i= 0; i < indent; i++) {
- buffer.append('\t');
- }
- buffer.append(lp.getText(e));
- buffer.append(System.getProperty("line.separator"));
- if (shouldAppendChildren(e)) {
- Object[] children= new Object[0];
- try {
- children= getChildren(e);
- } catch (DebugException de) {
- }
- for (int i = 0;i < children.length; i++) {
- Object de= children[i];
- append(de, buffer, lp, indent + 1);
- }
- }
- }
-
- protected String getHelpContextId() {
- return IDebugHelpContextIds.COPY_TO_CLIPBOARD_ACTION;
- }
-
- protected Object[] getChildren(Object e) throws DebugException {
- return ((IDebugElement)e).getChildren();
- }
- /**
- * Do the specific action using the current selection.
- */
- public void run() {
- final Iterator iter= pruneSelection();
- String pluginId= DebugUIPlugin.getDefault().getDescriptor().getUniqueIdentifier();
- BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
- public void run() {
- StringBuffer buffer= new StringBuffer();
- while (iter.hasNext()) {
- doAction(iter.next(), buffer);
- }
- RTFTransfer rtfTransfer = RTFTransfer.getInstance();
- TextTransfer plainTextTransfer = TextTransfer.getInstance();
- Clipboard clipboard= new Clipboard(fViewer.getControl().getDisplay());
- clipboard.setContents(
- new String[]{buffer.toString()},
- new Transfer[]{plainTextTransfer});
- }
- });
- }
-
- /**
- * Removes the duplicate items from the selection.
- * That is, if both a parent and a child are in a selection
- * remove the child.
- */
- protected Iterator pruneSelection() {
- IStructuredSelection selection= (IStructuredSelection)fViewer.getSelection();
- List elements= new ArrayList(selection.size());
- Iterator iter= selection.iterator();
- while (iter.hasNext()) {
- Object element= iter.next();
- if (isEnabledFor(element)) {
- if(walkHierarchy(element, elements)) {
- elements.add(element);
- }
- }
- }
- return elements.iterator();
- }
-
- /**
- * Returns whether the parent of the specified
- * element is already contained in the collection.
- */
- protected boolean walkHierarchy(Object element, List elements) {
- Object parent= null;
- if (element instanceof IDebugElement) {
- parent= ((IDebugElement)element).getParent();
- }
- if (parent == null) {
- return true;
- }
- if (elements.contains(parent)) {
- return false;
- }
- return walkHierarchy(parent, elements);
-
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected void setActionImages(IAction action) {
- }
-
- protected boolean shouldAppendChildren(Object e) {
- return e instanceof IDebugElement && ((IDebugElement)e).getElementType() < IDebugElement.STACK_FRAME;
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/CopyVariablesToClipboardActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/CopyVariablesToClipboardActionDelegate.java
deleted file mode 100644
index 8448aeaf5..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/CopyVariablesToClipboardActionDelegate.java
+++ /dev/null
@@ -1,109 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.*;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.*;
-
-/**
- * Used to copy the values of variables to the clipboard from
- * the Variables and Inspector views.
- */
-public class CopyVariablesToClipboardActionDelegate extends CopyToClipboardActionDelegate {
-
- private static final String PREFIX= "copy_variables_to_clipboard_action.";
-
- protected String getHelpContextId() {
- return IDebugHelpContextIds.COPY_VARIABLES_TO_CLIPBOARD_ACTION;
- }
-
- /**
- * Only append children that are visible in the tree viewer
- */
- protected boolean shouldAppendChildren(Object e) {
- return((TreeViewer)fViewer).getExpandedState(e);
- }
-
- /**
- * @see ControlActionDelegate
- */
- public void initializeForOwner(ControlAction controlAction) {
- controlAction.setEnabled(!controlAction.getStructuredSelection().isEmpty());
- fViewer = (ContentViewer)controlAction.getSelectionProvider();
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected String getPrefix() {
- return PREFIX;
- }
-
- /**
- * Returns the children of the parent after applying the filters
- * that are present in the viewer.
- */
- protected Object[] getChildren(Object parent) {
- Object[] children= ((BasicContentProvider)fViewer.getContentProvider()).getChildren(parent);
- ViewerFilter[] filters= ((StructuredViewer)fViewer).getFilters();
- if (filters != null) {
- for (int i= 0; i < filters.length; i++) {
- ViewerFilter f = filters[i];
- children = f.filter(fViewer, parent, children);
- }
- }
- return children;
- }
-
- /**
- * @see ControlActionDelegate
- */
- public boolean isEnabledFor(Object element) {
- return element instanceof IDebugElement || element instanceof InspectItem;
- }
-
- /**
- * Returns whether the parent of the specified
- * element is already contained in the collection.
- */
- protected boolean walkHierarchy(Object element, List elements) {
- IDebugElement parent= null;
- if (element instanceof IVariable) {
- parent= ((IVariable)element).getParent();
- }
- if (parent == null || parent.getElementType() == IDebugElement.STACK_FRAME) {
- return true;
- }
- Iterator i= elements.iterator();
- while (i.hasNext()) {
- Object o= i.next();
- try {
- if (o instanceof IVariable
- && ((IVariable)o).getValue().equals(parent)) {
- return false;
- }
- if (o instanceof InspectItem
- && ((InspectItem)o).getValue().equals(parent)) {
- return false;
- }
- } catch (DebugException e) {
- }
- }
-
- return walkHierarchy(((IValue)parent).getVariable(), elements);
- }
-
- /**
- * @see IActionDelegate
- */
- public void selectionChanged(IAction action, ISelection s) {
- action.setEnabled(!s.isEmpty());
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugAction.java
deleted file mode 100644
index 8c0df76fc..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugAction.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.ILaunchManager; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * An execution action that uses launchers in
- * debug mode.
- */
-public class DebugAction extends ExecutionAction {
-
- protected final static String PREFIX= "debug_action.";
-
- public DebugAction() {
- setText(DebugUIUtils.getResourceString(PREFIX + TEXT));
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_ACT_DEBUG));
- setToolTipText(DebugUIUtils.getResourceString(PREFIX + TOOL_TIP_TEXT));
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.DEBUG_ACTION });
- }
-
- /**
- * @see ExecutionAction
- */
- protected String getMode() {
- return ILaunchManager.DEBUG_MODE;
- }
-
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugContentProvider.java
deleted file mode 100644
index a2224f9ad..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugContentProvider.java
+++ /dev/null
@@ -1,285 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.*;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-
-/**
- * Provides the contents for a debug mode of the Launches viewer.
- */
-public class DebugContentProvider extends BasicContentProvider implements IDebugEventListener, ILaunchListener, ITreeContentProvider {
-
- /**
- * Constructs a new content provider.
- */
- public DebugContentProvider() {
- DebugPlugin plugin= DebugPlugin.getDefault();
- plugin.addDebugEventListener(this);
- plugin.getLaunchManager().addLaunchListener(this);
- }
-
- /**
- * @see BasicContentProvider#doGetChildren(Object)
- */
- protected Object[] doGetChildren(Object parent) {
- if (parent instanceof IDebugElement) {
- IDebugElement de= (IDebugElement) parent;
- if (de.getElementType() < IDebugElement.STACK_FRAME) {
- try {
- return de.getChildren();
- } catch (DebugException e) {
- DebugUIUtils.logError(e);
- }
- }
- } else
- if (parent instanceof ILaunch) {
- return ((ILaunch)parent).getChildren();
- } else
- if (parent instanceof ILaunchManager) {
- return ((ILaunchManager) parent).getLaunches();
- }
- return new Object[0];
- }
-
- /**
- * Returns the <code>ILaunch</code>es for the <code>ILaunchManager</code>
- */
- public Object[] getElements(Object element) {
- if (element instanceof ILaunchManager) {
- return ((ILaunchManager) element).getLaunches();
- }
- return new Object[0];
- }
-
- /**
- * @see org.eclipse.jface.viewer.ITreeContentProvider
- */
- public Object getParent(Object item) {
- Object parent= null;
- if (item instanceof IDebugElement) {
- IDebugElement de= (IDebugElement) item;
- parent= de.getParent();
- if (parent == null) {
- parent= de.getLaunch();
- }
- } else
- if (item instanceof IProcess) {
- parent= ((IProcess) item).getLaunch();
- } else
- if (item instanceof ILaunch) {
- parent= DebugPlugin.getDefault().getLaunchManager();
- }
- return parent;
- }
-
- /**
- * @see BasicContentProvider#doHandleDebug(Event)
- */
- public void doHandleDebugEvent(DebugEvent event) {
- Object element= event.getSource();
- if (element instanceof IDebugElement && ((IDebugElement) element).getElementType() == IDebugElement.VARIABLE) {
- // the debug view does not show variables
- return;
- }
- switch (event.getKind()) {
- case DebugEvent.CREATE :
- insert(element);
- break;
- case DebugEvent.TERMINATE :
- clearSourceSelection();
- if (element instanceof IThread) {
- remove(element);
- } else {
- Object parent = getParent(element);
- refresh(parent);
- }
- updateButtons();
- break;
- case DebugEvent.RESUME :
- doHandleResumeEvent(event, element);
- break;
- case DebugEvent.SUSPEND :
- doHandleSuspendEvent(element);
- break;
- case DebugEvent.CHANGE :
- refresh(element);
- updateButtons();
- break;
- }
- }
-
- protected void doHandleResumeEvent(DebugEvent event, Object element) {
- if (element instanceof ISuspendResume) {
- if (((ISuspendResume)element).isSuspended()) {
- return;
- }
- }
- clearSourceSelection();
- if (event.getDetail() != DebugEvent.STEP_START) {
- refresh(element);
- if (element instanceof IThread) {
- //select and reveal will update buttons
- //via selection changed callback
- selectAndReveal(element);
- return;
- }
- }
- labelChanged(element);
- updateButtons();
- }
-
- protected void doHandleSuspendEvent(Object element) {
- if (element instanceof IThread) {
- ((LaunchesViewer)fViewer).autoExpand(element, true);
- }
- updateButtons();
- }
-
- /**
- * Helper method for inserting the given element - must be called in UI thread
- */
- protected void insert(Object element) {
- final Object parent= getParent(element);
- // a parent can be null for a debug target or process that has not yet been associated
- // with a launch
- if (parent != null) {
- ((LaunchesViewer) fViewer).add(parent, element);
- }
- }
-
- /**
- * Helper method to remove the given element - must be called in UI thread
- */
- private void remove(Object element) {
- ((LaunchesViewer) fViewer).remove(element);
- }
-
- /**
- * Helper method to update the label of the given element - must be called in UI thread
- */
- protected void labelChanged(Object element) {
- ((LaunchesViewer) fViewer).update(element, new String[] {IBasicPropertyConstants.P_TEXT});
- }
-
- /**
- * Helper method to update the buttons of the viewer - must be called in UI thread
- */
- protected void updateButtons() {
- ((LaunchesViewer)fViewer).updateButtons();
- }
-
- /**
- * Helper method to update the selection of the viewer - must be called in UI thread
- */
- protected void updateMarkerForSelection() {
- ((LaunchesViewer)fViewer).updateMarkerForSelection();
- }
-
- /**
- * Helper method to select and reveal the given element - must be called in UI thread
- */
- protected void selectAndReveal(Object element) {
- ((LaunchesViewer) fViewer).setSelection(new StructuredSelection(element), true);
- }
-
- /**
- * @see ITreeContentProvider
- */
- public boolean hasChildren(Object item) {
- if (item instanceof IStackFrame) {
- return false;
- // No children shown for IStackFrames in this view (see the variables view instead).
- } else
- if (item instanceof IDebugElement) {
- try {
- return ((IDebugElement) item).hasChildren();
- } catch (DebugException de) {
- }
- } else
- if (item instanceof ILaunch) {
- return true;
- } else
- if (item instanceof ILaunchManager) {
- return ((ILaunchManager) item).getLaunches().length > 0;
- }
- return false;
- }
-
- /**
- * @see ILaunchListener
- */
- public void launchDeregistered(final ILaunch launch) {
- Runnable r= new Runnable() {
- public void run() {
- if (!isDisposed()) {
- remove(launch);
- ILaunchManager lm= DebugPlugin.getDefault().getLaunchManager();
- IDebugTarget[] targets= lm.getDebugTargets();
- if (targets.length > 0) {
- IDebugTarget target= targets[targets.length - 1];
- try {
- IDebugElement[] threads= target.getChildren();
- for (int i=0; i < threads.length; i++) {
- if (((IThread)threads[i]).isSuspended()) {
- ((LaunchesViewer)fViewer).autoExpand(threads[i], false);
- return;
- }
- }
- } catch (DebugException de) {
- DebugUIUtils.logError(de);
- }
-
- ((LaunchesViewer)fViewer).autoExpand(target.getLaunch(), false);
- }
- updateButtons();
- }
- }
- };
-
- asyncExec(r);
- }
-
- /**
- * @see ILaunchListener
- */
- public void launchRegistered(final ILaunch launch) {
- Runnable r= new Runnable() {
- public void run() {
- if (!isDisposed() && launch.getLaunchMode().equals(ILaunchManager.DEBUG_MODE)) {
- insert(launch);
- ((LaunchesViewer)fViewer).autoExpand(launch, false);
- }
- }
- };
-
- syncExec(r);
- }
-
- /**
- * Unregisters this content provider from the debug model so that
- * this object can be garbage-collected.
- */
- public void dispose() {
- super.dispose();
- DebugPlugin plugin= DebugPlugin.getDefault();
- plugin.removeDebugEventListener(this);
- plugin.getLaunchManager().removeLaunchListener(this);
- }
-
- /**
- * Clear the selection in the editor - must be called in UI thread
- */
- private void clearSourceSelection() {
- if (fViewer != null) {
- ((LaunchesViewer)fViewer).clearSourceSelection();
- }
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugDropDownAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugDropDownAction.java
deleted file mode 100644
index 569a0d9e9..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugDropDownAction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchManager;
-
-public class DebugDropDownAction extends LaunchDropDownAction {
-
-
- public DebugDropDownAction() {
- super(new DebugAction());
- }
-
- /**
- * @see LaunchDropDownAction
- */
- public String getMode() {
- return ILaunchManager.DEBUG_MODE;
- }
-
- /**
- * @see LaunchDropDownAction
- */
- public LaunchHistoryElement[] getHistory() {
- return DebugUIPlugin.getDefault().getDebugHistory();
- }
-
-
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugMenuManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugMenuManager.java
deleted file mode 100644
index cdb800f86..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugMenuManager.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-
-public class DebugMenuManager extends MenuManager implements IMenuListener {
-
- public DebugMenuManager(String text, String id) {
- super(text, id);
- setDirty(true);
- addMenuListener(this);
- }
-
- public void menuAboutToShow(IMenuManager manager) {
- setDirty(true);
- }
-
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspective.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspective.java
deleted file mode 100644
index 01a758a80..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspective.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.ui.*;
-
-/**
- * The debug perspective
- */
-public class DebugPerspective implements IPerspectiveFactory {
-
- /**
- * @see 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(IPageLayout.ID_TASK_LIST);
-
- IFolderLayout navFolder= layout.createFolder(IInternalDebugUIConstants.ID_NAVIGATOR_FOLDER_VIEW, IPageLayout.TOP, (float) 0.5, layout.getEditorArea());
- navFolder.addView(IDebugUIConstants.ID_DEBUG_VIEW);
- navFolder.addView(IDebugUIConstants.ID_PROCESS_VIEW);
- navFolder.addView(IPageLayout.ID_RES_NAV);
-
-
- IFolderLayout folder= layout.createFolder(IInternalDebugUIConstants.ID_TOOLS_FOLDER_VIEW, IPageLayout.RIGHT, (float) 0.5, IInternalDebugUIConstants.ID_NAVIGATOR_FOLDER_VIEW);
- folder.addView(IDebugUIConstants.ID_VARIABLE_VIEW);
- folder.addView(IDebugUIConstants.ID_BREAKPOINT_VIEW);
- folder.addView(IDebugUIConstants.ID_INSPECTOR_VIEW);
-
- layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, layout.getEditorArea());
-
- layout.addActionSet(IDebugUIConstants.DEBUG_ACTION_SET);
-
- setContentsOfShowViewMenu(layout);
- }
-
- /**
- * Sets the intial contents of the "Show View" menu.
- */
- protected void setContentsOfShowViewMenu(IPageLayout layout) {
- layout.addShowViewShortcut(IDebugUIConstants.ID_DEBUG_VIEW);
- layout.addShowViewShortcut(IDebugUIConstants.ID_PROCESS_VIEW);
- layout.addShowViewShortcut(IDebugUIConstants.ID_BREAKPOINT_VIEW);
- layout.addShowViewShortcut(IDebugUIConstants.ID_INSPECTOR_VIEW);
- layout.addShowViewShortcut(IDebugUIConstants.ID_VARIABLE_VIEW);
- layout.addShowViewShortcut(IDebugUIConstants.ID_CONSOLE_VIEW);
- layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
deleted file mode 100644
index 69e2653f0..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
+++ /dev/null
@@ -1,219 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-
-/**
- * The images provided by the debug plugin.
- */
-public class DebugPluginImages {
-
- /**
- * The image registry containing <code>Image</code>s.
- */
- private static ImageRegistry imageRegistry;
-
- /**
- * A table of all the <code>ImageDescriptor</code>s.
- */
- private static HashMap imageDescriptors;
-
- /* Declare Common paths */
- private static URL ICON_BASE_URL= null;
- static {
- try {
- ICON_BASE_URL= new URL(DebugUIPlugin.getDefault().getDescriptor().getInstallURL(), "icons/");
- } catch (MalformedURLException e) {
- // do nothing
- }
- }
-
- // Use IPath and toOSString to build the names to ensure they have the slashes correct
- private final static String CTOOL= "full/ctool16/"; //basic colors - size 16x16
- private final static String LOCALTOOL= "full/clcl16/"; //basic colors - size 16x16
- private final static String DLCL= "full/dlcl16/"; //disabled - size 16x16
- private final static String ELCL= "full/elcl16/"; //enabled - size 16x16
- private final static String OBJECT= "full/obj16/"; //basic colors - size 16x16
- private final static String WIZBAN= "full/wizban/"; //basic colors - size 16x16
-
- /**
- * Declare all images
- */
- private static void declareImages() {
- // Actions
- declareRegistryImage(IDebugUIConstants.IMG_ACT_DEBUG, CTOOL + "debug_exc.gif");
- declareRegistryImage(IDebugUIConstants.IMG_ACT_RUN, CTOOL + "run_exc.gif");
-
- //menus
-
- //Local toolbars
- declareRegistryImage(IDebugUIConstants.IMG_LCL_RESUME, LOCALTOOL + "resume_co.gif");
- declareRegistryImage(IDebugUIConstants.IMG_LCL_SUSPEND, LOCALTOOL + "suspend_co.gif");
- declareRegistryImage(IDebugUIConstants.IMG_LCL_TERMINATE, LOCALTOOL + "terminate_co.gif");
- declareRegistryImage(IDebugUIConstants.IMG_LCL_DISCONNECT, LOCALTOOL + "disconnect_co.gif");
- declareRegistryImage(IDebugUIConstants.IMG_LCL_STEPINTO, LOCALTOOL + "stepinto_co.gif");
- declareRegistryImage(IDebugUIConstants.IMG_LCL_STEPOVER, LOCALTOOL + "stepover_co.gif");
- declareRegistryImage(IDebugUIConstants.IMG_LCL_STEPRETURN, LOCALTOOL + "stepreturn_co.gif");
- declareRegistryImage(IDebugUIConstants.IMG_LCL_CLEAR, LOCALTOOL + "clear_co.gif");
- declareRegistryImage(IDebugUIConstants.IMG_LCL_REMOVE_TERMINATED, LOCALTOOL + "rem_all_co.gif");
- declareRegistryImage(IDebugUIConstants.IMG_LCL_QUALIFIED_NAMES, LOCALTOOL + "qnames_co.gif");
- declareRegistryImage(IDebugUIConstants.IMG_LCL_TYPE_NAMES, LOCALTOOL + "tnames_co.gif");
- declareRegistryImage(IDebugUIConstants.IMG_LCL_REMOVE, LOCALTOOL + "rem_co.gif");
- declareRegistryImage(IDebugUIConstants.IMG_LCL_REMOVE_ALL, LOCALTOOL + "rem_all_co.gif");
- declareRegistryImage(IDebugUIConstants.IMG_LCL_INSPECT, LOCALTOOL + "inspect_co.gif");
-
- // disabled local toolbars
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_RESUME, DLCL + "resume_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_SUSPEND, DLCL + "suspend_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_TERMINATE, DLCL + "terminate_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DISCONNECT, DLCL + "disconnect_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_STEPINTO, DLCL + "stepinto_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_STEPOVER, DLCL + "stepover_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_STEPRETURN, DLCL + "stepreturn_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_CLEAR, DLCL + "clear_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_REMOVE_TERMINATED, DLCL + "rem_all_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_QUALIFIED_NAMES, DLCL + "qnames_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_TYPE_NAMES, DLCL + "tnames_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_REMOVE, DLCL + "rem_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_REMOVE_ALL, DLCL + "rem_all_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_INSPECT, DLCL + "inpsect_co.gif");
-
- // enabled local toolbars
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_RESUME, ELCL + "resume_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_SUSPEND, ELCL + "suspend_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_TERMINATE, ELCL + "terminate_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DISCONNECT, ELCL + "disconnect_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_STEPINTO, ELCL + "stepinto_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_STEPOVER, ELCL + "stepover_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_STEPRETURN, ELCL + "stepreturn_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_CLEAR, ELCL + "clear_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_REMOVE_TERMINATED, ELCL + "rem_all_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_QUALIFIED_NAMES, ELCL + "qnames_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_TYPE_NAMES, ELCL + "tnames_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_REMOVE, ELCL + "rem_co.gif");
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_REMOVE_ALL, ELCL + "rem_all_co.gif");
-
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_INSPECT, ELCL + "inpsect_co.gif");
-
-
- //Object
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_LAUNCH_DEBUG, OBJECT + "ldebug_obj.gif");
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_LAUNCH_RUN, OBJECT + "lrun_obj.gif");
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET, OBJECT + "debugt_obj.gif");
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET_TERMINATED, OBJECT + "debugtt_obj.gif");
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_THREAD_RUNNING, OBJECT + "thread_obj.gif");
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_THREAD_SUSPENDED, OBJECT + "threads_obj.gif");
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_THREAD_TERMINATED, OBJECT + "threadt_obj.gif");
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_STACKFRAME, OBJECT + "stckframe_obj.gif");
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT, OBJECT + "brkp_obj.gif");
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT_DISABLED, OBJECT + "brkpd_obj.gif");
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_OS_PROCESS, OBJECT + "osprc_obj.gif");
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_OS_PROCESS_TERMINATED, OBJECT + "osprct_obj.gif");
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_EXPRESSION, OBJECT + "expression_obj.gif");
-
- //Wizard Banners
- declareRegistryImage(IDebugUIConstants.IMG_WIZBAN_DEBUG, WIZBAN + "debug_wiz.gif");
- declareRegistryImage(IDebugUIConstants.IMG_WIZBAN_RUN, WIZBAN + "run_wiz.gif");
- }
-
- /**
- * Declare an Image in the registry table.
- * @param key The key to use when registering the image
- * @param path The path where the image can be found. This path is relative to where
- * this plugin class is found (i.e. typically the packages directory)
- */
- private final static void declareRegistryImage(String key, String path) {
- ImageDescriptor desc= ImageDescriptor.getMissingImageDescriptor();
- try {
- desc= ImageDescriptor.createFromURL(makeIconFileURL(path));
- } catch (MalformedURLException me) {
-
- }
- imageRegistry.put(key, desc);
- imageDescriptors.put(key, desc);
- }
-
- /**
- * Returns the ImageRegistry.
- */
- public static ImageRegistry getImageRegistry() {
- if (imageRegistry == null) {
- initializeImageRegistry();
- }
- return imageRegistry;
- }
-
- /**
- * Initialize the image registry by declaring all of the required
- * graphics. This involves creating JFace image descriptors describing
- * how to create/find the image should it be needed.
- * The image is not actually allocated until requested.
- *
- * Prefix conventions
- * Wizard Banners WIZBAN_
- * Preference Banners PREF_BAN_
- * Property Page Banners PROPBAN_
- * Color toolbar CTOOL_
- * Enable toolbar ETOOL_
- * Disable toolbar DTOOL_
- * Local enabled toolbar ELCL_
- * Local Disable toolbar DLCL_
- * Object large OBJL_
- * Object small OBJS_
- * View VIEW_
- * Product images PROD_
- * Misc images MISC_
- *
- * Where are the images?
- * The images (typically gifs) are found in the same location as this plugin class.
- * This may mean the same package directory as the package holding this class.
- * The images are declared using this.getClass() to ensure they are looked up via
- * this plugin class.
- * @see JFace's ImageRegistry
- */
- public static ImageRegistry initializeImageRegistry() {
- imageRegistry= new ImageRegistry();
- imageDescriptors = new HashMap(30);
- declareImages();
- return imageRegistry;
- }
-
- /**
- * Returns the <code>Image<code> identified by the given key,
- * or <code>null</code> if it does not exist.
- */
- public static Image getImage(String key) {
- return getImageRegistry().get(key);
- }
-
- /**
- * Returns the <code>ImageDescriptor<code> identified by the given key,
- * or <code>null</code> if it does not exist.
- */
- public static ImageDescriptor getImageDescriptor(String key) {
- if (imageDescriptors == null) {
- initializeImageRegistry();
- }
- return (ImageDescriptor)imageDescriptors.get(key);
- }
-
- private static URL makeIconFileURL(String iconPath) throws MalformedURLException {
- if (ICON_BASE_URL == null) {
- throw new MalformedURLException();
- }
-
- return new URL(ICON_BASE_URL, iconPath);
- }
-}
-
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPreferencePage.java
deleted file mode 100644
index 90de2af3c..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPreferencePage.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.jface.preference.*; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.help.WorkbenchHelp;
-
-/*
- * The page for setting the default debugger preferences.
- */
-public class DebugPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage, IDebugPreferenceConstants {
-
- private static final String PREFIX= "debug_preferences.";
- private static final String DEBUG= PREFIX + "debug";
- private static final String RUN= PREFIX + "run";
- private static final String C_OPEN= PREFIX + "console_open";
-
- public DebugPreferencePage() {
- super(GRID);
-
- IPreferenceStore store= DebugUIPlugin.getDefault().getPreferenceStore();
- setPreferenceStore(store);
- }
-
- public void createControl(Composite parent) {
- super.createControl(parent);
- WorkbenchHelp.setHelp(
- parent,
- new Object[] { IDebugHelpContextIds.DEBUG_PREFERENCE_PAGE });
- }
-
- /**
- * @see FieldEditorPreferencePage#createFieldEditors
- */
- protected void createFieldEditors() {
- BooleanFieldEditor debug= new BooleanFieldEditor(IDebugUIConstants.PREF_AUTO_SHOW_DEBUG_VIEW, DebugUIUtils.getResourceString(DEBUG), SWT.NONE, getFieldEditorParent());
- BooleanFieldEditor run= new BooleanFieldEditor(IDebugUIConstants.PREF_AUTO_SHOW_PROCESS_VIEW, DebugUIUtils.getResourceString(RUN), SWT.NONE, getFieldEditorParent());
- BooleanFieldEditor consoleOpen= new BooleanFieldEditor(CONSOLE_OPEN, DebugUIUtils.getResourceString(C_OPEN), SWT.NONE, getFieldEditorParent());
-
- addField(debug);
- addField(run);
- addField(consoleOpen);
- }
-
- /**
- * @see IWorkbenchPreferencePage#init
- */
- public void init(IWorkbench workbench) {
- }
-}
-
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
deleted file mode 100644
index 6e2bef878..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
+++ /dev/null
@@ -1,1410 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.*;
-import java.util.*;
-import javax.xml.parsers.*;
-import org.apache.xerces.dom.DocumentImpl;
-import org.apache.xml.serialize.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.*;
-import org.eclipse.debug.ui.*;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.text.*;
-import org.eclipse.jface.util.ListenerList;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.*;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.w3c.dom.*;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * The Debug UI Plugin.
- *
- */
-public class DebugUIPlugin extends AbstractUIPlugin implements ISelectionChangedListener,
- IDebugEventListener,
- ISelectionListener,
- IDocumentListener,
- ILaunchListener,
- IResourceChangeListener {
-
-
- /**
- * The singleton debug plugin instance
- */
- private static DebugUIPlugin fgDebugUIPlugin= null;
-
- /**
- * A utility presentation used to obtain labels
- */
- protected static IDebugModelPresentation fgPresentation = null;
-
- /**
- * The selection providers for the debug UI
- */
- protected List fSelectionProviders= new ArrayList(2);
-
- /**
- * The desktop parts that contain the selections
- */
- protected List fSelectionParts= new ArrayList(2);
-
- /**
- * The list of selection listeners for the debug UI
- */
- protected ListenerList fListeners= new ListenerList(2);
-
- /**
- * The mappings of processes to their console documents.
- */
- protected Map fConsoleDocuments= new HashMap(3);
-
- /**
- * The process that is/can provide output to the console
- * view.
- */
- protected IProcess fCurrentProcess= null;
-
- /**
- * Colors to be used in the debug ui
- */
- protected ColorManager fColorManager= new ColorManager();
-
- /**
- * The most recent launch
- */
- protected LaunchHistoryElement fRecentLaunch = null;
-
- protected final static int MAX_HISTORY_SIZE= 5;
- /**
- * The most recent debug launches
- */
- protected Vector fDebugHistory = new Vector(MAX_HISTORY_SIZE);
-
- /**
- * The most recent run launches
- */
- protected Vector fRunHistory = new Vector(MAX_HISTORY_SIZE);
-
- /**
- * Event filters for the debug UI
- */
- protected ListenerList fEventFilters = new ListenerList(2);
-
- /**
- * The visitor used to traverse resource deltas and keep the run & debug
- * histories in synch with resource deletions.
- */
- protected static ResourceDeletedVisitor fgDeletedVisitor;
-
- protected SwitchContext fSwitchContext= new SwitchContext();
- /**
- * Visitor for handling resource deltas
- */
- class ResourceDeletedVisitor implements IResourceDeltaVisitor {
-
- /**
- * @see IResourceDeltaVisitor
- */
- public boolean visit(IResourceDelta delta) {
- if (delta.getKind() != IResourceDelta.REMOVED) {
- return true;
- }
- // check for deletions in launch history
- removeDeletedHistories();
- return false;
- }
- }
-
- /**
- * Tracks the debugger page and perspective for
- * the DebugUIPlugin
- */
- class SwitchContext implements IPartListener, IPageListener {
- protected IWorkbenchWindow fWindow;
- protected IWorkbenchPage fPage;
- protected IPerspectiveDescriptor fPerspective;
- protected LaunchesView fDebuggerView;
- protected boolean fPageCreated;
- protected boolean fContextChanged= true;
- protected String fMode;
-
- protected void init(String mode) {
- fMode= mode;
- fPageCreated= false;
- if (fPage != null) {
- fPage.removePartListener(this);
- }
- fPage= null;
- fDebuggerView= null;
- if (fWindow != null) {
- fWindow.removePageListener(this);
- }
- fWindow= getActiveWorkbenchWindow();
- fWindow.addPageListener(this);
- fContextChanged= false;
- }
-
- protected void shutdown() {
- if (fWindow == null) {
- return;
- }
- Shell shell= fWindow.getShell();
- if (shell == null || shell.isDisposed()) {
- return;
- }
- if (fPage != null) {
- fPage.removePartListener(this);
- }
- if (fWindow != null) {
- fWindow.removePageListener(this);
- }
- }
-
- /**
- * Returns whether the world has changed in a way that will
- * require switching to the debug perspective.
- */
- protected boolean contextChanged(String mode) {
- if (!fContextChanged) {
- if (fMode == null || !fMode.equals(mode)) {
- return true;
- }
- }
- boolean changed= fContextChanged ||
- !fWindow.equals(getActiveWorkbenchWindow()) ||
- !fWindow.getActivePage().equals(fPage) ||
- !fWindow.getActivePage().getPerspective().equals(fPerspective);
-
- return changed;
- }
-
- /**
- * Returns whether the DebugUIPlugin has recently caused
- * a debugger page to be created.
- */
- protected boolean wasPageCreated() {
- return fPageCreated;
- }
-
- /**
- * Sets whether the DebugUIPlugin has recently caused
- * a debugger page to be created.
- */
- protected void setPageCreated(boolean created) {
- fPageCreated= created;
- }
-
- protected IWorkbenchPage getPage() {
- return fPage;
- }
-
- protected void setPage(IWorkbenchPage page) {
- if (fPage != null) {
- fPage.removePartListener(this);
- }
- fPage = page;
- fPage.addPartListener(this);
- fPerspective= page.getPerspective();
- }
-
- protected IWorkbenchWindow getWindow() {
- return fWindow;
- }
-
- protected void setWindow(IWorkbenchWindow window) {
- fWindow.removePageListener(this);
- fWindow = window;
- fWindow.addPageListener(this);
- }
-
- protected LaunchesView getDebuggerView() {
- return fDebuggerView;
- }
-
- protected void setDebuggerView(LaunchesView debuggerView) {
- fDebuggerView = debuggerView;
- }
- /**
- * @see IPartListener#partActivated(IWorkbenchPart)
- */
- public void partActivated(IWorkbenchPart part) {
- if (part == fDebuggerView) {
- fContextChanged= false;
- }
- }
- /**
- * @see IPartListener#partBroughtToTop(IWorkbenchPart)
- */
- public void partBroughtToTop(IWorkbenchPart arg0) {
- }
-
- /**
- * @see IPartListener#partClosed(IWorkbenchPart)
- */
- public void partClosed(IWorkbenchPart part) {
- if (part == fDebuggerView) {
- fContextChanged= true;
- }
- }
-
- /**
- * @see IPartListener#partDeactivated(IWorkbenchPart)
- */
- public void partDeactivated(IWorkbenchPart part) {
- if (part == fDebuggerView) {
- fContextChanged= true;
- }
- }
-
- /**
- * @see IPartListener#partOpened(IWorkbenchPart)
- */
- public void partOpened(IWorkbenchPart arg0) {
- }
-
- /**
- * @see IPageListener#pageActivated(IWorkbenchPage)
- */
- public void pageActivated(IWorkbenchPage arg0) {
- }
-
- /**
- * @see IPageListener#pageClosed(IWorkbenchPage)
- */
- public void pageClosed(IWorkbenchPage page) {
- if (page.equals(fPage)) {
- init(null);
- fContextChanged= true;
- }
- }
-
- /**
- * @see IPageListener#pageOpened(IWorkbenchPage)
- */
- public void pageOpened(IWorkbenchPage arg0) {
- }
- }
-
- /**
- * Constructs the debug UI plugin
- */
- public DebugUIPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
- fgDebugUIPlugin= this;
- }
-
- /**
- * On a SUSPEND event, show the debug view or if no debug view is open,
- * switch to the perspective specified by the launcher.
- *
- * @see IDebugEventListener
- */
- public void handleDebugEvent(final DebugEvent event) {
- // open the debugger if this is a suspend event and the debug view is not yet open
- // and the preferences are set to switch
- if (event.getKind() == DebugEvent.SUSPEND) {
- getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (fSwitchContext.contextChanged(ILaunchManager.DEBUG_MODE)) {
- if (showSuspendEvent(event)) {
- if (getPreferenceStore().getBoolean(IDebugUIConstants.PREF_AUTO_SHOW_DEBUG_VIEW)) {
- switchToDebugPerspective(event.getSource(), ILaunchManager.DEBUG_MODE);
- }
- }
- }
- if (fSwitchContext.wasPageCreated()) {
- fSwitchContext.setPageCreated(false);
- LaunchesView view= fSwitchContext.getDebuggerView();
- if (view != null) {
- view.autoExpand(event.getSource(), true);
- }
- }
- }
- });
- }
- }
-
- /**
- * Poll the filters to determine if the event should be shown
- */
- protected boolean showSuspendEvent(DebugEvent event) {
- Object s= event.getSource();
- if (s instanceof ITerminate) {
- if (((ITerminate)s).isTerminated()) {
- return false;
- }
- }
- if (!fEventFilters.isEmpty()) {
- Object[] filters = fEventFilters.getListeners();
- for (int i = 0; i < filters.length; i++) {
- if (!((IDebugUIEventFilter)filters[i]).showDebugEvent(event)) {
- return false;
- }
- }
- }
- return true;
- }
-
- /**
- * Poll the filters to determine if the launch should be shown
- */
- protected boolean showLaunch(ILaunch launch) {
- if (!fEventFilters.isEmpty()) {
- Object[] filters = fEventFilters.getListeners();
- for (int i = 0; i < filters.length; i++) {
- if (!((IDebugUIEventFilter)filters[i]).showLaunch(launch)) {
- return false;
- }
- }
- }
- return true;
- }
-
- /**
- * Opens the a workbench page with the layout specified by the launcher
- * if it had not already been opened in any workbench window.
- *
- * A switch only occurs if a debug view is not present in any workbench window.
- */
- protected void switchToDebugPerspective(Object source, String mode) {
- fSwitchContext.init(mode);
- String layoutId= getLauncherPerspective(source);
- findDebugPresentation(fSwitchContext, mode, layoutId);
- activateDebugLayoutPage(fSwitchContext, layoutId);
- // bring debug to the front
- activateDebuggerPart(fSwitchContext, mode);
- if (fSwitchContext.wasPageCreated()) {
- LaunchesView view2= fSwitchContext.getDebuggerView();
- if (view2 != null) {
- view2.autoExpand(source, true);
- }
- }
- }
-
- /**
- * Debug ui thread safe access to a display
- */
- protected Display getDisplay() {
- //we can rely on not creating a display as we
- //prereq the base eclipse ui plugin.
- return Display.getDefault();
- }
-
- /**
- * Activates (may include creates) a debugger part based on the mode
- * in the specified switch context.
- * Must be called in the UI thread.
- */
- protected void activateDebuggerPart(SwitchContext switchContext, String mode) {
- LaunchesView debugPart= null;
- try {
- if (mode == ILaunchManager.DEBUG_MODE) {
- debugPart= (LaunchesView) switchContext.getPage().showView(IDebugUIConstants.ID_DEBUG_VIEW);
- } else {
- debugPart= (LaunchesView) switchContext.getPage().showView(IDebugUIConstants.ID_PROCESS_VIEW);
- }
- } catch (PartInitException pie) {
- IStatus status= new Status(IStatus.ERROR, getDescriptor().getUniqueIdentifier(), IDebugStatusConstants.INTERNAL_ERROR, pie.getMessage(), pie);
- DebugUIUtils.errorDialog(getActiveWorkbenchWindow().getShell(), "debug_ui_plugin.switch_perspective.error.", status);
- }
- switchContext.setDebuggerView(debugPart);
- }
-
- /**
- * Checks all active pages for a debugger view.
- * If no debugger view is found, looks for a page in any window
- * that has the specified debugger layout id.
- * Must be called in UI thread.
- */
- protected void findDebugPresentation(SwitchContext switchContext, String mode, String layoutId) {
-
- IWorkbenchWindow[] windows= getWorkbench().getWorkbenchWindows();
- IWorkbenchWindow activeWindow= getActiveWorkbenchWindow();
-
- //check the active page of the active window for
- //debug view
- LaunchesView part= findDebugPart(activeWindow, mode);
- if (part != null) {
- switchContext.setWindow(activeWindow);
- switchContext.setPage(part.getSite().getPage());
- return;
- }
- //check active pages of all windows for debug view
- int i;
- for (i= 0; i < windows.length; i++) {
- IWorkbenchWindow window= windows[i];
- LaunchesView lPart= findDebugPart(window, mode);
- if (lPart != null) {
- switchContext.setWindow(window);
- switchContext.setPage(lPart.getSite().getPage());
- return;
- }
- }
-
- //check the pages for the debugger layout.
- //check the pages of the active window first
- IWorkbenchPage page= null;
- IWorkbenchPage[] pages= activeWindow.getPages();
- for (i= 0; i < pages.length; i++) {
- if (pages[i].getPerspective().getId().equals(layoutId)) {
- page= pages[i];
- break;
- }
- }
- if (page != null) {
- switchContext.setWindow(activeWindow);
- switchContext.setPage(page);
- return;
- }
-
- i= 0;
- i: for (i= 0; i < windows.length; i++) {
- IWorkbenchWindow window= windows[i];
- if (window.equals(activeWindow)) {
- continue;
- }
- pages= window.getPages();
-
- j: for (int j= 0; j < pages.length; j++) {
- if (pages[j].getPerspective().getId().equals(layoutId)) {
- page= pages[j];
- break i;
- }
- }
- }
-
- if (page != null) {
- switchContext.setWindow(windows[i]);
- switchContext.setPage(page);
- return;
- }
- }
-
- /**
- * Returns a launches view if the specified window contains the debugger part for the
- * specified debug mode.
- */
- protected LaunchesView findDebugPart(IWorkbenchWindow window, String mode) {
- if (window == null) {
- return null;
- }
- IWorkbenchPage activePage= window.getActivePage();
- if (activePage == null) {
- return null;
- }
- IViewPart debugPart= null;
- if (mode == ILaunchManager.DEBUG_MODE) {
- debugPart= activePage.findView(IDebugUIConstants.ID_DEBUG_VIEW);
- } else {
- debugPart= activePage.findView(IDebugUIConstants.ID_PROCESS_VIEW);
- }
- return (LaunchesView)debugPart;
- }
-
- /**
- * Activates (may include creates) a debugger page with the
- * specified layout within the switch context.
- */
- protected void activateDebugLayoutPage(SwitchContext switchContext, String layoutId) {
- IWorkbenchPage page= switchContext.getPage();
- IWorkbenchWindow window= switchContext.getWindow();
- if (page == null) {
- try {
- IContainer root= ResourcesPlugin.getWorkspace().getRoot();
- // adhere to the workbench preference when openning the debugger
- AbstractUIPlugin plugin = (AbstractUIPlugin) Platform.getPlugin(PlatformUI.PLUGIN_ID);
- String perspectiveSetting = plugin.getPreferenceStore().getString(IWorkbenchPreferenceConstants.OPEN_NEW_PERSPECTIVE);
-
- IWorkbench wb = window.getWorkbench();
- if (perspectiveSetting.equals(IWorkbenchPreferenceConstants.OPEN_PERSPECTIVE_WINDOW)) {
- // in new window
- window= wb.openWorkbenchWindow(layoutId, root);
- page= window.getActivePage();
- } else if (perspectiveSetting.equals(IWorkbenchPreferenceConstants.OPEN_PERSPECTIVE_PAGE)) {
- // in new page
- page= window.openPage(layoutId, root);
- } else if (perspectiveSetting.equals(IWorkbenchPreferenceConstants.OPEN_PERSPECTIVE_REPLACE)) {
- // replace current
- page= window.getActivePage();
- if (page == null) {
- // no pages - open a new one
- page = window.openPage(layoutId, root);
- } else {
- page.setPerspective(wb.getPerspectiveRegistry().findPerspectiveWithId(layoutId));
- }
- }
- switchContext.setPageCreated(true);
- } catch (WorkbenchException e) {
- IStatus status= new Status(IStatus.ERROR, getDescriptor().getUniqueIdentifier(), IDebugStatusConstants.INTERNAL_ERROR, e.getMessage(), e);
- DebugUIUtils.errorDialog(window.getShell(), "debug_ui_plugin.switch_perspective.error.", status);
- return;
- }
- switchContext.setPage(page);
- switchContext.setWindow(window);
- } else {
- window.getShell().moveAbove(null);
- window.getShell().setFocus();
- window.setActivePage(page);
- }
- }
- /**
- * Returns the launcher perspective specified in the launcher
- * associated with the source of a <code>DebugEvent</code>
- */
- protected String getLauncherPerspective(Object eventSource) {
- ILaunch launch= null;
- if (eventSource instanceof IDebugElement) {
- launch= ((IDebugElement) eventSource).getLaunch();
- } else
- if (eventSource instanceof ILaunch) {
- launch= (ILaunch) eventSource;
- }
- ILaunchManager launchManager= DebugPlugin.getDefault().getLaunchManager();
- String perspectiveID= launch == null ? null : launch.getLauncher().getPerspectiveIdentifier();
- if (perspectiveID == null) {
- perspectiveID= IDebugUIConstants.ID_DEBUG_PERSPECTIVE;
- }
- return perspectiveID;
- }
-
- /**
- * Returns the singleton instance of the debug plugin.
- */
- public static DebugUIPlugin getDefault() {
- return fgDebugUIPlugin;
- }
-
- public static IDebugModelPresentation getModelPresentation() {
- if (fgPresentation == null) {
- fgPresentation = new DelegatingModelPresentation();
- }
- return fgPresentation;
- }
- public static IWorkbenchWindow getActiveWorkbenchWindow() {
- return getDefault().getWorkbench().getActiveWorkbenchWindow();
- }
-
-/**
- * Creates an extension. If the extension plugin has not
- * been loaded a busy cursor will be activated during the duration of
- * the load.
- *
- * @param element the config element defining the extension
- * @param classAttribute the name of the attribute carrying the class
- * @returns the extension object
- */
-public static Object createExtension(final IConfigurationElement element, final String classAttribute) throws CoreException {
- // If plugin has been loaded create extension.
- // Otherwise, show busy cursor then create extension.
- IPluginDescriptor plugin = element.getDeclaringExtension().getDeclaringPluginDescriptor();
- if (plugin.isPluginActivated()) {
- return element.createExecutableExtension(classAttribute);
- } else {
- final Object [] ret = new Object[1];
- final CoreException [] exc = new CoreException[1];
- BusyIndicator.showWhile(null, new Runnable() {
- public void run() {
- try {
- ret[0] = element.createExecutableExtension(classAttribute);
- } catch (CoreException e) {
- exc[0] = e;
- }
- }
- });
- if (exc[0] != null) {
- throw exc[0];
- }
- else {
- return ret[0];
- }
- }
-}
-
- protected ImageRegistry createImageRegistry() {
- return DebugPluginImages.initializeImageRegistry();
- }
-
- /**
- * Shuts down this plug-in and discards all plug-in state.
- * If a plug-in has been started, this method is automatically
- * invoked by the platform core when the workbench is closed.
- * <p>
- * This method is intended to perform simple termination
- * of the plug-in environment. The platform may terminate invocations
- * that do not complete in a timely fashion.
- * </p><p>
- * By default this will save the preference and dialog stores (if they are in use).
- * </p><p>
- * Subclasses which override this method must call super first.
- * </p>
- */
- public void shutdown() throws CoreException {
- super.shutdown();
- removeSelectionListener(this);
- DebugPlugin.getDefault().removeDebugEventListener(this);
- ILaunchManager launchManager= DebugPlugin.getDefault().getLaunchManager();
- launchManager.removeLaunchListener(this);
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
- fColorManager.dispose();
- Iterator docs= fConsoleDocuments.values().iterator();
- while (docs.hasNext()) {
- ConsoleDocument doc= (ConsoleDocument)docs.next();
- doc.removeDocumentListener(this);
- doc.close();
- }
- fSwitchContext.shutdown();
- try {
- persistLaunchHistory();
- } catch (IOException e) {
- DebugUIUtils.logError(e);
- }
- }
-
- /**
- * Starts up this plug-in.
- * <p>
- * This method is automatically invoked by the platform core
- * the first time any code in the plug-in is executed.
- * <p>
- */
- public void startup() throws CoreException {
- DebugPlugin.getDefault().addDebugEventListener(this);
- ILaunchManager launchManager= DebugPlugin.getDefault().getLaunchManager();
- launchManager.addLaunchListener(this);
- addSelectionListener(this);
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
- //set up the docs for launches already registered
- ILaunch[] launches= launchManager.getLaunches();
- try {
- restoreLaunchHistory();
- } catch (IOException e) {
- DebugUIUtils.logError(e);
- }
- for (int i = 0; i < launches.length; i++) {
- launchRegistered(launches[i]);
- }
- }
-
- /**
- * Adds the selection provider for the debug UI.
- */
- public void addSelectionProvider(ISelectionProvider provider, IWorkbenchPart part) {
- fSelectionProviders.add(provider);
- fSelectionParts.add(part);
- provider.addSelectionChangedListener(this);
- }
-
- /**
- * Removes the selection provider from the debug UI.
- */
- public void removeSelectionProvider(ISelectionProvider provider, IWorkbenchPart part) {
- fSelectionProviders.remove(provider);
- fSelectionParts.remove(part);
- provider.removeSelectionChangedListener(this);
- selectionChanged(null);
- }
-
- /**
- * Adds an <code>ISelectionListener</code> to the debug selection manager.
- */
- public void addSelectionListener(ISelectionListener l) {
- fListeners.add(l);
- }
-
- /**
- * Removes an <code>ISelectionListener</code> from the debug selection manager.
- */
- public synchronized void removeSelectionListener(ISelectionListener l) {
- fListeners.remove(l);
- }
-
- /**
- * Selection has changed in the debug selection provider.
- * Notify the listeners.
- */
- public void selectionChanged(SelectionChangedEvent event) {
- Object[] copiedListeners= fListeners.getListeners();
-
- ISelection selection= null;
- ISelectionProvider provider= null;
- IWorkbenchPart part= null;
- if (event != null) {
- selection= event.getSelection();
- provider= (ISelectionProvider) event.getSource();
- int index= fSelectionProviders.indexOf(provider);
- if (index == -1) {
- return;
- }
- part= (IWorkbenchPart) fSelectionParts.get(index);
- }
- for (int i= 0; i < copiedListeners.length; i++) {
- ((ISelectionListener)copiedListeners[i]).selectionChanged(part, selection);
- }
- }
-
- /**
- * Sets the console document for the specified process.
- * If the document is <code>null</code> the mapping for the
- * process is removed.
- */
- public void setConsoleDocument(IProcess process, IDocument doc) {
- if (doc == null) {
- fConsoleDocuments.remove(process);
- } else {
-
- fConsoleDocuments.put(process, doc);
- }
- }
-
- /**
- * Returns the correct document for the process, determining the current
- * process if required (process argument is null).
- */
- public IDocument getConsoleDocument(IProcess process) {
- return getConsoleDocument(process, true);
- }
- /**
- * Returns the correct document for the process, determining the current
- * process if specified.
- */
- public IDocument getConsoleDocument(IProcess process, boolean determineCurrentProcess) {
- if (process != null) {
- IDocument document= (IDocument) fConsoleDocuments.get(process);
- if (document != null) {
- return document;
- }
- document= new ConsoleDocument(process);
- fConsoleDocuments.put(process, document);
- return document;
- }
-
- if (determineCurrentProcess) {
- if (getCurrentProcess() == null) {
- setCurrentProcess(determineCurrentProcess());
- }
-
- IProcess currentProcess= getCurrentProcess();
- if (currentProcess != null) {
- IDocument document= (IDocument) fConsoleDocuments.get(currentProcess);
- if (document != null) {
- return document;
- }
- document= new ConsoleDocument(currentProcess);
- fConsoleDocuments.put(currentProcess, document);
- return document;
- }
- }
-
- return new ConsoleDocument(null);
- }
-
- /**
- * Returns the color manager to use in the debug UI
- */
- public ColorManager getColorManager() {
- return fColorManager;
- }
-
- /**
- * @see AbstractUIPlugin#initializeDefaultPreferences
- */
- protected void initializeDefaultPreferences(IPreferenceStore prefs) {
- prefs.setDefault(IDebugUIConstants.PREF_AUTO_SHOW_DEBUG_VIEW, true);
- prefs.setDefault(IDebugUIConstants.PREF_AUTO_SHOW_PROCESS_VIEW, true);
- prefs.setDefault(IDebugPreferenceConstants.CONSOLE_OPEN, true);
-
- PreferenceConverter.setDefault(prefs, IDebugPreferenceConstants.CONSOLE_SYS_OUT_RGB, new RGB(0, 0, 255));
- PreferenceConverter.setDefault(prefs, IDebugPreferenceConstants.CONSOLE_SYS_IN_RGB, new RGB(0, 200, 125));
- PreferenceConverter.setDefault(prefs, IDebugPreferenceConstants.CONSOLE_SYS_ERR_RGB, new RGB(255, 0, 0));
- }
-
- /**
- * @see ISelectionListener
- */
- public void selectionChanged(IWorkbenchPart part, ISelection sel) {
- if (!(part instanceof LaunchesView)) {
- return;
- }
-
- IWorkbenchWindow window= getActiveWorkbenchWindow();
- IWorkbenchPage page= window.getActivePage();
- if (page == null) {
- return;
- }
- Object input= null;
- if (sel instanceof IStructuredSelection) {
- input= ((IStructuredSelection) sel).getFirstElement();
- }
- ConsoleView consoleView= (ConsoleView)page.findView(IDebugUIConstants.ID_CONSOLE_VIEW);
- if (input == null) {
- if (consoleView != null && getCurrentProcess() != null) {
- consoleView.setViewerInput(getCurrentProcess());
- } else {
- IProcess currentProcess= determineCurrentProcess();
- if (currentProcess == null) {
- setCurrentProcess(currentProcess);
- if (consoleView != null) {
- consoleView.setViewerInput(currentProcess);
- }
- }
- }
- } else {
- IProcess processFromInput= getProcessFromInput(input);
- if (processFromInput == null) {
- if (consoleView != null) {
- consoleView.setViewerInput(null, false);
- }
- setCurrentProcess(null);
- return;
- }
- if (!processFromInput.equals(getCurrentProcess())) {
- setCurrentProcess(processFromInput);
- if (consoleView != null) {
- consoleView.setViewerInput(processFromInput);
- } else {
- IDocument doc= getConsoleDocument(processFromInput);
- if (doc != null) {
- doc.addDocumentListener(this);
- }
- }
- }
- }
- }
-
- /**
- * Returns the current process to use as input for the console view.
- * Returns the first <code>IProcess</code> that has a launch and is associated with a debug target.
- * If no debug targets, returns the first <code>IProcess</code> found in the launch manager.
- * Can return <code>null</code>.
- */
- public IProcess determineCurrentProcess() {
- ILaunchManager launchManager= DebugPlugin.getDefault().getLaunchManager();
- IDebugTarget[] debugTargets= launchManager.getDebugTargets();
- for (int i = 0; i < debugTargets.length; i++) {
- IDebugTarget target= debugTargets[i];
- IProcess process= target.getProcess();
- if (process != null && process.getLaunch() != null) {
- return process;
- }
- }
-
- IProcess[] processes= launchManager.getProcesses();
- for (int i=0; i < processes.length; i++) {
- IProcess process= processes[i];
- if (process.getLaunch() != null) {
- return process;
- }
- }
-
- return null;
- }
-
- protected IProcess getProcessFromInput(Object input) {
- IProcess processInput= null;
- if (input instanceof IProcess) {
- processInput= (IProcess) input;
- } else
- if (input instanceof ILaunch) {
- IDebugTarget target= ((ILaunch) input).getDebugTarget();
- if (target != null) {
- processInput= target.getProcess();
- } else {
- IProcess[] processes= ((ILaunch) input).getProcesses();
- if ((processes != null) && (processes.length > 0)) {
- processInput= processes[0];
- }
- }
- } else
- if (input instanceof IDebugElement) {
- processInput= ((IDebugElement) input).getProcess();
- }
-
- if ((processInput == null) || (processInput.getLaunch() == null)) {
- return null;
- } else {
- return processInput;
- }
- }
-
- /**
- * @see IDocumentListener
- */
- public void documentAboutToBeChanged(final DocumentEvent e) {
- // if the prefence is set, show the conosle
- if (!getPreferenceStore().getBoolean(IDebugPreferenceConstants.CONSOLE_OPEN)) {
- return;
- }
-
- getDisplay().asyncExec(new Runnable() {
- public void run() {
- IWorkbenchWindow window = getActiveWorkbenchWindow();
- if (window != null) {
- IWorkbenchPage page= window.getActivePage();
- if (page != null) {
- try { // show the console
- ConsoleView consoleView= (ConsoleView)page.findView(IDebugUIConstants.ID_CONSOLE_VIEW);
- if(consoleView == null) {
- IWorkbenchPart activePart= page.getActivePart();
- consoleView= (ConsoleView)page.showView(IDebugUIConstants.ID_CONSOLE_VIEW);
- consoleView.setViewerInput(getCurrentProcess());
- //restore focus stolen by the creation of the console
- page.activate(activePart);
- } else {
- page.bringToTop(consoleView);
- }
- } catch (PartInitException pie) {
- }
- }
- }
- }
- });
- }
-
- /**
- * @see IDocumentListener
- */
- public void documentChanged(DocumentEvent e) {
- }
-
- public IProcess getCurrentProcess() {
- return fCurrentProcess;
- }
- public void setCurrentProcess(IProcess process) {
- if (fCurrentProcess != null) {
- getConsoleDocument(fCurrentProcess).removeDocumentListener(this);
- }
- fCurrentProcess= process;
- if (fCurrentProcess != null) {
- getConsoleDocument(fCurrentProcess).addDocumentListener(this);
- }
- }
-
- /**
- * @see IResourceChangeListener
- */
- public void resourceChanged(IResourceChangeEvent event) {
- IResourceDelta delta= event.getDelta();
- if (delta != null) {
- try {
- if (fgDeletedVisitor == null) {
- fgDeletedVisitor= new ResourceDeletedVisitor();
- }
- delta.accept(fgDeletedVisitor, false);
- } catch (CoreException ce) {
- DebugUIUtils.logError(ce);
- }
- }
- }
-
- /**
- * @see ILaunchListener
- */
- public void launchDeregistered(final ILaunch launch) {
- getDisplay().syncExec(new Runnable () {
- public void run() {
- IProcess[] processes= launch.getProcesses();
- for (int i= 0; i < processes.length; i++) {
- ConsoleDocument doc= (ConsoleDocument)getConsoleDocument(processes[i]);
- doc.removeDocumentListener(DebugUIPlugin.this);
- doc.close();
- setConsoleDocument(processes[i], null);
- }
- IProcess currentProcess= getCurrentProcess();
- if (currentProcess != null && currentProcess.getLaunch() == null) {
- fCurrentProcess= null;
- }
- }
- });
- }
-
- /**
- * Must not assume that will only be called from the UI thread.
- *
- * @see ILaunchListener
- */
- public void launchRegistered(final ILaunch launch) {
- updateHistories(launch);
- switchToDebugPerspectiveIfPreferred(launch);
-
- getDisplay().syncExec(new Runnable () {
- public void run() {
- IProcess[] processes= launch.getProcesses();
- if (processes != null) {
- for (int i= 0; i < processes.length; i++) {
- ConsoleDocument doc= new ConsoleDocument(processes[i]);
- doc.startReading();
- setConsoleDocument(processes[i], doc);
- }
- }
- }
- });
-
- IProcess newProcess= null;
- IDebugTarget target= launch.getDebugTarget();
- if (target != null) {
- newProcess= target.getProcess();
- } else {
- IProcess[] processes= launch.getProcesses();
- if ((processes != null) && (processes.length > 0)) {
- newProcess= processes[processes.length - 1];
- }
- }
- setCurrentProcess(newProcess);
- setConsoleInput(newProcess);
- }
-
- /**
- * In a thread safe manner, switches the workbench to the debug perspective
- * if the user preferences specify to do so.
- */
- protected void switchToDebugPerspectiveIfPreferred(final ILaunch launch) {
- getDisplay().asyncExec(new Runnable() {
- public void run() {
- String mode= launch.getLaunchMode();
- if (fSwitchContext.contextChanged(mode)) {
- boolean isDebug= mode.equals(ILaunchManager.DEBUG_MODE);
- boolean doSwitch= userPreferenceToSwitchPerspective(isDebug);
- if (doSwitch && showLaunch(launch)) {
- switchToDebugPerspective(launch, mode);
- }
- }
- }
- });
- }
-
- /**
- * Must be called in the UI thread
- */
- public boolean userPreferenceToSwitchPerspective(boolean isDebug) {
- IPreferenceStore prefs= getPreferenceStore();
- return isDebug ? prefs.getBoolean(IDebugUIConstants.PREF_AUTO_SHOW_DEBUG_VIEW) : prefs.getBoolean(IDebugUIConstants.PREF_AUTO_SHOW_PROCESS_VIEW);
- }
-
- /**
- * Sets the input console view viewer input for all
- * consoles that exist in a thread safe manner.
- */
- protected void setConsoleInput(final IProcess process) {
- getDisplay().asyncExec(new Runnable() {
- public void run() {
- IWorkbenchWindow[] windows= getWorkbench().getWorkbenchWindows();
- for (int j= 0; j < windows.length; j++) {
- IWorkbenchWindow window= windows[j];
- IWorkbenchPage[] pages= window.getPages();
- if (pages != null) {
- for (int i= 0; i < pages.length; i++) {
- IWorkbenchPage page= pages[i];
- ConsoleView consoleView= (ConsoleView)page.findView(IDebugUIConstants.ID_CONSOLE_VIEW);
- if (consoleView != null) {
- consoleView.setViewerInput(process);
- }
- }
- }
- }
- }
- });
- }
-
- /**
- * Returns the collection of most recent debug launches, which
- * can be empty.
- *
- * @return an array of launches
- */
- public LaunchHistoryElement[] getDebugHistory() {
- return getHistoryArray(fDebugHistory);
- }
-
- /**
- * Returns the set of most recent run launches, which can be empty.
- *
- * @return an array of launches
- */
- public LaunchHistoryElement[] getRunHistory() {
- return getHistoryArray(fRunHistory);
- }
-
- protected LaunchHistoryElement[] getHistoryArray(Vector history) {
- LaunchHistoryElement[] array = new LaunchHistoryElement[history.size()];
- history.copyInto(array);
- return array;
- }
-
- /**
- * Returns the most recent launch, or <code>null</code> if there
- * have been no launches.
- *
- * @return the last launch, or <code>null</code> if none
- */
- public LaunchHistoryElement getLastLaunch() {
- return fRecentLaunch;
- }
-
- /**
- * Adjust all histories, removing deleted launches.
- */
- protected void removeDeletedHistories() {
- removeDeletedHistories(fDebugHistory);
- removeDeletedHistories(fRunHistory);
- }
-
- /**
- * Update the given history, removing launches with no element.
- */
- protected void removeDeletedHistories(Vector history) {
- List remove = null;
- Iterator iter = history.iterator();
- while (iter.hasNext()) {
- LaunchHistoryElement element = (LaunchHistoryElement)iter.next();
- if (element.getLaunchElement() == null) {
- if (remove == null) {
- remove = new ArrayList(1);
- }
- remove.add(element);
- }
- }
- if (remove != null) {
- iter = remove.iterator();
- while (iter.hasNext()) {
- history.remove(iter.next());
- }
- }
- }
-
- /**
- * Given a launch, try to add it to both of the run & debug histories.
- */
- protected void updateHistories(ILaunch launch) {
- if (isVisible(launch.getLauncher())) {
- String elementMemento = launch.getLauncher().getDelegate().getLaunchMemento(launch.getElement());
- if (elementMemento == null) {
- return;
- }
- updateHistory(ILaunchManager.DEBUG_MODE, fDebugHistory, launch, elementMemento);
- updateHistory(ILaunchManager.RUN_MODE, fRunHistory, launch, elementMemento);
- }
- }
-
- /**
- * Add the given launch to the debug history if the
- * launcher supports the debug mode.
- */
- protected void updateHistory(String mode, Vector history, ILaunch launch, String memento) {
-
- // First make sure the launcher used supports the mode of the history list
- ILauncher launcher= launch.getLauncher();
- Set supportedLauncherModes= launcher.getModes();
- if (!supportedLauncherModes.contains(mode)) {
- return;
- }
-
- // create new history item
- LaunchHistoryElement item= new LaunchHistoryElement(launcher.getIdentifier(), memento, mode, getModelPresentation().getText(launch));
-
- // update the most recent launch
- if (launch.getLaunchMode().equals(mode)) {
- fRecentLaunch = item;
- }
-
- // Look for an equivalent launch in the history list
- int index;
- boolean found= false;
-
- index = history.indexOf(item);
-
- //It's already listed as the most recent launch, so nothing to do
- if (index == 0) {
- return;
- }
-
- // It's in the history, but not the most recent, so make it the most recent
- if (index > 0) {
- history.remove(item);
- }
- history.add(0, item);
- if (history.size() > MAX_HISTORY_SIZE) {
- history.remove(history.size() - 1);
- }
- }
-
- protected String getHistoryAsXML() throws IOException {
-
- org.w3c.dom.Document doc = new DocumentImpl();
- Element historyRootElement = doc.createElement("launchHistory");
- doc.appendChild(historyRootElement);
-
- List all = new ArrayList(fDebugHistory.size() + fRunHistory.size());
- all.addAll(fDebugHistory);
- all.addAll(fRunHistory);
-
- Iterator iter = all.iterator();
- while (iter.hasNext()) {
- Element historyElement =
- getHistoryEntryAsXMLElement(doc, (LaunchHistoryElement)iter.next());
- historyRootElement.appendChild(historyElement);
- }
- if (fRecentLaunch != null) {
- Element recent = getRecentLaunchAsXMLElement(doc, fRecentLaunch);
- historyRootElement.appendChild(recent);
- }
-
- // produce a String output
- StringWriter writer = new StringWriter();
- OutputFormat format = new OutputFormat();
- format.setIndenting(true);
- Serializer serializer =
- SerializerFactory.getSerializerFactory(Method.XML).makeSerializer(
- writer,
- format);
- serializer.asDOMSerializer().serialize(doc);
- return writer.toString();
-
- }
-
- protected Element getHistoryEntryAsXMLElement(org.w3c.dom.Document doc, LaunchHistoryElement element) {
- Element entry = doc.createElement("launch");
- setAttributes(entry, element);
- return entry;
- }
-
- protected Element getRecentLaunchAsXMLElement(org.w3c.dom.Document doc, LaunchHistoryElement element) {
- Element entry = doc.createElement("lastLaunch");
- setAttributes(entry, element);
- return entry;
- }
-
- protected void setAttributes(Element entry, LaunchHistoryElement element) {
- entry.setAttribute("launcherId", element.getLauncherIdentifier());
- entry.setAttribute("elementMemento", element.getElementMemento());
- entry.setAttribute("launchLabel", element.getLabel());
- entry.setAttribute("mode", element.getMode());
- }
-
-
- protected void persistLaunchHistory() throws IOException {
- IPath path = getStateLocation();
- path = path.append("launchHistory.xml");
- String osPath = path.toOSString();
- File file = new File(osPath);
- file.createNewFile();
- FileWriter writer = new FileWriter(file);
- writer.write(getHistoryAsXML());
- writer.close();
- }
-
- protected void restoreLaunchHistory() throws IOException {
- IPath path = getStateLocation();
- path = path.append("launchHistory.xml");
- String osPath = path.toOSString();
- File file = new File(osPath);
-
- if (!file.exists()) {
- // no history to restore
- return;
- }
-
- FileInputStream stream = new FileInputStream(file);
- Element rootHistoryElement = null;
- try {
- DocumentBuilder parser =
- DocumentBuilderFactory.newInstance().newDocumentBuilder();
- rootHistoryElement = parser.parse(new InputSource(stream)).getDocumentElement();
- } catch (SAXException e) {
- DebugUIUtils.logError(e);
- return;
- } catch (ParserConfigurationException e) {
- DebugUIUtils.logError(e);
- return;
- } finally {
- stream.close();
- }
- if (!rootHistoryElement.getNodeName().equalsIgnoreCase("launchHistory")) {
- return;
- }
- NodeList list = rootHistoryElement.getChildNodes();
- int length = list.getLength();
- for (int i = 0; i < length; ++i) {
- Node node = list.item(i);
- short type = node.getNodeType();
- if (type == Node.ELEMENT_NODE) {
- Element entry = (Element) node;
- if (entry.getNodeName().equalsIgnoreCase("launch")) {
- LaunchHistoryElement item = createHistoryElement(entry);
- if (item.getMode().equals(ILaunchManager.DEBUG_MODE)) {
- fDebugHistory.add(item);
- } else {
- fRunHistory.add(item);
- }
- } else if (entry.getNodeName().equalsIgnoreCase("lastLaunch")) {
- fRecentLaunch = createHistoryElement(entry);
- }
- }
- }
- }
-
- public LaunchHistoryElement createHistoryElement(Element entry) {
- String launcherId = entry.getAttribute("launcherId");
- String mode = entry.getAttribute("mode");
- String memento = entry.getAttribute("elementMemento");
- String label = entry.getAttribute("launchLabel");
- return new LaunchHistoryElement(launcherId, memento, mode, label);
- }
-
- public void addEventFilter(IDebugUIEventFilter filter) {
- fEventFilters.add(filter);
- }
-
- /**
- * Removes the event filter after the current set
- * of events posted to the queue have been processed.
- */
- public void removeEventFilter(final IDebugUIEventFilter filter) {
- Runnable runnable = new Runnable() {
- public void run() {
- fEventFilters.remove(filter);
- }
- };
- getDisplay().asyncExec(runnable);
- }
-
- /**
- * Returns whether the given launcher should be visible in the UI.
- * If a launcher is not visible, it will not appear
- * in the UI - i.e. not as a default launcher, not in the run/debug
- * drop downs, and not in the launch history.
- * Based on the public attribute.
- */
- public boolean isVisible(ILauncher launcher) {
- IConfigurationElement e = launcher.getConfigurationElement();
- String publc= e.getAttribute("public");
- if (publc == null || publc.equals("true")) {
- return true;
- }
- return false;
- }
-
- /**
- * Returns whether the given launcher specifies a wizard.
- */
- public boolean hasWizard(ILauncher launcher) {
- IConfigurationElement e = launcher.getConfigurationElement();
- return e.getAttribute("wizard") != null;
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIResources.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIResources.properties
deleted file mode 100644
index 107903582..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIResources.properties
+++ /dev/null
@@ -1,261 +0,0 @@
-##############################################################
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-##############################################################
-
-##############################################################
-# DebugUIPlugin
-##############################################################
-debug_ui_plugin.switch_perspective.error.title=Problem Switching to the Debug Perspective
-debug_ui_plugin.switch_perspective.error.message=Exceptions occurred switching to the specified debug layout
-
-##############################################################
-# Console property page
-##############################################################
-console_preferences.description=Console text color settings.
-console_preferences.out=Standard Out:
-console_preferences.err=Standard Error:
-console_preferences.in=Standard In:
-console_preferences.font=Console font setting:
-
-##############################################################
-# Debug preference page
-##############################################################
-debug_preferences.debug=Show Debug Perspective when a program is launched in de&bug mode
-debug_preferences.run=Show Debug Perspective when a program is launched in &run mode
-debug_preferences.console_open=Show &Console View when there is program output
-
-##############################################################
-# Launcher property page
-##############################################################
-launcher_preferences.description=Select default launcher
-launcher_preferences.run_debug=Run/Debug
-launcher_preferences.none=none
-launcher_preferences.error.title=Launcher property page
-launcher_preferences.error.message=Exceptions occurred saving the launcher preferences
-launcher_preferences.closed_project=Launcher information is not available for a closed project
-##############################################################
-# Launch wizard
-##############################################################
-launch_wizard.title.debug=Debug
-launch_wizard.title.run=Run
-
-##############################################################
-# Launch wizard project selection page
-##############################################################
-launch_wizard_project_page.title=Select Project
-launch_wizard_project_page.select_element= Select a project for the launch context.
-launch_wizard_project_page.select_error_element=No projects available.
-launch_wizard_project_page.pattern_label=Enter a pattern to select a range of projects
-
-##############################################################
-# Launch wizard page
-##############################################################
-launch_wizard_page.title=Select Launcher
-launch_wizard_page.launcher= Select a launcher:
-launch_wizard_page.select_error_launcher=No launchers registered.
-launch_wizard_page.default_launcher=Set as &default launcher for project \"{0}\"
-launch_wizard_page.unknown=<unknown>
-
-launch_wizard_node.error.title=Problem Opening Wizard
-launch_wizard_node.error.message=The selected wizard could not be started.
-
-##############################################################
-# Action resources
-##############################################################
-
-add_to_inspector_action.text=&Inspect
-add_to_inspector_action.toolTipText=Adds Selected Variables to Inspector
-
-change_variable_value_action.text=&Change Variable Value
-change_variable_value_action.description=Changes the value of a simple type variable
-change_variable_value_action.error.title=Setting variable value
-change_variable_value_action.error.message=Setting the variable value failed
-change_variable_value_action.dialog.message=Enter the new value for the variable \"{0}\"
-change_variable_value_action.dialog.invalid=Value is not valid for the variable \"{0}\"
-change_variable_value_action.dialog.title=Change Variable Value
-
-clear_output_action.text=Clear &Output
-clear_output_action.toolTipText=Clear Output
-
-copy_action.label=&Copy@Ctrl+C
-copy_action.tooltip=Copy
-copy_action.description=Copy
-
-copy_to_clipboard_action.text=&Copy Stack
-copy_to_clipboard_action.toolTipText=Copy to Clipboard
-##only needed due to inheritance
-copy_to_clipboard_action.status=
-
-copy_variables_to_clipboard_action.text=Copy &Variables
-copy_variables_to_clipboard_action.toolTipText=Copy to Clipboard
-##only needed due to inheritance
-copy_variables_to_clipboard_action.status=
-
-cut_action.label=Cu&t@Ctrl+X
-cut_action.tooltip=Cut
-cut_action.description=Cut
-
-debug_action.text=&Debug@F9
-debug_action.toolTipText=Debug
-
-disconnect_action.text=&Disconnect
-disconnect_action.toolTipText=Disconnect
-disconnect_action.status=Disconnect failed
-disconnect_action.error.title=Disconnect
-disconnect_action.error.message=Exceptions occurred attempting to disconnect
-
-enable_disable_breakpoint_action.text=&Enable/Disable
-enable_disable_breakpoint_action.text.enable=&Enable
-enable_disable_breakpoint_action.text.disable=&Disable
-enable_disable_breakpoint_action.error.title=Enabling/disabling breakpoints
-enable_disable_breakpoint_action.error.message=Exceptions occurred enabling/disabling the breakpoint(s)
-enable_disable_breakpoint_action.status.message=Enable/Disable breakpoint(s) failed
-
-execution_action.error.title= Error finding default launchers
-execution_action.error.message=Exceptions occurred determining the default launcher(s)
-execution_action.status=Error occurred retrieving default launcher
-
-find_replace_action.label=&Find/Replace@Ctrl+F
-find_replace_action.tooltip=Find/Replace
-find_replace_action.image=
-find_replace_action.description=Find/Replace
-
-goto_line_action.label=Goto &Line@Ctrl+G
-goto_line_action.tooltip=Goto Line
-goto_line_action.image=
-goto_line_action.description=Goto Line
-goto_line_action.dialog.title=Goto Line
-goto_line_action.dialog.message=Enter line number:
-goto_line_action.dialog.invalid_input=Not a number
-goto_line_action.dialog.invalid_range=Line number out of range
-
-launch_with_action.text.debug=Debug
-launch_with_action.text.run=Run
-
-launch_action.error.title=Launch failed
-launch_action.error.message=Launch attempt failed: {0}
-
-open_breakpoint_marker_action.text=&Go to File
-open_breakpoint_marker_action.toolTipText=Go to File for Breakpoint
-
-paste_action.label=&Paste@Ctrl+V
-paste_action.tooltip=Paste
-paste_action.description=Pastes clipboard text
-
-relaunch_action.text=Re&launch
-relaunch_action.toolTipText=Relaunch
-##only needed due to inheritance
-relaunch_action.status=
-
-remove_all_breakpoints_action.text=Remove &All
-remove_all_breakpoints_action.toolTipText=Remove All Breakpoints
-remove_all_breakpoints_action.error.title=Removing all breakpoints
-remove_all_breakpoints_action.error.message=Exceptions occurred removing breakpoints
-remove_all_breakpoints_action.status=Breakpoint(s) removal failed
-
-remove_all_from_inspector_action.text=Remove &All
-remove_all_from_inspector_action.toolTipText=Remove All Variables from Inspector
-
-remove_all_terminated_action.text=Remove &All Terminated
-remove_all_terminated_action.toolTipText=Remove All Terminated Launches
-
-remove_breakpoint_action.text=&Remove
-remove_breakpoint_action.toolTipText=Remove Selected Breakpoints
-remove_breakpoint_action.error.title=Removing a breakpoint
-remove_breakpoint_action.error.message=Exceptions occurred attempting to remove a breakpoint
-remove_breakpoint_action.status=Breakpoint(s) removal failed
-
-remove_from_inspector_action.text=&Remove
-remove_from_inspector_action.toolTipText=Remove Selected Variables from Inspector
-
-resume_action.text=&Resume
-resume_action.toolTipText=Resume
-resume_action.status=Resume failed
-resume_action.error.title=Resume
-resume_action.error.message=Exceptions occurred attempting to resume
-
-run_action.text=R&un@Alt+F9
-run_action.toolTipText=Run
-
-select_all_action.label=Select &All@Ctrl+A
-select_all_action.tooltip=Select All
-select_all_action.description=Select All
-
-show_qualified_action.toolTipText.show=Show &Qualified Names
-show_qualified_action.toolTipText.hide=Hide &Qualified Names
-
-show_types_action.toolTipText.show=Show &Type Names
-show_types_action.toolTipText.hide=Hide &Type Names
-
-step_into_action.text=Step &Into
-step_into_action.toolTipText=Step Into
-step_into_action.status=Step into failed
-step_into_action.error.title=Step Into
-step_into_action.error.message=Exceptions occurred attempting to step into the frame
-
-step_over_action.text=Step O&ver
-step_over_action.toolTipText=Step Over
-step_over_action.status=Step over failed
-step_over_action.error.title=Stop over
-step_over_action.error.message=Exceptions occurred attempting to step over the frame
-
-step_return_action.text=R&un to return
-step_return_action.toolTipText=Run to Return
-step_return_action.status=Run to return failed
-step_return_action.error.title=Run to return
-step_return_action.error.message=Exceptions occurred attempting to run to return of the frame
-
-suspend_action.text=&Suspend
-suspend_action.toolTipText=Suspend
-suspend_action.status=Suspend failed
-suspend_action.error.title=Suspend
-suspend_action.error.message=Exceptions occurred attempting to suspend
-
-terminate_action.text=&Terminate
-terminate_action.toolTipText=Terminate
-terminate_action.status=Terminate failed.
-terminate_action.error.title=Terminate
-terminate_action.error.message=Exceptions occurred attempting to terminate
-
-terminate_all_action.text=Termi&nate All
-terminate_all_action.toolTipText=Terminate All
-terminate_all_action.error.title=Terminate all
-terminate_all_action.error.message=Exceptions occurred attempting to terminate all
-terminate_all_action.status=Terminate all failed
-
-terminate_and_remove_action.text=Ter&minate and Remove
-terminate_and_remove_action.toolTipText=Terminate and Remove
-terminate_and_remove_action.error.title=Terminate and remove
-terminate_and_remove_action.error.message=Exceptions occurred attempting to terminate and remove
-terminate_and_remove_action.status=Terminate and remove failed
-
-##############################################################
-# Label provider
-##############################################################
-label_provider.terminated=<terminated>
-label_provider.unknown=<unknown>
-
-##############################################################
-# Breakpoint Labels
-##############################################################
-breakpoint_label.line_number=Line:
-breakpoint_label.unknown_line_number=<unknown>
-breakpoint_label.unknown_resource=ERROR
-breakpoint_label.expired=<expired>
-breakpoint_label.hit_count=<Hit Count: {0}>
-
-##############################################################
-# Delegating Model Presentation Labels
-##############################################################
-presentation.breakpoint_label=Breakpoint
-
-##############################################################
-# Debug views title tool tips
-##############################################################
-debug_view.title_toolTipText=Debug Sessions and Associated Program Stacks
-launches_view.title_toolTipText=System Processes
-variables_view.title_toolTipText=Variables and their Values for a Selected Stack Frame
-breakpoints_view.title_toolTipText= Breakpoints in the Workbench
-inspector_view.title_toolTipText=Evaluated Expression
-console_view.title_toolTipText=Program Output \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIUtils.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIUtils.java
deleted file mode 100644
index d6afb91f1..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIUtils.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Shell;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * This class serves as a location for utility methods for the debug UI.
- */
-public class DebugUIUtils {
-
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Utility method with conventions
- */
- public static void errorDialog(Shell shell, String resourcePrefix, IStatus s) {
- String message= getResourceString(resourcePrefix + "message");
- // if the 'message' resource string and the IStatus' message are the same,
- // don't show both in the dialog
- if (s != null && message.equals(s.getMessage())) {
- message= null;
- }
- String title= getResourceString(resourcePrefix + "title");
- ErrorDialog.openError(shell, title, message, s);
- }
-
- /**
- * Utility method
- */
- public static String getResourceString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle= getResourceBundle();
- }
- if (fgResourceBundle != null) {
- return fgResourceBundle.getString(key);
- } else {
- return "!" + key + "!";
- }
- }
-
- /**
- * Returns the resource bundle used by all parts of the debug ui package.
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("org.eclipse.debug.internal.ui.DebugUIResources");
- } catch (MissingResourceException e) {
- MessageDialog.openError(DebugUIPlugin.getActiveWorkbenchWindow().getShell(), "Error", e.toString());
- }
- return null;
- }
-
- /**
- * Convenience method to log internal UI errors
- */
- public static void logError(Exception e) {
- if (DebugUIPlugin.getDefault().isDebugging()) {
- // this message is intentionally not internationalized, as an exception may
- // be due to the resource bundle itself
- System.out.println("Internal error logged from UI: ");
- e.printStackTrace();
- System.out.println();
- }
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugView.java
deleted file mode 100644
index 9035b425e..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugView.java
+++ /dev/null
@@ -1,532 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.*; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.model.*; import org.eclipse.debug.ui.IDebugModelPresentation; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.jface.action.*; import org.eclipse.jface.text.ITextSelection; import org.eclipse.jface.viewers.*; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.*; import org.eclipse.ui.help.ViewContextComputer; import org.eclipse.ui.help.WorkbenchHelp; import org.eclipse.ui.texteditor.ITextEditor;
-
-public class DebugView extends LaunchesView implements IPartListener {
-
- protected final static String PREFIX= "debug_view.";
-
- protected ControlAction fResumeAction;
- protected ControlAction fSuspendAction;
- protected ControlAction fStepIntoAction;
- protected ControlAction fStepOverAction;
- protected ControlAction fStepReturnAction;
- protected ControlAction fCopyToClipboardAction;
-
- protected ShowQualifiedAction fShowQualifiedAction;
-
- /**
- * A marker for the source selection and icon for an
- * instruction pointer. This marker is transient.
- */
- private IMarker fInstructionPointer;
- private boolean fShowingMarker = false;
-
- // marker attributes
- private final static String[] fgStartEnd =
- new String[] {IMarker.CHAR_START, IMarker.CHAR_END};
-
- private final static String[] fgLineStartEnd =
- new String[] {IMarker.LINE_NUMBER, IMarker.CHAR_START, IMarker.CHAR_END};
-
- /**
- * The editor associated with this debug view,
- * or <code>null</code> if none.
- */
- private IEditorPart fEditor;
- private Integer fEditorMemento;
- private static final String DEBUG_EDITOR= DebugUIPlugin.getDefault().getDescriptor().getUniqueIdentifier() + ".DEBUG_EDITOR";
-
-
- /**
- * Creates a debug view and an instruction pointer marker for the view
- */
- public DebugView() {
- try {
- fInstructionPointer = ResourcesPlugin.getWorkspace().getRoot().createMarker(IInternalDebugUIConstants.INSTRUCTION_POINTER);
- } catch (CoreException e) {
- DebugUIUtils.logError(e);
- }
- }
-
- /**
- * @see IViewPart
- */
- public void init(IViewSite site) throws PartInitException {
- super.init(site);
- getSite().getPage().addPartListener(this);
- }
-
- public void createPartControl(Composite parent) {
- super.createPartControl(parent);
- WorkbenchHelp.setHelp(
- parent,
- new ViewContextComputer(this, IDebugHelpContextIds.DEBUG_VIEW ));
- }
-
- /**
- * @see IWorkbenchPart
- */
- public void dispose() {
- super.dispose();
- getSite().getPage().removePartListener(this);
- fEditor = null;
- }
-
- /**
- * Returns the configured instruction pointer.
- * Selection is based on the line number OR char start and char end.
- */
- protected IMarker getInstructionPointer(final int lineNumber, final int charStart, final int charEnd, final boolean isTopStackFrame) {
-
- IWorkspace workspace= ResourcesPlugin.getWorkspace();
- IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- if (lineNumber == -1) {
- fInstructionPointer.setAttributes(fgStartEnd,
- new Object[] {new Integer(charStart), new Integer(charEnd)});
- } else {
- fInstructionPointer.setAttributes(fgLineStartEnd,
- new Object[] {new Integer(lineNumber), new Integer(charStart), new Integer(charEnd)});
- }
- }
- };
-
- try {
- workspace.run(runnable, null);
- } catch (CoreException ce) {
- DebugUIUtils.logError(ce);
- }
-
- return fInstructionPointer;
- }
-
- /**
- * Initializes the actions of this view.
- */
- protected void initializeActions(LaunchesViewer viewer) {
- super.initializeActions(viewer);
-
- fResumeAction= new ControlAction(viewer, new ResumeActionDelegate());
- viewer.addSelectionChangedListener(fResumeAction);
- fResumeAction.setEnabled(false);
-
- fSuspendAction= new ControlAction(viewer, new SuspendActionDelegate());
- viewer.addSelectionChangedListener(fSuspendAction);
- fSuspendAction.setEnabled(false);
-
- fStepIntoAction= new ControlAction(viewer, new StepIntoActionDelegate());
- viewer.addSelectionChangedListener(fStepIntoAction);
- fStepIntoAction.setEnabled(false);
-
- fStepOverAction= new ControlAction(viewer, new StepOverActionDelegate());
- viewer.addSelectionChangedListener(fStepOverAction);
- fStepOverAction.setEnabled(false);
-
- fStepReturnAction= new ControlAction(viewer, new StepReturnActionDelegate());
- viewer.addSelectionChangedListener(fStepReturnAction);
- fStepReturnAction.setEnabled(false);
-
- fCopyToClipboardAction= new ControlAction(viewer, new CopyToClipboardActionDelegate());
-
- fShowQualifiedAction= new ShowQualifiedAction(viewer);
- fShowQualifiedAction.setChecked(false);
- }
-
- /**
- * Configures the toolBar
- */
- protected void configureToolBar(IToolBarManager tbm) {
- tbm.add(fResumeAction);
- tbm.add(fSuspendAction);
- tbm.add(fTerminateAction);
- tbm.add(fDisconnectAction);
- tbm.add(fRemoveTerminatedAction);
- tbm.add(new Separator("#StepGroup"));
- tbm.add(fStepIntoAction);
- tbm.add(fStepOverAction);
- tbm.add(fStepReturnAction);
- tbm.add(new Separator("#RenderGroup"));
- tbm.add(fShowQualifiedAction);
- }
-
- /**
- * The selection has changed in the viewer. Show the
- * associated source code if it is a stack frame.
- */
- public void selectionChanged(SelectionChangedEvent event) {
- super.selectionChanged(event);
- showMarkerForCurrentSelection();
- }
-
- /**
- * Opens a marker for the current selection if it is a stack frame.
- * If the current selection is a thread, deselection occurs.
- * Otherwise, nothing will happen.
- */
- protected void showMarkerForCurrentSelection() {
- if (!fShowingMarker) {
- try {
- fShowingMarker = true;
- ISelection selection= fViewer.getSelection();
- Object obj= null;
- if (selection instanceof IStructuredSelection) {
- obj= ((IStructuredSelection) selection).getFirstElement();
- }
- if (obj == null || !(obj instanceof IDebugElement)) {
- return;
- }
-
- IDebugElement debugElement= (IDebugElement) obj;
- if (debugElement.getElementType() != IDebugElement.STACK_FRAME) {
- return;
- }
-
- IStackFrame stackFrame= (IStackFrame) debugElement;
-
- // Get the corresponding element.
- ISourceLocator locator= stackFrame.getSourceLocator();
- if (locator == null) {
- return;
- }
- Object sourceElement = locator.getSourceElement(stackFrame);
- if (sourceElement == null) {
- return;
- }
-
- // translate to an editor input using the model presentation
- IDebugModelPresentation presentation = getPresentation(stackFrame.getModelIdentifier());
- IEditorInput editorInput = null;
- String editorId= null;
- if (presentation != null) {
- editorInput= presentation.getEditorInput(sourceElement);
- editorId= presentation.getEditorId(editorInput, sourceElement);
- }
-
- if (editorInput != null) {
- boolean isTopStackFrame= false;
- int lineNumber= 0;
- try {
- isTopStackFrame= stackFrame.getThread().getTopStackFrame() == stackFrame;
- } catch (DebugException de) {
- }
- try {
- lineNumber= stackFrame.getLineNumber();
- } catch (DebugException de) {
- }
- openEditorAndSetMarker(editorInput, editorId, lineNumber, -1, -1, isTopStackFrame);
- }
- } finally {
- fShowingMarker= false;
- }
- }
- }
-
- /**
- * Get the active window and open/bring to the front an editor on the source element.
- * Selection is based on the line number OR the char start and end.
- */
- protected void openEditorAndSetMarker(IEditorInput input, String editorId, int lineNumber, int charStart, int charEnd, boolean isTopStackFrame) {
- IWorkbenchWindow dwindow= getSite().getWorkbenchWindow();
- if (dwindow == null) {
- return;
- }
-
-
- IWorkbenchPage page= dwindow.getActivePage();
- if (page == null) {
- return;
- }
- IEditorPart editor= null;
- IEditorPart[] editorParts= page.getEditors();
-
-
- // restore editor on startup
- if (fEditorMemento != null) {
- if (editorParts.length > fEditorMemento.intValue())
- fEditor = editorParts[fEditorMemento.intValue()];
- fEditorMemento = null;
- }
-
-
- for (int i= 0; i < editorParts.length; i++) {
- IEditorPart part= editorParts[i];
- if (input.equals(part.getEditorInput())) {
- editor= part;
- break;
- }
- }
-
- if (editor == null) {
- if (fEditor != null) {
- if (!fEditor.isDirty()) {
- page.closeEditor(fEditor, false);
- }
- }
- try {
- editor= page.openEditor(input, editorId);
- fEditor = editor;
- page.activate(this);
- } catch (PartInitException e) {
- DebugUIUtils.logError(e);
- }
-
- } else {
- page.bringToTop(editor);
- }
-
- if (editor != null && (lineNumber >= 0 || charStart >= 0)) {
- //have an editor and either a lineNumber or a starting character
- IMarker marker= getInstructionPointer(lineNumber, charStart, charEnd, isTopStackFrame);
- editor.gotoMarker(marker);
- }
- }
-
- /**
- * Deselect any source in the active editor that was 'programmatically' selected by
- * the debugger.
- */
- public void clearSourceSelection() {
- // Get the active editor
- IEditorPart editor= getSite().getPage().getActiveEditor();
- if ((editor == null) || !(editor instanceof ITextEditor)) {
- return;
- }
- ITextEditor textEditor= (ITextEditor)editor;
-
- // Get the current text selection in the editor. If there is none,
- // then there's nothing to do
- ITextSelection textSelection= (ITextSelection)textEditor.getSelectionProvider().getSelection();
- if (textSelection.isEmpty()) {
- return;
- }
- int startChar= textSelection.getOffset();
- int endChar= startChar + textSelection.getLength() - 1;
- int startLine= textSelection.getStartLine();
-
- // Check to see if the current selection looks the same as the last 'programmatic'
- // selection in fSourceLocationMarker. If not, it must be a user selection, which
- // we leave alone. In practice, we can leave alone any user selections on other lines,
- // but if the user makes a selection on the same line as the last programmatic selection,
- // it will get cleared.
- int lastCharStart= fInstructionPointer.getAttribute(IMarker.CHAR_START, -1);
- int lastCharEnd= fInstructionPointer.getAttribute(IMarker.CHAR_END, -1);;
- if (lastCharStart == -1) {
- // subtract 1 since editor is 0-based
- if (fInstructionPointer.getAttribute(IMarker.LINE_NUMBER, -1) - 1 != startLine) {
- return;
- }
- } else if ((lastCharStart != startChar) ||
- (lastCharEnd != endChar)) {
- return;
- }
-
- ITextSelection nullSelection= getNullSelection(startLine, startChar);
- textEditor.getSelectionProvider().setSelection(nullSelection);
- }
-
- /**
- * Creates and returns an ITextSelection that is a zero-length selection located at the
- * start line and start char.
- */
- protected ITextSelection getNullSelection(final int startLine, final int startChar) {
- return new ITextSelection() {
- public int getStartLine() {
- return startLine;
- }
- public int getEndLine() {
- return startLine;
- }
- public int getOffset() {
- return startChar;
- }
- public String getText() {
- return "";
- }
- public int getLength() {
- return 0;
- }
- public boolean isEmpty() {
- return true;
- }
- };
- }
- /**
- * Updates the enablement of the buttons/actions in the view
- */
- protected void updateButtons() {
- ISelection s= fViewer.getSelection();
- if (s instanceof IStructuredSelection) {
- IStructuredSelection selection= (IStructuredSelection) s;
- fTerminateAction.selectionChanged(selection);
- fDisconnectAction.selectionChanged(selection);
- fSuspendAction.selectionChanged(selection);
- fResumeAction.selectionChanged(selection);
- fStepIntoAction.selectionChanged(selection);
- fStepOverAction.selectionChanged(selection);
- fStepReturnAction.selectionChanged(selection);
- }
- fRemoveTerminatedAction.update();
- fTerminateAllAction.update();
- }
-
- /**
- * Adds items to the context menu.
- */
- protected void fillContextMenu(IMenuManager menu) {
- fRemoveTerminatedAction.update();
- fTerminateAllAction.update();
-
- menu.add(new Separator(IDebugUIConstants.EMPTY_EDIT_GROUP));
- menu.add(new Separator(IDebugUIConstants.EDIT_GROUP));
- menu.add(fCopyToClipboardAction);
- menu.add(new Separator(IDebugUIConstants.EMPTY_STEP_GROUP));
- menu.add(new Separator(IDebugUIConstants.STEP_GROUP));
- menu.add(fStepIntoAction);
- menu.add(fStepOverAction);
- menu.add(fStepReturnAction);
- menu.add(new Separator(IDebugUIConstants.EMPTY_THREAD_GROUP));
- menu.add(new Separator(IDebugUIConstants.THREAD_GROUP));
- menu.add(fResumeAction);
- menu.add(fSuspendAction);
- menu.add(fTerminateAction);
- menu.add(fDisconnectAction);
- menu.add(new Separator(IDebugUIConstants.EMPTY_LAUNCH_GROUP));
- menu.add(new Separator(IDebugUIConstants.LAUNCH_GROUP));
- menu.add(fTerminateAndRemoveAction);
- menu.add(fTerminateAllAction);
- menu.add(fRemoveTerminatedAction);
- menu.add(fRelaunchAction);
- menu.add(new Separator(IDebugUIConstants.EMPTY_RENDER_GROUP));
- menu.add(new Separator(IDebugUIConstants.RENDER_GROUP));
- menu.add(fShowQualifiedAction);
- menu.add(new Separator(IDebugUIConstants.PROPERTY_GROUP));
- fPropertyDialogAction.setEnabled(fPropertyDialogAction.isApplicableForSelection());
- menu.add(fPropertyDialogAction);
- menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
-
- /**
- * Returns the content provider to use for this viewer
- * of this view.
- */
- protected DebugContentProvider getContentProvider() {
- return new DebugContentProvider();
- }
-
- /**
- * Auto-expand and select the given element - must be called in UI thread.
- * This is used to implement auto-expansion-and-select on a SUSPEND event.
- */
- public void autoExpand(Object element, boolean refreshNeeded) {
- Object selectee = element;
- Object[] children= null;
- if (element instanceof IThread) {
- // try the top stack frame
- try {
- selectee = ((IThread)element).getTopStackFrame();
- } catch (DebugException de) {
- }
- if (selectee == null) {
- selectee = element;
- }
- } else if (element instanceof ILaunch) {
- IDebugTarget dt = ((ILaunch)element).getDebugTarget();
- if (dt != null) {
- selectee= dt;
- try {
- children= dt.getChildren();
- } catch (DebugException de) {
- DebugUIUtils.logError(de);
- }
- }
- }
-
- if (refreshNeeded) {
- //ensures that the child item exists in the viewer widget
- //set selection only works if the child exists
- fViewer.refresh(element);
- }
- fViewer.setSelection(new StructuredSelection(selectee), true);
- if (children != null && children.length > 0) {
- //reveal the thread children of a debug target
- fViewer.reveal(children[0]);
- }
- }
-
- /**
- * Returns the resource bundle prefix for this action
- */
- protected String getPrefix(){
- return PREFIX;
- }
-
- /**
- * @see IPartListener#partClosed(org.eclipse.ui.IWorkbenchPart)
- */
- public void partClosed(IWorkbenchPart part) {
- if (part.equals(fEditor)) {
- fEditor = null;
- }
- }
-
- /**
- * @see IPartListener#partOpened(org.eclipse.ui.IWorkbenchPart)
- */
- public void partOpened(IWorkbenchPart part) {
- }
-
- /**
- * @see IPartListener#partDeactivated(org.eclipse.ui.IWorkbenchPart)
- */
- public void partDeactivated(IWorkbenchPart part) {
- }
-
- /**
- * @see IPartListener#partBroughtToTop(org.eclipse.ui.IWorkbenchPart)
- */
- public void partBroughtToTop(IWorkbenchPart part) {
- }
-
- /**
- * @see IPartListener#partActivated(org.eclipse.ui.IWorkbenchPart)
- */
- public void partActivated(IWorkbenchPart part) {
- if (part == this) {
- showMarkerForCurrentSelection();
- }
- }
-
- /**
- * @see IViewPart
- */
- public void init(IViewSite site, IMemento memento) throws PartInitException {
- super.init(site,memento);
- if (memento != null) {
- fEditorMemento = memento.getInteger(DEBUG_EDITOR);
- }
- }
-
- /**
- * @see IViewPart
- */
- public void saveState(IMemento memento) {
- if (fEditor != null) {
- IWorkbenchPage page = getSite().getPage();
- if (page != null) {
- IEditorPart[] editors = page.getEditors();
- for (int i = 0; i < editors.length; i++) {
- if (fEditor.equals(editors[i])) {
- memento.putInteger(DEBUG_EDITOR, i);
- break;
- }
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java
deleted file mode 100644
index 4f2091fe8..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java
+++ /dev/null
@@ -1,486 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.*;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * A model presentation that delegates to the appropriate extension. This
- * presentation contains a table of specialized presentations that are defined
- * as <code>org.eclipse.debug.ui.debugModelPresentations</code> extensions. When
- * asked to render an object from a debug model, this presentation delegates
- * to the extension registered for that debug model.
- */
-public class DelegatingModelPresentation implements IDebugModelPresentation {
-
- private final static String TOP_PREFIX= "presentation.";
- private final static String BREAKPOINT_LABEL= TOP_PREFIX + "breakpoint_label";
-
- /**
- * A mapping of attribute ids to their values
- * @see IDebugModelPresentation#setAttribute
- */
- protected HashMap fAttributes= new HashMap(3);
- /**
- * A table of label providers keyed by debug model identifiers.
- */
- protected HashMap fLabelProviders= new HashMap(5);
-
- // Resource String keys
- private static final String PREFIX= "label_provider.";
- private static final String TERMINATED= PREFIX + "terminated";
- private static final String UNKNOWN= PREFIX + "unknown";
-
- /**
- * Constructs a new DelegatingLabelProvider that delegates to extensions
- * of kind <code>org.eclipse.debug.ui.debugLabelProvider</code>
- */
- public DelegatingModelPresentation() {
- IPluginDescriptor descriptor= DebugUIPlugin.getDefault().getDescriptor();
- IExtensionPoint point= descriptor.getExtensionPoint(IDebugUIConstants.ID_DEBUG_MODEL_PRESENTATION);
- if (point != null) {
- IExtension[] extensions= point.getExtensions();
- for (int i= 0; i < extensions.length; i++) {
- IExtension extension= extensions[i];
- IConfigurationElement[] configElements= extension.getConfigurationElements();
- for (int j= 0; j < configElements.length; j++) {
- IConfigurationElement elt= configElements[j];
- String id= elt.getAttribute("id");
- if (id != null) {
- IDebugModelPresentation lp= new LazyModelPresentation(elt);
- fLabelProviders.put(id, lp);
- }
- }
- }
- }
- }
-
- /**
- * Delegate to all extensions.
- *
- * @see ILabelProvider
- */
- public void addListener(ILabelProviderListener listener) {
- Iterator i= fLabelProviders.values().iterator();
- while (i.hasNext()) {
- ((ILabelProvider) i.next()).addListener(listener);
- }
- }
-
- /**
- * Delegate to all extensions.
- *
- * @see ILabelProvider
- */
- public void dispose() {
- Iterator i= fLabelProviders.values().iterator();
- while (i.hasNext()) {
- ((ILabelProvider) i.next()).dispose();
- }
- }
-
- /**
- * Returns an image for the item
- * Can return <code>null</code>
- */
- public Image getImage(Object item) {
- if (item instanceof IDebugElement || item instanceof IMarker || item instanceof IBreakpoint) {
- IDebugModelPresentation lp= getConfiguredPresentation(item);
- if (lp != null) {
- Image image= lp.getImage(item);
- if (image != null) {
- return image;
- }
- }
- // default to show the simple element name
- return getDefaultImage(item);
- } else {
- ImageRegistry iRegistry= DebugUIPlugin.getDefault().getImageRegistry();
- if (item instanceof IProcess) {
- if (((IProcess) item).isTerminated()) {
- return iRegistry.get(IDebugUIConstants.IMG_OBJS_OS_PROCESS_TERMINATED);
- } else {
- return iRegistry.get(IDebugUIConstants.IMG_OBJS_OS_PROCESS);
- }
- } else
- if (item instanceof ILauncher) {
- return getLauncherImage((ILauncher)item);
- } else
- if (item instanceof ILaunch) {
- ILaunch launch = (ILaunch) item;
- String mode= launch.getLaunchMode();
- if (mode.equals(ILaunchManager.DEBUG_MODE)) {
- return iRegistry.get(IDebugUIConstants.IMG_ACT_DEBUG);
- } else {
- return iRegistry.get(IDebugUIConstants.IMG_ACT_RUN);
- }
- } else
- if (item instanceof InspectItem) {
- return iRegistry.get(IDebugUIConstants.IMG_OBJS_EXPRESSION);
- } else
- if (item instanceof IAdaptable) {
- IWorkbenchAdapter de= (IWorkbenchAdapter) ((IAdaptable) item).getAdapter(IWorkbenchAdapter.class);
- if (de != null) {
- ImageDescriptor descriptor= de.getImageDescriptor(item);
- if( descriptor != null) {
- return descriptor.createImage();
- }
- }
- }
-
- return null;
-
- }
- }
-
- protected Image getLauncherImage(ILauncher launcher) {
- String iconPath = launcher.getIconPath();
- if (iconPath != null) {
- // return custom image
- ImageRegistry registry = DebugPluginImages.getImageRegistry();
- Image image = registry.get(launcher.getIdentifier());
- if (image == null) {
- URL iconURL = launcher.getConfigurationElement().getDeclaringExtension().getDeclaringPluginDescriptor().getInstallURL();
- ImageDescriptor desc = ImageDescriptor.getMissingImageDescriptor();
- try {
- iconURL = new URL(iconURL, iconPath);
- desc= ImageDescriptor.createFromURL(iconURL);
- } catch (MalformedURLException e) {
- }
- DebugPluginImages.getImageRegistry().put(launcher.getIdentifier(), desc);
- return registry.get(launcher.getIdentifier());
- } else {
- return image;
- }
- }
- return null;
- }
-
- /**
- * @see IDebugModelPresentation
- */
- public IEditorInput getEditorInput(Object item) {
- IDebugModelPresentation lp= getConfiguredPresentation(item);
- if (lp != null) {
- return lp.getEditorInput(item);
- }
- return null;
- }
-
- /**
- * @see IDebugModelPresentation
- */
- public String getEditorId(IEditorInput input, Object objectInput) {
- IDebugModelPresentation lp= getConfiguredPresentation(objectInput);
- if (lp != null) {
- return lp.getEditorId(input, objectInput);
- }
- return null;
- }
-
-
- /**
- * Returns a default image for the debug element
- */
- public String getDefaultText(Object element) {
- if (element instanceof IDebugElement) {
- try {
- return ((IDebugElement) element).getName();
- } catch (DebugException de) {
- }
- } else
- if (element instanceof IMarker) {
- IMarker m= (IMarker) element;
- try {
- if (m.exists() && m.isSubtypeOf(IDebugConstants.BREAKPOINT_MARKER)) {
- return DebugUIUtils.getResourceString(BREAKPOINT_LABEL);
- }
- } catch (CoreException e) {
- }
- }
- return DebugUIUtils.getResourceString(UNKNOWN);
- }
-
- /**
- * Returns a default image for the debug element
- */
- public Image getDefaultImage(Object element) {
- ImageRegistry iRegistry= DebugUIPlugin.getDefault().getImageRegistry();
- if (element instanceof IThread) {
- IThread thread = (IThread)element;
- if (thread.isSuspended()) {
- return iRegistry.get(IDebugUIConstants.IMG_OBJS_THREAD_SUSPENDED);
- } else if (thread.isTerminated()) {
- return iRegistry.get(IDebugUIConstants.IMG_OBJS_THREAD_TERMINATED);
- } else {
- return iRegistry.get(IDebugUIConstants.IMG_OBJS_THREAD_RUNNING);
- }
- } else
- if (element instanceof IStackFrame) {
- return iRegistry.get(IDebugUIConstants.IMG_OBJS_STACKFRAME);
- } else
- if (element instanceof IProcess) {
- if (((IProcess) element).isTerminated()) {
- return iRegistry.get(IDebugUIConstants.IMG_OBJS_OS_PROCESS_TERMINATED);
- } else {
- return iRegistry.get(IDebugUIConstants.IMG_OBJS_OS_PROCESS);
- }
- } else
- if (element instanceof IDebugTarget) {
- IDebugTarget target= (IDebugTarget) element;
- if (target.isTerminated() || target.isDisconnected()) {
- return iRegistry.get(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET_TERMINATED);
- } else {
- return iRegistry.get(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET);
- }
- } else
- if (element instanceof IMarker) {
- try {
- IMarker marker= (IMarker) element;
- IBreakpoint breakpoint= DebugPlugin.getDefault().getBreakpointManager().getBreakpoint(marker);
- if (breakpoint != null && marker.exists()) {
- if (breakpoint.isEnabled()) {
- return DebugPluginImages.getImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT);
- } else {
- return DebugPluginImages.getImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT_DISABLED);
- }
- }
- } catch (CoreException e) {
- DebugUIUtils.logError(e);
- }
- }
- return null;
- }
-
- /**
- * Returns a label for the item
- */
- public String getText(Object item) {
- boolean displayVariableTypes= showVariableTypeNames();
- boolean displayQualifiedNames= showQualifiedNames();
- if (item instanceof InspectItem) {
- return getInspectItemText((InspectItem)item);
- } else if (item instanceof IDebugElement || item instanceof IMarker || item instanceof IBreakpoint) {
- IDebugModelPresentation lp= getConfiguredPresentation(item);
- if (lp != null) {
- String label= lp.getText(item);
- if (label != null) {
- return label;
- }
- }
- if (item instanceof IVariable) {
- IVariable var= (IVariable) item;
- StringBuffer buf= new StringBuffer();
- try {
- IValue value = var.getValue();
-
- if (displayVariableTypes) {
- buf.append(value.getReferenceTypeName());
- buf.append(' ');
- }
- buf.append(var.getName());
- buf.append(" = ");
- buf.append(value.getValueString());
- return buf.toString();
- } catch (DebugException de) {
- }
- }
- // default to show the simple element name
- return getDefaultText(item);
- } else {
-
- String label= null;
- if (item instanceof IProcess) {
- label= ((IProcess) item).getLabel();
- } else
- if (item instanceof ILauncher) {
- label = ((ILauncher)item).getLabel();
- } else
- if (item instanceof ILaunch) {
- label= getLaunchText((ILaunch) item);
- } else if (item instanceof InspectItem) {
- try {
- InspectItem var= (InspectItem) item;
- StringBuffer buf= new StringBuffer();
- buf.append(var.getLabel());
- buf.append(" = ");
- IValue value = var.getValue();
- if (displayVariableTypes) {
- buf.append(value.getReferenceTypeName());
- buf.append(' ');
- }
- buf.append(value.getValueString());
- return buf.toString();
- } catch (DebugException de) {
- return getDefaultText(item);
- }
- } else {
- label= getDesktopLabel(item);
- }
-
- if ((item instanceof ITerminate) && ((ITerminate) item).isTerminated()) {
- label= DebugUIUtils.getResourceString(TERMINATED) + label;
- }
- return label;
- }
- }
-
- /**
- * InspectItems have their left halves rendered here, and their
- * right halves rendered by the registered model presentation.
- */
- protected String getInspectItemText(InspectItem inspectItem) {
- StringBuffer buffer= new StringBuffer(inspectItem.getLabel());
- String valueString= null;
- IDebugModelPresentation lp= getConfiguredPresentation(inspectItem);
- IValue value= inspectItem.getValue();
- if (lp != null) {
- valueString= lp.getText(value);
- }
- if ((valueString == null) || (valueString.length() < 1)) {
- try {
- valueString= value.getValueString();
- } catch (DebugException de) {
- }
- }
- if (valueString != null && valueString.length() > 0) {
- buffer.append("= ");
- buffer.append(valueString);
- }
- return buffer.toString();
- }
-
- /**
- * Delegate to all extensions.
- *
- * @see ILabelProvider
- */
- public void removeListener(ILabelProviderListener listener) {
- Iterator i= fLabelProviders.values().iterator();
- while (i.hasNext()) {
- ((ILabelProvider) i.next()).removeListener(listener);
- }
- }
-
- public String getDesktopLabel(Object object) {
- if (object instanceof IAdaptable) {
- IWorkbenchAdapter de= (IWorkbenchAdapter) ((IAdaptable) object).getAdapter(IWorkbenchAdapter.class);
- if (de != null) {
- return de.getLabel(object);
- }
- }
-
- return DebugUIUtils.getResourceString(UNKNOWN);
- }
-
- /**
- * Delegate to the appropriate label provider.
- *
- * @see ILabelProvider
- */
- public boolean isLabelProperty(Object element, String property) {
- if (element instanceof IDebugElement) {
- IDebugModelPresentation lp= getConfiguredPresentation((IDebugElement) element);
- if (lp != null) {
- return lp.isLabelProperty(element, property);
- }
- }
-
- return true;
- }
-
- /**
- * Returns a configured model presentation for the given object,
- * or <code>null</code> if one is not registered.
- */
- protected IDebugModelPresentation getConfiguredPresentation(Object element) {
- String id= null;
- if (element instanceof IDebugElement) {
- IDebugElement de= (IDebugElement) element;
- id= de.getModelIdentifier();
- } else if (element instanceof InspectItem) {
- IValue value= ((InspectItem)element).getValue();
- id= value.getModelIdentifier();
- } else if (element instanceof IMarker) {
- IMarker m= (IMarker) element;
- IBreakpoint bp = DebugPlugin.getDefault().getBreakpointManager().getBreakpoint(m);
- if (bp != null) {
- id= bp.getModelIdentifier();
- }
- } else if (element instanceof IBreakpoint) {
- id = ((IBreakpoint)element).getModelIdentifier();
- }
- if (id != null) {
- return getPresentation(id);
- }
-
- return null;
- }
-
- /**
- * Returns the presentation registered for the given id, or <code>null</code>
- * of nothing is registered for the id.
- */
- protected IDebugModelPresentation getPresentation(String id) {
- IDebugModelPresentation lp= (IDebugModelPresentation) fLabelProviders.get(id);
- if (lp != null) {
- Iterator keys= fAttributes.keySet().iterator();
- while (keys.hasNext()) {
- String key= (String)keys.next();
- lp.setAttribute(key, fAttributes.get(key));
- }
- return lp;
- }
- return null;
- }
-
- /**
- * Used to render launch history items in the re-launch drop downs
- */
- protected String getLaunchText(ILaunch launch) {
- return getDesktopLabel(launch.getElement()) + " [" + getText(launch.getLauncher()) + "]";
- }
-
- /**
- * @see IDebugModelPresentation
- */
- public void setAttribute(String id, Object value) {
- if (value == null) {
- return;
- }
- fAttributes.put(id, value);
- }
-
- protected boolean showVariableTypeNames() {
- Boolean show= (Boolean) fAttributes.get(DISPLAY_VARIABLE_TYPE_NAMES);
- show= show == null ? new Boolean(false) : show;
- return show.booleanValue();
- }
-
- protected boolean showQualifiedNames() {
- Boolean show= (Boolean) fAttributes.get(DISPLAY_QUALIFIED_NAMES);
- show= show == null ? new Boolean(false) : show;
- return show.booleanValue();
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DisconnectActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DisconnectActionDelegate.java
deleted file mode 100644
index 4d81f90c3..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DisconnectActionDelegate.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IDisconnect;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.IAction;
-
-public class DisconnectActionDelegate extends ControlActionDelegate {
-
- private static final String PREFIX= "disconnect_action.";
-
- /**
- * @see ControlActionDelegate
- */
- protected void doAction(Object element) throws DebugException {
- if (element instanceof IDisconnect)
- ((IDisconnect) element).disconnect();
- }
-
- /**
- * @see ControlActionDelegate
- */
- public boolean isEnabledFor(Object element) {
- return element instanceof IDisconnect && ((IDisconnect) element).canDisconnect();
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected String getPrefix() {
- return PREFIX;
- }
-
- protected String getHelpContextId() {
- return IDebugHelpContextIds.DISCONNECT_ACTION;
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected void setActionImages(IAction action) {
- action.setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_DISCONNECT));
- action.setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_DISCONNECT));
- action.setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DISCONNECT));
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/EnableDisableBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/EnableDisableBreakpointAction.java
deleted file mode 100644
index 071e01bc0..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/EnableDisableBreakpointAction.java
+++ /dev/null
@@ -1,134 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.actions.SelectionProviderAction;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Enables or disables a breakpoint
- */
-public class EnableDisableBreakpointAction extends SelectionProviderAction implements IBreakpointListener {
-
- private final static String PREFIX= "enable_disable_breakpoint_action.";
- private final static String ENABLE= PREFIX + TEXT + ".enable";
- private final static String DISABLE= PREFIX + TEXT + ".disable";
- private final static String ERROR= PREFIX + "error.";
- private final static String STATUS= PREFIX + "status.message";
- /**
- * Creates the action to enable/disable breakpoints
- */
- public EnableDisableBreakpointAction(ISelectionProvider selectionProvider) {
- super(selectionProvider, DebugUIUtils.getResourceString(PREFIX + TEXT));
- setEnabled(!getStructuredSelection().isEmpty());
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.ENABLE_DISABLE_BREAKPOINT_ACTION });
- }
-
- /**
- * @see Action
- */
- public void run() {
- IStructuredSelection selection= (IStructuredSelection) getStructuredSelection();
- //Get the selected marker
- Iterator enum= selection.iterator();
- if (!enum.hasNext()) {
- return;
- }
-
- MultiStatus ms= new MultiStatus(DebugUIPlugin.getDefault().getDescriptor().getUniqueIdentifier(), IDebugStatusConstants.REQUEST_FAILED, DebugUIUtils.getResourceString(STATUS), null);
- while (enum.hasNext()) {
- IBreakpoint breakpoint = (IBreakpoint) enum.next();
- try {
- breakpoint.setEnabled(!breakpoint.isEnabled());
- } catch (CoreException e) {
- ms.merge(e.getStatus());
- }
- }
- if (!ms.isOK()) {
- DebugUIUtils.errorDialog(DebugUIPlugin.getActiveWorkbenchWindow().getShell(), ERROR, ms);
- }
- }
-
- /**
- * @see SelectionProviderAction
- */
- public void selectionChanged(IStructuredSelection sel) {
- Iterator enum= sel.iterator();
- if (!enum.hasNext()) {
- //No selection
- setEnabled(false);
- return;
- }
- IBreakpoint bp= (IBreakpoint)enum.next();
- if (!enum.hasNext()) {
- //single selection
- try {
- if (bp.isEnabled()) {
- setText(DebugUIUtils.getResourceString(DISABLE));
- } else {
- setText(DebugUIUtils.getResourceString(ENABLE));
- }
- } catch (CoreException ce) {
- DebugUIUtils.errorDialog(DebugUIPlugin.getActiveWorkbenchWindow().getShell(), ERROR, ce.getStatus());
- }
- } else {
- // multi- selection
- setText(DebugUIUtils.getResourceString(PREFIX + TEXT));
- }
- setEnabled(true);
- }
-
- /**
- * @see IBreakpointListener
- */
- public void breakpointAdded(IBreakpoint breakpoint) {
- }
-
- /**
- * @see IBreakpointListener
- */
- public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
- }
-
- /**
- * @see IBreakpointListener
- */
- public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
- Display display= Display.getDefault();
- if (display.isDisposed()) {
- return;
- }
- display.asyncExec(new Runnable() {
- public void run() {
- ISelection s= getSelectionProvider().getSelection();
- if (s instanceof IStructuredSelection) {
- selectionChanged((IStructuredSelection) s);
- }
- }
- });
- }
-
- /**
- * Returns the breakpoint manager
- */
- private IBreakpointManager getBreakpointManager() {
- return DebugPlugin.getDefault().getBreakpointManager();
- }
-
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ExecutionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ExecutionAction.java
deleted file mode 100644
index f5416aaa8..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ExecutionAction.java
+++ /dev/null
@@ -1,301 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.text.MessageFormat;
-import java.util.*;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.*;
-
-/**
- * This is the debug action which appears in the desktop menu and toolbar.
- */
-public abstract class ExecutionAction extends Action {
-
- private final static String PREFIX= "execution_action.";
- private final static String ERROR= "error.";
- private final static String STATUS= PREFIX + "status";
- private static final String LAUNCH_PREFIX= "launch_action.";
- private static final String LAUNCH_ERROR_TITLE= LAUNCH_PREFIX + ERROR + "title";
- private static final String LAUNCH_ERROR_MESSAGE= LAUNCH_PREFIX + ERROR + "message";
-
- /**
- * @see Action
- */
- public void run() {
-
- final IWorkbenchWindow dwindow= DebugUIPlugin.getActiveWorkbenchWindow();
- final IStructuredSelection selection= resolveSelection(dwindow);
-
- // if the selection is a debug element, system process, or launch, try to do a relaunch
- if (selection != null && attemptRelaunch(selection)) {
- return;
- }
-
- // otherwise, resolve a launcher and an element
- final IProject[] projects= resolveProjects(selection);
- final ILauncher[] launchers= resolveLaunchers(projects);
- if (launchers.length == 0) {
- // could not determine any launchers to use to launch
- // very unlikely to happen
- beep();
- return;
- }
-
- BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
- public void run() {
- // if there are no choices to make, do the launch
- if (launchers.length == 1 && selection != null) {
- ILauncher launcher= (ILauncher)launchers[0];
- Object[] elements= selection.toArray();
- boolean ok= launcher.launch(elements, getMode());
- if (!ok) {
- String string= DebugUIUtils.getResourceString(LAUNCH_ERROR_MESSAGE);
- String message= MessageFormat.format(string, new String[] {launcher.getLabel()});
- MessageDialog.openError(DebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(), DebugUIUtils.getResourceString(LAUNCH_ERROR_TITLE), message);
- }
- } else {
- // must choose a launcher
- IProject selectedProject = null;
- if (projects.length == 1) {
- selectedProject = projects[0];
- }
- ILauncher selectedLauncher = null;
- if (launchers.length == 1) {
- selectedLauncher = launchers[0];
- }
- useWizard(launchers, dwindow.getShell(), selection, selectedProject, selectedLauncher);
- }
- }
- });
- }
-
- /**
- * Returns the mode of a launcher to use for this action
- */
- protected abstract String getMode();
-
- /**
- * Returns the launch manager.
- */
- protected static ILaunchManager getLaunchManager() {
- return DebugPlugin.getDefault().getLaunchManager();
- }
-
- /**
- * Relaunches the launch in the specified mode.
- */
- public void relaunch(ILaunch launch, String mode) {
- RelaunchActionDelegate.relaunch(launch, mode);
- }
-
- /**
- * Determines and returns the selection that provides context for the launch,
- * or <code>null</code> if there is no selection.
- */
- protected static IStructuredSelection resolveSelection(IWorkbenchWindow window) {
- if (window == null) {
- return null;
- }
- ISelection selection= window.getSelectionService().getSelection();
- if (selection == null || selection.isEmpty() || !(selection instanceof IStructuredSelection)) {
- // there is no obvious selection - go fishing
- selection= null;
- IWorkbenchPage page= window.getActivePage();
- if (page == null) {
- //workspace is closed
- return null;
- }
-
- // first, see if there is an active editor, and try its input element
- IEditorPart editor= page.getActiveEditor();
- Object element= null;
- if (editor != null) {
- element= editor.getEditorInput();
- }
-
- if (selection == null && element != null) {
- selection= new StructuredSelection(element);
- }
- }
- return (IStructuredSelection)selection;
- }
-
- /**
- * Resolves and returns the applicable project(s) associated with the
- * elements in the specified selection.
- */
- protected static IProject[] resolveProjects(IStructuredSelection selection) {
-
- if (selection == null || selection.isEmpty()) {
- return new IProject[0];
- } else {
- Vector projects = new Vector(1);
- Iterator elements= selection.iterator();
- while (elements.hasNext()) {
- Object element= elements.next();
- IResource resource= null;
- if (element instanceof IAdaptable) {
- IAdaptable el= (IAdaptable)element;
- resource= (IResource)el.getAdapter(IResource.class);
- if (resource == null) {
- resource= (IProject)el.getAdapter(IProject.class);
- }
- }
- IProject project= null;
- if (resource != null) {
- project= resource.getProject();
- }
- if (project != null && !projects.contains(project)) {
- projects.add(project);
- }
- }
- IProject[] list= new IProject[projects.size()];
- projects.copyInto(list);
- return list;
- }
-
- }
-
- /**
- * Resolves and returns the applicable launcher(s) to be used to launch the
- * specified projects.
- */
- protected ILauncher[] resolveLaunchers(IProject[] projects) {
- List launchers;
- if (projects.length == 0) {
- launchers= Arrays.asList(getLaunchManager().getLaunchers(getMode()));
- } else {
- launchers= new ArrayList(2);
- MultiStatus status= new MultiStatus(DebugUIPlugin.getDefault().getDescriptor().getUniqueIdentifier(), IDebugStatusConstants.REQUEST_FAILED, DebugUIUtils.getResourceString(STATUS), null);
- for (int i = 0; i < projects.length; i++) {
- IProject project= projects[i];
- ILauncher defaultLauncher= null;
- try {
- defaultLauncher = getLaunchManager().getDefaultLauncher(project);
- if (defaultLauncher != null) {
- if (!defaultLauncher.getModes().contains(getMode())) {
- defaultLauncher= null;
- }
- }
- } catch (CoreException e) {
- status.merge(e.getStatus());
- }
- if (defaultLauncher != null) {
- if (!launchers.contains(defaultLauncher)) {
- launchers.add(defaultLauncher);
- }
- }
- }
- if (!status.isOK()) {
- DebugUIUtils.errorDialog(DebugUIPlugin.getActiveWorkbenchWindow().getShell(), PREFIX + ERROR, status);
- }
- if (launchers.isEmpty()) {
- launchers= Arrays.asList(getLaunchManager().getLaunchers(getMode()));
- }
- }
-
- return resolveVisibleLaunchers(launchers);
- }
-
- protected ILauncher[] resolveVisibleLaunchers(List launchers) {
- Vector visibleLaunchers= new Vector(launchers.size());
- Iterator itr= launchers.iterator();
- while (itr.hasNext()) {
- ILauncher launcher= (ILauncher)itr.next();
- if (DebugUIPlugin.getDefault().isVisible(launcher)) {
- //cannot use itr.remove() as the list may be a fixed size list
- visibleLaunchers.addElement(launcher);
- }
- }
- ILauncher[] ls = new ILauncher[visibleLaunchers.size()];
- visibleLaunchers.copyInto(ls);
- return ls;
- }
-
- protected ILauncher[] resolveWizardLaunchers(ILauncher[] launchers) {
- Vector wizardLaunchers= new Vector(launchers.length);
- for (int i= 0 ; i < launchers.length; i++) {
- ILauncher launcher= launchers[i];
- if (DebugUIPlugin.getDefault().hasWizard(launcher)) {
- wizardLaunchers.add(launcher);
- }
- }
- ILauncher[] wl = new ILauncher[wizardLaunchers.size()];
- wizardLaunchers.copyInto(wl);
- return wl;
- }
-
- /**
- * If the selection contains re-launchables, a relaunch is performed
- * for each launch and true is returned, otherwise, false is returned.
- */
- protected boolean attemptRelaunch(IStructuredSelection selection) {
- // if the selection is a debug element, system process, or launch, do a relaunch
- Iterator objects= selection.iterator();
- List relaunchables= null;
- while (objects.hasNext()) {
- Object object= objects.next();
- ILaunch launch= null;
- if (object instanceof IDebugElement) {
- launch= ((IDebugElement)object).getLaunch();
- } else if (object instanceof ILaunch) {
- launch= (ILaunch)object;
- } else if (object instanceof IProcess) {
- launch= ((IProcess)object).getLaunch();
- }
- if (launch != null) {
- if (relaunchables == null) {
- relaunchables= new ArrayList(1);
- relaunchables.add(launch);
- } else if (!relaunchables.contains(launch)) {
- relaunchables.add(launch);
- }
- }
- }
- if (relaunchables == null) {
- return false;
- } else {
- Iterator itr= relaunchables.iterator();
- while (itr.hasNext()) {
- relaunch((ILaunch)itr.next(), getMode());
- }
- return true;
- }
- }
-
- /**
- * Use the wizard to do the launch.
- */
- protected void useWizard(ILauncher[] launchers, Shell shell, IStructuredSelection selection, IProject selectedProject, ILauncher selectedLauncher) {
- launchers= resolveWizardLaunchers(launchers);
- LaunchWizard lw= new LaunchWizard(launchers, selection, getMode(), selectedProject, selectedLauncher);
- LaunchWizardDialog dialog= new LaunchWizardDialog(shell, lw);
- dialog.open();
- }
-
- /**
- * Ring the bell
- */
- protected void beep() {
- Display display= Display.getCurrent();
- if (display != null) {
- display.beep();
- }
- }
-}
-
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
deleted file mode 100644
index dbb22490a..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-/**
- * Help context ids for the debug ui.
- * <p>
- * This interface contains constants only; it is not intended to be implemented
- * or extended.
- * </p>
- *
- */
-public interface IDebugHelpContextIds {
- public static final String PREFIX = IDebugUIConstants.PLUGIN_ID + ".";
-
- // Actions
- public static final String DEBUG_ACTION = PREFIX + "debug_action_context";
- public static final String RUN_ACTION = PREFIX + "run_action_context";
- public static final String INSPECT_ACTION = PREFIX + "inspect_action_context";
- public static final String CHANGE_VALUE_ACTION = PREFIX + "change_value_action_context";
- public static final String CLEAR_CONSOLE_ACTION = PREFIX + "clear_console_action_context";
- public static final String COPY_TO_CLIPBOARD_ACTION = PREFIX + "copy_to_clipboard_action_context";
- public static final String COPY_VARIABLES_TO_CLIPBOARD_ACTION = PREFIX + "copy_variables_to_clipboard_action_context";
- public static final String DISCONNECT_ACTION = PREFIX + "disconnect_action_context";
- public static final String ENABLE_DISABLE_BREAKPOINT_ACTION = PREFIX + "enable_disable_breakpoint_action_context";
- public static final String LAUNCH_SELECTION_ACTION = PREFIX + "launch_selection_action_context";
- public static final String OPEN_BREAKPOINT_ACTION = PREFIX + "open_breakpoint_action_context";
- public static final String RELAUNCH_ACTION = PREFIX + "relaunch_action_context";
- public static final String RELAUNCH_LAST_ACTION = PREFIX + "relaunch_last_action_context";
- public static final String RELAUNCH_HISTORY_ACTION = PREFIX + "relaunch_history_action_context";
- public static final String REMOVE_ACTION = PREFIX + "remove_action_context";
- public static final String REMOVE_ALL_ACTION = PREFIX + "remove_all_action_context";
- public static final String RESUME_ACTION = PREFIX + "resume_action_context";
- public static final String SHOW_QUALIFIED_NAMES_ACTION = PREFIX + "show_qualified_names_action_context";
- public static final String SHOW_TYPES_ACTION = PREFIX + "show_types_action_context";
- public static final String STEP_INTO_ACTION = PREFIX + "step_into_action_context";
- public static final String STEP_OVER_ACTION = PREFIX + "step_over_action_context";
- public static final String STEP_RETURN_ACTION = PREFIX + "step_return_action_context";
- public static final String SUSPEND_ACTION = PREFIX + "suspend_action_context";
- public static final String TERMINATE_ACTION = PREFIX + "terminate_action_context";
- public static final String TERMINATE_ALL_ACTION = PREFIX + "terminate_all_action_context";
- public static final String TERMINATE_AND_REMOVE_ACTION = PREFIX + "terminate_and_remove_action_context";
-
- // Views
- public static final String DEBUG_VIEW = "debug_view_context";
- public static final String PROCESS_VIEW = "process_view_context";
- public static final String VARIABLE_VIEW = "variable_view_context";
- public static final String INSPECTOR_VIEW = "inspector_view_context";
- public static final String BREAKPOINT_VIEW = "breakpoint_view_context";
- public static final String CONSOLE_VIEW = "console_view_context";
-
- // Preference pages
- public static final String DEBUG_PREFERENCE_PAGE = PREFIX + "debug_preference_page_context";
- public static final String CONSOLE_PREFERENCE_PAGE = PREFIX + "console_preference_page_context";
-
- // Wizard pages
- public static final String PROJECT_SELECTION_WIZARD_PAGE = PREFIX + "project_selection_wizard_page_context";
- public static final String LAUNCHER_SELECTION_WIZARD_PAGE = PREFIX + "launcher_selection_wizard_page_context";
-
- // Wizards
- public static final String LAUNCH_WIZARD = PREFIX + "launch_wizard_context";
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugPreferenceConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugPreferenceConstants.java
deleted file mode 100644
index 4711acf2e..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugPreferenceConstants.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- * Constants defining the keys to be used for accessing preferences
- * inside the debug ui plugin's preference bundle.
- *
- * In descriptions (of the keys) below describe the preference
- * stored at the given key. The type indicates type of the stored preferences
- *
- * The preference store is loaded by the plugin (DebugUIPlugin).
- * @See DebugUIPlugin.initializeDefaultPreferences() - for initialization of the store
- */
-public interface IDebugPreferenceConstants {
-
- /**
- * RGB colors for displaying the content in the Console
- */
- public static final String CONSOLE_SYS_ERR_RGB= "Console.stdErrColor";
- public static final String CONSOLE_SYS_OUT_RGB= "Console.stdOutColor";
- public static final String CONSOLE_SYS_IN_RGB= "Console.stdInColor";
-
- /**
- * The name of the font to use for the Console
- **/
- public static final String CONSOLE_FONT= "Console.font";
-
- /**
- * (boolean) Whether or not the console view is shown
- * when there is program ouptut.
- */
- public static final String CONSOLE_OPEN= "DEBUG.consoleOpen";
-
-
-}
-
-
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
deleted file mode 100644
index 8c22aae59..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-public interface IInternalDebugUIConstants {
-
- //Folders
- public static final String ID_NAVIGATOR_FOLDER_VIEW= "org.eclipse.debug.internal.ui.NavigatorFolderView";
- public static final String ID_TOOLS_FOLDER_VIEW= "org.eclipse.debug.internal.ui.ToolsFolderView";
- public static final String ID_CONSOLE_FOLDER_VIEW= "org.eclipse.debug.internal.ui.ConsoleFolderView";
-
- //Current stack frame instruction pointer
- public static final String INSTRUCTION_POINTER= "org.eclipse.debug.ui.instructionPointer";
-
-
- // disabled local tool images
- public static final String IMG_DLCL_RESUME= "IMG_DLCL_RESUME";
- public static final String IMG_DLCL_SUSPEND= "IMG_DLCL_SUSPEND";
- public static final String IMG_DLCL_TERMINATE= "IMG_DLCL_TERMINATE";
- public static final String IMG_DLCL_DISCONNECT= "IMG_DLCL_DISCONNECT";
- public static final String IMG_DLCL_STEPINTO= "IMG_DLCL_STEPINTO";
- public static final String IMG_DLCL_STEPOVER= "IMG_DLCL_STEPOVER";
- public static final String IMG_DLCL_STEPRETURN= "IMG_DLCL_STEPRETURN";
- public static final String IMG_DLCL_CLEAR= "IMG_DLCL_CLEAR";
- public static final String IMG_DLCL_REMOVE_TERMINATED= "IMG_DLCL_REMOVE_TERMINATED";
- public static final String IMG_DLCL_QUALIFIED_NAMES= "IMG_DLCL_QUALIFIED_NAMES";
- public static final String IMG_DLCL_TYPE_NAMES= "IMG_DLCL_TYPE_NAMES";
- public static final String IMG_DLCL_REMOVE= "IMG_DLCL_REMOVE";
- public static final String IMG_DLCL_REMOVE_ALL= "IMG_DLCL_REMOVE_ALL";
- public static final String IMG_DLCL_INSPECT= "IMG_DLCL_INSPECT";
-
- // enabled local tool images
- public static final String IMG_ELCL_RESUME= "IMG_ELCL_RESUME";
- public static final String IMG_ELCL_SUSPEND= "IMG_ELCL_SUSPEND";
- public static final String IMG_ELCL_TERMINATE= "IMG_ELCL_TERMINATE";
- public static final String IMG_ELCL_DISCONNECT= "IMG_ELCL_DISCONNECT";
- public static final String IMG_ELCL_STEPINTO= "IMG_ELCL_STEPINTO";
- public static final String IMG_ELCL_STEPOVER= "IMG_ELCL_STEPOVER";
- public static final String IMG_ELCL_STEPRETURN= "IMG_ELCL_STEPRETURN";
- public static final String IMG_ELCL_CLEAR= "IMG_ELCL_CLEAR";
- public static final String IMG_ELCL_REMOVE_TERMINATED= "IMG_ELCL_REMOVE_TERMINATED";
- public static final String IMG_ELCL_QUALIFIED_NAMES= "IMG_ELCL_QUALIFIED_NAMES";
- public static final String IMG_ELCL_TYPE_NAMES= "IMG_ELCL_TYPE_NAMES";
- public static final String IMG_ELCL_REMOVE= "IMG_ELCL_REMOVE";
- public static final String IMG_ELCL_REMOVE_ALL= "IMG_ELCL_REMOVE_ALL";
- public static final String IMG_ELCL_INSPECT= "IMG_ELCL_INSPECT";
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectItem.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectItem.java
deleted file mode 100644
index ce1958545..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectItem.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.core.runtime.PlatformObject;
-
-
-public class InspectItem extends PlatformObject {
-
- protected String fLabel;
- protected IValue fValue;
-
-
- public InspectItem(String label, IValue value) {
- fLabel = label;
- fValue = value;
- }
-
- public String getLabel() {
- return fLabel;
- }
-
- public IValue getValue() {
- return fValue;
- }
-
- /**
- * @see IAdaptable
- */
- public Object getAdapter(Class adapter) {
- if (adapter == InspectItem.class) {
- return this;
- }
- return super.getAdapter(adapter);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorAction.java
deleted file mode 100644
index 5ab930aa2..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorAction.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.SelectionProviderAction;
-
-public abstract class InspectorAction extends SelectionProviderAction {
-
- public InspectorAction(ISelectionProvider provider, String label) {
- super(provider, label);
- }
-
- /**
- * @see IAction
- */
- public void run() {
- // get the Inspector
- IWorkbenchPage p= DebugUIPlugin.getActiveWorkbenchWindow().getActivePage();
- if (p == null) {
- return;
- }
- InspectorView view= (InspectorView) p.findView(IDebugUIConstants.ID_INSPECTOR_VIEW);
- if (view == null) {
- // open a new view
- try {
- view= (InspectorView) p.showView(IDebugUIConstants.ID_INSPECTOR_VIEW);
- } catch (PartInitException e) {
- DebugUIUtils.logError(e);
- return;
- }
- }
-
- try {
- doAction(view);
- } catch (DebugException de) {
- DebugUIUtils.logError(de);
- }
- }
-
- /**
- * @see SelectionProviderAction
- */
- public void selectionChanged(IStructuredSelection sel) {
- setEnabled(!sel.isEmpty());
- }
-
- protected abstract void doAction(InspectorView view) throws DebugException;
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorContentProvider.java
deleted file mode 100644
index 0b263788a..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorContentProvider.java
+++ /dev/null
@@ -1,232 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.*; import org.eclipse.debug.core.*; import org.eclipse.debug.core.model.IValue; import org.eclipse.debug.core.model.IVariable; import org.eclipse.jface.viewers.*;
-
-public class InspectorContentProvider extends BasicContentProvider implements ITreeContentProvider, IDebugEventListener {
-
- /**
- * The inspect items in the viewer
- */
- protected InspectorList fInspectorList;
-
- /**
- * The action that removes all the items
- */
- protected RemoveAllFromInspectorAction fRemoveAllFromInspectorAction;
-
- /**
- * A table of root values in the inspector
- */
- protected Hashtable fRootValuesTable;
-
- /**
- * Constructs a new inspector content provider
- */
- public InspectorContentProvider(RemoveAllFromInspectorAction action) {
- fRemoveAllFromInspectorAction= action;
- fInspectorList = new InspectorList(3);
- fRootValuesTable = new Hashtable(3);
- DebugPlugin.getDefault().addDebugEventListener(this);
- enableRemoveAllFromInspectorAction();
- }
-
- /**
- * @see ITreeContentProvider
- */
- public Object getParent(Object child) {
- if (fInspectorList == child) {
- return null;
- } else if (child instanceof InspectItem) {
- return fInspectorList;
- } else if (child instanceof IVariable) {
- Object parent = ((IVariable)child).getParent();
- if (parent instanceof IValue) {
- IValue value = (IValue)parent;
- Object inspectItem = fRootValuesTable.get(value);
- if (inspectItem != null) {
- return inspectItem;
- } else {
- return value.getVariable();
- }
- } else {
- return null;
- }
- } else {
- return null;
- }
- }
-
- /**
- * @see BasicContentProvider#doGetChildren(Object)
- */
- protected Object[] doGetChildren(Object parent) {
- if (parent == fInspectorList) {
- return fInspectorList.getList().toArray();
- }
- try {
- if (parent instanceof IVariable) {
- return ((IVariable)parent).getValue().getChildren();
- }
- if (parent instanceof InspectItem) {
- return ((InspectItem)parent).getValue().getChildren();
- }
- } catch (DebugException de) {
- DebugUIUtils.logError(de);
- }
- return new Object[0];
- }
-
- /**
- * @see ITreeContentProvider
- */
- public boolean hasChildren(Object parent) {
- if (parent == fInspectorList) {
- return !fInspectorList.isEmpty();
- }
- try {
- if (parent instanceof InspectItem) {
- return ((InspectItem)parent).getValue().hasChildren();
- } else{
- return ((IVariable)parent).getValue().hasChildren();
- }
- } catch (DebugException de) {
- return false;
- }
- }
-
- /**
- * @see IStructuredContentProvider
- */
- public Object[] getElements(Object parent) {
- return getChildren(parent);
- }
-
- /**
- * @see IContentProvider
- */
- public void dispose() {
- super.dispose();
- fInspectorList = new InspectorList(0);
- DebugPlugin.getDefault().removeDebugEventListener(this);
- }
-
- /**
- * Returns the list of inspect items being inspected.
- */
- public InspectorList getInspectorList() {
- return fInspectorList;
- }
-
- /**
- * @see BasicContentProvider#doHandleDebug(Event)
- */
- protected void doHandleDebugEvent(DebugEvent event) {
- if (!fInspectorList.isEmpty() && (event.getKind() == DebugEvent.SUSPEND ||
- event.getKind() == DebugEvent.TERMINATE ||
- event.getKind() == DebugEvent.CHANGE)) {
- // remove any de-allocated values
- Iterator itr = fInspectorList.getList().iterator();
- while (itr.hasNext()) {
- InspectItem item = (InspectItem)itr.next();
- boolean allocated= false;
- try {
- allocated= item.getValue().isAllocated();
- } catch (DebugException de) {
- }
- if (!allocated) {
- itr.remove();
- fRootValuesTable.remove(item.getValue());
- }
- }
- refresh();
- enableRemoveAllFromInspectorAction();
- }
- }
-
- /**
- * Helper method to remove the given element
- */
- protected void remove(final Object element) {
- Runnable r= new Runnable() {
- public void run() {
- if (!isDisposed()) {
- ((TreeViewer)fViewer).remove(element);
- enableRemoveAllFromInspectorAction();
- }
- }
- };
- asyncExec(r);
- }
-
- /**
- * Helper method to remove all elements
- */
- protected void removeAll() {
- Runnable r= new Runnable() {
- public void run() {
- if (!isDisposed()) {
- fInspectorList.getList().clear();
- refresh();
- enableRemoveAllFromInspectorAction();
- }
- }
- };
- asyncExec(r);
- }
-
- /**
- * Helper method for inserting the given element
- */
- protected void insert(final Object element) {
- final Object parent = getParent(element);
- if (parent != null) {
- Runnable r= new Runnable() {
- public void run() {
- if (!isDisposed()) {
- TreeViewer tempViewer= (TreeViewer)fViewer;
- tempViewer.add(parent, element);
- tempViewer.setExpandedState(element, true);
- tempViewer.setSelection(new StructuredSelection(element));
- enableRemoveAllFromInspectorAction();
- }
- }
- };
- asyncExec(r);
- }
- }
-
- /**
- * Adds a inspect item to the list
- */
- public void addToInspector(InspectItem item) {
- List inspectorList = getInspectorList().getList();
- if (!inspectorList.contains(item)) {
- fRootValuesTable.put(item.getValue(), item);
- inspectorList.add(item);
- insert(item);
- }
- }
-
- /**
- * Removes a inspect item from the list
- */
- public void removeFromInspector(InspectItem item) {
- getInspectorList().getList().remove(item);
- fRootValuesTable.remove(item.getValue());
- remove(item);
- }
-
- /**
- * Enable/disable the <code>RemoveAllFromInspectorAction<code> based on whether the inspector
- * list is currently empty.
- */
- public void enableRemoveAllFromInspectorAction() {
- boolean enable= getInspectorList().isEmpty() ? false : true;
- fRemoveAllFromInspectorAction.setEnabled(enable);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorList.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorList.java
deleted file mode 100644
index 1423ac0ff..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorList.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.PlatformObject;
-import java.util.List;
-import java.util.Vector;
-
-public class InspectorList extends PlatformObject {
-
- protected Vector fInspectorList;
-
- /**
- * @see IAdaptable
- */
- public Object getAdapter(Class adapter) {
- if (adapter == InspectItem.class) {
- return this;
- }
- return super.getAdapter(adapter);
- }
-
- public InspectorList(int initialCapacity) {
- fInspectorList= new Vector(initialCapacity);
- }
-
- public List getList() {
- return fInspectorList;
- }
-
- public boolean isEmpty() {
- return fInspectorList.isEmpty();
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorView.java
deleted file mode 100644
index a11f20f7b..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorView.java
+++ /dev/null
@@ -1,144 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.jface.action.*; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.swt.SWT; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.IWorkbenchActionConstants; import org.eclipse.ui.help.ViewContextComputer; import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * A view that shows items that have been added to a inspector
- */
-public class InspectorView extends AbstractDebugView {
-
- protected final static String PREFIX= "inspector_view.";
-
- protected InspectorContentProvider fContentProvider= null;
- protected ShowQualifiedAction fShowQualifiedAction;
- protected ShowTypesAction fShowTypesAction;
- protected InspectorViewAddToInspectorAction fAddToInspectorAction;
- protected RemoveFromInspectorAction fRemoveFromInspectorAction;
- protected RemoveAllFromInspectorAction fRemoveAllFromInspectorAction;
- protected ChangeVariableValueAction fChangeVariableAction;
- protected ControlAction fCopyToClipboardAction;
- /**
- * @see IWorkbenchPart
- */
- public void createPartControl(Composite parent) {
- TreeViewer vv = new TreeViewer(parent, SWT.MULTI);
- fViewer= vv;
- initializeActions();
- initializeToolBar();
- fContentProvider= new InspectorContentProvider(fRemoveAllFromInspectorAction);
- fViewer.setContentProvider(fContentProvider);
- fViewer.setLabelProvider(new DelegatingModelPresentation());
- fViewer.setUseHashlookup(true);
-
- createContextMenu(vv.getTree());
-
- fViewer.setInput(fContentProvider.getInspectorList());
- fViewer.getControl().addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- handleKeyPressed(e);
- }
- });
-
- setTitleToolTip(getTitleToolTipText(PREFIX));
- WorkbenchHelp.setHelp(
- parent,
- new ViewContextComputer(this, IDebugHelpContextIds.INSPECTOR_VIEW ));
- }
-
- /**
- * Initializes the actions of this view.
- */
- protected void initializeActions() {
- fShowTypesAction= new ShowTypesAction(fViewer);
- fShowTypesAction.setChecked(false);
-
- fShowQualifiedAction= new ShowQualifiedAction(fViewer);
- fShowQualifiedAction.setChecked(false);
-
- fAddToInspectorAction = new InspectorViewAddToInspectorAction(fViewer);
-
- fRemoveFromInspectorAction= new RemoveFromInspectorAction(fViewer);
-
- fRemoveAllFromInspectorAction= new RemoveAllFromInspectorAction(fViewer);
-
- fChangeVariableAction= new ChangeVariableValueAction(fViewer);
- fChangeVariableAction.setEnabled(false);
-
- fCopyToClipboardAction= new ControlAction(fViewer, new CopyVariablesToClipboardActionDelegate());
- }
-
- /**
- * Configures the toolBar
- */
- protected void configureToolBar(IToolBarManager tbm) {
- tbm.add(new Separator(this.getClass().getName()));
- tbm.add(fShowTypesAction);
- tbm.add(fShowQualifiedAction);
- tbm.add(new Separator(this.getClass().getName()));
- tbm.add(fRemoveFromInspectorAction);
- tbm.add(fRemoveAllFromInspectorAction);
- }
-
- /**
- * Adds items to the context menu including any extension defined actions.
- */
- protected void fillContextMenu(IMenuManager menu) {
- menu.add(new Separator(IDebugUIConstants.EMPTY_EXPRESSION_GROUP));
- menu.add(new Separator(IDebugUIConstants.EXPRESSION_GROUP));
- menu.add(fAddToInspectorAction);
- menu.add(fChangeVariableAction);
- menu.add(fCopyToClipboardAction);
- menu.add(fRemoveFromInspectorAction);
- menu.add(fRemoveAllFromInspectorAction);
- menu.add(new Separator(IDebugUIConstants.EMPTY_RENDER_GROUP));
- menu.add(new Separator(IDebugUIConstants.RENDER_GROUP));
- menu.add(fShowTypesAction);
- menu.add(fShowQualifiedAction);
- menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
-
- /**
- * Adds a inspect item to the list, and sets the selection to either
- * the first child or to the item if it has no children.
- */
- public void addToInspector(InspectItem item) {
- fContentProvider.addToInspector(item);
- }
-
- /**
- * Removes a items from the list
- */
- public void removeFromInspector(Object object) {
- // first we have to get the root item to remove
- while (! (object instanceof InspectItem && object != null)) {
- object = fContentProvider.getParent(object);
- }
- if (object != null) {
- fContentProvider.removeFromInspector((InspectItem)object);
- }
- }
-
- /**
- * Removes all items from the list
- */
- public void removeAllFromInspector() {
- fContentProvider.removeAll();
- }
-
- /**
- * Handles key events in viewer. Specifically interested in
- * the Delete key.
- */
- protected void handleKeyPressed(KeyEvent event) {
- if (event.character == SWT.DEL && event.stateMask == 0
- && fRemoveFromInspectorAction.isEnabled()) {
- fRemoveFromInspectorAction.run();
- }
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorViewAddToInspectorAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorViewAddToInspectorAction.java
deleted file mode 100644
index e91a16764..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InspectorViewAddToInspectorAction.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Iterator; import org.eclipse.debug.core.DebugException; import org.eclipse.debug.core.model.IVariable; import org.eclipse.debug.ui.DebugUITools; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * This action applies specifically to the <code>InspectorView</code>, whereas
- * <code>AddToInspectorAction</code> applies to a more generic variables view.
- * The difference is that this action has to avoid re-adding items
- * to the inspector.
- */
-public class InspectorViewAddToInspectorAction extends AddToInspectorAction {
-
- public InspectorViewAddToInspectorAction(ISelectionProvider sp) {
- super(sp);
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.INSPECT_ACTION });
- }
-
- /**
- * @see AddToInspectorAction
- * Top-level items in the inspector are of type <code>InspectItem</code>.
- * Children are <code>IVariable</code>s. So to avoid re-adding top-level items to
- * the inspector, we simply check the type, and only add <code>IVariable</code>s.
- */
- protected void doAction(InspectorView view) throws DebugException {
- IStructuredSelection s = getStructuredSelection();
- Iterator vars = s.iterator();
- while (vars.hasNext()) {
- Object item= vars.next();
- if (item instanceof IVariable) {
- IVariable var = (IVariable)item;
- DebugUITools.inspect(var.getName(), var.getValue());
- }
- }
- }
-
- /**
- * @see InspectorAction
- */
- public void selectionChanged(IStructuredSelection sel) {
- if (sel == null) {
- setEnabled(false);
- return;
- }
- Iterator iterator= sel.iterator();
- while (iterator.hasNext()) {
- Object item= iterator.next();
- if (item instanceof IVariable) {
- setEnabled(true);
- return;
- }
- }
- setEnabled(false);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchDropDownAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchDropDownAction.java
deleted file mode 100644
index 81a529c7c..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchDropDownAction.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowPulldownDelegate;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-
-/**
- * Superclass of run & debug pulldown actions.
- */
-public abstract class LaunchDropDownAction implements IWorkbenchWindowPulldownDelegate {
-
-
- private ExecutionAction fLaunchAction;
-
- /**
- * Create a new instance of this class
- */
- public LaunchDropDownAction(ExecutionAction launchAction) {
- fLaunchAction= launchAction;
- }
-
- private void createMenuForAction(Menu parent, Action action) {
- ActionContributionItem item= new ActionContributionItem(action);
- item.fill(parent, -1);
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate
- */
- public void dispose() {
- }
-
- /**
- * @see IWorkbenchWindowPulldownDelegate
- */
- public Menu getMenu(Control parent) {
- Menu menu= new Menu(parent);
- LaunchHistoryElement[] historyList= getHistory();
- int count= 0;
- for (int i = 0; i < historyList.length; i++) {
- LaunchHistoryElement launch= historyList[i];
- RelaunchHistoryLaunchAction newAction= new RelaunchHistoryLaunchAction(launch);
- createMenuForAction(menu, newAction);
- count++;
- }
- if (count > 0) {
- new MenuItem(menu, SWT.SEPARATOR);
- }
- createMenuForAction(menu, new LaunchWithAction(getMode()));
-
- return menu;
- }
-
- /**
- * @see IActionDelegate
- */
- public void run(IAction action) {
- fLaunchAction.run();
- }
-
- /**
- * @see IActionDelegate
- */
- public void selectionChanged(IAction action, ISelection selection){
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate
- */
- public void init(IWorkbenchWindow window){
- }
-
- /**
- * Returns an array of previous launches applicable to this drop down
- */
- public abstract LaunchHistoryElement[] getHistory();
-
- /**
- * Returns the mode (e.g., 'run' or 'debug') of this drop down
- */
- public abstract String getMode();
-
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchHistoryElement.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchHistoryElement.java
deleted file mode 100644
index 229ab753d..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchHistoryElement.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILauncher;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
- /**
- * Stores information required to re-launch a
- * previous launch.
- */
-public class LaunchHistoryElement {
-
- /**
- * The identifier of the launcher used
- */
- protected String fLauncherIdentifier= null;
-
- /**
- * The memento of the launched element
- */
- protected String fMemento= null;
-
- /**
- * The launch mode
- */
- protected String fMode=null;
-
- /**
- * The label of the launch
- */
- protected String fLabel=null;
-
- public LaunchHistoryElement(String launcherId, String elementMemento, String mode, String label) {
- fLauncherIdentifier = launcherId;
- fMemento = elementMemento;
- fMode = mode;
- fLabel = label;
- }
-
- /**
- * Returns the identifier of the launcher that was
- * invoked.
- */
- public String getLauncherIdentifier() {
- return fLauncherIdentifier;
- }
-
- /**
- * Returns the memento of the element that was
- * launched.
- */
- public String getElementMemento() {
- return fMemento;
- }
-
- /**
- * Returns the mode of the lanuch.
- */
- public String getMode() {
- return fMode;
- }
-
- /**
- * Returns the label of the launch
- */
- public String getLabel() {
- return fLabel;
- }
-
- public boolean equals(Object o) {
- if (o instanceof LaunchHistoryElement) {
- LaunchHistoryElement e= (LaunchHistoryElement)o;
- return
- getLauncherIdentifier().equals(e.getLauncherIdentifier()) &&
- getElementMemento().equals(e.getElementMemento()) &&
- getMode().equals(getMode());
- }
- return false;
- }
-
- public ILauncher getLauncher() {
- ILauncher[] launchers = DebugPlugin.getDefault().getLaunchManager().getLaunchers();
- for (int i = 0; i < launchers.length; i++) {
- if (launchers[i].getIdentifier().equals(getLauncherIdentifier())) {
- return launchers[i];
- }
- }
- return null;
- }
-
- public Object getLaunchElement() {
- ILauncher launcher = getLauncher();
- if (launcher != null) {
- return launcher.getDelegate().getLaunchObject(getElementMemento());
- }
- return null;
- }
-
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchSelectionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchSelectionAction.java
deleted file mode 100644
index fa390110a..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchSelectionAction.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.text.MessageFormat;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.ILauncher;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class LaunchSelectionAction extends Action {
-
- private static final String PREFIX= "launch_action.";
- private static final String ERROR= PREFIX + "error.";
- private static final String ERROR_TITLE= ERROR + "title";
- private static final String ERROR_MESSAGE= ERROR + "message";
-
- protected ILauncher fLauncher;
- protected String fMode;
- protected Object fElement;
-
- public LaunchSelectionAction(ILauncher launcher, Object element, String mode) {
- super();
- fLauncher= launcher;
- fMode= mode;
- fElement= element;
- setText(new DelegatingModelPresentation().getText(launcher));
- ImageDescriptor descriptor= null;
- if (fMode.equals(ILaunchManager.DEBUG_MODE)) {
- descriptor= DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_ACT_DEBUG);
- } else {
- descriptor= DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_ACT_RUN);
- }
-
- if (descriptor != null) {
- setImageDescriptor(descriptor);
- }
-
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.LAUNCH_SELECTION_ACTION });
- }
-
- /**
- * @see IAction
- */
- public void run() {
- BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
- public void run() {
- if (fElement != null || !DebugUIPlugin.getDefault().hasWizard(fLauncher)) {
- boolean ok= fLauncher.launch(new Object[] {fElement}, fMode);
- if (!ok) {
- String string= DebugUIUtils.getResourceString(ERROR_MESSAGE);
- String message= MessageFormat.format(string, new String[] {fLauncher.getLabel()});
- MessageDialog.openError(DebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(), DebugUIUtils.getResourceString(ERROR_TITLE), message);
- }
- } else {
- Shell shell= DebugUIPlugin.getActiveWorkbenchWindow().getShell();
- if (shell != null) {
- IProject project = null;
- IWorkbenchWindow dwindow= DebugUIPlugin.getActiveWorkbenchWindow();
- IStructuredSelection selection= ExecutionAction.resolveSelection(dwindow);
- IProject[] projects = null;
- if (selection == null) {
- projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- } else {
- projects = ExecutionAction.resolveProjects(selection);
- }
- if (projects.length == 1) {
- project = projects[0];
- }
- useWizard(new Object[] {fLauncher}, shell, StructuredSelection.EMPTY, fLauncher, project);
- }
- }
- }
- });
- }
-
- /**
- * Use the launch wizard to do the launch.
- */
- protected void useWizard(Object[] launchers, Shell shell, IStructuredSelection selection, ILauncher launcher, IProject project) {
- LaunchWizard wizard= new LaunchWizard(launchers, selection, fMode, project, launcher);
- LaunchWizardDialog dialog= new LaunchWizardDialog(shell, wizard);
- dialog.open();
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWithAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWithAction.java
deleted file mode 100644
index 3aebe7d8e..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWithAction.java
+++ /dev/null
@@ -1,131 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.ILauncher;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-
-/**
- * A cascading sub-menu that shows all launchers pertinent to this action's mode
- * (e.g., 'run' or 'debug').
- */
-public class LaunchWithAction extends Action implements IMenuCreator {
-
- private static final String PREFIX= "launch_with_action.";
- protected String fMode;
-
- /**
- * @see IAction
- */
- public void run() {
- }
-
- public LaunchWithAction(String mode) {
- super();
- fMode= mode;
- String text= mode.equals(ILaunchManager.DEBUG_MODE) ? DebugUIUtils.getResourceString(PREFIX + TEXT + ".debug") : DebugUIUtils.getResourceString(PREFIX + TEXT + ".run");
- setText(text);
- ImageDescriptor descriptor= null;
- if (mode.equals(ILaunchManager.DEBUG_MODE)) {
- descriptor= DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_ACT_DEBUG);
- } else {
- descriptor= DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_ACT_RUN);
- }
-
- if (descriptor != null) {
- setImageDescriptor(descriptor);
- }
- setMenuCreator(this);
- }
-
- private void createMenuForAction(Menu parent, Action action) {
- ActionContributionItem item= new ActionContributionItem(action);
- item.fill(parent, -1);
- }
-
- /**
- * @see IMenuCreator
- */
- public void dispose() {
- }
-
- /**
- * @see IMenuCreator
- */
- public Menu getMenu(Control parent) {
- return null;
- }
-
- /**
- * @see IMenuCreator
- */
- public Menu getMenu(Menu parent) {
- Object element= null;
- ILaunchManager manager= DebugPlugin.getDefault().getLaunchManager();
- ILauncher[] launchers= manager.getLaunchers(fMode);
- IStructuredSelection selection = resolveSelection(DebugUIPlugin.getActiveWorkbenchWindow());
- if (selection != null) {
- element= selection.getFirstElement();
- }
-
- Menu menu= new Menu(parent);
- for (int i= 0; i < launchers.length; i++) {
- if (DebugUIPlugin.getDefault().isVisible(launchers[i])) {
- LaunchSelectionAction newAction= new LaunchSelectionAction(launchers[i], element, fMode);
- createMenuForAction(menu, newAction);
- }
- }
- return menu;
- }
-
- /**
- * Determines and returns the selection that provides context for the launch,
- * or <code>null</code> if there is no selection.
- */
- protected IStructuredSelection resolveSelection(IWorkbenchWindow window) {
- if (window == null) {
- return null;
- }
- ISelection selection= window.getSelectionService().getSelection();
- if (selection == null || selection.isEmpty() || !(selection instanceof IStructuredSelection)) {
- // there is no obvious selection - go fishing
- selection= null;
- IWorkbenchPage p= window.getActivePage();
- if (p == null) {
- //workspace is closed
- return null;
- }
- IEditorPart editor= p.getActiveEditor();
- Object element= null;
-
- // first, see if there is an active editor, and try its input element
- if (editor != null) {
- element= editor.getEditorInput();
- }
-
- if (selection == null && element != null) {
- selection= new StructuredSelection(element);
- }
- }
- return (IStructuredSelection)selection;
- }
-}
-
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizard.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizard.java
deleted file mode 100644
index 6734600ef..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizard.java
+++ /dev/null
@@ -1,209 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.*;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * This wizard is used when the debug or run button is pressed, and
- * the launcher/element resolution is not 1:1. It allows the user to
- * choose a launcher and element to launch.
- *
- * <p>The renderer used to render elements to launch is pluggable,
- * allowing launchers to provide custom renderers for the elements
- * they can launch.
- */
-
-public class LaunchWizard extends Wizard {
-
- //NLS
- private static final String PREFIX = "launch_wizard.";
- private static final String DEBUG = PREFIX + "title.debug";
- private static final String RUN = PREFIX + "title.run";
-
- /**
- * The collection of available launchers
- */
- protected Object[] fAvailableLaunchers;
-
- /**
- * The selection providing context to determine launchables
- */
- protected IStructuredSelection fSelection;
-
- /**
- * The launcher selection page
- */
- protected LaunchWizardSelectionPage fLauncherPage;
-
- /**
- * The project selection page
- */
- protected LaunchWizardProjectSelectionPage fProjectPage;
-
- /**
- * The mode of the wizard.
- * @see ExecutionAction#getMode()
- */
- protected String fMode;
-
- /**
- * The initial project selection, or <code>null</code> if none.
- */
- protected IProject fInitialProject;
-
- /**
- * The initial launcher selection, or <code>null</code> if none.
- */
- protected ILauncher fInitialLauncher;
-
- /**
- * The old default launcher set for the <code>IProject</code>
- * associated with the current selection.
- */
- protected ILauncher fOldDefaultLauncher= null;
-
- /**
- * Indicates if the default launcher has been set for the <code>IProject</code>
- * associated with the current selection.
- */
- protected boolean fDefaultLauncherSet= false;
-
- public LaunchWizard(Object[] availableLaunchers, IStructuredSelection selection, String mode, IProject initialProject, ILauncher initialLauncher) {
- fAvailableLaunchers= availableLaunchers;
- fSelection= selection;
- fMode= mode;
- fInitialProject = initialProject;
- fInitialLauncher = initialLauncher;
- initialize();
- }
-
- public void createPageControls(Composite pageContainer) {
- super.createPageControls(pageContainer);
- WorkbenchHelp.setHelp(
- pageContainer,
- new Object[] { IDebugHelpContextIds.LAUNCH_WIZARD });
- }
-
- protected void initialize() {
- setNeedsProgressMonitor(true);
- setForcePreviousAndNextButtons(true);
- if (fMode.equals(ILaunchManager.DEBUG_MODE)) {
- setWindowTitle(DebugUIUtils.getResourceString(DEBUG));
- } else {
- setWindowTitle(DebugUIUtils.getResourceString(RUN));
- }
- setDefaultPageImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_OBJS_LAUNCH_DEBUG));
- }
- /**
- * @see Wizard#addPages
- */
- public void addPages() {
- addPage(fProjectPage = new LaunchWizardProjectSelectionPage(fMode, fInitialProject));
- addPage(fLauncherPage= new LaunchWizardSelectionPage(fAvailableLaunchers, fMode, fInitialLauncher));
- }
-
- public IStructuredSelection getSelection() {
- if (fSelection == null) {
- return new StructuredSelection(getProject());
- } else {
- return fSelection;
- }
- }
-
- /**
- * Updates the default launcher if required - i.e. if the checkbox is
- * checked.
- */
- public void updateDefaultLauncher() {
- IProject project= getProject();
- if (fLauncherPage.fSetAsDefaultLauncher.getSelection()) {
- ILauncher launcher= fLauncherPage.getLauncher();
- if (launcher != null) {
- try {
- fOldDefaultLauncher= DebugPlugin.getDefault().getLaunchManager().getDefaultLauncher(project);
- DebugPlugin.getDefault().getLaunchManager().setDefaultLauncher(project, launcher);
- fDefaultLauncherSet= true;
- } catch (CoreException e) {
- }
- }
- }
- }
-
- /**
- * Returns the <code>IProject</code> that is associated with the context selection,
- * or <code>null</code> if there is no single project associated with the selection.
- */
- protected IProject getProject() {
- if (fProjectPage == null) {
- return fInitialProject;
- }
- return fProjectPage.getProject();
- }
-
- /**
- * @see IWizard#performFinish
- */
- public boolean performFinish() {
- if (!fDefaultLauncherSet) {
- updateDefaultLauncher();
- }
- return true;
- }
-
- /**
- * @see IWizard#performCancel
- */
- public boolean performCancel() {
- if (fDefaultLauncherSet) {
- try {
- DebugPlugin.getDefault().getLaunchManager().setDefaultLauncher(getProject(), fOldDefaultLauncher);
- } catch (CoreException e) {
- return false;
- }
- fDefaultLauncherSet= false;
- }
- return true;
- }
-
- /**
- * @see IWizard#getNextPage(IWizardPage)
- */
- public IWizardPage getNextPage(IWizardPage page) {
- if (page == fLauncherPage) {
- IWizardNode node= new LaunchWizardNode(page, fLauncherPage.getLauncher(), fMode);
- IWizard wizard = node.getWizard();
- wizard.addPages();
- return wizard.getStartingPage();
- }
- return super.getNextPage(page);
- }
-
- /**
- * @see IWizard#canFinish()
- */
- public boolean canFinish() {
- //it is the nested wizard that will finish
- return false;
- }
-
- public IWizardPage getStartingPage() {
- if (getProject() == null) {
- return fProjectPage;
- } else {
- return fLauncherPage;
- }
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizardDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizardDialog.java
deleted file mode 100644
index 329519d11..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizardDialog.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.lang.reflect.InvocationTargetException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Subclassed to provide access to button presses
- */
-public class LaunchWizardDialog extends WizardDialog {
-
- protected LaunchWizard fWizard;
-
- /**
- * Constructs a wizard dialog
- */
- public LaunchWizardDialog(Shell shell, LaunchWizard w) {
- super(shell, w);
- fWizard= w;
- }
-
- protected void cancelPressed() {
- fWizard.performCancel();
- super.cancelPressed();
- }
-
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizardNode.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizardNode.java
deleted file mode 100644
index b433dfeb6..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizardNode.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.debug.core.ILauncher;
-import org.eclipse.debug.ui.ILaunchWizard;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardNode;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.swt.graphics.Point;
-
-/**
- * A wizard node represents a "potential" wizard. Wizard nodes
- * allow the user to pick from several available nested wizards.
- */
-public class LaunchWizardNode implements IWizardNode {
-
- private static final String PREFIX= "launch_wizard_node.";
- private static final String ERROR= PREFIX + "error.";
-
- protected IWizard fWizard;
- protected IWizardPage fParentWizardPage;
- protected ILauncher fLauncher;
-
- protected String fMode;
- /**
- * Creates a node that holds onto a wizard element.
- * The wizard element provides information on how to create
- * the wizard supplied by the ISV's extension.
- */
- public LaunchWizardNode(IWizardPage aWizardPage, ILauncher launcher, String mode) {
- fParentWizardPage= aWizardPage;
- fLauncher= launcher;
- fMode= mode;
- }
-
- /**
- * Returns the wizard represented by this wizard node.
- */
- public ILaunchWizard createWizard() throws CoreException {
- IConfigurationElement config= fLauncher.getConfigurationElement();
- ILaunchWizard wizard= (ILaunchWizard)DebugUIPlugin.getDefault().createExtension(config, "wizard");
- wizard.init(fLauncher, fMode, ((LaunchWizard)fParentWizardPage.getWizard()).getSelection());
- return wizard;
- }
-
- /**
- * @see org.eclipse.jface.wizard.IWizardNode#getExtent()
- */
- public Point getExtent() {
- return new Point(-1, -1);
- }
-
- /**
- * @see org.eclipse.jface.wizards.IWizardNode#getWizard()
- */
- public IWizard getWizard() {
- if (fWizard != null) {
- return fWizard; // we've already created it
- }
- try {
- fWizard= createWizard(); // create instance of target wizard
- } catch (CoreException e) {
- DebugUIUtils.errorDialog(fParentWizardPage.getControl().getShell(), ERROR, e.getStatus());
- return null;
- }
-
- return fWizard;
- }
-
- /**
- * @see org.eclipse.jface.wizard.IWizardNode#isContentCreated()
- */
- public boolean isContentCreated() {
- return fWizard != null;
- }
-
- /**
- * @see org.eclipse.jface.wizard.IWizardNode#dispose()
- */
- public void dispose() {
- // Do nothing since the wizard wasn't created via reflection.
- fWizard= null;
- }
-
- /**
- * Returns the description specified for the launcher associated
- * with the wizard node.
- */
- public String getDescription() {
- IConfigurationElement config= fLauncher.getConfigurationElement();
- String description= config.getAttribute("description");
- if (description == null) {
- description= "";
- }
- return description;
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizardProjectSelectionPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizardProjectSelectionPage.java
deleted file mode 100644
index b8958cccb..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizardProjectSelectionPage.java
+++ /dev/null
@@ -1,306 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.*;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.IWizardContainer;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * Used to select the project that will be used as a launch context.
- */
-public class LaunchWizardProjectSelectionPage extends WizardPage {
-
- private static final String PREFIX= "launch_wizard_project_page.";
- private static final String LAUNCHER= PREFIX + "launcher";
- private static final String SELECT_ELEMENT= PREFIX + "select_element";
- private static final String SELECT_ERROR_ELEMENT= PREFIX + "select_error_element";
- private static final String PATTERN_LABEL= PREFIX + "pattern_label";
-
- /**
- * Viewer for the projects to provide the context for the launch
- */
- protected TableViewer fElementsList;
-
- /**
- * A text field to perform pattern matching
- */
- protected Text fPatternText;
-
- /**
- * The filtered array
- */
- protected Object[] fFilteredElements;
-
- /**
- * The selected project, or <code>null</code> if none.
- */
- protected IProject fProject;
-
- /**
- * A content provider for the elements list
- */
- class ElementsContentProvider implements IStructuredContentProvider {
-
- protected IWorkspaceRoot fWorkspaceRoot;
-
- /**
- * @see IContentProvider#inputChanged
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- fWorkspaceRoot= (IWorkspaceRoot)newInput;
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object parent) {
- if (fWorkspaceRoot != null) {
- return fWorkspaceRoot.getProjects();
- }
-
- return new Object[]{};
- }
- }
-
- class PatternFilter extends ViewerFilter {
- protected StringMatcher fMatcher= null;
-
- /**
- * @see ViewerFilter
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (fMatcher == null) {
- return true;
- }
- ILabelProvider lp= (ILabelProvider) fElementsList.getLabelProvider();
- return fMatcher.match(lp.getText(element));
- }
-
- public void setPattern(String pattern) {
- fMatcher= new StringMatcher(pattern + "*", true, false);
- }
-
- /**
- * Cache the filtered elements so we can single-select.
- *
- * @see ViewerFilter
- */
- public Object[] filter(Viewer viewer, Object parent, Object[] input) {
- fFilteredElements= super.filter(viewer, parent, input);
- return fFilteredElements;
- }
-
- }
-
- class SimpleSorter extends ViewerSorter {
- /**
- * @seeViewerSorter#isSorterProperty(Object, Object)
- */
- public boolean isSorterProperty(Object element, Object property) {
- return true;
- }
- }
-
- /**
- * Constructs a this page for the given mode
- */
- public LaunchWizardProjectSelectionPage(String mode, IProject initialSelection) {
- super(DebugUIUtils.getResourceString(PREFIX + "title"));
- // Set the image for the wizard based on the mode
- if (mode.equals(ILaunchManager.DEBUG_MODE)) {
- setImageDescriptor(DebugUITools.getImageDescriptor(IDebugUIConstants.IMG_WIZBAN_DEBUG));
- } else {
- setImageDescriptor(DebugUITools.getImageDescriptor(IDebugUIConstants.IMG_WIZBAN_RUN));
- }
- fProject = initialSelection;
- }
-
- /**
- * Creates the contents of the page - a sorted list of
- * the projects in the workspace and text area to enter
- * a pattern to match.
- */
- public void createControl(Composite ancestor) {
- Composite root= new Composite(ancestor, SWT.NONE);
- GridLayout l= new GridLayout();
- l.numColumns= 1;
- l.makeColumnsEqualWidth= true;
- root.setLayout(l);
-
- createElementsGroup(root);
-
- setDescription(DebugUIUtils.getResourceString(PREFIX + "title"));
-
- setPageComplete(false);
- setTitle(DebugUIUtils.getResourceString(PREFIX + "title"));
- setControl(root);
- WorkbenchHelp.setHelp(
- ancestor,
- new Object[] { IDebugHelpContextIds.PROJECT_SELECTION_WIZARD_PAGE });
- }
-
- public void createElementsGroup(Composite root) {
- Label elementsLabel= new Label(root, SWT.NONE);
- elementsLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
- elementsLabel.setText(DebugUIUtils.getResourceString(PATTERN_LABEL));
-
- fPatternText= new Text(root, SWT.BORDER);
- fPatternText.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- fElementsList= new TableViewer(root, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER) {
- protected void handleDoubleSelect(SelectionEvent event) {
- getContainer().showPage(getNextPage());
- }
- };
-
- Table list= fElementsList.getTable();
-
- GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
- gd.heightHint= 200;
- gd.grabExcessVerticalSpace= true;
- list.setLayoutData(gd);
-
- fElementsList.setContentProvider(new ElementsContentProvider());
- fElementsList.setLabelProvider(new WorkbenchLabelProvider());
- fElementsList.setSorter(new SimpleSorter());
-
- final PatternFilter filter= new PatternFilter();
- fElementsList.addFilter(filter);
- fPatternText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- filter.setPattern(((Text) (e.widget)).getText());
- fElementsList.refresh();
- if (fFilteredElements.length >= 1) {
- fElementsList.setSelection(new StructuredSelection(fFilteredElements[0]), true);
- setMessage(DebugUIUtils.getResourceString(SELECT_ELEMENT));
- setPageComplete(true);
- return;
- } else {
- setMessage(DebugUIUtils.getResourceString(SELECT_ERROR_ELEMENT));
- setPageComplete(false);
- }
- }
- });
-
- fElementsList.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- setMessage(DebugUIUtils.getResourceString(SELECT_ELEMENT));
- IStructuredSelection ss = null;
- if (e.getSelection() instanceof IStructuredSelection) {
- ss = (IStructuredSelection) e.getSelection();
- }
- if (ss != null && ss.size() == 1) {
- fProject = (IProject)ss.getFirstElement();
- setPageComplete(true);
- } else {
- setPageComplete(false);
- fProject = null;
- }
- }
- });
-
- fElementsList.setInput(ResourcesPlugin.getWorkspace().getRoot());
- if (fProject != null) {
- fElementsList.setSelection(new StructuredSelection(fProject));
- }
- }
-
- /**
- * Returns the selected Java project for the context of the launch or <code>null</code> if
- * no Java project is selected.
- */
- protected Object[] getElements() {
- ISelection s= fElementsList.getSelection();
- if (s.isEmpty()) {
- return null;
- }
-
- if (s instanceof IStructuredSelection) {
- return ((IStructuredSelection) s).toArray();
- }
-
- return null;
- }
-
- /**
- * Convenience method to set the message line
- */
- public void setMessage(String message) {
- super.setErrorMessage(null);
- super.setMessage(message);
- }
-
- /**
- * Convenience method to set the error line
- */
- public void setErrorMessage(String message) {
- super.setMessage(null);
- super.setErrorMessage(message);
- }
-
- /**
- * Initialize the settings:<ul>
- * <li>If there is only one project, select it
- * <li>Put the cursor in the pattern text area
- * </ul>
- */
- protected void initializeSettings() {
-
- Object[] children= ResourcesPlugin.getWorkspace().getRoot().getProjects();
- if (children.length == 1) {
- fElementsList.setSelection(new StructuredSelection(children[0]));
- setMessage(DebugUIUtils.getResourceString(SELECT_ELEMENT));
- setPageComplete(true);
- } else if (children.length > 0) {
- setMessage(DebugUIUtils.getResourceString(SELECT_ELEMENT));
- if (fElementsList.getSelection().isEmpty()) {
- fElementsList.setSelection(new StructuredSelection(children[0]));
- }
- setPageComplete(true);
- } else {
- // no elements to select
- setErrorMessage(DebugUIUtils.getResourceString(SELECT_ERROR_ELEMENT));
- setPageComplete(false);
- }
- fPatternText.setFocus();
- }
-
- /**
- * @IWizardPage#canFlipToNextPage()
- */
- public boolean canFlipToNextPage() {
- return isPageComplete();
- }
-
- public IWizardContainer getContainer() {
- return super.getContainer();
- }
-
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- initializeSettings();
- }
- }
-
- protected IProject getProject() {
- return fProject;
- }
-}
-
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizardSelectionPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizardSelectionPage.java
deleted file mode 100644
index f145fbee1..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchWizardSelectionPage.java
+++ /dev/null
@@ -1,284 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.text.MessageFormat;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.IWizardContainer;
-import org.eclipse.jface.wizard.WizardSelectionPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class LaunchWizardSelectionPage extends WizardSelectionPage {
-
- private static final String PREFIX= "launch_wizard_page.";
- private static final String LAUNCHER= PREFIX + "launcher";
- private static final String UNKNOWN= PREFIX + "unknown";
- private static final String DEFAULT_LAUNCHER= PREFIX + "default_launcher";
- private static final String SELECT_ERROR_LAUNCHER= PREFIX + "select_error_launcher";
- /**
- * Viewer for the launchers
- */
- protected TableViewer fLaunchersList;
-
- /**
- * List of launchers
- */
- protected Object[] fLaunchers;
-
- /**
- * Check box for setting default launcher
- */
- protected Button fSetAsDefaultLauncher;
-
- /**
- * The mode of the launch.
- * @see ExecutionAction#getMode()
- */
- protected String fMode;
-
- /**
- * Indicates whether the project context of the launch has
- * changed since the creation of this wizard.
- * If the context has changed, the list of launchables
- * needs updating.
- */
- protected boolean fLaunchablesUpdateNeeded;
-
- /**
- * The selected launcher or <code>null</code> if none.
- */
- protected ILauncher fLauncher;
-
- /**
- * The current project context
- */
- protected IProject fProject= null;
-
- /**
- * A content provider for the elements list
- */
- class ElementsContentProvider implements IStructuredContentProvider {
-
- /**
- * @see IContentProvider#inputChanged
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object parent) {
- return fLaunchers;
- }
- }
-
- class SimpleSorter extends ViewerSorter {
- /**
- * @seeViewerSorter#isSorterProperty(Object, Object)
- */
- public boolean isSorterProperty(Object element, Object property) {
- return true;
- }
- }
-
- public LaunchWizardSelectionPage(Object[] allLaunchers, String mode, ILauncher initialLauncher) {
- super(DebugUIUtils.getResourceString(PREFIX + "title"));
- fLaunchers= allLaunchers;
- fMode= mode;
- fLauncher = initialLauncher;
- }
-
- public void createControl(Composite ancestor) {
- Composite root= new Composite(ancestor, SWT.NONE);
- GridLayout l= new GridLayout();
- l.numColumns= 1;
- root.setLayout(l);
- createLaunchersGroup(root);
-
- setTitle(DebugUIUtils.getResourceString(PREFIX + "title"));
- if (fMode.equals(ILaunchManager.DEBUG_MODE)) {
- setImageDescriptor(DebugUITools.getImageDescriptor(IDebugUIConstants.IMG_WIZBAN_DEBUG));
- } else {
- setImageDescriptor(DebugUITools.getImageDescriptor(IDebugUIConstants.IMG_WIZBAN_RUN));
- }
- setControl(root);
- WorkbenchHelp.setHelp(
- ancestor,
- new Object[] { IDebugHelpContextIds.LAUNCHER_SELECTION_WIZARD_PAGE });
- }
-
- public void createLaunchersGroup(Composite root) {
-
- fSetAsDefaultLauncher= new Button(root, SWT.CHECK);
-
- Label launchersLabel= new Label(root, SWT.NONE);
- launchersLabel.setText(DebugUIUtils.getResourceString(LAUNCHER));
-
- fLaunchersList= new TableViewer(new Table(root, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER)) {
- protected void handleDoubleSelect(SelectionEvent event) {
- updateSelection(getSelection());
- ((LaunchWizard)getWizard()).updateDefaultLauncher();
- getContainer().showPage(getNextPage());
- }
- };
-
- Table list= fLaunchersList.getTable();
-
- GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
- gd.heightHint= 200;
- gd.grabExcessVerticalSpace= true;
- gd.grabExcessHorizontalSpace= true;
- list.setLayoutData(gd);
-
- fLaunchersList.setContentProvider(new ElementsContentProvider());
- fLaunchersList.setLabelProvider(new DelegatingModelPresentation());
- fLaunchersList.setSorter(new SimpleSorter());
- fLaunchersList.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- if (e.getSelection() instanceof IStructuredSelection) {
- IStructuredSelection ss= (IStructuredSelection) e.getSelection();
- if (ss.isEmpty()) {
- launcherSelected(null);
- } else {
- launcherSelected((ILauncher)ss.getFirstElement());
- }
- }
- }
- });
- fLaunchersList.setInput(fLaunchersList);
- if (fLauncher != null) {
- fLaunchersList.setSelection(new StructuredSelection(fLauncher));
- }
- }
-
- /**
- * Updates the elements list for the given launcher
- */
- protected void launcherSelected(ILauncher launcher) {
- fLauncher = launcher;
- setMessage(null);
- if (launcher != null) {
- LaunchWizardNode node= new LaunchWizardNode(this, launcher, fMode);
- setSelectedNode(node);
- setDescription(node.getDescription());
- }
- updateDefaultLauncherButton(launcher);
-
- }
-
- /**
- * Convenience method to set the error line
- */
- public void setErrorMessage(String message) {
- super.setMessage(null);
- super.setErrorMessage(message);
- }
-
- /**
- * Convenience method to set the message line
- */
- public void setMessage(String message) {
- super.setErrorMessage(null);
- super.setMessage(message);
- }
-
- /**
- * Initialize the settings:<ul>
- * <li>If there is only one launcher, select it
- * </ul>
- */
- protected void initializeSettings() {
-
- if (fLaunchers.length == 0) {
- setErrorMessage(DebugUIUtils.getResourceString(SELECT_ERROR_LAUNCHER));
- } else {
- IStructuredSelection selection= (IStructuredSelection)fLaunchersList.getSelection();
- if (selection.isEmpty()) {
- fLaunchersList.setSelection(new StructuredSelection(fLaunchers[0]));
- } else if (fLaunchablesUpdateNeeded) {
- //update the list of launchables if the project has changed
- fLaunchersList.setSelection(selection);
- fLaunchablesUpdateNeeded= false;
- }
- }
- }
-
- protected void updateDefaultLauncherButton(ILauncher launcher) {
- IProject project= ((LaunchWizard)getWizard()).getProject();
- if (project == null) {
- // disable the control, we cannot set it without a project context
- fSetAsDefaultLauncher.setSelection(false);
- fSetAsDefaultLauncher.setEnabled(false);
- } else {
- // if the launcher is not the default launcher, enable the control
- try {
- ILauncher defaultLauncher= DebugPlugin.getDefault().getLaunchManager().getDefaultLauncher(project);
- if (defaultLauncher != null && defaultLauncher.equals(launcher)) {
- // disable the setting, but show that it is set
- fSetAsDefaultLauncher.setSelection(true);
- fSetAsDefaultLauncher.setEnabled(false);
- } else {
- // allow to set as default - in fact, set as default
- fSetAsDefaultLauncher.setSelection(true);
- fSetAsDefaultLauncher.setEnabled(true);
- }
- } catch (CoreException e) {
- // disable default launcher
- fSetAsDefaultLauncher.setSelection(false);
- fSetAsDefaultLauncher.setEnabled(false);
- }
- }
- }
-
- protected ILauncher getLauncher() {
- return fLauncher;
- }
-
- /**
- * Implemented here to provide package access
- */
- protected IWizardContainer getContainer() {
- return super.getContainer();
- }
-
- protected void updateDefaultProject() {
- IProject project= ((LaunchWizard)getWizard()).getProject();
- String projectName= "";
- if (project != null) {
- if (!project.equals(fProject)) {
- fLaunchablesUpdateNeeded= true;
- fProject= project;
- }
- projectName= project.getName();
- } else {
- projectName= DebugUIUtils.getResourceString(UNKNOWN);
- }
- fSetAsDefaultLauncher.setText(MessageFormat.format(DebugUIUtils.getResourceString(DEFAULT_LAUNCHER), new String[] {projectName}));
- fSetAsDefaultLauncher.pack();
- }
-
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- updateDefaultProject();
- initializeSettings();
- } else {
- fLaunchablesUpdateNeeded= false;
- }
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LauncherPropertyPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LauncherPropertyPage.java
deleted file mode 100644
index 42b311a13..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LauncherPropertyPage.java
+++ /dev/null
@@ -1,259 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.ILauncher;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import java.util.ArrayList;
-
-/**
- * A preference page to enable/disable default launchers for a resource.
- */
-public class LauncherPropertyPage extends PropertyPage implements IWorkbenchPreferencePage {
-
- private static final String PREFIX= "launcher_preferences.";
- private static final String DESCRIPTION= PREFIX + "description";
- private static final String RUN_DEBUG= PREFIX + "run_debug";
- private static final String NONE= PREFIX + "none";
- private static final String ERROR= PREFIX + "error.";
- private static final String CLOSED_PROJECT= PREFIX + "closed_project";
-
- protected Combo fCombo;
-
- /**
- * Utility method that creates a combo instance
- * and sets the default layout data.
- */
-
- private Combo createCombo(Composite parent, String[] items) {
- Combo combo= new Combo(parent, SWT.READ_ONLY | SWT.DROP_DOWN);
- combo.setItems(items);
- GridData data= new GridData();
- data.horizontalAlignment= GridData.HORIZONTAL_ALIGN_BEGINNING;
- combo.setLayoutData(data);
- return combo;
- }
-
- /**
- * Creates composite control and sets the default layout data.
- */
-
- private Composite createComposite(Composite parent, int numColumns) {
- Composite composite= new Composite(parent, SWT.NULL);
-
- //GridLayout
- GridLayout layout= new GridLayout();
- layout.numColumns= numColumns;
- composite.setLayout(layout);
-
- //GridData
- GridData data= new GridData();
- data.verticalAlignment= GridData.FILL;
- data.horizontalAlignment= GridData.FILL;
- composite.setLayoutData(data);
- return composite;
- }
-
- protected Control createContents(Composite parent){
- return null;
- }
- /**
- * Creates preference page controls on demand.
- */
- public void createControl(Composite parent) {
-
- if (!getProject().isOpen()) {
- createForClosedProject(parent);
- return;
- }
- // Table to choose which tags are shown in the outliner
- Composite pageComponent= createComposite(parent, 1);
- createLabel(pageComponent, DebugUIUtils.getResourceString(DESCRIPTION));
- ImageRegistry registry= DebugUIPlugin.getDefault().getImageRegistry();
-
- ILauncher[] launchers= getLaunchManager().getLaunchers();
- java.util.List list = new ArrayList(1);
- list.add(DebugUIUtils.getResourceString(NONE));
- for (int i = 0; i < launchers.length; i++) {
- if (DebugUIPlugin.getDefault().isVisible(launchers[i]))
- list.add(launchers[i].getLabel());
- }
- String[] items= new String[list.size()];
- list.toArray(items);
-
- //Composite box= createComposite(pageComponent, 2);
- Composite launcherComponent= createComposite(pageComponent, 2);
- createLabel(launcherComponent, DebugUIUtils.getResourceString(RUN_DEBUG), registry.get(IDebugUIConstants.IMG_ACT_DEBUG));
- fCombo= createCombo(launcherComponent, items);
-
- initializeValues();
- setControl(pageComponent);
- }
-
- private void createForClosedProject(Composite parent) {
- Label label= new Label(parent, SWT.LEFT);
- label.setText(DebugUIUtils.getResourceString(CLOSED_PROJECT));
- label.setFont(parent.getFont());
- setControl(label);
- }
- /**
- * Utility method that creates a label instance
- * and sets the default layout data.
- */
- private Label createLabel(Composite parent, String text) {
- Label label= new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data= new GridData();
- data.horizontalAlignment= GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
-
- /**
- * Utility method that creates a composite label instance
- * and sets the default layout data.
- */
-
- private Composite createLabel(Composite parent, String text, Image image) {
- Composite composite= createComposite(parent, 2);
- Label imageLabel= new Label(composite, SWT.LEFT);
- imageLabel.setImage(image);
- Label textLabel= new Label(composite, SWT.LEFT);
- textLabel.setText(text);
-
- GridData data= new GridData();
- data.horizontalAlignment= GridData.HORIZONTAL_ALIGN_BEGINNING;
- composite.setLayoutData(data);
-
- return composite;
- }
-
- /**
- * The default button has been pressed.
- */
- protected void performDefaults() {
- super.performDefaults();
- // Select "none"
- fCombo.select(0);
- }
-
- /**
- * Returns preference store that belongs to the our plugin.
- * This is important because we want to store
- * our preferences separately from the desktop.
- */
- protected IPreferenceStore doGetPreferenceStore() {
- return DebugUIPlugin.getDefault().getPreferenceStore();
- }
-
- /**
- * This is a hook for subclasses to do special things when the ok
- * button is pressed.
- */
- public boolean performOk() {
- IProject project= getProject();
- if (project != null && project.isOpen()) {
- boolean ok;
- String selection= fCombo.getText();
- return saveLauncherProperty(project, selection);
- }
- return true;
- }
-
- /**
- * Convenience method to get the launch manager
- */
- protected ILaunchManager getLaunchManager() {
- return DebugPlugin.getDefault().getLaunchManager();
- }
-
- /**
- * Returns the project this page works on
- */
- protected IProject getProject() {
- IAdaptable element= getElement();
- IProject project= null;
- IResource resource= (IResource)element.getAdapter(IResource.class);
- if (resource != null) {
- return resource.getProject();
- }
- return null;
- }
-
- /**
- * @see IWorkbenchPreferencePage
- */
- public void init(IWorkbench desktop) {
- doGetPreferenceStore();
- }
-
- /**
- * Initializes states of the controls.
- */
- private void initializeValues() {
-
- IProject project= getProject();
- if (project != null) {
- try {
- ILauncher launcher= getLaunchManager().getDefaultLauncher(project);
- if (launcher == null) {
- fCombo.select(0);
- } else {
- fCombo.setText(launcher.getLabel());
- }
- } catch (CoreException ce) {
- fCombo.select(0);
- DebugUIUtils.logError(ce);
- }
- }
- }
-
- /**
- * Find the launcher with the given selection (name), and save it as the preference.
- */
- protected boolean saveLauncherProperty(IProject project, String selection) {
- try {
- ILauncher[] launchers= getLaunchManager().getLaunchers();
- for (int i= 0; i < launchers.length; i++) {
- ILauncher launcher= launchers[i];
- if (launcher.getLabel().equals(selection)) {
- getLaunchManager().setDefaultLauncher(project, launcher);
- return true;
- }
- }
- getLaunchManager().setDefaultLauncher(project, null);
- } catch (CoreException e) {
- DebugUIUtils.errorDialog(DebugUIPlugin.getActiveWorkbenchWindow().getShell(), ERROR, e.getStatus());
- return false;
- }
- return true;
- }
-
- /**
- * The push button has been double clicked
- */
- public void widgetDoubleSelected(SelectionEvent event) {
-
- // The select all button has been double clicked
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchesView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchesView.java
deleted file mode 100644
index fcae205a8..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchesView.java
+++ /dev/null
@@ -1,223 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.model.IProcess; import org.eclipse.debug.core.model.IStackFrame; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.jface.action.*; import org.eclipse.jface.viewers.*; import org.eclipse.swt.SWT; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.ui.IWorkbenchActionConstants; import org.eclipse.ui.actions.SelectionProviderAction; import org.eclipse.ui.dialogs.PropertyDialogAction; import org.eclipse.ui.help.ViewContextComputer; import org.eclipse.ui.help.WorkbenchHelp;
-
-public class LaunchesView extends AbstractDebugView implements ISelectionChangedListener, IDoubleClickListener {
-
- protected final static String PREFIX= "launches_view.";
-
- protected SelectionProviderAction fTerminateAction;
- protected RemoveTerminatedAction fRemoveTerminatedAction;
- protected TerminateAllAction fTerminateAllAction;
- protected SelectionProviderAction fDisconnectAction;
- protected SelectionProviderAction fRelaunchAction;
- protected SelectionProviderAction fTerminateAndRemoveAction;
-
- protected PropertyDialogAction fPropertyDialogAction;
-
- /**
- * Updates the state of the buttons in the view
- */
- protected void updateButtons() {
- ISelection s= fViewer.getSelection();
- if (s instanceof IStructuredSelection) {
- IStructuredSelection selection= (IStructuredSelection) s;
- fTerminateAction.selectionChanged(selection);
- fDisconnectAction.selectionChanged(selection);
- }
- fRemoveTerminatedAction.update();
- fTerminateAllAction.update();
- }
-
- /**
- * Initializes the actions of this view.
- */
- protected void initializeActions(LaunchesViewer viewer) {
-
- fTerminateAction= new ControlAction(viewer, new TerminateActionDelegate());
- fTerminateAction.setEnabled(false);
-
- fDisconnectAction= new ControlAction(viewer, new DisconnectActionDelegate());
- fDisconnectAction.setEnabled(false);
-
- fRemoveTerminatedAction= new RemoveTerminatedAction(this instanceof DebugView);
- fRemoveTerminatedAction.setEnabled(false);
-
- fRelaunchAction= new ControlAction(viewer, new RelaunchActionDelegate());
- fRelaunchAction.setEnabled(false);
-
- fTerminateAndRemoveAction= new ControlAction(viewer, new TerminateAndRemoveActionDelegate());
-
- fTerminateAllAction= new TerminateAllAction();
-
- fPropertyDialogAction= new PropertyDialogAction(getSite().getWorkbenchWindow().getShell(), getSite().getSelectionProvider());
- }
-
- /**
- * @see IWorkbenchPart
- */
- public void createPartControl(Composite parent) {
- boolean showDebugTargets = getSite().getId().equals(IDebugUIConstants.ID_DEBUG_VIEW);
- LaunchesViewer lv = new LaunchesViewer(parent, showDebugTargets, this);
- fViewer= lv;
- fViewer.addSelectionChangedListener(this);
- fViewer.addDoubleClickListener(this);
- fViewer.setContentProvider(getContentProvider());
- fViewer.setLabelProvider(new DelegatingModelPresentation());
- fViewer.setUseHashlookup(true);
- // add my viewer as a selection provider, so selective re-launch works
- getSite().setSelectionProvider(fViewer);
- initializeActions(lv);
- // register this viewer as the debug UI selection provider
- DebugUIPlugin.getDefault().addSelectionProvider(fViewer, this);
-
- // create context menu
- createContextMenu(lv.getTree());
- initializeToolBar();
- lv.expandToLevel(2);
- fViewer.setInput(DebugPlugin.getDefault().getLaunchManager());
- fViewer.getControl().addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- handleKeyPressed(e);
- }
- });
- setTitleToolTip(getTitleToolTipText(getPrefix()));
- WorkbenchHelp.setHelp(
- parent,
- new ViewContextComputer(this, IDebugHelpContextIds.PROCESS_VIEW ));
- }
-
- /**
- * Configures the toolBar
- */
- protected void configureToolBar(IToolBarManager tbm) {
- tbm.add(fTerminateAction);
- tbm.add(fDisconnectAction);
- tbm.add(fRemoveTerminatedAction);
- }
-
- /**
- * @see IWorkbenchPart
- */
- public void setFocus() {
- Control c = fViewer.getControl();
- if (!c.isFocusControl()) {
- c.setFocus();
- //ensure that all downstream listeners
- //know the current selection..switching from another view
- DebugUIPlugin.getDefault().selectionChanged(new SelectionChangedEvent(fViewer, fViewer.getSelection()));
- }
- }
-
- /**
- * Adds items to the context menu
- */
- protected void fillContextMenu(IMenuManager mgr) {
- fRemoveTerminatedAction.update();
- fTerminateAllAction.update();
-
- mgr.add(new Separator(IDebugUIConstants.EMPTY_LAUNCH_GROUP));
- mgr.add(new Separator(IDebugUIConstants.LAUNCH_GROUP));
-
- mgr.add(fTerminateAction);
- mgr.add(fDisconnectAction);
- mgr.add(new Separator());
- mgr.add(fTerminateAndRemoveAction);
- mgr.add(fTerminateAllAction);
- mgr.add(fRemoveTerminatedAction);
- mgr.add(fRelaunchAction);
- mgr.add(new Separator(IDebugUIConstants.PROPERTY_GROUP));
- fPropertyDialogAction.setEnabled(fPropertyDialogAction.isApplicableForSelection());
- mgr.add(fPropertyDialogAction);
- mgr.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
-
- /**
- * @see IWorkbenchPart
- */
- public void dispose() {
- if (fViewer != null) {
- DebugUIPlugin.getDefault().removeSelectionProvider(fViewer, this);
- fViewer.removeDoubleClickListener(this);
- fViewer.removeSelectionChangedListener(this);
- }
- super.dispose();
- }
-
- /**
- * Auto-expand and select the given element - must be called in UI thread.
- * This is used to implement auto-expansion-and-select on a SUSPEND event.
- */
- public void autoExpand(Object element, boolean refreshNeeded) {
- autoExpand(element);
- }
-
- public void autoExpand(Object element) {
- Object selectee = element;
- if (element instanceof ILaunch) {
- IProcess[] ps= ((ILaunch)element).getProcesses();
- if (ps != null && ps.length > 0) {
- selectee= ps[0];
- }
- }
- fViewer.setSelection(new StructuredSelection(selectee), true);
- }
-
- /**
- * Returns the content provider to use for the viewer of this view.
- */
- protected DebugContentProvider getContentProvider() {
- return new ProcessesContentProvider();
- }
-
- /**
- * The selection has changed in the viewer. Update
- * the state of the buttons.
- */
- public void selectionChanged(SelectionChangedEvent event) {
- updateButtons();
- }
-
- /**
- * Returns the resource bundle prefix for this action
- */
- protected String getPrefix(){
- return PREFIX;
- }
-
- /**
- * Handles key events in viewer. Specifically interested in
- * the Delete key.
- */
- protected void handleKeyPressed(KeyEvent event) {
- if (event.character == SWT.DEL && event.stateMask == 0
- && fTerminateAndRemoveAction.isEnabled()) {
- fTerminateAndRemoveAction.run();
- }
- }
-
- /**
- * @see IDoubleClickListener#doubleClick(DoubleClickEvent)
- */
- public void doubleClick(DoubleClickEvent event) {
- ISelection selection= event.getSelection();
- if (!(selection instanceof IStructuredSelection)) {
- return;
- }
- IStructuredSelection ss= (IStructuredSelection)selection;
- Object o= ss.getFirstElement();
- if (o instanceof IStackFrame) {
- return;
- }
- TreeViewer tViewer= (TreeViewer)fViewer;
- boolean expanded= tViewer.getExpandedState(o);
- tViewer.setExpandedState(o, !expanded);
- }
-}
-
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchesViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchesViewer.java
deleted file mode 100644
index 90f65f596..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchesViewer.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Tree;
-
-/**
- * The launches viewer displays a tree of launches. It can be
- * configured to display run launches or debug launches. When
- * displaying run launches, it filters debug targets from the viewer.
- * When displaying debug launches, debug targets are displayed,
- * and the debug target's corresponding system process is filtered
- * from the view.
- */
-public class LaunchesViewer extends TreeViewer {
- /**
- * The view this viewer is contained in
- */
- protected LaunchesView fView;
-
- public LaunchesViewer(Composite parent, boolean showDebugTargets, LaunchesView view) {
- super(new Tree(parent, SWT.MULTI));
- fView= view;
- LaunchesViewerFilter filter= new LaunchesViewerFilter(showDebugTargets);
- addFilter(filter);
- setUseHashlookup(true);
- }
-
- /**
- * Update the buttons in my view
- */
- protected void updateButtons() {
- fView.updateButtons();
- }
-
- protected void autoExpand(Object element, boolean refreshNeeded) {
- fView.autoExpand(element, refreshNeeded);
- }
-
- protected void updateMarkerForSelection() {
- // update the instruction pointer
- if (fView instanceof DebugView) {
- ((DebugView) fView).showMarkerForCurrentSelection();
- }
- }
-
- /**
- * Only sets selection if it is different from the current selection
- */
- public void setSelection(ISelection selection, boolean reveal) {
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss= (IStructuredSelection)selection;
- Object element= ss.getFirstElement();
- ISelection oldSelection= getSelection();
- if (oldSelection instanceof IStructuredSelection) {
- if (element != null) {
- IStructuredSelection oldss= (IStructuredSelection)oldSelection;
- Object oldElement= oldss.getFirstElement();
- if (element.equals(oldElement)) {
- if (element instanceof IStackFrame) {
- //update source selection only...line number change
- ((DebugView)fView).showMarkerForCurrentSelection();
- } else if (element instanceof IThread) {
- ((DebugView)fView).updateButtons();
- }
- return;
- }
- }
- }
- }
- super.setSelection(selection, reveal);
- }
-
- protected void clearSourceSelection() {
- if (fView instanceof DebugView) {
- ((DebugView)fView).clearSourceSelection();
- }
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchesViewerFilter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchesViewerFilter.java
deleted file mode 100644
index a4bf5fc54..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchesViewerFilter.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-
-public class LaunchesViewerFilter extends ViewerFilter {
- private boolean fShowDebug;
-
- public LaunchesViewerFilter(boolean showDebug) {
- fShowDebug= showDebug;
- }
-
- /**
- * Helper method for #select - returns whether the given
- * launch should be in the viewer.
- */
- protected boolean showLaunch(ILaunch launch) {
- if (launch == null) {
- return false;
- }
- if (fShowDebug) {
- return launch.getDebugTarget() != null;
- } else {
- IProcess[] processes= launch.getProcesses();
- return processes.length > 0;
- }
- }
-
- /**
- * @see ViewerFilter
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- ILaunch launch= null;
- if (element instanceof ILaunch) {
- return showLaunch((ILaunch)element);
-
- } else
- if (element instanceof IProcess) {
- launch= ((IProcess)element).getLaunch();
- if (launch == null) {
- return false;
- }
- if (fShowDebug) {
- IDebugTarget target = launch.getDebugTarget();
- return target != null && !element.equals(target.getProcess());
- } else {
- return showLaunch(launch);
- }
- } else
- if (element instanceof IDebugElement) {
- return fShowDebug;
- }
- return false;
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java
deleted file mode 100644
index 0d19b9baa..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.util.ListenerList;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.graphics.Image;
-import java.util.HashMap;
-import java.util.Iterator;
-
-/**
- * A proxy to an IDebugModelPresentation extension. Instantiates the extension
- * when it is needed.
- */
-
-public class LazyModelPresentation implements IDebugModelPresentation {
-
- /**
- * A temporary mapping of attribute ids to their values
- * @see IDebugModelPresentation#setAttribute
- */
- protected HashMap fAttributes= new HashMap(3);
-
- /**
- * The config element that defines the extension
- */
- protected IConfigurationElement fConfig = null;
-
- /**
- * The actual presentation instance - null until called upon
- */
- protected IDebugModelPresentation fPresentation = null;
-
- /**
- * Temp holding for listeners - we do not add to presentation until
- * it needs to be instantiated.
- */
- protected ListenerList fListeners= new ListenerList(5);
- /**
- * Constructs a lazy presentation from the config element.
- */
- public LazyModelPresentation(IConfigurationElement configElement) {
- fConfig = configElement;
- }
-
- public Image getImage(Object element) {
- return getPresentation().getImage(element);
- }
-
- public String getText(Object element) {
- return getPresentation().getText(element);
- }
-
- /**
- * @see IDebugModelPresentaion
- */
- public IEditorInput getEditorInput(Object element) {
- return getPresentation().getEditorInput(element);
- }
-
- /**
- * @see IDebugModelPresentaion
- */
- public String getEditorId(IEditorInput input, Object inputObject) {
- return getPresentation().getEditorId(input, inputObject);
- }
-
- public void addListener(ILabelProviderListener listener) {
- if (fPresentation != null) {
- getPresentation().addListener(listener);
- }
- fListeners.add(listener);
- }
-
- public void dispose() {
- if (fPresentation != null) {
- getPresentation().dispose();
- }
- fListeners = null;
- }
-
- public boolean isLabelProperty(Object element, String property) {
- if (fPresentation != null) {
- return getPresentation().isLabelProperty(element, property);
- }
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- if (fPresentation != null) {
- getPresentation().removeListener(listener);
- }
- fListeners.remove(listener);
- }
-
- /**
- * @deprecated
- */
- public Image getLabelImage(Viewer viewer, Object element) {
- return getPresentation().getImage(element);
- }
-
- /**
- * @deprecated
- */
- public String getLabelText(Viewer viewer, Object element) {
- return getPresentation().getText(element);
- }
-
- /**
- * Returns the real presentation, instantiating if required.
- */
- protected IDebugModelPresentation getPresentation() {
- if (fPresentation == null) {
- try {
- fPresentation= (IDebugModelPresentation) DebugUIPlugin.createExtension(fConfig, "class");
- // configure it
- if (fListeners != null) {
- Object[] list = fListeners.getListeners();
- for (int i= 0; i < list.length; i++) {
- fPresentation.addListener((ILabelProviderListener)list[i]);
- }
- }
- Iterator keys= fAttributes.keySet().iterator();
- while (keys.hasNext()) {
- String key= (String)keys.next();
- fPresentation.setAttribute(key, fAttributes.get(key));
- }
- } catch (CoreException e) {
- DebugUIUtils.logError(e);
- }
- }
- return fPresentation;
- }
-
- /**
- * @see IDebugModelPresentation
- */
- public void setAttribute(String id, Object value) {
- if (value == null) {
- return;
- }
- if (fPresentation != null) {
- getPresentation().setAttribute(id, value);
- }
-
- fAttributes.put(id, value);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/OpenBreakpointMarkerAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/OpenBreakpointMarkerAction.java
deleted file mode 100644
index 95e4f22fc..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/OpenBreakpointMarkerAction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.*;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class OpenBreakpointMarkerAction extends OpenMarkerAction {
-
- private static final String PREFIX= "open_breakpoint_marker_action.";
- protected static DelegatingModelPresentation fgPresentation = new DelegatingModelPresentation();
-
- public OpenBreakpointMarkerAction(ISelectionProvider selectionProvider) {
- super(selectionProvider, DebugUIUtils.getResourceString(PREFIX + TEXT));
- setToolTipText(DebugUIUtils.getResourceString(PREFIX + TOOL_TIP_TEXT));
- ISharedImages images= DebugUIPlugin.getDefault().getWorkbench().getSharedImages();
- setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_OPEN_MARKER));
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.OPEN_BREAKPOINT_ACTION });
- }
-
- /**
- * @see IAction
- */
- public void run() {
- IWorkbenchWindow dwindow= DebugUIPlugin.getActiveWorkbenchWindow();
- IWorkbenchPage page= dwindow.getActivePage();
- if (page == null) {
- return;
- }
- IEditorPart part= null;
- // Get the resource.
- IStructuredSelection selection= (IStructuredSelection)getStructuredSelection();
- //Get the selected marker
- Iterator enum= selection.iterator();
- IBreakpoint breakpoint= (IBreakpoint)enum.next();
- IEditorInput input= fgPresentation.getEditorInput(breakpoint);
- String editorId= fgPresentation.getEditorId(input, breakpoint);
- if (input != null) {
- try {
- part= page.openEditor(input, editorId);
- } catch (PartInitException e) {
- DebugUIUtils.logError(e);
- }
- }
- if (part != null) {
- // Bring editor to front.
- part.setFocus();
-
- // Goto the bookmark.
- part.gotoMarker(breakpoint.getMarker());
- }
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/OpenMarkerAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/OpenMarkerAction.java
deleted file mode 100644
index b0485016f..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/OpenMarkerAction.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.SelectionProviderAction;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-
-/**
- * Open a marker
- */
-public class OpenMarkerAction extends SelectionProviderAction {
-
- public OpenMarkerAction(ISelectionProvider selectionProvider, String label) {
- super(selectionProvider, label);
- setEnabled(getStructuredSelection().size() == 1);
- }
-
- /**
- * @see IAction
- */
- public void run() {
- IStructuredSelection selection= (IStructuredSelection) getStructuredSelection();
- //Get the selected marker
- if (selection.size() != 1) {
- return; //Single selection only
- }
- Object object= selection.getFirstElement();
- IWorkbenchWindow dwindow= DebugUIPlugin.getActiveWorkbenchWindow();
- IWorkbenchPage page= dwindow.getActivePage();
- if (page == null) {
- return;
- }
- try {
- page.openEditor((IMarker)object);
- } catch (PartInitException e) {
- DebugUIUtils.logError(e);
- }
- }
-
- /**
- * @see SelectionProviderAction
- */
- public void selectionChanged(IStructuredSelection sel) {
- if (sel.size() == 1) {
- setEnabled(true);
- } else {
- setEnabled(false);
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ProcessesContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ProcessesContentProvider.java
deleted file mode 100644
index 9237f3162..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ProcessesContentProvider.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugEvent; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.model.IDebugElement; import org.eclipse.debug.core.model.IProcess;
-
-/**
- * Provides the contents for a run mode of the Launches viewer.
- */
-public class ProcessesContentProvider extends DebugContentProvider {
-
- /**
- * @see BasicContentProvider#doHandleDebug(Event)
- */
- public void doHandleDebugEvent(DebugEvent event) {
- Object element= event.getSource();
- if (element instanceof IDebugElement) {
- // the processes view is not interested in anything
- //other than launches and processes
- return;
- }
- switch (event.getKind()) {
- case DebugEvent.CREATE :
- insert(element);
- break;
- case DebugEvent.TERMINATE :
- Object parent= getParent(element);
- refresh(parent);
- updateButtons();
- break;
- case DebugEvent.CHANGE :
- refresh(element);
- updateButtons();
- break;
- }
- }
-
- /**
- * @see ILaunchListener
- */
- public void launchRegistered(final ILaunch launch) {
- Runnable r= new Runnable() {
- public void run() {
- if (!isDisposed()) {
- insert(launch);
- IProcess[] ps= launch.getProcesses();
- if (ps != null && ps.length > 0) {
- selectAndReveal(ps[0]);
- }
- }
- }
- };
-
- asyncExec(r);
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchActionDelegate.java
deleted file mode 100644
index 50b65c125..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchActionDelegate.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.text.MessageFormat;
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-
-public class RelaunchActionDelegate extends ControlActionDelegate {
-
- private static final String PREFIX= "relaunch_action.";
- private static final String ERROR= "error.";
- private static final String LAUNCH_PREFIX= "launch_action.";
- private static final String LAUNCH_ERROR_TITLE= LAUNCH_PREFIX + ERROR + "title";
- private static final String LAUNCH_ERROR_MESSAGE= LAUNCH_PREFIX + ERROR + "message";
-
- /**
- * @see ControlActionDelegate
- */
- protected void doAction(Object object) {
- if (object instanceof IDebugElement) {
- relaunch((IDebugElement)object);
- } else if (object instanceof ILaunch) {
- relaunch((ILaunch)object);
- } else if (object instanceof IProcess) {
- relaunch((IProcess)object);
- }
- }
-
- /**
- * Re-launches the launch of the given object in the specified mode.
- */
- public static void relaunch(ILauncher launcher, String mode, Object element) {
- boolean ok= launcher.launch(new Object[]{element}, mode);
- if (!ok) {
- String string= DebugUIUtils.getResourceString(LAUNCH_ERROR_MESSAGE);
- String message= MessageFormat.format(string, new String[] {launcher.getLabel()});
- MessageDialog.openError(DebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(), DebugUIUtils.getResourceString(LAUNCH_ERROR_TITLE), message);
- }
- }
-
- public static void relaunch(LaunchHistoryElement history) {
- relaunch(history.getLauncher(), history.getMode(), history.getLaunchElement());
- }
-
- public static void relaunch(IDebugElement element) {
- relaunch(element.getLaunch());
- }
-
- public static void relaunch(IProcess process) {
- relaunch(process.getLaunch());
- }
-
- public static void relaunch(ILaunch launch) {
- relaunch(launch.getLauncher(), launch.getLaunchMode(), launch.getElement());
- }
-
- public static void relaunch(ILaunch launch, String mode) {
- relaunch(launch.getLauncher(), mode, launch.getElement());
- }
-
-
- /**
- * @see ControlActionDelegate
- */
- public boolean isEnabledFor(Object element) {
- ILaunch launch= null;
-
- if (element instanceof ILaunch) {
- launch= (ILaunch)element;
- } else if (element instanceof IDebugElement) {
- launch= ((IDebugElement)element).getLaunch();
- } else if (element instanceof IProcess) {
- launch= ((IProcess)element).getLaunch();
- }
-
- return launch != null && DebugUIPlugin.getDefault().isVisible(launch.getLauncher());
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected String getPrefix() {
- return PREFIX;
- }
-
- protected String getHelpContextId() {
- return IDebugHelpContextIds.RELAUNCH_ACTION;
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected void setActionImages(IAction action) {
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchHistoryLaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchHistoryLaunchAction.java
deleted file mode 100644
index 9d2d7906c..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchHistoryLaunchAction.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchManager; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.jface.action.Action; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Re-launches a previous launch.
- */
-public class RelaunchHistoryLaunchAction extends Action {
-
- protected LaunchHistoryElement fLaunch;
-
- public RelaunchHistoryLaunchAction(LaunchHistoryElement launch) {
- super();
- fLaunch= launch;
- setText(launch.getLabel());
- ImageDescriptor descriptor= null;
- if (launch.getMode().equals(ILaunchManager.DEBUG_MODE)) {
- descriptor= DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_ACT_DEBUG);
- } else {
- descriptor= DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_ACT_RUN);
- }
-
- if (descriptor != null) {
- setImageDescriptor(descriptor);
- }
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.RELAUNCH_HISTORY_ACTION });
- }
-
- /**
- * @see IAction
- */
- public void run() {
- BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
- public void run() {
- RelaunchActionDelegate.relaunch(fLaunch);
- }
- });
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchLastAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchLastAction.java
deleted file mode 100644
index c1902506a..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchLastAction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.ILaunch; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.IWorkbenchWindowActionDelegate; import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Re-runs or re-debugs the last launch.
- */
-public class RelaunchLastAction extends Action implements IWorkbenchWindowActionDelegate {
-
-
- public RelaunchLastAction() {
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.RELAUNCH_LAST_ACTION });
- }
-
- /**
- * @see IAction
- */
- public void run() {
- final LaunchHistoryElement recent= DebugUIPlugin.getDefault().getLastLaunch();
- if (recent == null) {
- Display.getCurrent().beep();
- } else {
- BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
- public void run() {
- RelaunchActionDelegate.relaunch(recent);
- }
- });
- }
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate
- */
- public void dispose(){
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate
- */
- public void init(IWorkbenchWindow window){
- }
-
- /**
- * @see IActionDelegate
- */
- public void run(IAction action){
- run();
- }
-
- /**
- * @see IActionDelegate
- */
- public void selectionChanged(IAction action, ISelection selection){
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveAllBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveAllBreakpointsAction.java
deleted file mode 100644
index 34e5d3db0..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveAllBreakpointsAction.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Removes all breakpoints from the source (markers) and remove all
- * breakpoints from processes
- */
-public class RemoveAllBreakpointsAction extends Action implements IBreakpointListener {
-
- private static final String PREFIX= "remove_all_breakpoints_action.";
- private static final String ERROR= "error.";
- private static final String STATUS= PREFIX + "status";
-
- public RemoveAllBreakpointsAction() {
- super(DebugUIUtils.getResourceString(PREFIX + TEXT));
- setToolTipText(DebugUIUtils.getResourceString(PREFIX + TOOL_TIP_TEXT));
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_REMOVE_ALL));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_REMOVE_ALL));
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_REMOVE_ALL));
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.REMOVE_ALL_ACTION });
- }
-
- /**
- * @see IAction
- */
- public void run() {
- final IBreakpointManager breakpointManager= DebugPlugin.getDefault().getBreakpointManager();
- final IBreakpoint[] breakpoints= breakpointManager.getBreakpoints();
- final MultiStatus ms= new MultiStatus(DebugPlugin.getDefault().getDescriptor().getUniqueIdentifier(), IDebugStatusConstants.REQUEST_FAILED, DebugUIUtils.getResourceString(STATUS), null);
- IWorkspaceRunnable r = new IWorkspaceRunnable() {
- public void run(IProgressMonitor pm) {
- for (int i= 0; i < breakpoints.length; i++) {
- try {
- breakpointManager.removeBreakpoint(breakpoints[i], true);
- } catch (CoreException e) {
- ms.merge(e.getStatus());
- }
- }
- }
- };
- try {
- ResourcesPlugin.getWorkspace().run(r, null);
- } catch (CoreException e) {
- ms.merge(e.getStatus());
- }
- if (!ms.isOK()) {
- DebugUIUtils.errorDialog(DebugUIPlugin.getActiveWorkbenchWindow().getShell(), PREFIX + ERROR, ms);
- }
- }
- /**
- * @see IBreakpointListener
- */
- public void breakpointAdded(IBreakpoint breakpoint) {
- breakpointAltered();
- }
- /**
- * @see IBreakpointListener
- */
- public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
- }
- /**
- * @see IBreakpointListener
- */
- public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
- breakpointAltered();
- }
-
- protected void breakpointAltered() {
- boolean enable= DebugPlugin.getDefault().getBreakpointManager().getBreakpoints().length == 0 ? false : true;
- setEnabled(enable);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveAllFromInspectorAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveAllFromInspectorAction.java
deleted file mode 100644
index 21ce03c34..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveAllFromInspectorAction.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class RemoveAllFromInspectorAction extends InspectorAction {
-
- private static final String PREFIX= "remove_all_from_inspector_action.";
-
- public RemoveAllFromInspectorAction(ISelectionProvider provider) {
- super(provider, DebugUIUtils.getResourceString(PREFIX + TEXT));
- setToolTipText(DebugUIUtils.getResourceString(PREFIX + TOOL_TIP_TEXT));
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_REMOVE_ALL));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_REMOVE_ALL));
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_REMOVE_ALL));
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.REMOVE_ALL_ACTION });
- }
-
- /**
- * @see InspectorAction
- */
- protected void doAction(InspectorView view) {
- // Ask view to remove all variables
- view.removeAllFromInspector();
- }
- /**
- * @see SelectionProviderAction
- */
- public void selectionChanged(IStructuredSelection sel) {
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveBreakpointAction.java
deleted file mode 100644
index 94a616f52..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveBreakpointAction.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.actions.SelectionProviderAction;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class RemoveBreakpointAction extends SelectionProviderAction {
-
- private final static String PREFIX= "remove_breakpoint_action.";
- private final static String ERROR= "error.";
- private final static String STATUS= PREFIX + "status";
-
- public RemoveBreakpointAction(ISelectionProvider provider) {
- super(provider, DebugUIUtils.getResourceString(PREFIX + TEXT));
- setEnabled(!getStructuredSelection().isEmpty());
- setToolTipText(DebugUIUtils.getResourceString(PREFIX + TOOL_TIP_TEXT));
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_REMOVE));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_REMOVE));
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_REMOVE));
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.REMOVE_ACTION });
- }
-
- /**
- * @see IAction
- */
- public void run() {
- IStructuredSelection selection= getStructuredSelection();
- if (selection.isEmpty()) {
- return;
- }
- IStructuredSelection es= (IStructuredSelection)selection;
- final Iterator itr= es.iterator();
- final MultiStatus ms = new MultiStatus(DebugUIPlugin.getDefault().getDescriptor().getUniqueIdentifier(),
- IDebugStatusConstants.REQUEST_FAILED, DebugUIUtils.getResourceString(STATUS), null);
-
- IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
- while (itr.hasNext()) {
- try {
- IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
- IBreakpoint breakpoint= (IBreakpoint)itr.next();
- breakpointManager.removeBreakpoint(breakpoint, true);
- } catch (CoreException ce) {
- ms.merge(ce.getStatus());
- }
- }
- }
- };
- try {
- ResourcesPlugin.getWorkspace().run(runnable, null);
- } catch (CoreException ce) {
- ms.merge(ce.getStatus());
- }
- if (!ms.isOK()) {
- DebugUIUtils.errorDialog(DebugUIPlugin.getActiveWorkbenchWindow().getShell(), PREFIX + ERROR, ms);
- }
- }
-
- /**
- * @see SelectionProviderAction
- */
- public void selectionChanged(IStructuredSelection sel) {
- setEnabled(!sel.isEmpty());
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveFromInspectorAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveFromInspectorAction.java
deleted file mode 100644
index 068e53b11..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveFromInspectorAction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.Iterator;
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class RemoveFromInspectorAction extends InspectorAction {
-
- private static final String PREFIX= "remove_from_inspector_action.";
-
- public RemoveFromInspectorAction(ISelectionProvider provider) {
- super(provider, DebugUIUtils.getResourceString(PREFIX + TEXT));
- setToolTipText(DebugUIUtils.getResourceString(PREFIX + TOOL_TIP_TEXT));
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_REMOVE));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_REMOVE));
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_REMOVE));
- setEnabled(!getStructuredSelection().isEmpty());
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.REMOVE_ACTION });
- }
-
- /**
- * @see InspectorAction
- */
- protected void doAction(InspectorView view) {
- IStructuredSelection selection= getStructuredSelection();
- Iterator vars= selection.iterator();
- while (vars.hasNext()) {
- Object item= vars.next();
- if (item instanceof InspectItem) {
- view.removeFromInspector(item);
- }
- }
- }
-
- /**
- * @see InspectorAction
- */
- public void selectionChanged(IStructuredSelection sel) {
- if (sel == null) {
- setEnabled(false);
- return;
- }
- Iterator iterator= sel.iterator();
- while (iterator.hasNext()) {
- Object item= iterator.next();
- if (item instanceof InspectItem) {
- setEnabled(true);
- return;
- }
- }
- setEnabled(false);
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveTerminatedAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveTerminatedAction.java
deleted file mode 100644
index 1999954f9..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RemoveTerminatedAction.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Removes all terminated/detached launches from the UI.
- * Clears the launches output as well.
- */
-public class RemoveTerminatedAction extends Action {
-
- private static final String PREFIX= "remove_all_terminated_action.";
- boolean fRemoveDebug;
-
- public RemoveTerminatedAction(boolean removeDebug) {
- super(DebugUIUtils.getResourceString(PREFIX + TEXT));
- setToolTipText(DebugUIUtils.getResourceString(PREFIX + TOOL_TIP_TEXT));
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_REMOVE_TERMINATED));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_REMOVE_TERMINATED));
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_REMOVE_TERMINATED));
- fRemoveDebug= removeDebug;
- setEnabled(false);
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.REMOVE_ACTION });
- }
-
- /**
- * Removes all of the terminated launches relevant to the
- * current perspective. Has the
- * side effect of clearing the console output.
- * @see IAction
- */
- public void run() {
- ILaunchManager lManager= DebugPlugin.getDefault().getLaunchManager();
- Object[] launches= lManager.getLaunches();
- for (int i= 0; i < launches.length; i++) {
- ILaunch launch= (ILaunch)launches[i];
- if (launch.isTerminated() && isLaunchRelevantToCurrentPerpective(launch)) {
- lManager.deregisterLaunch(launch);
- }
- }
- }
-
- /**
- * Updates the enabled state of this action to enabled if at
- * least one launch is terminated and relative to the current perspective.
- */
- public void update() {
- ILaunchManager lManager= DebugPlugin.getDefault().getLaunchManager();
- ILaunch[] launches= lManager.getLaunches();
- for (int i= 0; i < launches.length; i++) {
- ILaunch launch= launches[i];
- if (launch.isTerminated() && isLaunchRelevantToCurrentPerpective(launch)) {
- setEnabled(true);
- return;
- }
- }
- setEnabled(false);
- }
-
- /**
- * Returns whether this launch is relevant to the
- * current perspective...ie Run or Debug.
- * For example, if in the debug perspective (fRemoveDebug= true)
- * and the launch does not have a debug target, <code>false</code>
- * will be returned.
- */
- protected boolean isLaunchRelevantToCurrentPerpective(ILaunch launch) {
- if (fRemoveDebug) {
- return launch.getDebugTarget() != null;
- }
- IProcess[] processes= launch.getProcesses();
- return (processes != null && processes.length > 0);
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ResumeActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ResumeActionDelegate.java
deleted file mode 100644
index 57323c7e9..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ResumeActionDelegate.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.ISuspendResume;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.IStructuredSelection;
-
-public class ResumeActionDelegate extends ControlActionDelegate {
-
- private static final String PREFIX= "resume_action.";
-
- /**
- * @see ControlActionDelegate
- */
- protected void doAction(Object object) throws DebugException {
- IDebugElement element= (IDebugElement)object;
- if (element instanceof ISuspendResume) {
- ISuspendResume suspendResume= (ISuspendResume)element;
- if (suspendResume.canResume()) {
- suspendResume.resume();
- }
- }
- }
-
- /**
- * @see ControlActionDelegate
- */
- public boolean isEnabledFor(Object element) {
- return element instanceof ISuspendResume && ((ISuspendResume) element).canResume();
- }
-
- /**
- * @see ControlActionDelegate
- */
- public boolean getEnableStateForSelection(IStructuredSelection selection) {
- if (selection.size() == 1) {
- return isEnabledFor(selection.getFirstElement());
- } else {
- return false;
- }
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected String getPrefix() {
- return PREFIX;
- }
-
- protected String getHelpContextId() {
- return IDebugHelpContextIds.RESUME_ACTION;
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected void setActionImages(IAction action) {
- action.setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_RESUME));
- action.setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_RESUME));
- action.setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_RESUME));
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RunAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RunAction.java
deleted file mode 100644
index d00a09087..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RunAction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.ILaunchManager; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * An execution action that uses launchers in
- * run mode.
- */
-public class RunAction extends ExecutionAction {
-
- protected final static String PREFIX= "run_action.";
-
- public RunAction() {
- setText(DebugUIUtils.getResourceString(PREFIX + TEXT));
- setToolTipText(DebugUIUtils.getResourceString(PREFIX + TOOL_TIP_TEXT));
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_ACT_RUN));
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.RUN_ACTION });
- }
-
- /**
- * @see ExecutionAction
- */
- protected String getMode() {
- return ILaunchManager.RUN_MODE;
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RunDropDownAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RunDropDownAction.java
deleted file mode 100644
index fd2804165..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RunDropDownAction.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchManager;
-
-public class RunDropDownAction extends LaunchDropDownAction {
-
- public RunDropDownAction() {
- super(new RunAction());
- }
-
- /**
- * @see LaunchDropDownAction
- */
- public String getMode() {
- return ILaunchManager.RUN_MODE;
- }
-
- /**
- * @see LaunchDropDownAction
- */
- public LaunchHistoryElement[] getHistory() {
- return DebugUIPlugin.getDefault().getRunHistory();
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ShowQualifiedAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ShowQualifiedAction.java
deleted file mode 100644
index 052cf4130..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ShowQualifiedAction.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * An action that toggles the state of its viewer to
- * show/hide qualified names.
- */
-public class ShowQualifiedAction extends Action {
-
- private static final String PREFIX= "show_qualified_action.";
- private static final String SHOW= PREFIX + TOOL_TIP_TEXT + ".show";
- private static final String HIDE= PREFIX + TOOL_TIP_TEXT + ".hide";
-
- protected StructuredViewer fViewer;
-
- public ShowQualifiedAction(StructuredViewer viewer) {
- super(DebugUIUtils.getResourceString(SHOW));
- fViewer= viewer;
- setToolTipText(DebugUIUtils.getResourceString(SHOW));
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_QUALIFIED_NAMES));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_QUALIFIED_NAMES));
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_QUALIFIED_NAMES));
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.SHOW_QUALIFIED_NAMES_ACTION });
- }
-
- /**
- * @see Action
- */
- public void run() {
- valueChanged(isChecked());
- }
-
- private void valueChanged(boolean on) {
- if (fViewer.getControl().isDisposed()) {
- return;
- }
- ILabelProvider labelProvider= (ILabelProvider)fViewer.getLabelProvider();
- if (labelProvider instanceof IDebugModelPresentation) {
- IDebugModelPresentation debugLabelProvider= (IDebugModelPresentation)labelProvider;
- debugLabelProvider.setAttribute(IDebugModelPresentation.DISPLAY_QUALIFIED_NAMES, (on ? Boolean.TRUE : Boolean.FALSE));
- BusyIndicator.showWhile(fViewer.getControl().getDisplay(), new Runnable() {
- public void run() {
- fViewer.refresh();
- }
- });
- }
- setToolTipText(on ? DebugUIUtils.getResourceString(HIDE) : DebugUIUtils.getResourceString(SHOW));
-
- }
-
- /**
- * @see Action
- */
- public void setChecked(boolean value) {
- super.setChecked(value);
- valueChanged(value);
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ShowTypesAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ShowTypesAction.java
deleted file mode 100644
index fe5fbdcf6..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ShowTypesAction.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * An action that toggles the state of a viewer to
- * show/hide type names of variables.
- * Only viewers that use a <code>VariableLabelProvider</code> to render its
- * elements are effected.
- */
-public class ShowTypesAction extends Action {
-
- private static final String PREFIX= "show_types_action.";
- private static final String SHOW= PREFIX + TOOL_TIP_TEXT + ".show";
- private static final String HIDE= PREFIX + TOOL_TIP_TEXT + ".hide";
-
- protected StructuredViewer fViewer;
-
- public ShowTypesAction(StructuredViewer viewer) {
- super(DebugUIUtils.getResourceString(SHOW));
- fViewer= viewer;
- setToolTipText(SHOW);
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_TYPE_NAMES));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_TYPE_NAMES));
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_TYPE_NAMES));
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.SHOW_TYPES_ACTION });
- }
-
- /**
- * @see Action
- */
- public void run() {
- valueChanged(isChecked());
- }
-
- private void valueChanged(boolean on) {
- if (fViewer.getControl().isDisposed()) {
- return;
- }
- ILabelProvider labelProvider= (ILabelProvider)fViewer.getLabelProvider();
- if (labelProvider instanceof IDebugModelPresentation) {
- IDebugModelPresentation debugLabelProvider= (IDebugModelPresentation)labelProvider;
- debugLabelProvider.setAttribute(IDebugModelPresentation.DISPLAY_VARIABLE_TYPE_NAMES, (on ? Boolean.TRUE : Boolean.FALSE));
- BusyIndicator.showWhile(fViewer.getControl().getDisplay(), new Runnable() {
- public void run() {
- fViewer.refresh();
- }
- });
- }
- setToolTipText(on ? DebugUIUtils.getResourceString(HIDE) : DebugUIUtils.getResourceString(SHOW));
- }
-
- /**
- * @see Action
- */
- public void setChecked(boolean value) {
- super.setChecked(value);
- valueChanged(value);
- }
-}
-
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepActionDelegate.java
deleted file mode 100644
index 10a7d8385..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepActionDelegate.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IStep;
-
-public abstract class StepActionDelegate extends ControlActionDelegate {
-
- /**
- * @see ControlActionDelegate
- */
- public void doAction(Object object) throws DebugException {
- IDebugElement element= (IDebugElement)object;
- IStep steppable= null;
- if (element instanceof IStep) {
- steppable= (IStep) element;
- stepAction(steppable);
- }
- }
-
- /**
- * @see ControlActionDelegate
- */
- public boolean isEnabledFor(Object element) {
- if (element instanceof IStep) {
- return checkCapability((IStep) element);
- }
- return false;
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected boolean enableForMultiSelection() {
- return false;
- }
-
- /**
- * Returns whether the <code>IStep</code> has the capability to perform the
- * requested step action.
- */
- protected abstract boolean checkCapability(IStep element);
-
- /**
- * Performs the specific step action.
- *
- * @exception DebugException if the action fails
- */
- protected abstract void stepAction(IStep element) throws DebugException;
-
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepIntoActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepIntoActionDelegate.java
deleted file mode 100644
index 08fbfebc6..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepIntoActionDelegate.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IStep;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.IAction;
-
-public class StepIntoActionDelegate extends StepActionDelegate {
-
- private static final String PREFIX= "step_into_action.";
-
- /**
- * @see StepActionDelegate
- */
- protected boolean checkCapability(IStep element) {
- return element.canStepInto();
- }
-
- /**
- * @see StepActionDelegate
- */
- protected void stepAction(IStep element) throws DebugException {
- element.stepInto();
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected String getPrefix() {
- return PREFIX;
- }
-
- protected String getHelpContextId() {
- return IDebugHelpContextIds.STEP_INTO_ACTION;
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected void setActionImages(IAction action) {
- action.setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_STEPINTO));
- action.setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_STEPINTO));
- action.setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_STEPINTO));
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepOverActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepOverActionDelegate.java
deleted file mode 100644
index d6bd4cb33..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepOverActionDelegate.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IStep;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.IAction;
-
-public class StepOverActionDelegate extends StepActionDelegate {
-
- private static final String PREFIX= "step_over_action.";
-
- /**
- * @see StepActionDelegate
- */
- protected boolean checkCapability(IStep element) {
- return element.canStepOver();
- }
-
- /**
- * @see StepActionDelegate
- */
- protected void stepAction(IStep element) throws DebugException {
- element.stepOver();
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected String getPrefix() {
- return PREFIX;
- }
-
- protected String getHelpContextId() {
- return IDebugHelpContextIds.STEP_OVER_ACTION;
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected void setActionImages(IAction action) {
- action.setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_STEPOVER));
- action.setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_STEPOVER));
- action.setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_STEPOVER));
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepReturnActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepReturnActionDelegate.java
deleted file mode 100644
index 1f665cd13..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StepReturnActionDelegate.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IStep;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.IAction;
-
-public class StepReturnActionDelegate extends StepActionDelegate {
-
- private static final String PREFIX= "step_return_action.";
-
- /**
- * @see StepActionDelegate
- */
- protected boolean checkCapability(IStep element) {
- return element.canStepReturn();
- }
-
- /**
- * @see StepActionDelegate
- */
- protected void stepAction(IStep element) throws DebugException {
- element.stepReturn();
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected String getPrefix() {
- return PREFIX;
- }
-
- protected String getHelpContextId() {
- return IDebugHelpContextIds.STEP_RETURN_ACTION;
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected void setActionImages(IAction action) {
- action.setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_STEPRETURN));
- action.setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_STEPRETURN));
- action.setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_STEPRETURN));
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StringMatcher.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StringMatcher.java
deleted file mode 100644
index efa011c52..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/StringMatcher.java
+++ /dev/null
@@ -1,404 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class StringMatcher {
- protected String fPattern;
- protected int fLength; // pattern length
- protected boolean fIgnoreWildCards;
- protected boolean fIgnoreCase;
- protected boolean fHasLeadingStar;
- protected boolean fHasTrailingStar;
- protected String fSegments[]; //the given pattern is split into * separated segments
-
- /* boundary value beyond which we don't need to search in the text */
- protected int fBound= 0;
-
- protected static final char fSingleWildCard= '\u0000';
-
- public static class Position {
- int start; //inclusive
- int end; //exclusive
- public Position(int start, int end) {
- this.start= start;
- this.end= end;
- }
- public int getStart() {
- return start;
- }
- public int getEnd() {
- return end;
- }
- }
-
- /**
- * StringMatcher constructor takes in a String object that is a simple
- * pattern which may contain ‘*’ for 0 and many characters and
- * ‘?’ for exactly one character. Also takes as parameter a boolean object
- * specifying if case should be ignored
- * @deprecated Use StringMatcher(pattern, ignoreCase, ignoreWildCards).
- */
- public StringMatcher(String aPattern, boolean ignoreCase) {
- this(aPattern, ignoreCase, false);
- }
-
- /**
- * StringMatcher constructor takes in a String object that is a simple
- * pattern which may contain ‘*’ for 0 and many characters and
- * ‘?’ for exactly one character.
- *
- * Literal '*' and '?' characters must be escaped in the pattern
- * e.g., "\*" means literal "*", etc.
- *
- * Escaping any other character (including the escape character itself),
- * just results in that character in the pattern.
- * e.g., "\a" means "a" and "\\" means "\"
- *
- * If invoking the StringMatcher with string literals in Java, don't forget
- * escape characters are represented by "\\".
- *
- * @param aPattern the pattern to match text against
- * @param ignoreCase if true, case is ignored
- * @param ignoreWildCards if true, wild cards and their escape sequences are ignored
- * (everything is taken literally).
- */
- public StringMatcher(String aPattern, boolean ignoreCase, boolean ignoreWildCards) {
- fIgnoreCase= ignoreCase;
- fIgnoreWildCards= ignoreWildCards;
- fLength= aPattern.length();
-
- /* convert case */
- if (fIgnoreCase) {
- fPattern= aPattern.toUpperCase();
- } else {
- fPattern= aPattern;
- }
-
- if (fIgnoreWildCards) {
- parseNoWildCards();
- } else {
- parseWildCards();
- }
- }
-
- /**
- * Find the first occurrence of the pattern between <code>start</code)(inclusive)
- * and <code>end</code>(exclusive).
- * @param <code>text</code>, the String object to search in
- * @param <code>start</code>, the starting index of the search range, inclusive
- * @param <code>end</code>, the ending index of the search range, exclusive
- * @return an <code>StringMatcher.Position</code> object that keeps the starting
- * (inclusive) and ending positions (exclusive) of the first occurrence of the
- * pattern in the specified range of the text; return null if not found or subtext
- * is empty (start==end). A pair of zeros is returned if pattern is empty string
- * Note that for pattern like "*abc*" with leading and trailing stars, position of "abc"
- * is returned. For a pattern like"*??*" in text "abcdf", (1,3) is returned
- */
-
- public StringMatcher.Position find(String text, int start, int end) {
- if (fPattern == null || text == null)
- throw new IllegalArgumentException();
-
- int tlen= text.length();
- if (start < 0)
- start= 0;
- if (end > tlen)
- end= tlen;
- if (end < 0 || start >= end)
- return null;
- if (fLength == 0)
- return new Position(start, start);
- if (fIgnoreWildCards) {
- int x= posIn(text, start, end);
- if (x < 0)
- return null;
- return new Position(x, x + fLength);
- }
-
- int segCount= fSegments.length;
- if (segCount == 0) //pattern contains only '*'(s)
- return new Position(start, end);
-
- int curPos= start;
- int matchStart= -1;
- for (int i= 0; i < segCount && curPos < end; ++i) {
- String current= fSegments[i];
- int nextMatch= regExpPosIn(text, curPos, end, current);
- if (nextMatch < 0)
- return null;
- if (i == 0)
- matchStart= nextMatch;
- curPos= nextMatch + current.length();
- }
- return new Position(matchStart, curPos);
- }
-
- /**
- * match the given <code>text</code> with the pattern
- * @return true if matched eitherwise false
- * @param <code>text</code>, a String object
- */
- public boolean match(String text) {
- return match(text, 0, text.length());
- }
-
- /**
- * Given the starting (inclusive) and the ending (exclusive) poisitions in the
- * <code>text</code>, determine if the given substring matches with aPattern
- * @return true if the specified portion of the text matches the pattern
- * @param String <code>text</code>, a String object that contains the substring to match
- * @param int <code>start<code> marks the starting position (inclusive) of the substring
- * @param int <code>end<code> marks the ending index (exclusive) of the substring
- */
- public boolean match(String text, int start, int end) {
- if (null == fPattern || null == text)
- throw new IllegalArgumentException();
-
- if (start > end)
- return false;
-
- if (fIgnoreWildCards)
- return fPattern.regionMatches(fIgnoreCase, 0, text, start, fLength);
- int segCount= fSegments.length;
- if (segCount == 0) //pattern contains only '*'(s) or empty pattern
- return true;
- if (start == end)
- return fLength == 0;
- if (fLength == 0)
- return start == end;
-
- int tlen= text.length();
- if (start < 0)
- start= 0;
- if (end > tlen)
- end= tlen;
-
- int tCurPos= start;
- int bound= end - fBound;
- if (bound < 0)
- return false;
- int i= 0;
- String current= fSegments[i];
- int segLength= current.length();
-
- /* process first segment */
- if (!fHasLeadingStar) {
- if (!regExpRegionMatches(text, start, current, 0, segLength)) {
- return false;
- } else {
- ++i;
- tCurPos= tCurPos + segLength;
- }
- }
-
- /* process middle segments */
- for (; i < segCount && tCurPos <= bound; ++i) {
- current= fSegments[i];
- int currentMatch;
- int k= current.indexOf(fSingleWildCard);
- if (k < 0) {
- currentMatch= textPosIn(text, tCurPos, end, current);
- if (currentMatch < 0)
- return false;
- } else {
- currentMatch= regExpPosIn(text, tCurPos, end, current);
- if (currentMatch < 0)
- return false;
- }
- tCurPos= currentMatch + current.length();
- }
-
- /* process final segment */
- if (!fHasTrailingStar && tCurPos != end) {
- int clen= current.length();
- return regExpRegionMatches(text, end - clen, current, 0, clen);
- }
- return i == segCount;
- }
-
- /**
- * This method parses the given pattern into segments seperated by wildcard '*' characters.
- * Since wildcards are not being used in this case, the pattern consists of a single segment.
- */
- private void parseNoWildCards() {
- fSegments= new String[1];
- fSegments[0]= fPattern;
- fBound= fLength;
- }
-
- /**
- * This method parses the given pattern into segments seperated by wildcard '*' characters.
- * @param p, a String object that is a simple regular expression with ‘*’ and/or ‘?’
- */
- private void parseWildCards() {
- if (fPattern.startsWith("*"))
- fHasLeadingStar= true;
- if (fPattern.endsWith("*")) {
- /* make sure it's not an escaped wildcard */
- if (fLength > 1 && fPattern.charAt(fLength - 2) != '\\') {
- fHasTrailingStar= true;
- }
- }
-
- List temp= new ArrayList();
-
- int pos= 0;
- StringBuffer buf= new StringBuffer();
- while (pos < fLength) {
- char c= fPattern.charAt(pos++);
- switch (c) {
- case '\\' :
- if (pos >= fLength) {
- buf.append(c);
- } else {
- char next= fPattern.charAt(pos++);
- /* if it's an escape sequence */
- if (next == '*' || next == '?' || next == '\\') {
- buf.append(next);
- } else {
- /* not an escape sequence, just insert literally */
- buf.append(c);
- buf.append(next);
- }
- }
- break;
- case '*' :
- if (buf.length() > 0) {
- /* new segment */
- temp.add(buf.toString());
- fBound += buf.length();
- buf.setLength(0);
- }
- break;
- case '?' :
- /* append special character representing single match wildcard */
- buf.append(fSingleWildCard);
- break;
- default :
- buf.append(c);
- }
- }
-
- /* add last buffer to segment list */
- if (buf.length() > 0) {
- temp.add(buf.toString());
- fBound += buf.length();
- }
-
- fSegments= new String[temp.size()];
- temp.toArray(fSegments);
- }
-
- /**
- * @param <code>text</code>, a string which contains no wildcard
- * @param <code>start</code>, the starting index in the text for search, inclusive
- * @param <code>end</code>, the stopping point of search, exclusive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int posIn(String text, int start, int end) { //no wild card in pattern
- int max= end - fLength;
-
- if (!fIgnoreCase) {
- int i= text.indexOf(fPattern, start);
- if (i == -1 || i > max)
- return -1;
- return i;
- }
-
- for (int i= start; i <= max; ++i) {
- if (text.regionMatches(true, i, fPattern, 0, fLength))
- return i;
- }
-
- return -1;
- }
-
- /**
- * @param <code>text</code>, a simple regular expression that may only contain '?'(s)
- * @param <code>start</code>, the starting index in the text for search, inclusive
- * @param <code>end</code>, the stopping point of search, exclusive
- * @param <code>p</code>, a simple regular expression that may contains '?'
- * @param <code>caseIgnored</code>, wether the pattern is not casesensitive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int regExpPosIn(String text, int start, int end, String p) {
- int plen= p.length();
-
- int max= end - plen;
- for (int i= start; i <= max; ++i) {
- if (regExpRegionMatches(text, i, p, 0, plen))
- return i;
- }
- return -1;
- }
-
- /**
- *
- * @return boolean
- * @param <code>text</code>, a String to match
- * @param <code>start</code>, int that indicates the starting index of match, inclusive
- * @param <code>end</code> int that indicates the ending index of match, exclusive
- * @param <code>p</code>, String, String, a simple regular expression that may contain '?'
- * @param <code>ignoreCase</code>, boolean indicating wether code>p</code> is case sensitive
- */
- protected boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen) {
- while (plen-- > 0) {
- char tchar= text.charAt(tStart++);
- char pchar= p.charAt(pStart++);
-
- /* process wild cards */
- if (!fIgnoreWildCards) {
- /* skip single wild cards */
- if (pchar == fSingleWildCard) {
- continue;
- }
- }
- if (pchar == tchar)
- continue;
- if (fIgnoreCase) {
- char tc= Character.toUpperCase(tchar);
- if (tc == pchar)
- continue;
- }
- return false;
- }
- return true;
- }
-
- /**
- * @param <code>text</code>, the string to match
- * @param <code>start</code>, the starting index in the text for search, inclusive
- * @param <code>end</code>, the stopping point of search, exclusive
- * @param code>p</code>, a string that has no wildcard
- * @param <code>ignoreCase</code>, boolean indicating wether code>p</code> is case sensitive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int textPosIn(String text, int start, int end, String p) {
-
- int plen= p.length();
- int max= end - plen;
-
- if (!fIgnoreCase) {
- int i= text.indexOf(p, start);
- if (i == -1 || i > max)
- return -1;
- return i;
- }
-
- for (int i= 0; i <= max; ++i) {
- if (text.regionMatches(true, i, p, 0, plen))
- return i;
- }
-
- return -1;
- }
-
-}
-
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SuspendActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SuspendActionDelegate.java
deleted file mode 100644
index 24402182d..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SuspendActionDelegate.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.ISuspendResume;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.IStructuredSelection;
-
-public class SuspendActionDelegate extends ControlActionDelegate {
-
- private static final String PREFIX= "suspend_action.";
-
- /**
- * @see ControlActionDelegate
- */
- protected void doAction(Object element) throws DebugException {
- if (element instanceof ISuspendResume) {
- ((ISuspendResume) element).suspend();
- }
- }
-
- /**
- * @see ControlActionDelegate
- */
- public boolean isEnabledFor(Object element) {
- return element instanceof ISuspendResume && ((ISuspendResume)element).canSuspend();
- }
-
- /**
- * @see ControlActionDelegate
- */
- public boolean getEnableStateForSelection(IStructuredSelection selection) {
- if (selection.size() == 1) {
- return isEnabledFor(selection.getFirstElement());
- } else {
- return false;
- }
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected String getPrefix() {
- return PREFIX;
- }
-
- protected String getHelpContextId() {
- return IDebugHelpContextIds.SUSPEND_ACTION;
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected void setActionImages(IAction action) {
- action.setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_SUSPEND));
- action.setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_SUSPEND));
- action.setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_SUSPEND));
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/TerminateActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/TerminateActionDelegate.java
deleted file mode 100644
index 5fc78a069..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/TerminateActionDelegate.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.ITerminate;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.IAction;
-
-public class TerminateActionDelegate extends ControlActionDelegate {
-
- private static final String PREFIX= "terminate_action.";
-
- /**
- * @see ControlActionDelegate
- */
- protected void doAction(Object element) throws DebugException {
- if (element instanceof ITerminate) {
- ((ITerminate)element).terminate();
- }
- }
-
- /**
- * @see ControlActionDelegate
- */
- public boolean isEnabledFor(Object element) {
- return element instanceof ITerminate && ((ITerminate)element).canTerminate();
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected String getPrefix() {
- return PREFIX;
- }
-
- protected String getHelpContextId() {
- return IDebugHelpContextIds.TERMINATE_ACTION;
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected void setActionImages(IAction action) {
- action.setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_TERMINATE));
- action.setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_TERMINATE));
- action.setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_TERMINATE));
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/TerminateAllAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/TerminateAllAction.java
deleted file mode 100644
index 6b758d204..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/TerminateAllAction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.runtime.MultiStatus; import org.eclipse.debug.core.*; import org.eclipse.jface.action.Action; import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * Terminates all launches.
- */
-public class TerminateAllAction extends Action {
-
- private static final String PREFIX= "terminate_all_action.";
- private static final String STATUS= "status";
- private static final String ERROR= "error.";
-
- public TerminateAllAction() {
- super(DebugUIUtils.getResourceString(PREFIX + TEXT));
- WorkbenchHelp.setHelp(
- this,
- new Object[] { IDebugHelpContextIds.TERMINATE_ALL_ACTION });
- }
-
- /**
- * @see Action
- */
- public void run() {
- ILaunchManager lManager= DebugPlugin.getDefault().getLaunchManager();
- ILaunch[] launches= lManager.getLaunches();
- MultiStatus ms = new MultiStatus(DebugPlugin.getDefault().getDescriptor().getUniqueIdentifier(),
- IDebugStatusConstants.REQUEST_FAILED, DebugUIUtils.getResourceString(PREFIX + STATUS), null);
- for (int i= 0; i < launches.length; i++) {
- ILaunch launch= (ILaunch) launches[i];
- if (!launch.isTerminated()) {
- try {
- launch.terminate();
- } catch (DebugException de) {
- ms.merge(de.getStatus());
- }
- }
- }
- if (!ms.isOK()) {
- DebugUIUtils.errorDialog(DebugUIPlugin.getActiveWorkbenchWindow().getShell(), PREFIX + ERROR, ms);
- }
- }
-
- /**
- * Updates the enabled state of this action.
- */
- public void update() {
- ILaunchManager lManager= DebugPlugin.getDefault().getLaunchManager();
- ILaunch[] launches= lManager.getLaunches();
- for (int i= 0; i< launches.length; i++) {
- ILaunch launch= launches[i];
- if (!launch.isTerminated()) {
- setEnabled(true);
- return;
- }
- }
- setEnabled(false);
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/TerminateAndRemoveActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/TerminateAndRemoveActionDelegate.java
deleted file mode 100644
index 63f23f5cb..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/TerminateAndRemoveActionDelegate.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.*;
-import org.eclipse.jface.action.IAction;
-
-public class TerminateAndRemoveActionDelegate extends ControlActionDelegate {
-
- private static final String PREFIX= "terminate_and_remove_action.";
-
- /**
- * @see ControlActionDelegate
- */
- public void initializeForOwner(ControlAction controlAction) {
- super.initializeForOwner(controlAction);
- controlAction.setEnabled(!controlAction.getStructuredSelection().isEmpty());
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected void doAction(Object element) throws DebugException {
- ITerminate terminate= (ITerminate)element;
- if (!terminate.isTerminated()) {
- terminate.terminate();
- }
-
- ILaunch launch= null;
- if (element instanceof ILaunch) {
- launch= (ILaunch) element;
- } else if (element instanceof IDebugElement) {
- IDebugElement de= (IDebugElement) element;
- launch= de.getLaunch();
- } else if (element instanceof IProcess) {
- launch= ((IProcess) element).getLaunch();
- }
- ILaunchManager lManager= DebugPlugin.getDefault().getLaunchManager();
- lManager.deregisterLaunch(launch);
- }
-
- /**
- * @see ControlActionDelegate
- */
- public boolean isEnabledFor(Object element) {
- return element instanceof ITerminate;
- }
- /**
- * @see ControlActionDelegate
- */
- protected String getPrefix() {
- return PREFIX;
- }
-
- protected String getHelpContextId() {
- return IDebugHelpContextIds.TERMINATE_AND_REMOVE_ACTION;
- }
-
- /**
- * @see ControlActionDelegate
- */
- protected void setActionImages(IAction action) {
- }
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariablesContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariablesContentProvider.java
deleted file mode 100644
index a43ee77f2..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariablesContentProvider.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.ui.internal.IPreferenceConstants;
-
-/**
- * Provide the contents for a variables viewer.
- */
-public class VariablesContentProvider extends BasicContentProvider implements IDebugEventListener, ITreeContentProvider {
- /**
- * Constructs a new provider
- */
- public VariablesContentProvider() {
- DebugPlugin.getDefault().addDebugEventListener(this);
- }
-
- /**
- * @see BasicContentProvider#doGetChildren(Object)
- */
- protected Object[] doGetChildren(Object parent) {
- try {
- if (parent instanceof IStackFrame || parent instanceof IValue) {
- return ((IDebugElement) parent).getChildren();
- } else if (parent instanceof IVariable) {
- return ((IVariable)parent).getValue().getChildren();
- }
- } catch (DebugException de) {
- DebugUIUtils.logError(de);
- }
- return new Object[0];
- }
-
- /**
- * Returns the <code>IVariable</code>s for the given <code>IDebugElement</code>.
- */
- public Object[] getElements(Object parent) {
- return getChildren(parent);
- }
-
- /**
- * @see ITreeContentProvider
- */
- public Object getParent(Object item) {
- Object parent = null;
- if (item instanceof IVariable) {
- parent = ((IVariable) item).getParent();
- }
- if (parent instanceof IValue) {
- parent = ((IValue)parent).getVariable();
- }
- return parent;
- }
-
- /**
- * @see BasicContentProvider#doHandleDebug(Event)
- */
- protected void doHandleDebugEvent(DebugEvent event) {
- switch (event.getKind()) {
- case DebugEvent.SUSPEND:
- case DebugEvent.CHANGE:
- refresh();
- break;
- }
- }
-
- /**
- * @see ITreeContentProvider
- */
- public boolean hasChildren(Object item) {
- try {
- if (item instanceof IVariable) {
- return ((IVariable)item).getValue().hasChildren();
- } else {
- return ((IDebugElement) item).hasChildren();
- }
- } catch (DebugException de) {
- return false;
- }
- }
-
- /**
- * Unregisters this content provider from the debug plugin so that
- * this object can be garbage-collected.
- */
- public void dispose() {
- super.dispose();
- DebugPlugin.getDefault().removeDebugEventListener(this);
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariablesView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariablesView.java
deleted file mode 100644
index b47c7347e..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariablesView.java
+++ /dev/null
@@ -1,164 +0,0 @@
-package org.eclipse.debug.internal.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.model.IDebugElement; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.jface.action.*; import org.eclipse.jface.viewers.*; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.*; import org.eclipse.ui.help.ViewContextComputer; import org.eclipse.ui.help.WorkbenchHelp;
-
-/**
- * This view shows variables and their values for a particular stack frame
- */
-public class VariablesView extends AbstractDebugView implements ISelectionListener {
-
- protected final static String PREFIX= "variables_view.";
-
- protected ShowQualifiedAction fShowQualifiedAction;
- protected ShowTypesAction fShowTypesAction;
- protected ChangeVariableValueAction fChangeVariableAction;
- protected AddToInspectorAction fAddToInspectorAction;
- protected ControlAction fCopyToClipboardAction;
-
- /**
- * Remove myself as a selection listener to the <code>LaunchesView</code> in this perspective.
- *
- * @see IWorkbenchPart
- */
- public void dispose() {
- DebugUIPlugin.getDefault().removeSelectionListener(this);
- super.dispose();
- }
-
- /**
- * The <code>VariablesView</code> listens for selection changes in the <code>LaunchesView</code>
- *
- * @see ISelectionListener
- */
- public void selectionChanged(IWorkbenchPart part, ISelection sel) {
- if (part instanceof LaunchesView) {
- if (sel instanceof IStructuredSelection) {
- setViewerInput((IStructuredSelection)sel);
- }
- }
- if (!(part instanceof DebugView)) {
- return;
- }
- if (!(sel instanceof IStructuredSelection)) {
- return;
- }
-
- setViewerInput((IStructuredSelection)sel);
- }
-
- protected void setViewerInput(IStructuredSelection ssel) {
- IDebugElement de= null;
- if (ssel.size() == 1) {
- Object input= ssel.getFirstElement();
- if (input != null && input instanceof IDebugElement) {
- de= ((IDebugElement) input).getStackFrame();
- }
- }
-
- Object current= fViewer.getInput();
- if (current == null && de == null) {
- return;
- }
-
- if (current != null && current.equals(de)) {
- return;
- }
-
- fViewer.setInput(de);
- }
- /**
- * @see IWorkbenchPart
- */
- public void createPartControl(Composite parent) {
- DebugUIPlugin.getDefault().addSelectionListener(this);
- TreeViewer vv = new TreeViewer(parent, SWT.MULTI);
- fViewer= vv;
- fViewer.setContentProvider(new VariablesContentProvider());
- fViewer.setLabelProvider(new DelegatingModelPresentation());
- fViewer.setUseHashlookup(true);
- // add a context menu
- createContextMenu(vv.getTree());
-
- initializeActions();
- initializeToolBar();
-
- setInitialContent();
- setTitleToolTip(getTitleToolTipText(PREFIX));
- WorkbenchHelp.setHelp(
- parent,
- new ViewContextComputer(this, IDebugHelpContextIds.VARIABLE_VIEW ));
- }
-
- protected void setInitialContent() {
- IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
- if (window == null) {
- return;
- }
- IWorkbenchPage p= window.getActivePage();
- if (p == null) {
- return;
- }
- DebugView view= (DebugView) p.findView(IDebugUIConstants.ID_DEBUG_VIEW);
- if (view != null) {
- ISelectionProvider provider= view.getSite().getSelectionProvider();
- if (provider != null) {
- provider.getSelection();
- ISelection selection= provider.getSelection();
- if (!selection.isEmpty() && selection instanceof IStructuredSelection) {
- setViewerInput((IStructuredSelection) selection);
- }
- }
- }
- }
-
- /**
- * Initializes the actions of this view.
- */
- protected void initializeActions() {
- fShowTypesAction= new ShowTypesAction(fViewer);
- fShowTypesAction.setChecked(false);
-
- fShowQualifiedAction= new ShowQualifiedAction(fViewer);
- fShowQualifiedAction.setChecked(false);
-
- fAddToInspectorAction= new AddToInspectorAction(fViewer);
-
- fChangeVariableAction= new ChangeVariableValueAction(fViewer);
- fChangeVariableAction.setEnabled(false);
-
- fCopyToClipboardAction= new ControlAction(fViewer, new CopyVariablesToClipboardActionDelegate());
- }
-
- /**
- * Configures the toolBar
- */
- protected void configureToolBar(IToolBarManager tbm) {
- tbm.add(new Separator(this.getClass().getName()));
- tbm.add(fShowTypesAction);
- tbm.add(fShowQualifiedAction);
- }
-
- /**
- * Adds items to the context menu including any extension defined actions.
- */
- protected void fillContextMenu(IMenuManager menu) {
-
- menu.add(new Separator(IDebugUIConstants.EMPTY_VARIABLE_GROUP));
- menu.add(new Separator(IDebugUIConstants.VARIABLE_GROUP));
- menu.add(fAddToInspectorAction);
- menu.add(fChangeVariableAction);
- menu.add(fCopyToClipboardAction);
- menu.add(new Separator(IDebugUIConstants.EMPTY_RENDER_GROUP));
- menu.add(new Separator(IDebugUIConstants.RENDER_GROUP));
- menu.add(fShowTypesAction);
- menu.add(fShowQualifiedAction);
-
- menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java
deleted file mode 100644
index 3cdf568fd..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package org.eclipse.debug.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.model.IValue; import org.eclipse.debug.internal.ui.*; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.swt.graphics.Image; import org.eclipse.ui.*;
-
-/**
- * This class provides utilities for clients of the debug UI.
- * <p>
- * Images retrieved from this facility should not be disposed.
- * The images will be disposed when this plugin is shutdown.
- * </p>
- * <p>
- * This class is not intended to be subclassed or instantiated.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public class DebugUITools {
-
- /**
- * Shows and selects the given value in an inspector view with the specified label.
- * If an inspector view is not in the current workbench page, an inspector view
- * is created. This method must be called in the UI thread.
- *
- * @param label a localized label to associate with the value in the inspector view
- * @param value the value to display
- */
- public static void inspect(String label, IValue value) {
- IWorkbenchPage p= DebugUIPlugin.getActiveWorkbenchWindow().getActivePage();
- if (p == null) {
- return;
- }
- InspectorView view= (InspectorView) p.findView(IDebugUIConstants.ID_INSPECTOR_VIEW);
- if (view == null) {
- // open a new view
- try {
- IWorkbenchPart activePart= p.getActivePart();
- view= (InspectorView) p.showView(IDebugUIConstants.ID_INSPECTOR_VIEW);
- p.activate(activePart);
- } catch (PartInitException e) {
- DebugUIUtils.logError(e);
- return;
- }
- }
- InspectItem item = new InspectItem(label, value);
- view.addToInspector(item);
- p.bringToTop(view);
- }
-
- /**
- * Returns the shared image managed under the given key. If there isn't any image
- * associated with the given key, <code>null</code> is returned. <p>
- * Note that clients <br>MUST NOT</br> dispose the image returned by this method.
- * <p>
- * See <code>IDebugUIConstants</code> for available images.
- * </p>
- *
- * @param key the image key
- * @return the image, or <code>null</code> if none
- * @see IDebugUIConstants
- */
- public static Image getImage(String key) {
- return DebugPluginImages.getImage(key);
- }
-
- /**
- * Returns the shared image descriptor managed under the given key. If there isn't any image
- * descriptor associated with the given key, <code>null</code> is returned. <p>
- * <p>
- * See <code>IDebugUIConstants</code> for available image descriptors.
- * </p>
- *
- * @param key the image descriptor key
- * @return the image descriptor, or <code>null</code> if none
- * @see IDebugUIConstants
- */
- public static ImageDescriptor getImageDescriptor(String key) {
- return DebugPluginImages.getImageDescriptor(key);
- }
-
- /**
- * Returns the preference store for the debug UI plugin.
- *
- * @return preference store
- */
- public static IPreferenceStore getPreferenceStore() {
- return DebugUIPlugin.getDefault().getPreferenceStore();
- }
-
- /**
- * Adds the given filter to the list of registered filters. Has
- * no effect if an identical filter is already registered.
- */
- public static void addEventFilter(IDebugUIEventFilter filter) {
- DebugUIPlugin.getDefault().addEventFilter(filter);
- }
-
- /**
- * Removes the given filter from the list of registered filters. Has
- * no effect if an identical filter is not already registered.
- */
- public static void removeEventFilter(IDebugUIEventFilter filter) {
- DebugUIPlugin.getDefault().removeEventFilter(filter);
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugModelPresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugModelPresentation.java
deleted file mode 100644
index 24a9b3224..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugModelPresentation.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package org.eclipse.debug.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * A debug model presentation is responsible for providing labels, images,
- * and editors associated with debug elements in a specific debug model.
- * Extensions of type <code>org.eclipse.debug.ui.debugModelPresentations</code> implement
- * this interface. Generally, a debug model implementation will also provide a
- * debug model presentation extension to render and display its elements. A debug
- * model presentation is registered for a specific debug model, and is responsible
- * for the presentation of the following kinds of elements defined by that model:
- * <ul>
- * <li>debug targets</li>
- * <li>threads</li>
- * <li>stack frames</li>
- * <li>variables</li>
- * <li>values</li>
- * <li>breakpoint markers</li>
- * </ul>
- * <p>
- * A debug model presentation extension is defined in <code>plugin.xml</code>.
- * Following is an example definition of a debug model presentation extension.
- * <pre>
- * &lt;extension point="org.eclipse.debug.ui.debugModelPresentations"&gt;
- * &lt;debugModelPresentation
- * id="com.example.debugModelIdentifier"
- * class="com.example.ExmaplePresentation"
- * &lt;/debugModelPresentation&gt;
- * &lt;/extension&gt;
- * </pre>
- * The attributes are specified as follows:
- * <ul>
- * <li><code>id</code> specifies the identifier of the debug model this presentation
- * is responsible for. Corresponds to the model identifier returned from a debug
- * element - see <code>IDebugElement.getModelIndentifier</code></li>
- * <li><code>class</code> specifies the fully qualified name of the java class
- * that implements this interface.</li>
- * </ul>
- * </p>
- * <p>
- * To allow for an extensible configuation, this interface defines
- * a <code>setAttribute</code> method. The debug UI plug-in defines
- * two presentation attributes:
- * <ul>
- * <li><code>DISPLAY_QUALIFIED_NAMES</code> - This is a boolean attribute
- * indicating whether elements should be rendered with fully qualified names.
- * For example, a java debug model presentation would include package names
- * when this attribute is true.</li>
- * <li><code>DISPLAY_VARIABLE_TYPE_NAMES</code> - This is a boolean attribute
- * indicating whether variable elements should be rendered with the declared
- * type of a variable. For example, a java debug model presentation would render
- * an integer as <code>"int x = 3"</code> when true, and <code>"x = 3"</code>
- * when false.</li>
- * </ul>
- * </p>
- * <p>
- * Clients may define new presentation attributes. For example, a client may wish
- * to define a "hexidecimal" property to display numeric values in hexidecimal. Implementations
- * should honor the presentation attributes defined by this interface where possible,
- * but do not need to honor presentation attributes defined by other clients.
- * To access the debug model presentation for a debug view, clients should use the
- * <code>IDebugViewAdapter</code>.
- * </p>
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see org.eclipse.debug.core.model.IDebugElement
- * @see ILabelProvider
- * @see IDebugViewAdapter
- */
-
-public interface IDebugModelPresentation extends ILabelProvider {
- /**
- * Qualified names presentation property (value <code>"org.eclipse.debug.ui.displayQualifiedNames"</code>).
- * When <code>DISPLAY_QUALIFIED_NAMES</code> is set to <code>True</code>,
- * this label provider should use fully qualified type names when rendering elements.
- * When set to <code>False</code>,this label provider should use simple names
- * when rendering elements.
- * @see #setAttribute(String, Object)
- */
- public final static String DISPLAY_QUALIFIED_NAMES= IDebugUIConstants.PLUGIN_ID + ".displayQualifiedNames";
- /**
- * Variable type names presentation property (value <code>"org.eclipse.debug.ui.displayVariableTypeNames"</code>).
- * When <code>DISPLAY_VARIABLE_TYPE_NAMES</code> is set to <code>True</code>,
- * this label provider should include the reference type of a variable when rendering
- * variables. When set to <code>False</code>, this label provider
- * should not include the reference type of a variable when rendering
- * variables.
- * @see #setAttribute(String, Object)
- */
- public final static String DISPLAY_VARIABLE_TYPE_NAMES= IDebugUIConstants.PLUGIN_ID + ".displayVariableTypeNames";
- /**
- * Sets a presentation attribute of this label provider. For example,
- * see the presentation attribute <code>DISPLAY_QUALIFIED_NAMES</code>
- * defined by this interface.
- *
- * @param attribute the presentation attribute identifier
- * @param value the value of the attribute
- */
- void setAttribute(String attribute, Object value);
- /**
- * Returns the image for the label of the given element. If an implementation
- * of <code>IDebugModelPresentation</code> returns <code>null</code>, the debug
- * UI will provide a default image for the given element.
- *
- * @param element the debug model element
- * @return an image for the element, or <code>null</code> if a default
- * image should be used
- * @see ILabelProvider
- */
- public Image getImage(Object element);
- /**
- * Returns the text for the label of the given element. If an implementation
- * of <code>IDebugModelPresentation</code> returns <code>null</code>, the debug
- * UI will provide a default text for the given element.
- *
- * @param element the debug model element
- * @return a label for the element, or <code>null</code> if a default
- * label should be used
- * @see ILabelProvider
- */
- public String getText(Object element);
- /**
- * Returns an editor input that should be used to display the given object
- * in an editor or <code>null</code> if unable to provide an editor input
- * for the given object.
- *
- * @param element a debug model object
- * @return an editor input, or <code>null</code> if none
- */
- IEditorInput getEditorInput(Object element);
-
- /**
- * Returns the id of the editor to use to display the
- * given editor input and object, or <code>null</code> if
- * unable to provide an editor id.
- *
- * @param input an editor input that was previously retrieved from this
- * debug model presentation's <code>getEditorInput</code> method
- * @param element the debug model object that was used in the call to
- * <code>getEditorInput</code>, that corresponds to the given input
- * @return an editor id, or <code>null</code> if none
- */
- String getEditorId(IEditorInput input, Object element);
-
-}
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
deleted file mode 100644
index 3eb5227ba..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java
+++ /dev/null
@@ -1,388 +0,0 @@
-package org.eclipse.debug.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-/**
- * Constant definitions for debug UI plug-in.
- * <p>
- * Popup menus in the debug UI support action contribution via the
- * <code>org.eclipse.ui.popupMenus</code> extension. Actions may be
- * contributed to any group on the menu. To facilitate insertion of actions
- * inbetween existing groups, empty groups have been defined
- * in the menu. Each group prefixed by "empty" indicates an empty group.
- * </p>
- * <h3>Debug View Popup Menu</h3>
- * <ul>
- * <li>Empty edit group</li>
- * <li>Edit group</li>
- * <li>Copy Stack action</li>
- * <li>Empty Step group</li>
- * <li>Step group</li>
- * <li>Step Into action</li>
- * <li>Step Over action</li>
- * <li>Run to return action</li>
- * <li>Empty thread group</li>
- * <li>Thread group</li>
- * <li>Suspend action</li>
- * <li>Resume action</li>
- * <li>Terminate action</li>
- * <li>Empty launch group</li>
- * <li>Launch group</li>
- * <li>Terminate and Remove action</li>
- * <li>Terminate All action</li>
- * <li>Remove All Terminated action</li>
- * <li>Relaunch action</li>
- * <li>Empty render group</li>
- * <li>Render group</li>
- * <li>Show qualified names action</li>
- * <li>Property group</li>
- * <li>Property dialog action</li>
- * <li>Additions group</li>
- * </ul>
- * <h3>Process View Popup Menu</h3>
- * <ul>
- * <li>Empty launch group</li>
- * <li>Launch group</li>
- * <li>Relaunch action</li>
- * <li>Terminate action</li>
- * <li>Terminate and Remove action</li>
- * <li>Terminate All action</li>
- * <li>Remove All Terminated action</li>
- * <li>Property group</li>
- * <li>Property dialog action</li>
- * <li>Additions group</li>
- * </ul>
- * <h3>Variable View Popup Menu</h3>
- * <ul>
- * <li>Empty variable group</li>
- * <li>Variable group</li>
- * <li>Add to Watch List action</li>
- * <li>Change value action</li>
- * <li>Empty render group</li>
- * <li>Render group</li>
- * <li>Show qualified names action</li>
- * <li>Additions group</li>
- * </ul>
- * <h3>Breakpoint View Popup Menu</h3>
- * <ul>
- * <li>Empty Navigation group</li>
- * <li>Navigation group</li>
- * <li>Open action</li>
- * <li>Empty Breakpoint goup</li>
- * <li>Breakpoint group</li>
- * <li>Enable/Disable action</li>
- * <li>Remove action</li>
- * <li>Remove all action</li>
- * <li>Empty render group</li>
- * <li>Render group</li>
- * <li>Show qualified names action</li>
- * <li>Additions group</li>
- * </ul>
- * <h3>Inspector View Popup Menu</h3>
- * <ul>
- * <li>Empty Expression group</li>
- * <li>Expression group</li>
- * <li>Remove action</li>
- * <li>Remove all action</li>
- * <li>Empty Render group</li>
- * <li>Render group</li>
- * <li>Show qualified names action</li>
- * <li>Additions group</li>
- * </ul>
- * <p>
- * Constants only; not intended to be implemented or extended.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-
-public interface IDebugUIConstants {
-
- /**
- * Debug UI plug-in identifier (value <code>"org.eclipse.debug.ui"</code>).
- */
- public static final String PLUGIN_ID = "org.eclipse.debug.ui";
-
- /**
- * Debug perspective identifier (value <code>"org.eclipse.debug.ui.DebugPerspective"</code>).
- */
- public static final String ID_DEBUG_PERSPECTIVE = PLUGIN_ID + ".DebugPerspective";
-
- /**
- * Debug model presentation extension point identifier (value <code>"debugModelPresentations"</code>).
- */
- public static final String ID_DEBUG_MODEL_PRESENTATION= "debugModelPresentations";
-
- // Preferences
- /**
- * Boolean preference controlling automatic change to debug perspective when
- * a debug session is launched, or when a debug session suspends
- * (value <code>"org.eclipse.debug.ui.auto_show_debug_view"</code>). When this
- * preference is <code>true</code> and a debug session is launched or suspends,
- * and a debug view is not present in the current perspective, a debug perspective
- * of the appropriate kind is created (or switched to if already created).
- */
- public static final String PREF_AUTO_SHOW_DEBUG_VIEW= PLUGIN_ID + ".auto_show_debug_view";
-
- /**
- * Boolean preference controlling automatic change to debug perspective when
- * a program is launched in run mode (value <code>"org.eclipse.debug.ui.auto_show_process_view"</code>).
- * When this preference is <code>true</code>
- * and a program is launched, and a process view is not present in the current
- * perspective, a debug perspective of the appropriate kind is created (or switched
- * to if already created).
- */
- public static final String PREF_AUTO_SHOW_PROCESS_VIEW= PLUGIN_ID + ".auto_show_process_view";
-
- // Debug views
-
- /**
- * Debug view identifier (value <code>"org.eclipse.debug.ui.DebugView"</code>).
- */
- public static final String ID_DEBUG_VIEW= "org.eclipse.debug.ui.DebugView";
-
- /**
- * Process view identifier (value <code>"org.eclipse.debug.ui.ProcessView"</code>).
- */
- public static final String ID_PROCESS_VIEW= "org.eclipse.debug.ui.ProcessView";
-
- /**
- * Breakpoint view identifier (value <code>"org.eclipse.debug.ui.BreakpointView"</code>).
- */
- public static final String ID_BREAKPOINT_VIEW= "org.eclipse.debug.ui.BreakpointView";
-
- /**
- * Variable view identifier (value <code>"org.eclipse.debug.ui.VariableView"</code>).
- */
- public static final String ID_VARIABLE_VIEW= "org.eclipse.debug.ui.VariableView";
-
- /**
- * Inspector view identifier (value <code>"org.eclipse.debug.ui.InspectorView"</code>).
- */
- public static final String ID_INSPECTOR_VIEW= "org.eclipse.debug.ui.InspectorView";
-
- /**
- * Console view identifier (value <code>"org.eclipse.debug.ui.ConsoleView"</code>).
- */
- public static final String ID_CONSOLE_VIEW= "org.eclipse.debug.ui.ConsoleView";
-
- // Debug Action images
-
- /**
- * Debug action image identifier.
- */
- public static final String IMG_ACT_DEBUG= "IMG_ACT_DEBUG";
-
- /**
- * Run action image identifier.
- */
- public static final String IMG_ACT_RUN= "IMG_ACT_RUN";
-
- /** Resume action image identifier. */
- public static final String IMG_LCL_RESUME= "IMG_LCL_RESUME";
-
- /** Suspend action image identifier. */
- public static final String IMG_LCL_SUSPEND= "IMG_LCL_SUSPEND";
-
- /** Terminate action image identifier. */
- public static final String IMG_LCL_TERMINATE= "IMG_LCL_TERMINATE";
-
- /** Disconnect action image identifier. */
- public static final String IMG_LCL_DISCONNECT= "IMG_LCL_DISCONNECT";
-
- /** Step into action image identifier. */
- public static final String IMG_LCL_STEPINTO= "IMG_LCL_STEPINTO";
-
- /** Step over action image identifier. */
- public static final String IMG_LCL_STEPOVER= "IMG_LCL_STEPOVER";
-
- /** Step return action image identifier. */
- public static final String IMG_LCL_STEPRETURN= "IMG_LCL_STEPRETURN";
-
- /** Clear action image identifier. */
- public static final String IMG_LCL_CLEAR= "IMG_LCL_CLEAR";
-
- /** Remove all terminated action image identifier. */
- public static final String IMG_LCL_REMOVE_TERMINATED= "IMG_LCL_REMOVE_TERMINATED";
-
- /** Display qualififed names action image identifier. */
- public static final String IMG_LCL_QUALIFIED_NAMES= "IMG_LCL_QUALIFIED_NAMES";
-
- /** Display variable type names action image identifier. */
- public static final String IMG_LCL_TYPE_NAMES= "IMG_LCL_TYPE_NAMES";
-
- /** Remove action image identifier. */
- public static final String IMG_LCL_REMOVE= "IMG_LCL_REMOVE";
-
- /** Remove all action image identifier. */
- public static final String IMG_LCL_REMOVE_ALL= "IMG_LCL_REMOVE_ALL";
-
- /** Inspector action image identifier. */
- public static final String IMG_LCL_INSPECT= "IMG_LCL_INSPECT";
-
- // Debug element images
-
- /** Debug mode launch image identifier. */
- public static final String IMG_OBJS_LAUNCH_DEBUG= "IMG_OBJS_LAUNCH_DEBUG";
-
- /** Run mode launch image identifier. */
- public static final String IMG_OBJS_LAUNCH_RUN= "IMG_OBJS_LAUNCH_RUN";
-
- /** Running debug target image identifier. */
- public static final String IMG_OBJS_DEBUG_TARGET= "IMG_OBJS_DEBUG_TARGET";
-
- /** Terminated debug target image identifier. */
- public static final String IMG_OBJS_DEBUG_TARGET_TERMINATED= "IMG_OBJS_DEBUG_TARGET_TERMINATED";
-
- /** Running thread image identifier. */
- public static final String IMG_OBJS_THREAD_RUNNING= "IMG_OBJS_THREAD_RUNNING";
-
- /** Suspended thread image identifier. */
- public static final String IMG_OBJS_THREAD_SUSPENDED= "IMG_OBJS_THREAD_SUSPENDED";
-
- /** Terminated thread image identifier. */
- public static final String IMG_OBJS_THREAD_TERMINATED= "IMG_OBJS_THREAD_TERMINATED";
-
- /** Stack frame image identifier. */
- public static final String IMG_OBJS_STACKFRAME= "IMG_OBJS_STACKFRAME";
-
- /** Enabled breakpoint image identifier. */
- public static final String IMG_OBJS_BREAKPOINT= "IMG_OBJS_BREAKPOINT";
-
- /** Disabled breakpoint image identifier. */
- public static final String IMG_OBJS_BREAKPOINT_DISABLED= "IMG_OBJS_BREAKPOINT_DISABLED";
-
- /** Running system process image identifier. */
- public static final String IMG_OBJS_OS_PROCESS= "IMG_OBJS_OS_PROCESS";
-
- /** Terminated system process image identifier. */
- public static final String IMG_OBJS_OS_PROCESS_TERMINATED= "IMG_OBJS_OS_PROCESS_TERMINATED";
-
- /** Expression image identifier. */
- public static final String IMG_OBJS_EXPRESSION= "IMG_OBJS_EXPRESSION";
-
- // wizard banners
- /** Debug wizard banner image identifier. */
- public static final String IMG_WIZBAN_DEBUG= "IMG_WIZBAN_DEBUG";
-
- /** Run wizard banner image identifier. */
- public static final String IMG_WIZBAN_RUN= "IMG_WIZBAN_RUN";
-
- /**
- * Debug action set identifier (value <code>"org.eclipse.debug.ui.debugActionSet"</code>).
- */
- public static final String DEBUG_ACTION_SET= PLUGIN_ID + ".debugActionSet";
-
- // menus
-
- /**
- * Identifier for an empty group preceeding an
- * edit group in a menu (value <code>"emptyEditGroup"</code>).
- */
- public static final String EMPTY_EDIT_GROUP = "emptyEditGroup";
-
- /**
- * Identifier for an edit group in a menu (value <code>"editGroup"</code>).
- */
- public static final String EDIT_GROUP = "editGroup";
-
- /**
- * Identifier for an empty group preceeding a
- * step group in a menu (value <code>"emptyStepGroup"</code>).
- */
- public static final String EMPTY_STEP_GROUP = "emptyStepGroup";
-
- /**
- * Identifier for a step group in a menu (value <code>"stepGroup"</code>).
- */
- public static final String STEP_GROUP = "stepGroup";
-
- /**
- * Identifier for an empty group preceeding a
- * thread group in a menu (value <code>"emptyThreadGroup"</code>).
- */
- public static final String EMPTY_THREAD_GROUP = "emptyThreadGroup";
-
- /**
- * Identifier for a thread group in a menu (value <code>"threadGroup"</code>).
- */
- public static final String THREAD_GROUP = "threadGroup";
-
- /**
- * Identifier for an empty group preceeding a
- * launch group in a menu (value <code>"emptyLaunchGroup"</code>).
- */
- public static final String EMPTY_LAUNCH_GROUP = "emptyLaunchGroup";
-
- /**
- * Identifier for a launch group in a menu (value <code>"launchGroup"</code>).
- */
- public static final String LAUNCH_GROUP = "launchGroup";
-
- /**
- * Identifier for an empty group preceeding a
- * variable group in a menu (value <code>"emptyVariableGroup"</code>).
- */
- public static final String EMPTY_VARIABLE_GROUP = "emptyVariableGroup";
-
- /**
- * Identifier for a variable group in a menu (value <code>"variableGroup"</code>).
- */
- public static final String VARIABLE_GROUP = "variableGroup";
-
- /**
- * Identifier for an empty group preceeding a
- * navigation group in a menu (value <code>"emptyNavigationGroup"</code>).
- */
- public static final String EMPTY_NAVIGATION_GROUP = "emptyNavigationGroup";
-
- /**
- * Identifier for a navigation group in a menu (value <code>"navigationGroup"</code>).
- */
- public static final String NAVIGATION_GROUP = "navigationGroup";
-
- /**
- * Identifier for an empty group preceeding a
- * breakpoint group in a menu (value <code>"emptyBreakpointGroup"</code>).
- */
- public static final String EMPTY_BREAKPOINT_GROUP = "emptyBreakpointGroup";
-
- /**
- * Identifier for a breakpoint group in a menu (value <code>"breakpointGroup"</code>).
- */
- public static final String BREAKPOINT_GROUP = "breakpointGroup";
-
- /**
- * Identifier for an empty group preceeding an
- * expression group in a menu (value <code>"emptyExpressionGroup"</code>).
- */
- public static final String EMPTY_EXPRESSION_GROUP = "emptyExpressionGroup";
-
- /**
- * Identifier for an expression group in a menu (value <code>"expressionGroup"</code>).
- */
-
- public static final String EXPRESSION_GROUP = "expressionGroup";
- /**
- * Identifier for an empty group preceeding a
- * render group in a menu (value <code>"emptyRenderGroup"</code>).
- */
- public static final String EMPTY_RENDER_GROUP = "emptyRenderGroup";
-
- /**
- * Identifier for a render group in a menu (value <code>"renderGroup"</code>).
- */
- public static final String RENDER_GROUP = "renderGroup";
-
- /**
- * Identifier for a property group in a menu (value <code>"propertyGroup"</code>).
- */
- public static final String PROPERTY_GROUP = "propertyGroup";
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIEventFilter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIEventFilter.java
deleted file mode 100644
index 97dfb22ad..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIEventFilter.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.eclipse.debug.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.ILaunch;
-
-/**
- * An event filter allows clients to selectively suppress events that
- * cause the debug UI to automatically display the debug/process view when
- * a launch is registered or when a debug session suspends.
- * <p>
- * For example, a client that programatically launches a debug session may
- * not want the default behavior of switching to the debug perspective as
- * a result of registering a launch. In this case the client could add a filter
- * to the debug UI to selectively suppress switch to the debug perspective.
- * </p>
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- */
-public interface IDebugUIEventFilter {
-
- /**
- * Returns whether the given launch should cause the debug UI to
- * show the debug/process view. This method is only called when the
- * <code>PREF_AUTO_SHOW_DEBUG_VIEW</code> preference is <code>true</code>.
- *
- * @param the launch that has just been registered
- * @return whether to automatically display the launch
- */
- public boolean showLaunch(ILaunch launch);
-
- /**
- * Returns whether the given event should cause the debug UI to
- * show the associated debug element. This method is only called when the
- * <code>PREF_AUTO_SHOW_DEBUG_VIEW</code> preference is <code>true</code>,
- * and the debug event is of kind <code>SUSPEND</code>.
- *
- * @param the launch that has just been registered
- * @return whether to automatically display the launch
- * @see DebugEvent
- */
- public boolean showDebugEvent(DebugEvent event);
-
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugViewAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugViewAdapter.java
deleted file mode 100644
index 3234dd69e..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugViewAdapter.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.eclipse.debug.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.jface.viewers.StructuredViewer;
-
-/**
- * An adapter that debug views containing a structured viewer implement.
- * Provides access to enclosed viewer and debug model presentation being
- * used by a viewer. This allows clients to do such things as add and
- * remove filters to a viewer, and configure a debug model presentation.
- * The following debug views support this adapter:
- * <ul>
- * <li>Debug view</li>
- * <li>Process view</li>
- * <li>Breakpoint view</li>
- * <li>Variable view</li>
- * <li>Inspector view</li>
- * </ul>
- * <p>
- * Clients are not intended to implement this interface.
- * </p>
- * <p>
- * <b>NOTE:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see org.eclipse.core.runtime.IAdaptable
- * @see IDebugModelPresentation
- */
-
-public interface IDebugViewAdapter {
-
- /**
- * Returns the structured viewer contained in this debug view.
- *
- * @return viewer
- */
- public StructuredViewer getViewer();
-
- /**
- * Returns the debug model presentation for this view specified
- * by the debug model identifier.
- *
- * @param id the debug model identifier that corresponds to the <code>id</code>
- * attribute of a debug model presentation extension
- * @return the debug model presentation, or <code>null</code> if no
- * presentation is registered for the specified id
- */
- public IDebugModelPresentation getPresentation(String id);
-
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchWizard.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchWizard.java
deleted file mode 100644
index c0e1135cd..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchWizard.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.eclipse.debug.ui;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import org.eclipse.debug.core.ILauncher;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizard;
-
-/**
- * A launch wizard provides a UI for a launcher. It allows users
- * to configure launch specific attributes. A launch wizard is
- * is contributed by a launcher extension, via the <code>"wizard"</code>
- * attribute, which specifies the fully qualified name of the class that
- * implements this interface.
- * <p>
- * A launch wizard can be instantiated in two ways:
- * <ul>
- * <li>When the run or debug button is pressed and a default launcher can
- * not be determined for the current selection of active editor, the
- * debug UI presents a composite wizard that allows the user to select a launcher
- * to use. When the next button is pressed, the wizard specified for that
- * launcher is instantiated and displayed.</li>
- * </ul>When a launcher delegate is invoked, it has the option of displaying its
- * wizard if the launcher delegate requires user interaction to configure a launch.</li>
- * </p>
- * <p>
- * Clients may implement this interface.
- * </p>
- * <p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
- * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
- * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
- * (repeatedly) as the API evolves.
- * </p>
- * @see org.eclipse.debug.core.ILauncher
- * @see org.eclipse.debug.core.model.ILauncherDelegate
- */
-
-public interface ILaunchWizard extends IWizard {
- /**
- * This lifecycle method is called by the debug UI plug-in after instantiating
- * and before displaying a launch wizard, to allow the wizard to configure itself
- * based on the mode in which it should launch, and the selection of elements
- * which provide context on what should be launched.
- *
- * @param launcher the launcher being used - corresponds to the launcher delegate
- * that contributed this launch wizard
- * @param mode run or debug
- * @param selection the current selection in the workbench, from which this wizard
- * can obtain context on what may be launched
- *
- * @see org.eclipse.debug.core.ILaunchManager
- * @see org.eclipse.debug.core.ILauncher
- * @see org.eclipse.debug.core.model.ILauncherDelegate
- */
- void init(ILauncher launcher, String mode, IStructuredSelection selection);
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/package.html b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/package.html
deleted file mode 100644
index 980386c8f..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/package.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Eclipse Debug Tools</title>
-</head>
-
-<body bgcolor="#FFFFFF">
-
-<p>Provides a generic debugger user interface that clients may customize via standard
-workbench extension points.</p>
-
-<h2>Package Specification</h2>
-
-<p><strong>Note</strong>: this package is part of an interim API that is still under
-development and expected to change significantly before reaching stability. It is being
-made available at this early stage to soloicit feedback from pioneering adopters on the
-understanding that any code that uses this API will almost certainly be broken
-(repeatedly) as the API evolves.</p>
-
-<p>Eclipse Debug Tools UI (debug UI plug-in) provides a set of classes and interfaces to
-support a debugger user interface. A generic debug perspective is provided with a common
-set of views. Clients are allowed to contribute actions to the debug views via the
-standard workbench <b>viewAction</b> extension point, and can
-contribute to popup menus in the debug views via the standard <b>popupMenu</b>
-extension point.</p>
-
-<h4>The Debug View</h4>
-
-<p>The debug view presents a tree of launched debug sessions. The view provides support
-for standard debug interactions such as terminating, stepping, suspending, and resuming
-threads and debug targets. The debug view is linked to an editor view, variable view, and
-console. The editor view is used to display source code for stack frames. A selection in
-the debug view causes the line of code being executed to be highlighted in the editor
-view. The variable view shows the visible variables in the selected stack frame, and the
-console view handles I/O for the debuggable process.</p>
-
-<h4>The Process View</h4>
-
-<p>The process view presents a tree of launched programs in normal (non-debug) mode. The
-view provides support for terminating processes, and is linked to the console view to
-support I/O.</p>
-
-<h4>The Variable View</h4>
-
-<p>The variable view presents a tree of variables for the currently selected stack frame.</p>
-
-<h4>The Breakpoint View</h4>
-
-<p>The breakpoint view presents a list of all breakpoints currently defined in the
-workspace. It supports enabling/disabling and breakpoint removal.</p>
-
-<h4>The Inspector View</h4>
-
-<p>The inspector view presents a tree of expressions that have been evaluated.</p>
-
-<h4>Debug Model Presentation</h4>
-
-<p>The debug UI plug-in defines an extension (<b>org.eclipse.debug.ui.debugModelPresentations</b>)
-point to allow implementations of debug models to provide custom rendering and
-presentation of its debug elements. Extensions are be registered for a specific debug
-model. It is intended that an implementation of a debug model will also provide an
-implementation of a debug model presentation. The presentation provides:
-
-<ul>
- <li>an image for a debug element or breakpoint</li>
- <li>a label for a debug element or breakpoint</li>
- <li>an editor input and editor id used to display the debug element or breakpoint</li>
-</ul>
-
-<h4>Launch Wizard</h4>
-
-<p>The debug UI plug-in defines an interface that launch wizards must implement - <b>
-org.eclipse.debug.ui.ILaunchWizard</b>. Launch wizards are defined
-in <b>launcher</b> extensions (defined by <b>org.eclipse.debug.core</b>), and are instantiated by the debug UI
-plug-in.</p>
-
-<h4>Debug Perspective</h4>
-
-<p>By default, when a program is run or debug, the debug UI automatically switches to the
-default debug perspective. To circumvent automatic perspective switching, a user
-preference is available. Launcher extensions may also define an alternate perspective to
-use.</p>
-</body>
-</html>

Back to the top