This commit was manufactured by cvs2svn to create branch 'FlexBreakpoint'.
Sprout from master 2009-11-12 20:03:34 UTC Darin Wright <darin> 'REVERT CHANGES FOR Bug 41353 - [launching] Launch config templates'
Delete:
org.eclipse.core.externaltools/.classpath
org.eclipse.core.externaltools/.cvsignore
org.eclipse.core.externaltools/.project
org.eclipse.core.externaltools/.settings/org.eclipse.jdt.core.prefs
org.eclipse.core.externaltools/.settings/org.eclipse.pde.prefs
org.eclipse.core.externaltools/META-INF/MANIFEST.MF
org.eclipse.core.externaltools/about.html
org.eclipse.core.externaltools/build.properties
org.eclipse.core.externaltools/plugin.properties
org.eclipse.core.externaltools/plugin.xml
org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/ExternalToolsCore.java
org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/IExternalToolConstants.java
org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/BackgroundResourceRefresher.java
org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsCoreUtil.java
org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.java
org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.properties
org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java
org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/BuilderCoreUtils.java
org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolBuilder.java
org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolsModelMessages.java
org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolsModelMessages.properties
org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolMigration.java
org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolsMigrationMessages.java
org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolsMigrationMessages.properties
org.eclipse.core.variables/.classpath
org.eclipse.core.variables/.cvsignore
org.eclipse.core.variables/.project
org.eclipse.core.variables/.settings/org.eclipse.jdt.core.prefs
org.eclipse.core.variables/.settings/org.eclipse.pde.prefs
org.eclipse.core.variables/META-INF/MANIFEST.MF
org.eclipse.core.variables/about.html
org.eclipse.core.variables/build.properties
org.eclipse.core.variables/plugin.properties
org.eclipse.core.variables/plugin.xml
org.eclipse.core.variables/schema/dynamicVariables.exsd
org.eclipse.core.variables/schema/valueVariables.exsd
org.eclipse.core.variables/src/org/eclipse/core/internal/variables/ContributedValueVariable.java
org.eclipse.core.variables/src/org/eclipse/core/internal/variables/DynamicVariable.java
org.eclipse.core.variables/src/org/eclipse/core/internal/variables/EclipseHomeVariableResolver.java
org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java
org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariable.java
org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
org.eclipse.core.variables/src/org/eclipse/core/internal/variables/ValueVariable.java
org.eclipse.core.variables/src/org/eclipse/core/internal/variables/VariablesMessages.java
org.eclipse.core.variables/src/org/eclipse/core/internal/variables/VariablesMessages.properties
org.eclipse.core.variables/src/org/eclipse/core/variables/IDynamicVariable.java
org.eclipse.core.variables/src/org/eclipse/core/variables/IDynamicVariableResolver.java
org.eclipse.core.variables/src/org/eclipse/core/variables/IStringVariable.java
org.eclipse.core.variables/src/org/eclipse/core/variables/IStringVariableManager.java
org.eclipse.core.variables/src/org/eclipse/core/variables/IValueVariable.java
org.eclipse.core.variables/src/org/eclipse/core/variables/IValueVariableInitializer.java
org.eclipse.core.variables/src/org/eclipse/core/variables/IValueVariableListener.java
org.eclipse.core.variables/src/org/eclipse/core/variables/VariablesPlugin.java
org.eclipse.core.variables/src/org/eclipse/core/variables/package.html
org.eclipse.debug.examples.core/.classpath
org.eclipse.debug.examples.core/.cvsignore
org.eclipse.debug.examples.core/.project
org.eclipse.debug.examples.core/.settings/org.eclipse.jdt.core.prefs
org.eclipse.debug.examples.core/META-INF/MANIFEST.MF
org.eclipse.debug.examples.core/about.html
org.eclipse.debug.examples.core/build.properties
org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java
org.eclipse.debug.examples.core/pdavm/tests/vmtest10.pda
org.eclipse.debug.examples.core/pdavm/tests/vmtest2.pda
org.eclipse.debug.examples.core/pdavm/tests/vmtest3.pda
org.eclipse.debug.examples.core/pdavm/tests/vmtest6.pda
org.eclipse.debug.examples.core/pdavm/tests/vmtest8.pda
org.eclipse.debug.examples.core/pdavm/tests/vmtest9.pda
org.eclipse.debug.examples.core/pdavm/tests/vmtest_children.pda
org.eclipse.debug.examples.core/plugin.xml
org.eclipse.debug.examples.core/readme.html
org.eclipse.debug.examples.core/samples/counter.pda
org.eclipse.debug.examples.core/samples/drop.pda
org.eclipse.debug.examples.core/samples/example.pda
org.eclipse.debug.examples.core/samples/fibonacci.pda
org.eclipse.debug.examples.core/samples/registers.pda
org.eclipse.debug.examples.core/samples/stack.pda
org.eclipse.debug.examples.core/samples/structures.pda
org.eclipse.debug.examples.core/scripts/build.xml
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/ClockControl.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/LengthControl.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/MidiLaunch.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/MidiLaunchDelegate.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/SequencerControl.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TempoControl.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TimeControl.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/DebugCorePlugin.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDALineBreakpoint.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDARunToLineBreakpoint.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDAWatchpoint.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/launcher/PDALaunchDelegate.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/IPDAEventListener.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAArray.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAArrayEntry.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugElement.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugTarget.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackFrame.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackValue.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAThread.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAValue.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAVariable.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/WordStructureDelegate.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDABitFieldData.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAChildrenCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAClearBreakpointCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommandResult.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADataCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADropFrameCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalResultEvent.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvent.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEventStopCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAExitedEvent.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommandResult.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameData.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAGroupsCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAListResult.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDANoSuchLabelEvent.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPopDataCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPushDataCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegisterData.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommandResult.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersEvent.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARestartCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumeCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumedEvent.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARunControlEvent.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetBreakpointCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetDataCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetVarCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommandResult.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommandResult.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStartedEvent.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepReturnCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendedEvent.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminateCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminatedEvent.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAUnimplementedInstructionEvent.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumeCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumedEvent.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMStartedEvent.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendedEvent.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMTerminatedEvent.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVarCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAWatchCommand.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/package.html
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupDirector.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupParticipant.java
org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourcePathComputerDelegate.java
org.eclipse.debug.examples.core/src_ant/org/eclipse/debug/examples/ant/tasks/PreProcessor.java
org.eclipse.debug.examples.ui/.classpath
org.eclipse.debug.examples.ui/.cvsignore
org.eclipse.debug.examples.ui/.project
org.eclipse.debug.examples.ui/.settings/org.eclipse.jdt.core.prefs
org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF
org.eclipse.debug.examples.ui/about.html
org.eclipse.debug.examples.ui/build.properties
org.eclipse.debug.examples.ui/icons/full/dlcl16/pop.gif
org.eclipse.debug.examples.ui/icons/full/dlcl16/push.gif
org.eclipse.debug.examples.ui/icons/full/elcl16/pop.gif
org.eclipse.debug.examples.ui/icons/full/elcl16/push.gif
org.eclipse.debug.examples.ui/icons/full/obj16/clef.png
org.eclipse.debug.examples.ui/icons/full/obj16/note.gif
org.eclipse.debug.examples.ui/icons/full/obj16/pda.gif
org.eclipse.debug.examples.ui/plugin.xml
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/CheckboxModelProxyFactory.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlCellModifier.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEditor.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlLabelProvider.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiAdapterFactory.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventModelProxy.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiStepOverHandler.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnFactory.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnPresentation.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerModelProxyFactory.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnFactory.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnPresentation.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackContentProvider.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackModelProxy.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ControlDetailPaneFactory.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/TempoSliderDetailPane.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiLaunchShortcut.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiTabGroup.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/AdapterFactory.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/CommandAdapterFactory.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/ModelProxyFactory.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetContentProvider.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetProxy.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDARestartDebugCommand.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAThreadEventHandler.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDARunToLineAdapter.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTarget.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTargetFactory.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/AnnotationHover.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistant.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditorMessages.properties
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAScanner.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDASourceViewerConfiguration.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PopFrameActionDelegate.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/WordFinder.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDALaunchShortcut.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDATabGroup.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/presentation/PDAModelPresentation.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/AbstractDataStackViewHandler.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CanPushTester.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CheckboxView.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopHandler.java
org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushHandler.java
org.eclipse.debug.tests/.classpath
org.eclipse.debug.tests/.cvsignore
org.eclipse.debug.tests/.project
org.eclipse.debug.tests/.settings/org.eclipse.jdt.core.prefs
org.eclipse.debug.tests/META-INF/MANIFEST.MF
org.eclipse.debug.tests/about.html
org.eclipse.debug.tests/build.properties
org.eclipse.debug.tests/plugin.properties
org.eclipse.debug.tests/plugin.xml
org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/AbstractLaunchTest.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/AcceleratorSubstitutionTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/DebugFileStore.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/DebugFileSystem.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchConfigurationTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchHistoryTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchManagerTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/RefreshTabTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/TestLaunchDelegate.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/DynamicRenderingBindings.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlock.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlockDynamic.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlockOne.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlockThree.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlockTwo.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryRenderingTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/RenderingTypeDelegate.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/CheckTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ChildrenUpdateTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ContentTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/DeltaTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/FilterTransformTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ITestModelUpdatesListenerConstants.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerCheckTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerContentTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerDeltaTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerPerformanceTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerSelectionTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerStateTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerUpdateTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PerformanceTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PresentationContextTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/SelectionTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/StateTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/TestModel.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/TestModelUpdatesListener.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/TreeModelViewerAutopopulateAgent.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/UpdateTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerDeltaTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerLazyModeTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerPerformanceTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerSelectionTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerStateTests.java
org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerUpdateTests.java
org.eclipse.debug.tests/src/org/eclipse/debug/tests/AutomatedSuite.java
org.eclipse.debug.tests/src/org/eclipse/debug/tests/PerformanceSuite.java
org.eclipse.debug.tests/src/org/eclipse/debug/tests/TestsPlugin.java
org.eclipse.debug.tests/src/org/eclipse/debug/tests/statushandlers/StatusHandler.java
org.eclipse.debug.tests/src/org/eclipse/debug/tests/statushandlers/StatusHandlerTests.java
org.eclipse.debug.tests/test-import/Import1.launch
org.eclipse.debug.tests/test-import/Import2.launch
org.eclipse.debug.tests/test-import/Import3.launch
org.eclipse.debug.tests/test-import/Import4.launch
org.eclipse.debug.tests/test-import/Import5.launch
org.eclipse.debug.tests/test.xml
org.eclipse.debug.ui/.classpath
org.eclipse.debug.ui/.cvsignore
org.eclipse.debug.ui/.options
org.eclipse.debug.ui/.project
org.eclipse.debug.ui/.settings/org.eclipse.core.resources.prefs
org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs
org.eclipse.debug.ui/.settings/org.eclipse.pde.prefs
org.eclipse.debug.ui/META-INF/MANIFEST.MF
org.eclipse.debug.ui/about.html
org.eclipse.debug.ui/build.properties
org.eclipse.debug.ui/doc/.cvsignore
org.eclipse.debug.ui/icons/full/dlcl16/changevariablevalue_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/clear_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/collapseall.gif
org.eclipse.debug.ui/icons/full/dlcl16/copy_edit_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/copyviewtoclipboard_tsk.gif
org.eclipse.debug.ui/icons/full/dlcl16/debuglast_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/det_pane_hide.gif
org.eclipse.debug.ui/icons/full/dlcl16/det_pane_right.gif
org.eclipse.debug.ui/icons/full/dlcl16/det_pane_under.gif
org.eclipse.debug.ui/icons/full/dlcl16/disabled_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/disconnect_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/display_selected_mb.gif
org.eclipse.debug.ui/icons/full/dlcl16/edtsrclkup_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/enabled_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/export_brkpts.gif
org.eclipse.debug.ui/icons/full/dlcl16/filter_ps.gif
org.eclipse.debug.ui/icons/full/dlcl16/import_brkpts.gif
org.eclipse.debug.ui/icons/full/dlcl16/lock_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/memoryreset_tsk.gif
org.eclipse.debug.ui/icons/full/dlcl16/metharg_obj.gif
org.eclipse.debug.ui/icons/full/dlcl16/monitorexpression_tsk.gif
org.eclipse.debug.ui/icons/full/dlcl16/new_con.gif
org.eclipse.debug.ui/icons/full/dlcl16/next_thread_nav.gif
org.eclipse.debug.ui/icons/full/dlcl16/prev_thread_nav.gif
org.eclipse.debug.ui/icons/full/dlcl16/printview_tsk.gif
org.eclipse.debug.ui/icons/full/dlcl16/prop_ps.gif
org.eclipse.debug.ui/icons/full/dlcl16/rem_all_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/rem_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/removememory_tsk.gif
org.eclipse.debug.ui/icons/full/dlcl16/restart_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/resume_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/runlast_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/runtoline_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/skip_brkp.gif
org.eclipse.debug.ui/icons/full/dlcl16/stepbystep_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/stepinto_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/stepover_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/stepreturn_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/suspend_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/synced.gif
org.eclipse.debug.ui/icons/full/dlcl16/terminate_all_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/terminate_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/terminate_rem_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/tnames_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/toggledetailpane_co.gif
org.eclipse.debug.ui/icons/full/dlcl16/var_cntnt_prvdr.gif
org.eclipse.debug.ui/icons/full/dtool16/debug_exc.gif
org.eclipse.debug.ui/icons/full/dtool16/environment_co.gif
org.eclipse.debug.ui/icons/full/dtool16/profile_exc.gif
org.eclipse.debug.ui/icons/full/dtool16/run_exc.gif
org.eclipse.debug.ui/icons/full/dtool16/term_restart.gif
org.eclipse.debug.ui/icons/full/dtool16/watch_exp.gif
org.eclipse.debug.ui/icons/full/elcl16/changevariablevalue_co.gif
org.eclipse.debug.ui/icons/full/elcl16/collapseall.gif
org.eclipse.debug.ui/icons/full/elcl16/copy_edit_co.gif
org.eclipse.debug.ui/icons/full/elcl16/copyviewtoclipboard_tsk.gif
org.eclipse.debug.ui/icons/full/elcl16/debuglast_co.gif
org.eclipse.debug.ui/icons/full/elcl16/delete_config.gif
org.eclipse.debug.ui/icons/full/elcl16/det_pane_hide.gif
org.eclipse.debug.ui/icons/full/elcl16/det_pane_right.gif
org.eclipse.debug.ui/icons/full/elcl16/det_pane_under.gif
org.eclipse.debug.ui/icons/full/elcl16/disabled_co.gif
org.eclipse.debug.ui/icons/full/elcl16/disconnect_co.gif
org.eclipse.debug.ui/icons/full/elcl16/display_selected_mb.gif
org.eclipse.debug.ui/icons/full/elcl16/dissolve_group.gif
org.eclipse.debug.ui/icons/full/elcl16/drop_to_frame.gif
org.eclipse.debug.ui/icons/full/elcl16/edtsrclkup_co.gif
org.eclipse.debug.ui/icons/full/elcl16/enabled_co.gif
org.eclipse.debug.ui/icons/full/elcl16/expandall.gif
org.eclipse.debug.ui/icons/full/elcl16/export_brkpts.gif
org.eclipse.debug.ui/icons/full/elcl16/filter_ps.gif
org.eclipse.debug.ui/icons/full/elcl16/hierarchicalLayout.gif
org.eclipse.debug.ui/icons/full/elcl16/import_brkpts.gif
org.eclipse.debug.ui/icons/full/elcl16/lock_co.gif
org.eclipse.debug.ui/icons/full/elcl16/memoryreset_tsk.gif
org.eclipse.debug.ui/icons/full/elcl16/metharg_obj.gif
org.eclipse.debug.ui/icons/full/elcl16/monitorexpression_tsk.gif
org.eclipse.debug.ui/icons/full/elcl16/new_con.gif
org.eclipse.debug.ui/icons/full/elcl16/next_thread_nav.gif
org.eclipse.debug.ui/icons/full/elcl16/pin.gif
org.eclipse.debug.ui/icons/full/elcl16/prev_thread_nav.gif
org.eclipse.debug.ui/icons/full/elcl16/printview_tsk.gif
org.eclipse.debug.ui/icons/full/elcl16/prop_ps.gif
org.eclipse.debug.ui/icons/full/elcl16/rem_all_co.gif
org.eclipse.debug.ui/icons/full/elcl16/rem_co.gif
org.eclipse.debug.ui/icons/full/elcl16/removememory_tsk.gif
org.eclipse.debug.ui/icons/full/elcl16/restart_co.gif
org.eclipse.debug.ui/icons/full/elcl16/resume_co.gif
org.eclipse.debug.ui/icons/full/elcl16/runlast_co.gif
org.eclipse.debug.ui/icons/full/elcl16/runtoline_co.gif
org.eclipse.debug.ui/icons/full/elcl16/skip_brkp.gif
org.eclipse.debug.ui/icons/full/elcl16/stepbystep_co.gif
org.eclipse.debug.ui/icons/full/elcl16/stepinto_co.gif
org.eclipse.debug.ui/icons/full/elcl16/stepover_co.gif
org.eclipse.debug.ui/icons/full/elcl16/stepreturn_co.gif
org.eclipse.debug.ui/icons/full/elcl16/suspend_co.gif
org.eclipse.debug.ui/icons/full/elcl16/synced.gif
org.eclipse.debug.ui/icons/full/elcl16/terminate_all_co.gif
org.eclipse.debug.ui/icons/full/elcl16/terminate_co.gif
org.eclipse.debug.ui/icons/full/elcl16/terminate_rem_co.gif
org.eclipse.debug.ui/icons/full/elcl16/tnames_co.gif
org.eclipse.debug.ui/icons/full/elcl16/toggledetailpane_co.gif
org.eclipse.debug.ui/icons/full/elcl16/var_cntnt_prvdr.gif
org.eclipse.debug.ui/icons/full/elcl16/writeerr_co.gif
org.eclipse.debug.ui/icons/full/elcl16/writeout_co.gif
org.eclipse.debug.ui/icons/full/etool16/debug_exc.gif
org.eclipse.debug.ui/icons/full/etool16/environment_co.gif
org.eclipse.debug.ui/icons/full/etool16/profile_exc.gif
org.eclipse.debug.ui/icons/full/etool16/run_exc.gif
org.eclipse.debug.ui/icons/full/etool16/term_restart.gif
org.eclipse.debug.ui/icons/full/etool16/watch_exp.gif
org.eclipse.debug.ui/icons/full/eview16/breakpoint_view.gif
org.eclipse.debug.ui/icons/full/eview16/debug_persp.gif
org.eclipse.debug.ui/icons/full/eview16/debug_view.gif
org.eclipse.debug.ui/icons/full/eview16/details_view.gif
org.eclipse.debug.ui/icons/full/eview16/memory_view.gif
org.eclipse.debug.ui/icons/full/eview16/module_view.gif
org.eclipse.debug.ui/icons/full/eview16/register_view.gif
org.eclipse.debug.ui/icons/full/eview16/variable_view.gif
org.eclipse.debug.ui/icons/full/eview16/watchlist_view.gif
org.eclipse.debug.ui/icons/full/obj16/arraypartition_obj.gif
org.eclipse.debug.ui/icons/full/obj16/brkp_grp.gif
org.eclipse.debug.ui/icons/full/obj16/brkp_grp_disabled.gif
org.eclipse.debug.ui/icons/full/obj16/brkp_obj.gif
org.eclipse.debug.ui/icons/full/obj16/brkp_type.gif
org.eclipse.debug.ui/icons/full/obj16/brkpd_obj.gif
org.eclipse.debug.ui/icons/full/obj16/common_tab.gif
org.eclipse.debug.ui/icons/full/obj16/debugt_obj.gif
org.eclipse.debug.ui/icons/full/obj16/debugts_obj.gif
org.eclipse.debug.ui/icons/full/obj16/debugtt_obj.gif
org.eclipse.debug.ui/icons/full/obj16/environment_obj.gif
org.eclipse.debug.ui/icons/full/obj16/envvar_obj.gif
org.eclipse.debug.ui/icons/full/obj16/export_config_obj.gif
org.eclipse.debug.ui/icons/full/obj16/expression_obj.gif
org.eclipse.debug.ui/icons/full/obj16/file_obj.gif
org.eclipse.debug.ui/icons/full/obj16/fldr_obj.gif
org.eclipse.debug.ui/icons/full/obj16/genericreggroup_obj.gif
org.eclipse.debug.ui/icons/full/obj16/genericregister_obj.gif
org.eclipse.debug.ui/icons/full/obj16/genericvariable_obj.gif
org.eclipse.debug.ui/icons/full/obj16/import_config_obj.gif
org.eclipse.debug.ui/icons/full/obj16/inst_ptr.gif
org.eclipse.debug.ui/icons/full/obj16/inst_ptr_top.gif
org.eclipse.debug.ui/icons/full/obj16/jar_obj.gif
org.eclipse.debug.ui/icons/full/obj16/ldebug_obj.gif
org.eclipse.debug.ui/icons/full/obj16/lrun_obj.gif
org.eclipse.debug.ui/icons/full/obj16/memory_obj.gif
org.eclipse.debug.ui/icons/full/obj16/memorychanged_obj.gif
org.eclipse.debug.ui/icons/full/obj16/osprc_obj.gif
org.eclipse.debug.ui/icons/full/obj16/osprct_obj.gif
org.eclipse.debug.ui/icons/full/obj16/persp_tab.gif
org.eclipse.debug.ui/icons/full/obj16/prj_obj.gif
org.eclipse.debug.ui/icons/full/obj16/read_obj.gif
org.eclipse.debug.ui/icons/full/obj16/read_obj_disabled.gif
org.eclipse.debug.ui/icons/full/obj16/readwrite_obj.gif
org.eclipse.debug.ui/icons/full/obj16/readwrite_obj_disabled.gif
org.eclipse.debug.ui/icons/full/obj16/refresh_tab.gif
org.eclipse.debug.ui/icons/full/obj16/rundebug.gif
org.eclipse.debug.ui/icons/full/obj16/stckframe_obj.gif
org.eclipse.debug.ui/icons/full/obj16/stckframe_running_obj.gif
org.eclipse.debug.ui/icons/full/obj16/terminatedlaunch_obj.gif
org.eclipse.debug.ui/icons/full/obj16/thread_obj.gif
org.eclipse.debug.ui/icons/full/obj16/threads_obj.gif
org.eclipse.debug.ui/icons/full/obj16/threadt_obj.gif
org.eclipse.debug.ui/icons/full/obj16/workset.gif
org.eclipse.debug.ui/icons/full/obj16/write_obj.gif
org.eclipse.debug.ui/icons/full/obj16/write_obj_disabled.gif
org.eclipse.debug.ui/icons/full/ovr16/error.gif
org.eclipse.debug.ui/icons/full/ovr16/skip_breakpoint_ov.gif
org.eclipse.debug.ui/icons/full/ovr16/stcksync_ov.gif
org.eclipse.debug.ui/icons/full/ovr16/transparent.gif
org.eclipse.debug.ui/icons/full/wizban/adddir_wiz.png
org.eclipse.debug.ui/icons/full/wizban/addsrcloc_wiz.png
org.eclipse.debug.ui/icons/full/wizban/debug_wiz.png
org.eclipse.debug.ui/icons/full/wizban/editdir_wiz.png
org.eclipse.debug.ui/icons/full/wizban/edtsrclkup_wiz.png
org.eclipse.debug.ui/icons/full/wizban/export_brkpts_wizban.png
org.eclipse.debug.ui/icons/full/wizban/export_config_wizban.png
org.eclipse.debug.ui/icons/full/wizban/import_brkpts_wizban.png
org.eclipse.debug.ui/icons/full/wizban/import_config_wizban.png
org.eclipse.debug.ui/icons/full/wizban/profile_wiz.png
org.eclipse.debug.ui/icons/full/wizban/run_wiz.png
org.eclipse.debug.ui/plugin.properties
org.eclipse.debug.ui/plugin.xml
org.eclipse.debug.ui/schema/breakpointOrganizers.exsd
org.eclipse.debug.ui/schema/consoleColorProviders.exsd
org.eclipse.debug.ui/schema/consoleLineTrackers.exsd
org.eclipse.debug.ui/schema/contextViewBindings.exsd
org.eclipse.debug.ui/schema/debugModelContextBindings.exsd
org.eclipse.debug.ui/schema/debugModelPresentations.exsd
org.eclipse.debug.ui/schema/detailPaneFactories.exsd
org.eclipse.debug.ui/schema/launchConfigurationTabGroups.exsd
org.eclipse.debug.ui/schema/launchConfigurationTabs.exsd
org.eclipse.debug.ui/schema/launchConfigurationTypeImages.exsd
org.eclipse.debug.ui/schema/launchGroups.exsd
org.eclipse.debug.ui/schema/launchShortcuts.exsd
org.eclipse.debug.ui/schema/memoryRenderings.exsd
org.eclipse.debug.ui/schema/sourceContainerPresentations.exsd
org.eclipse.debug.ui/schema/stringVariablePresentations.exsd
org.eclipse.debug.ui/schema/toggleBreakpointsTargetFactories.exsd
org.eclipse.debug.ui/schema/variableValueEditors.exsd
org.eclipse.debug.ui/scripts/exportplugin.xml
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugCheckboxSelectionDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugListSelectionDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugSelectionDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/BreakpointImageProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/CompositeDebugImageDescriptor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugModelPropertyTester.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspectiveFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIAdapterFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DynamicInstructionPointerAnnotation.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ILaunchHistoryChangedListener.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ILaunchLabelChangedListener.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ImageDescriptorRegistry.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerAnnotation.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerContext.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerImageProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchConfigurationTabExtension.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/MultipleInputDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/Pair.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ResourceExtender.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariableValueEditorManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariablesViewModelPresentation.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/WorkingDirectoryStatusHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveAllActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractSelectionActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AddToFavoritesAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CollapseAllAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConfigureColumnsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugAsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugContextualLaunchAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugHistoryMenuAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugLastAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugToolbarAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/EditLaunchConfigurationAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ExecutionAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/IToggleBreakpointsTargetManagerListener.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchConfigurationAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchablePropertyTester.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenDebugConfigurations.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenProfileConfigurations.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenRunConfigurations.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileAsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileContextualLaunchAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileHistoryMenuAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileLastAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileToolbarAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetRunToLineAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunAsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunContextualLaunchAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunHistoryMenuAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunLastAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunToolbarAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SelectAllAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StatusInfo.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleFilterAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ViewManagementAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/AbstractBreakpointsViewAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/AdvancedGroupBreakpointsByAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointSelectionAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointWorkingSetAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ClearDefaultBreakpointGroupAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/EditBreakpointGroupAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/PasteBreakpointsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SelectBreakpointWorkingsetDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SetDefaultBreakpointGroupAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ToggleDefaultGroupAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/WorkingSetsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/AccessWatchpointToggleAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointTypesContribution.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsCollapseAllAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsExpandAllAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DeleteWorkingsetsMessageDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DisableBreakpointsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/EnableBreakpointsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/LinkBreakpointsWithDebugViewAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/Messages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/Messages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ModificationWatchpointToggleAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ModifyWatchpointAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllBreakpointsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetBreakpointAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetMethodBreakpointAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetToggleBreakpointAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetToggleLineBreakpointAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetWatchpointAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RulerEnableDisableBreakpointAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SelectAllBreakpointsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SkipAllBreakpointsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ToggleBreakpointObjectActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/AddWatchExpressionAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ConvertToWatchExpressionAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/DisableWatchExpressionAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EditWatchExpressionAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EnableWatchExpressionAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/PasteWatchExpressionsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ReevaluateWatchExpressionAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveAllExpressionsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveExpressionAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/SelectAllExpressionsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionFactoryTester.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueInputDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/SelectAllVariablesAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ShowTypesAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ToggleDetailPaneAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneAssignValueAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneMaxLengthAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneMaxLengthDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneWordWrapAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/AbstractRequestMonitor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ActionsUpdater.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ExecuteActionRequest.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ICommandParticipant.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/IEnabledTarget.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAllAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRemoveAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersCommandActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/UpdateActionsRequest.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/UpdateHandlerRequest.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextRunner.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextSourceProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/LaunchSuspendTrigger.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/SuspendTriggerAdapterFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/AsynchronousDebugLabelAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultVariableCellModifier.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultViewerInputProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockLabelAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryRetrievalContentAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemorySegmentLabelAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/Messages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/Messages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/RegisterGroupProxy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameSourceDisplayAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameViewerInputProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/VariableColumnFactoryAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/VariableColumnPresentation.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/BreakpointImportExport.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ExportBreakpoints.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/IImportExportConstants.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportBreakpoints.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportExportMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpoints.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpointsPage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpoints.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsPage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizard.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ImportLaunchConfigurationsWizard.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ImportLaunchConfigurationsWizardPage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/WizardMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/WizardMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/AbstractLaunchConfigurationAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ClosedProjectFilter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CollapseAllLaunchConfigurationAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorProjectPromptStatusHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorPromptStatusHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CreateLaunchConfigurationAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DebugModePromptStatusHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeleteLaunchConfigurationAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeletedProjectFilter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchConfigurationAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchDelegatesStatusHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/EnvironmentVariable.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FilterDropDownMenuCreator.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FilterLaunchConfigurationAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchCategoryFilter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationEditDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationFilteredTree.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationSelectionDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupExtension.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabImageDescriptor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypeContribution.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypeFilter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchDelegateContribution.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchDelegateNotAvailableHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchGroupExtension.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchGroupFilter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutExtension.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchTabContribution.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/OrganizeFavoritesAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SaveScopeResourcesHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectFavoritesDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchModesDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchersDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/WorkingSetComparator.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/WorkingSetsFilter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/IMemoryBlockConnection.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/IMemoryRenderingUpdater.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/IPersistableDebugElement.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/MemoryRenderingManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/MemoryRenderingType.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/RenderingBindings.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTextRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/MemoryViewPresentationContext.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugElementLabelProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugElementMementoProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugTargetContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementLabelProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementMementoProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionLabelProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerMementoProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionMementoProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchManagerContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryBlockContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryBlockLabelProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryRetrievalContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryViewElementMementoProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupLabelProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupMementoProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameMementoProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ThreadContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableEditor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableLabelProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableMementoProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ViewerInputProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/BooleanFieldEditor2.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ConsolePreferencePage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencePage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/DebugPreferencesMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchersPreferencePage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchingPreferencePage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ProcessPropertyPage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ViewManagementPreferencePage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddContainerAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/BasicContainerContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/DownAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/EditContainerAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/EditSourceLookupPathAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/LookupSourceAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/Prompter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/RemoveAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/ResolveDuplicatesHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/RestoreDefaultAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerAdapterFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerLabelProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerWorkbenchAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceElementAdapterFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceElementLabelProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceElementWorkbenchAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupFacility.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupPanel.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupResult.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupService.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIUtils.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/UpAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/WorkingSetSourceContainerType.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveFilter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveSourceContainerBrowser.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/DirectorySourceContainerBrowser.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/DirectorySourceContainerDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ExternalArchiveSourceContainerBrowser.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerBrowser.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ProjectSourceContainerBrowser.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ProjectSourceContainerDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkingSetSourceContainerBrowser.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkspaceSourceContainerBrowser.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/FilePrompt.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/FolderPrompt.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/IArgumentSelector.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/PasswordPrompt.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/PromptingResolver.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/ResourceSelector.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/SelectedResourceManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/SelectedResourceResolver.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/SelectedTextResolver.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringPrompt.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringSubstitutionMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringSubstitutionMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringVariableLabelProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringVariablePresentationManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/SystemPropertyArgumentSelector.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AbstractUpdatePolicy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousRequestMonitor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousSchedulingRuleFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableModel.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ChildrenRequestMonitor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/FindElementDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ILabelResult.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/LabelRequestMonitor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/LabelResult.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ModelNode.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/PartPresentationContext.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableAddRequestMonitor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableEditorImpl.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableInsertRequestMonitor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableRemoveRequestMonitor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableReplaceRequestMonitor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/TableUpdatePolicy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/AbstractBreadcrumb.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItem.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDetails.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbItemDropDown.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/IBreadcrumbDropDownSite.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/TreeViewerDropDown.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenUpdate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementCompareRequest.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementMementoRequest.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/FilterTransform.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/HasChildrenUpdate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ILabelUpdateListener.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/IMementoManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelCheckProviderTarget.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProviderTarget.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelLabelProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelLabelProviderTarget.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/LabelUpdate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/MementoUpdate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ModelContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/SubTreeModelViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeCursor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelLabelProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerAdapterService.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerInputUpdate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerUpdateMonitor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualItem.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualTree.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckUpdate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckboxModelProxy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IChildrenCountUpdate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IChildrenUpdate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentation.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IColumnPresentationFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementCompareRequest.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementEditor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementLabelProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementMementoProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IElementMementoRequest.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IHasChildrenUpdate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ILabelUpdate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelChangedListener.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelDelta.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelDeltaVisitor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxyFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxyFactory2.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelSelectionPolicy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelSelectionPolicyFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IPresentationContext.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStateUpdateListener.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStatusMonitor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputRequestor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerInputUpdate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IViewerUpdateListener.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/TreeModelViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ViewerInputService.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualTreeModelViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AbstractColumnPresentation.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AbstractModelProxy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AsynchronousContentAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AsynchronousLabelAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IAsynchronousContentAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IAsynchronousLabelAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IChildrenRequestMonitor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/IContainerRequestMonitor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/ILabelRequestMonitor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugEventHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetEventHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugTargetProxy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultExpressionModelProxy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultModelProxyFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultModelSelectionPolicyFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultSelectionPolicy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultVariableViewModelProxy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultWatchExpressionModelProxy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/EventHandlerModelProxy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ExpressionEventHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ExpressionManagerModelProxy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchProxy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/MemoryBlockProxy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/MemoryRetrievalProxy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ProcessProxy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/StackFrameEventHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ThreadEventHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/VariablesViewEventHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugModelPresentationContext.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugUIViewsMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugUIViewsMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/IDebugExceptionHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainerWorkbenchAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerExtension.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointPersistableElementAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointSetOrganizer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointTypeOrganizer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetCache.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetElementAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsComparator.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDragAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDropAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsLabelProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsViewEventHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/FileBreakpointOrganizer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/IBreakpointOrganizer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/OtherBreakpointCategory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/ProjectBreakpointOrganizer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/WorkingSetBreakpointOrganizer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/WorkingSetCategory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleLineNotifier.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleRemoveAllTerminatedAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleRemoveLaunchAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleShowPreferencesAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleTerminateAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsoleManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsolePageParticipant.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessTypePropertyTester.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ShowStandardErrorAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ShowStandardOutAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ShowWhenContentChangesAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionView.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/BreadcrumbDropDownAutoExpandAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/BreadcrumbWorkbenchPart.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementAdapterFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementHelper.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugViewModeAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/Decoration.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DecorationManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/ImageImageDescriptor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewBreadcrumb.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewCopyToClipboardActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/SourceNotFoundEditor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/SourceNotFoundEditorInput.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/StandardDecoration.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryBlockAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingContextAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/CodePagesPreferencePage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/IMemoryView.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/IMemoryViewPane.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/IMemoryViewTab.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/LinkRenderingPanesAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryView.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewIdRegistry.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewPrefAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewTab.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewTreeModelContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewTreeViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewUtil.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MonitorMemoryBlockDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/NewMemoryViewAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/PinMemoryBlockAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/PropertyChangeNotifier.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RemoveMemoryRenderingAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RemoveRenderingContextAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ResetMemoryBlockAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ResetMemoryBlockPreferencePage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RetargetAddMemoryBlockAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/SetPaddedStringPreferencePage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/SwitchMemoryBlockAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/SynchronizeInfo.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ToggleMemoryMonitorsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ToggleSplitPaneAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ToggleViewPaneAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneOrientationAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneRenderingMgr.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneSelectionProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewTabEnablementManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/ASCIIRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/ASCIIRenderingTypeDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AbstractBaseTableRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AbstractIntegerRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AbstractTableRenderingLabelProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AbstractVirtualContentTableModel.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncCopyTableRenderingAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncPrintTableRenderingAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingCellModifier.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingUpdatePolicy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncVirtualContentTableViewer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/BasicDebugViewContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/BigEndianAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/CopyTableRenderingToClipboardAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/CreateRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/DefaultEndianessAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/ErrorRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/FormatTableRenderingAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/FormatTableRenderingDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressComposite.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/HexIntegerRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/HexIntegerRenderingDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/HexRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/HexRenderingTypeDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/IContentChangeComputer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/IPresentationErrorListener.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/IVirtualContentListener.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/LittleEndianAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/MemorySegment.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/PendingPropertyChanges.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/PrintTableRenderingAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/ReformatAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/RenderingsUtil.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/ResetToBaseAddressAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/SignedIntegerRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/SignedIntegerRenderingTypeDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingCellModifier.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentDescriptor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentInput.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLabelProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLabelProviderEx.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLine.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingModel.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingPrefAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingPreferencePage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingPropertiesPage.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/UnsignedIntegerRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/UnsignedIntegerRenderingTypeDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/modules/IHelpContextIdProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/modules/ModulesView.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/modules/ModulesViewMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/modules/ModulesViewMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/registers/RegistersView.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/registers/RegistersViewMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/registers/RegistersViewMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/AvailableLogicalStructuresAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/IndexedValuePartition.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/IndexedVariablePartition.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/LogicalStructureCache.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/SelectLogicalStructureAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/SelectionDragAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/ToggleLogicalStructureAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/ToggleShowColumnsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariableViewToggleAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesViewMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesViewMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesViewResourceBundleMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AbstractDetailPane.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AvailableDetailPanesAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPane.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.properties
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneProxy.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/IDetailPaneContainer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/IDetailPaneContainer2.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractBreakpointOrganizerDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTabGroup.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/BreakpointTypeCategory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugElementWorkbenchAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugPopup.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DeferredDebugElementWorkbenchAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointOrganizerDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointOrganizerDelegateExtension.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IBreakpointTypeCategory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugEditorPresentation.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugModelPresentation.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugModelPresentationExtension.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugView.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane2.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPaneFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IInstructionPointerPresentation.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationTab.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchConfigurationTabGroup.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchGroup.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchShortcut.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ILaunchShortcut2.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/ISourcePresentation.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IValueDetailListener.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/RefreshTab.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/WorkingDirectoryBlock.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchHistoryAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchToolbarAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AddMemoryRenderingActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ExportBreakpointsOperation.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IAddMemoryBlocksTarget.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IAddMemoryRenderingsTarget.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ILaunchable.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IRunToLineTarget.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTarget.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetExtension.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IToggleBreakpointsTargetFactory.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IVariableValueEditor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IWatchExpressionFactoryAdapter.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IWatchExpressionFactoryAdapter2.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/IWatchExpressionFactoryAdapterExtension.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchAsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchShortcutsAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/OpenLaunchDialogAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerBreakpointAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerBreakpointTypesActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerEnableDisableBreakpointActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RulerToggleBreakpointActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineHandler.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleBreakpointAction.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleMethodBreakpointActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleWatchpointActionDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/package.html
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/ConsoleColorProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/FileLink.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsole.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleColorProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleHyperlink.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleLineTracker.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/IConsoleLineTrackerExtension.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/console/package.html
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/AbstractDebugContextProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/DebugContextEvent.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextListener.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/IDebugContextService.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTrigger.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/ISuspendTriggerListener.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/contexts/package.html
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractMemoryRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractMemoryRenderingBindingsProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTableRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTextRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryBlockTablePresentation.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingBindingsListener.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingBindingsProvider.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingContainer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingManager.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSite.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingSynchronizationService.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingType.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IMemoryRenderingTypeDelegate.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IRepositionableMemoryRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/IResettableMemoryRendering.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/MemoryRenderingElement.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/package.html
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/package.html
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/AbstractSourceContainerBrowser.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/CommonSourceNotFoundEditor.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/CommonSourceNotFoundEditorInput.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceContainerBrowser.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceDisplay.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceLookupResult.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupTab.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/WorkingSetSourceContainer.java
org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/package.html
org.eclipse.ui.console/.classpath
org.eclipse.ui.console/.cvsignore
org.eclipse.ui.console/.project
org.eclipse.ui.console/.settings/org.eclipse.jdt.core.prefs
org.eclipse.ui.console/.settings/org.eclipse.pde.prefs
org.eclipse.ui.console/META-INF/MANIFEST.MF
org.eclipse.ui.console/about.html
org.eclipse.ui.console/build.properties
org.eclipse.ui.console/icons/full/clcl16/clear_co.gif
org.eclipse.ui.console/icons/full/clcl16/lock_co.gif
org.eclipse.ui.console/icons/full/clcl16/pin.gif
org.eclipse.ui.console/icons/full/cview16/console_view.gif
org.eclipse.ui.console/icons/full/dlcl16/clear_co.gif
org.eclipse.ui.console/icons/full/dlcl16/lock_co.gif
org.eclipse.ui.console/icons/full/dlcl16/pin.gif
org.eclipse.ui.console/icons/full/dlcl16/rem_co.gif
org.eclipse.ui.console/icons/full/elcl16/clear_co.gif
org.eclipse.ui.console/icons/full/elcl16/lock_co.gif
org.eclipse.ui.console/icons/full/elcl16/new_con.gif
org.eclipse.ui.console/icons/full/elcl16/pin.gif
org.eclipse.ui.console/icons/full/elcl16/rem_co.gif
org.eclipse.ui.console/icons/full/eview16/console_view.gif
org.eclipse.ui.console/plugin.properties
org.eclipse.ui.console/plugin.xml
org.eclipse.ui.console/schema/consoleFactories.exsd
org.eclipse.ui.console/schema/consolePageParticipants.exsd
org.eclipse.ui.console/schema/consolePatternMatchListeners.exsd
org.eclipse.ui.console/scripts/exportplugin.xml
org.eclipse.ui.console/src/org/eclipse/ui/console/AbstractConsole.java
org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java
org.eclipse.ui.console/src/org/eclipse/ui/console/IConsole.java
org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleConstants.java
org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleDocumentPartitioner.java
org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleFactory.java
org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleListener.java
org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleManager.java
org.eclipse.ui.console/src/org/eclipse/ui/console/IConsolePageParticipant.java
org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleView.java
org.eclipse.ui.console/src/org/eclipse/ui/console/IHyperlink.java
org.eclipse.ui.console/src/org/eclipse/ui/console/IHyperlink2.java
org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsole.java
org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleInputStream.java
org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java
org.eclipse.ui.console/src/org/eclipse/ui/console/IPatternMatchListener.java
org.eclipse.ui.console/src/org/eclipse/ui/console/IPatternMatchListenerDelegate.java
org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsole.java
org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java
org.eclipse.ui.console/src/org/eclipse/ui/console/PatternMatchEvent.java
org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsole.java
org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsolePage.java
org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java
org.eclipse.ui.console/src/org/eclipse/ui/console/actions/ClearOutputAction.java
org.eclipse.ui.console/src/org/eclipse/ui/console/actions/CloseConsoleAction.java
org.eclipse.ui.console/src/org/eclipse/ui/console/actions/TextViewerAction.java
org.eclipse.ui.console/src/org/eclipse/ui/console/actions/TextViewerGotoLineAction.java
org.eclipse.ui.console/src/org/eclipse/ui/console/actions/package.html
org.eclipse.ui.console/src/org/eclipse/ui/console/package.html
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocument.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocumentAdapter.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDropDownAction.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleHyperlinkPosition.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.properties
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePageParticipantExtension.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePatternMatcher.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleResourceBundleMessages.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleResourceBundleMessages.properties
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleTypePropertyTester.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleView.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleViewConsoleFactory.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/HyperlinkUpdater.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IConsoleHelpContextIds.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IInternalConsoleConstants.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePage.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartition.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsoleViewer.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/OpenConsoleAction.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListener.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListenerExtension.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ScrollLockAction.java
org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ShowConsoleAction.java
org.eclipse.ui.externaltools/.classpath
org.eclipse.ui.externaltools/.cvsignore
org.eclipse.ui.externaltools/.project
org.eclipse.ui.externaltools/.settings/org.eclipse.jdt.core.prefs
org.eclipse.ui.externaltools/.settings/org.eclipse.jdt.ui.prefs
org.eclipse.ui.externaltools/.settings/org.eclipse.pde.prefs
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuildTab.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.properties
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsUtil.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/IgnoreWhiteSpaceComparator.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/WorkingSetComparator.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/ExternalToolMenuDelegate.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/OpenExternalToolsConfigurations.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/BuilderUtils.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsImages.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.properties
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsPlugin.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsPreferenceInitializer.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolConstants.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolsHelpContextIds.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IPreferenceConstants.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ImageDescriptorRegistry.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderLabelProvider.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/EditCommandDialog.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsPreferencePage.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.properties
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/FileSelectionDialog.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/TreeAndListGroup.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildFilesResolver.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildProjectResolver.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildTypeResolver.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/SystemPathResolver.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/VariableMessages.java
org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/VariableMessages.properties
org.eclipse.ui.externaltools/META-INF/MANIFEST.MF
org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.java
org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.properties
org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramBuilderTabGroup.java
org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java
org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramTabGroup.java
org.eclipse.ui.externaltools/about.html
org.eclipse.ui.externaltools/build.properties
org.eclipse.ui.externaltools/buildfiles/exportplugin.xml
org.eclipse.ui.externaltools/icons/full/dtool16/external_tools.gif
org.eclipse.ui.externaltools/icons/full/etool16/external_tools.gif
org.eclipse.ui.externaltools/icons/full/obj16/build_tab.gif
org.eclipse.ui.externaltools/icons/full/obj16/builder.gif
org.eclipse.ui.externaltools/icons/full/obj16/classpath.gif
org.eclipse.ui.externaltools/icons/full/obj16/external_tools.gif
org.eclipse.ui.externaltools/icons/full/obj16/invalid_build_tool.gif
org.eclipse.ui.externaltools/icons/full/obj16/main_tab.gif
org.eclipse.ui.externaltools/icons/full/wizban/ext_tools_wiz.png
org.eclipse.ui.externaltools/plugin.properties
org.eclipse.ui.externaltools/plugin.xml
org.eclipse.ui.externaltools/schema/configurationDuplicationMaps.exsd
diff --git a/org.eclipse.core.externaltools/.classpath b/org.eclipse.core.externaltools/.classpath
deleted file mode 100644
index 2fbb7a2..0000000
--- a/org.eclipse.core.externaltools/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.core.externaltools/.cvsignore b/org.eclipse.core.externaltools/.cvsignore
deleted file mode 100644
index c5e82d7..0000000
--- a/org.eclipse.core.externaltools/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
\ No newline at end of file
diff --git a/org.eclipse.core.externaltools/.project b/org.eclipse.core.externaltools/.project
deleted file mode 100644
index 4b19d2a..0000000
--- a/org.eclipse.core.externaltools/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.core.externaltools</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.core.externaltools/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.core.externaltools/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 5ac4bbd..0000000
--- a/org.eclipse.core.externaltools/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,74 +0,0 @@
-#Wed Sep 16 09:50:20 CDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/org.eclipse.core.externaltools/.settings/org.eclipse.pde.prefs b/org.eclipse.core.externaltools/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 189611f..0000000
--- a/org.eclipse.core.externaltools/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,25 +0,0 @@
-#Wed Oct 07 13:13:28 CDT 2009
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=1
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=1
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
diff --git a/org.eclipse.core.externaltools/META-INF/MANIFEST.MF b/org.eclipse.core.externaltools/META-INF/MANIFEST.MF
deleted file mode 100644
index dea5ba1..0000000
--- a/org.eclipse.core.externaltools/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.core.externaltools;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.core.externaltools.internal.ExternalToolsCore
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.debug.core;bundle-version="[3.6.0,4.0.0)",
- org.eclipse.core.variables;bundle-version="[3.2.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-ActivationPolicy: lazy
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.core.externaltools.internal;x-friends:="org.eclipse.ant.launching,org.eclipse.ui.externaltools,org.eclipse.ant.ui",
- org.eclipse.core.externaltools.internal.launchConfigurations;x-friends:="org.eclipse.ant.launching,org.eclipse.ui.externaltools",
- org.eclipse.core.externaltools.internal.model;x-friends:="org.eclipse.ant.launching,org.eclipse.ui.externaltools,org.eclipse.ant.ui",
- org.eclipse.core.externaltools.internal.registry;x-friends:="org.eclipse.ui.externaltools"
diff --git a/org.eclipse.core.externaltools/about.html b/org.eclipse.core.externaltools/about.html
deleted file mode 100644
index 8fcbcd9..0000000
--- a/org.eclipse.core.externaltools/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>September 16, 2009</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.core.externaltools/build.properties b/org.eclipse.core.externaltools/build.properties
deleted file mode 100644
index 81d294c..0000000
--- a/org.eclipse.core.externaltools/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- about.html
-src.includes = about.html
diff --git a/org.eclipse.core.externaltools/plugin.properties b/org.eclipse.core.externaltools/plugin.properties
deleted file mode 100644
index f2df1a6..0000000
--- a/org.eclipse.core.externaltools/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName=External Tools Headless Support
-providerName=Eclipse.org
-
-Program.externalTools = Program
-Builder.externalTools = Integrated External Tool Builder
\ No newline at end of file
diff --git a/org.eclipse.core.externaltools/plugin.xml b/org.eclipse.core.externaltools/plugin.xml
deleted file mode 100644
index 655c8a2..0000000
--- a/org.eclipse.core.externaltools/plugin.xml
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/ExternalToolsCore.java b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/ExternalToolsCore.java
deleted file mode 100644
index e14df99..0000000
--- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/ExternalToolsCore.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.externaltools.internal;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleContext;
-
-/**
- * Controls the plug-in life cycle
- */
-public class ExternalToolsCore extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.core.externaltools"; //$NON-NLS-1$
-
- private static final String EMPTY_STRING= ""; //$NON-NLS-1$
-
- /**
- * Status code indicating an unexpected internal error.
- * @since 2.1
- */
- public static final int INTERNAL_ERROR = 120;
-
- // The shared instance
- private static ExternalToolsCore plugin;
-
- /**
- * The constructor
- */
- public ExternalToolsCore() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static ExternalToolsCore getDefault() {
- return plugin;
- }
-
- /**
- * Logs the specified throwable with this plug-in's log.
- *
- * @param t throwable to log
- */
- public static void log(Throwable t) {
- IStatus status= new Status(IStatus.ERROR, PLUGIN_ID, INTERNAL_ERROR, "Error logged from Ant UI: ", t); //$NON-NLS-1$
- log(status);
- }
-
- /**
- * Logs the specified status with this plug-in's log.
- *
- * @param status status
- */
- public static void log(IStatus status) {
- getDefault().getLog().log(status);
- }
-
- /**
- * Writes the message to the plug-in's log
- *
- * @param message the text to write to the log
- */
- public static void log(String message, Throwable exception) {
- IStatus status = newErrorStatus(message, exception);
- log(status);
- }
-
- /**
- * Returns a new <code>IStatus</code> for this plug-in
- */
- public static IStatus newErrorStatus(String message, Throwable exception) {
- if (message == null) {
- message= EMPTY_STRING;
- }
- return new Status(IStatus.ERROR, PLUGIN_ID, 0, message, exception);
- }
-
- /**
- * Returns a new <code>CoreException</code> for this plug-in
- */
- public static CoreException newError(String message, Throwable exception) {
- return new CoreException(new Status(IStatus.ERROR,
- IExternalToolConstants.PLUGIN_ID, 0, message, exception));
- }
-
-}
diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/IExternalToolConstants.java b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/IExternalToolConstants.java
deleted file mode 100644
index 4641a0e..0000000
--- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/IExternalToolConstants.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * dakshinamurthy.karra@gmail.com - bug 165371
- *******************************************************************************/
-
-package org.eclipse.core.externaltools.internal;
-/**
- * Defines the constants available for client use.
- * <p>
- * This interface is not intended to be extended or implemented by clients.
- * </p>
- */
-public interface IExternalToolConstants {
- /**
- * Plug-in identifier for external tools UI (value <code>org.eclipse.ui.externaltools</code>).
- */
- public static final String UI_PLUGIN_ID = "org.eclipse.ui.externaltools"; //$NON-NLS-1$;
-
- /**
- * Plug-in identifier for external tools core (value <code>org.eclipse.core.externaltools</code>).
- */
- public static final String PLUGIN_ID = "org.eclipse.core.externaltools"; //$NON-NLS-1$;
-
- // ------- Refresh Variables -------
- /**
- * Variable that expands to the workspace root object (value <code>workspace</code>).
- */
- public static final String VAR_WORKSPACE = "workspace"; //$NON-NLS-1$
- /**
- * Variable that expands to the project resource (value <code>project</code>).
- */
- public static final String VAR_PROJECT = "project"; //$NON-NLS-1$
- /**
- * Variable that expands to the container resource (value <code>container</code>).
- */
- public static final String VAR_CONTAINER = "container"; //$NON-NLS-1$
- /**
- * Variable that expands to a resource (value <code>resource</code>).
- */
- public static final String VAR_RESOURCE = "resource"; //$NON-NLS-1$
- /**
- * Variable that expands to the working set object (value <code>working_set</code>).
- */
- public static final String VAR_WORKING_SET = "working_set"; //$NON-NLS-1$
- // ------- Tool Types -------
- /**
- * External tool type for programs such as executables, batch files,
- * shell scripts, etc (value <code>programType</code>).
- */
- public static final String TOOL_TYPE_PROGRAM = "programType"; //$NON-NLS-1$;
-
- // ------- Build Types -------
- /**
- * Build type indicating an incremental project build request for
- * the external tool running as a builder (value <code>incremental</code>).
- */
- public static final String BUILD_TYPE_INCREMENTAL = "incremental"; //$NON-NLS-1$
-
- /**
- * Build type indicating a full project build request for
- * the external tool running as a builder (value <code>full</code>).
- */
- public static final String BUILD_TYPE_FULL = "full"; //$NON-NLS-1$
-
- /**
- * Build type indicating an automatic project build request for
- * the external tool running as a builder (value <code>auto</code>).
- */
- public static final String BUILD_TYPE_AUTO = "auto"; //$NON-NLS-1$
-
- /**
- * Build type indicating a clean project build request for
- * the external tool running as a builder (value <code>clean</code>).
- */
- public static final String BUILD_TYPE_CLEAN = "clean"; //$NON-NLS-1$
-
- /**
- * Build type indicating no project build request for
- * the external tool running as a builder (value <code>none</code>).
- */
- public static final String BUILD_TYPE_NONE = "none"; //$NON-NLS-1$
-
- // ------- Launch configuration types --------
- /**
- * Program launch configuration type identifier.
- */
- public static final String ID_PROGRAM_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.ui.externaltools.ProgramLaunchConfigurationType"; //$NON-NLS-1$
-
- /**
- * Program builder launch configuration type identifier. Program project
- * builders are of this type.
- */
- public static final String ID_PROGRAM_BUILDER_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType"; //$NON-NLS-1$
-
- // ------- Launch configuration category --------
- /**
- * Identifier for external tools launch configuration category. Launch
- * configuration types for external tools that appear in the external tools
- * launch configuration dialog should belong to this category.
- */
- public static final String ID_EXTERNAL_TOOLS_LAUNCH_CATEGORY = "org.eclipse.ui.externaltools"; //$NON-NLS-1$
- /**
- * Identifier for external tools launch configuration builders category.
- * Launch configuration types that can be added as project builders should
- * belong to this category.
- */
- public static final String ID_EXTERNAL_TOOLS_BUILDER_LAUNCH_CATEGORY = "org.eclipse.ui.externaltools.builder"; //$NON-NLS-1$
-
- // ------- Common External Tool Launch Configuration Attributes -------
-
- /**
- * Boolean attribute indicating if external tool output should be captured.
- * Default value is <code>false</code>.
- * @deprecated since 3.1 Replaced by <code>org.eclipse.debug.core.DebugPlugin.ATTR_CAPTURE_OUTPUT</code>
- */
- public static final String ATTR_CAPTURE_OUTPUT = UI_PLUGIN_ID + ".ATTR_CAPTURE_OUTPUT"; //$NON-NLS-1$
- /**
- * String attribute identifying the location of an external. Default value
- * is <code>null</code>. Encoding is tool specific.
- */
- public static final String ATTR_LOCATION = UI_PLUGIN_ID + ".ATTR_LOCATION"; //$NON-NLS-1$
-
- /**
- * Boolean attribute indicating if the user should be prompted for
- * arguments before running a tool. Default value is <code>false</code>.
- * THIS ATTRIBUTE IS NOT USED.
- */
- public static final String ATTR_PROMPT_FOR_ARGUMENTS = UI_PLUGIN_ID + ".ATTR_PROMPT_FOR_ARGUMENTS"; //$NON-NLS-1$
-
- /**
- * String attribute identifying the scope of resources that should trigger an
- * external tool to run. Default value is <code>null</code>
- * indicating that the builder will be triggered for all changes.
- */
- public static final String ATTR_BUILDER_SCOPE = UI_PLUGIN_ID + ".ATTR_BUILD_SCOPE"; //$NON-NLS-1$
-
- /**
- * String attribute containing an array of build kinds for which an
- * external tool builder should be run.
- */
- public static final String ATTR_RUN_BUILD_KINDS = UI_PLUGIN_ID + ".ATTR_RUN_BUILD_KINDS"; //$NON-NLS-1$
-
- /**
- * Boolean attribute indicating if the console should be shown on external
- * tool output. Default value is <code>false</code>.
- */
- public static final String ATTR_SHOW_CONSOLE = UI_PLUGIN_ID + ".ATTR_SHOW_CONSOLE"; //$NON-NLS-1$
-
- /**
- * String attribute containing the arguments that should be passed to the
- * tool. Default value is <code>null</code>, and encoding is tool specific.
- */
- public static final String ATTR_TOOL_ARGUMENTS = UI_PLUGIN_ID + ".ATTR_TOOL_ARGUMENTS"; //$NON-NLS-1$
-
- /**
- * String attribute identifying the working directory of an external tool.
- * Default value is <code>null</code>, which indicates a default working
- * directory, which is tool specific.
- */
- public static final String ATTR_WORKING_DIRECTORY = UI_PLUGIN_ID + ".ATTR_WORKING_DIRECTORY"; //$NON-NLS-1$
-
- /**
- * String attribute identifying whether an external tool builder configuration
- * is enabled. The default value is <code>true</code>, which indicates
- * that the configuration will be executed as appropriate by the builder.
- */
- public static final String ATTR_BUILDER_ENABLED = UI_PLUGIN_ID + ".ATTR_BUILDER_ENABLED"; //$NON-NLS-1$
-
- /**
- * Boolean attribute identifying whether an external tool launcher should execute
- * synchronously (value <code>false</code>) or asynchronously (value <code>true</code>).
- * Default value is
- */
- public static final String ATTR_LAUNCH_IN_BACKGROUND = "org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND"; //$NON-NLS-1$
-
- /**
- * Status code indicating an unexpected internal error.
- */
- public static final int ERR_INTERNAL_ERROR = 150;
-
- /**
- * String attribute identifying a non-external tool builder launch configuration that is disabled
- * The value is the name of the disabled builder.
- */
- public static final String ATTR_DISABLED_BUILDER = UI_PLUGIN_ID + ".ATTR_DISABLED_BUILDER"; //$NON-NLS-1$
-
- /**
- * boolean attribute identifying that an external tool builder has been configured for triggering
- * using the <code>ICommand.setBuilding(int)</code> mechanism
- * @since 3.1
- */
- public static final String ATTR_TRIGGERS_CONFIGURED = UI_PLUGIN_ID + ".ATTR_TRIGGERS_CONFIGURED"; //$NON-NLS-1$
-
- /**
- * String attribute identifying the build scope for a launch configuration.
- * <code>null</code> indicates the default workspace build.
- */
- public static final String ATTR_BUILD_SCOPE = UI_PLUGIN_ID + ".ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE"; //$NON-NLS-1$
-
- /**
- * Attribute identifier specifying whether referenced projects should be
- * considered when computing the projects to build. Default value is
- * <code>true</code>.
- */
- public static final String ATTR_INCLUDE_REFERENCED_PROJECTS = UI_PLUGIN_ID + ".ATTR_INCLUDE_REFERENCED_PROJECTS"; //$NON-NLS-1$
-}
diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/BackgroundResourceRefresher.java b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/BackgroundResourceRefresher.java
deleted file mode 100644
index de77296..0000000
--- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/BackgroundResourceRefresher.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.externaltools.internal.launchConfigurations;
-
-
-import org.eclipse.core.externaltools.internal.ExternalToolsCore;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IDebugEventSetListener;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.RefreshUtil;
-import org.eclipse.debug.core.model.IProcess;
-
-/**
- * Refreshes resources as specified by a launch configuration, when
- * an associated process terminates.
- */
-public class BackgroundResourceRefresher implements IDebugEventSetListener {
-
- private ILaunchConfiguration fConfiguration;
- private IProcess fProcess;
-
-
-
- public BackgroundResourceRefresher(ILaunchConfiguration configuration, IProcess process) {
- fConfiguration = configuration;
- fProcess = process;
- }
-
- /**
- * If the process has already terminated, resource refreshing is done
- * immediately in the current thread. Otherwise, refreshing is done when the
- * process terminates.
- */
- public void startBackgroundRefresh() {
- synchronized (fProcess) {
- if (fProcess.isTerminated()) {
- refresh();
- } else {
- DebugPlugin.getDefault().addDebugEventListener(this);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent[])
- */
- public void handleDebugEvents(DebugEvent[] events) {
- for (int i = 0; i < events.length; i++) {
- DebugEvent event = events[i];
- if (event.getSource() == fProcess && event.getKind() == DebugEvent.TERMINATE) {
- DebugPlugin.getDefault().removeDebugEventListener(this);
- refresh();
- break;
- }
- }
- }
-
- /**
- * Submits a job to do the refresh
- */
- protected void refresh() {
- Job job= new Job(ExternalToolsProgramMessages.BackgroundResourceRefresher_0) {
- public IStatus run(IProgressMonitor monitor) {
- try {
- RefreshUtil.refreshResources(fConfiguration, monitor);
- } catch (CoreException e) {
- ExternalToolsCore.log(e);
- return e.getStatus();
- }
- return Status.OK_STATUS;
- }
- };
- job.schedule();
- }
-}
diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsCoreUtil.java b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsCoreUtil.java
deleted file mode 100644
index aba44bb..0000000
--- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsCoreUtil.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Keith Seitz (keiths@redhat.com) - Bug 27243 (environment variables contribution)
- * dakshinamurthy.karra@gmail.com - bug 165371
- *******************************************************************************/
-package org.eclipse.core.externaltools.internal.launchConfigurations;
-
-
-import java.io.File;
-
-import org.eclipse.core.externaltools.internal.ExternalToolsCore;
-import org.eclipse.core.externaltools.internal.IExternalToolConstants;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.variables.IStringVariableManager;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.RefreshUtil;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Utilities for external tool launch configurations.
- * <p>
- * This class it not intended to be instantiated.
- * </p>
- */
-public class ExternalToolsCoreUtil {
-
- /**
- * Throws a core exception with an error status object built from
- * the given message, lower level exception, and error code.
- * @param message the status message
- * @param exception lower level exception associated with the
- * error, or <code>null</code> if none
- * @param code error code
- */
- protected static void abort(String message, Throwable exception, int code) throws CoreException {
- throw new CoreException(new Status(IStatus.ERROR, IExternalToolConstants.PLUGIN_ID, code, message, exception));
- }
-
- /**
- * Expands and returns the location attribute of the given launch
- * configuration. The location is
- * verified to point to an existing file, in the local file system.
- *
- * @param configuration launch configuration
- * @return an absolute path to a file in the local file system
- * @throws CoreException if unable to retrieve the associated launch
- * configuration attribute, if unable to resolve any variables, or if the
- * resolved location does not point to an existing file in the local file
- * system
- */
- public static IPath getLocation(ILaunchConfiguration configuration) throws CoreException {
- String location = configuration.getAttribute(IExternalToolConstants.ATTR_LOCATION, (String) null);
- if (location == null) {
- abort(NLS.bind(ExternalToolsProgramMessages.ExternalToolsUtil_Location_not_specified_by__0__1, new String[] { configuration.getName()}), null, 0);
- } else {
- String expandedLocation = getStringVariableManager().performStringSubstitution(location);
- if (expandedLocation == null || expandedLocation.length() == 0) {
- String msg = NLS.bind(ExternalToolsProgramMessages.ExternalToolsUtil_invalidLocation__0_, new Object[] { configuration.getName()});
- abort(msg, null, 0);
- } else {
- File file = new File(expandedLocation);
- if (file.isFile()) {
- return new Path(expandedLocation);
- }
-
- String msg = NLS.bind(ExternalToolsProgramMessages.ExternalToolsUtil_invalidLocation__0_, new Object[] { configuration.getName()});
- abort(msg, null, 0);
- }
- }
- // execution will not reach here
- return null;
- }
-
- /**
- * Returns a boolean specifying whether or not output should be captured for
- * the given configuration
- *
- * @param configuration the configuration from which the value will be
- * extracted
- * @return boolean specifying whether or not output should be captured
- * @throws CoreException if unable to access the associated attribute
- */
- public static boolean getCaptureOutput(ILaunchConfiguration configuration) throws CoreException {
- return configuration.getAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, true);
- }
-
- /**
- * Expands and returns the working directory attribute of the given launch
- * configuration. Returns <code>null</code> if a working directory is not
- * specified. If specified, the working is verified to point to an existing
- * directory in the local file system.
- *
- * @param configuration launch configuration
- * @return an absolute path to a directory in the local file system, or
- * <code>null</code> if unspecified
- * @throws CoreException if unable to retrieve the associated launch
- * configuration attribute, if unable to resolve any variables, or if the
- * resolved location does not point to an existing directory in the local
- * file system
- */
- public static IPath getWorkingDirectory(ILaunchConfiguration configuration) throws CoreException {
- String location = configuration.getAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, (String) null);
- if (location != null) {
- String expandedLocation = getStringVariableManager().performStringSubstitution(location);
- if (expandedLocation.length() > 0) {
- File path = new File(expandedLocation);
- if (path.isDirectory()) {
- return new Path(expandedLocation);
- }
- String msg = NLS.bind(ExternalToolsProgramMessages.ExternalToolsUtil_invalidDirectory__0_, new Object[] { expandedLocation, configuration.getName()});
- abort(msg, null, 0);
- }
- }
- return null;
- }
-
- /**
- * Expands and returns the arguments attribute of the given launch
- * configuration. Returns <code>null</code> if arguments are not specified.
- *
- * @param configuration launch configuration
- * @return an array of resolved arguments, or <code>null</code> if
- * unspecified
- * @throws CoreException if unable to retrieve the associated launch
- * configuration attribute, or if unable to resolve any variables
- */
- public static String[] getArguments(ILaunchConfiguration configuration) throws CoreException {
- String args = configuration.getAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, (String) null);
- if (args != null) {
- String expanded = getStringVariableManager().performStringSubstitution(args);
- return parseStringIntoList(expanded);
- }
- return null;
- }
-
- private static IStringVariableManager getStringVariableManager() {
- return VariablesPlugin.getDefault().getStringVariableManager();
- }
-
- /**
- * Returns whether the given launch configuration is enabled. This property
- * is intended only to apply to external tool builder configurations and
- * determines whether the project builder will launch the configuration
- * when it builds.
- *
- * @param configuration the configuration for which the enabled state should
- * be determined.
- * @return whether the given configuration is enabled to be run when a build occurs.
- * @throws CoreException if unable to access the associated attribute
- */
- public static boolean isBuilderEnabled(ILaunchConfiguration configuration) throws CoreException {
- return configuration.getAttribute(IExternalToolConstants.ATTR_BUILDER_ENABLED, true);
- }
-
- /**
- * Returns the collection of resources for the build scope as specified by the given launch configuration.
- *
- * @param configuration launch configuration
- * @throws CoreException if an exception occurs while retrieving the resources
- */
- public static IResource[] getResourcesForBuildScope(ILaunchConfiguration configuration) throws CoreException {
- String scope = configuration.getAttribute(IExternalToolConstants.ATTR_BUILDER_SCOPE, (String) null);
- if (scope == null) {
- return null;
- }
-
- return RefreshUtil.toResources(scope);
- }
-
- /**
- * Parses the argument text into an array of individual
- * strings using the space character as the delimiter.
- * An individual argument containing spaces must have a
- * double quote (") at the start and end. Two double
- * quotes together is taken to mean an embedded double
- * quote in the argument text.
- *
- * @param arguments the arguments as one string
- * @return the array of arguments
- */
- public static String[] parseStringIntoList(String arguments) {
- if (arguments == null || arguments.length() == 0) {
- return new String[0];
- }
- String[] res= DebugPlugin.parseArguments(arguments);
- return res;
- }
- /**
- * Returns a collection of projects referenced by a build scope attribute.
- *
- * @return collection of projects referred to by configuration
- */
- public static IProject[] getBuildProjects(ILaunchConfiguration configuration, String buildScopeId) {
-
- String scope = null;
- String id = buildScopeId ;
- if (id == null) {
- id = IExternalToolConstants.ATTR_BUILD_SCOPE ;
- }
- try {
- scope = configuration.getAttribute(id, (String)null);
- } catch (CoreException e) {
- return null;
- }
- if (scope == null) {
- return null;
- }
- if (scope.startsWith("${projects:")) { //$NON-NLS-1$
- String pathString = scope.substring(11, scope.length() - 1);
- if (pathString.length() > 1) {
- String[] names = pathString.split(","); //$NON-NLS-1$
- IProject[] projects = new IProject[names.length];
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- for (int i = 0; i < names.length; i++) {
- projects[i] = root.getProject(names[i]);
- }
- return projects;
- }
- } else if (scope.equals("${project}")) { //$NON-NLS-1$
- if(configuration.getFile()!=null)
- return new IProject[]{((IResource)configuration.getFile()).getProject()};
- }
- return new IProject[0];
- }
-
- /**
- * Whether referenced projects should be considered when building. Only valid
- * when a set of projects is to be built.
- *
- * @param configuration
- * @return whether referenced projects should be considerd when building
- * @throws CoreException if unable to access the associated attribute
- */
- public static boolean isIncludeReferencedProjects(ILaunchConfiguration configuration, String includeReferencedProjectsId) throws CoreException {
- String id = includeReferencedProjectsId;
- if (id == null) {
- id = IExternalToolConstants.ATTR_INCLUDE_REFERENCED_PROJECTS ;
- }
- return configuration.getAttribute(id, true);
- }
-
- /**
- * Returns whether the given external builder configuration should build asynchronously.
- *
- * @param configuration the configuration
- * @return whether the configuration is configured to build asynchronously
- */
- public static boolean isAsynchronousBuild(ILaunchConfiguration configuration) {
- boolean launchInBackground= false;
- try {
- launchInBackground= configuration.getAttribute(IExternalToolConstants.ATTR_LAUNCH_IN_BACKGROUND, false);
- } catch (CoreException ce) {
- ExternalToolsCore.log(ce);
- }
- return launchInBackground;
- }
-}
diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.java b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.java
deleted file mode 100644
index 889fe2b..0000000
--- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.core.externaltools.internal.launchConfigurations;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ExternalToolsProgramMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.core.externaltools.internal.launchConfigurations.ExternalToolsProgramMessages";//$NON-NLS-1$
-
- public static String BackgroundResourceRefresher_0;
-
- public static String ProgramLaunchDelegate_3;
- public static String ProgramLaunchDelegate_4;
-
- public static String ExternalToolsUtil_Location_not_specified_by__0__1;
- public static String ExternalToolsUtil_invalidLocation__0_;
- public static String ExternalToolsUtil_invalidDirectory__0_;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ExternalToolsProgramMessages.class);
- }
-}
\ No newline at end of file
diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.properties b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.properties
deleted file mode 100644
index e76e7cd..0000000
--- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-BackgroundResourceRefresher_0=Refreshing resources...
-
-ProgramLaunchDelegate_3=Running {0}...
-ProgramLaunchDelegate_4=An IProcess could not be created for the launch
-
-ExternalToolsUtil_Location_not_specified_by__0__1=Location not specified by {0}
-ExternalToolsUtil_invalidLocation__0_ = The file does not exist for the external tool named {0}.
-ExternalToolsUtil_invalidDirectory__0_ = The working directory {0} does not exist for the external tool named {1}.
\ No newline at end of file
diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java
deleted file mode 100644
index 635f340..0000000
--- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Keith Seitz (keiths@redhat.com) - environment variables contribution (Bug 27243)
- * dakshinamurthy.karra@gmail.com - bug 165371
- *******************************************************************************/
-package org.eclipse.core.externaltools.internal.launchConfigurations;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.externaltools.internal.IExternalToolConstants;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.RefreshUtil;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Launch delegate for a program.
- */
-public class ProgramLaunchDelegate extends LaunchConfigurationDelegate {
-
- /**
- * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration,
- * java.lang.String, org.eclipse.debug.core.ILaunch,
- * org.eclipse.core.runtime.IProgressMonitor)
- */
- public void launch(ILaunchConfiguration configuration, String mode,
- ILaunch launch, IProgressMonitor monitor) throws CoreException {
-
- if (monitor.isCanceled()) {
- return;
- }
-
- // resolve location
- IPath location = ExternalToolsCoreUtil.getLocation(configuration);
-
- if (monitor.isCanceled()) {
- return;
- }
-
- // resolve working directory
- IPath workingDirectory = ExternalToolsCoreUtil
- .getWorkingDirectory(configuration);
-
- if (monitor.isCanceled()) {
- return;
- }
-
- // resolve arguments
- String[] arguments = ExternalToolsCoreUtil.getArguments(configuration);
-
- if (monitor.isCanceled()) {
- return;
- }
-
- int cmdLineLength = 1;
- if (arguments != null) {
- cmdLineLength += arguments.length;
- }
- String[] cmdLine = new String[cmdLineLength];
- cmdLine[0] = location.toOSString();
- if (arguments != null) {
- System.arraycopy(arguments, 0, cmdLine, 1, arguments.length);
- }
-
- File workingDir = null;
- if (workingDirectory != null) {
- workingDir = workingDirectory.toFile();
- }
-
- if (monitor.isCanceled()) {
- return;
- }
-
- String[] envp = DebugPlugin.getDefault().getLaunchManager()
- .getEnvironment(configuration);
-
- if (monitor.isCanceled()) {
- return;
- }
-
- Process p = DebugPlugin.exec(cmdLine, workingDir, envp);
- IProcess process = null;
-
- // add process type to process attributes
- Map processAttributes = new HashMap();
- String programName = location.lastSegment();
- String extension = location.getFileExtension();
- if (extension != null) {
- programName = programName.substring(0, programName.length()
- - (extension.length() + 1));
- }
- programName = programName.toLowerCase();
- processAttributes.put(IProcess.ATTR_PROCESS_TYPE, programName);
-
- if (p != null) {
- monitor.beginTask(NLS.bind(
- ExternalToolsProgramMessages.ProgramLaunchDelegate_3,
- new String[] { configuration.getName() }),
- IProgressMonitor.UNKNOWN);
- process = DebugPlugin.newProcess(launch, p, location.toOSString(),
- processAttributes);
- }
- if (p == null || process == null) {
- if (p != null)
- p.destroy();
- throw new CoreException(new Status(IStatus.ERROR,
- IExternalToolConstants.PLUGIN_ID,
- IExternalToolConstants.ERR_INTERNAL_ERROR,
- ExternalToolsProgramMessages.ProgramLaunchDelegate_4, null));
- }
- process.setAttribute(IProcess.ATTR_CMDLINE,
- generateCommandLine(cmdLine));
-
-// if (launchManager.isLaunchInBackground(configuration)) {
-// // refresh resources after process finishes
-// if (launchManager.getRefreshScope(configuration) != null) {
-// BackgroundResourceRefresher refresher = new BackgroundResourceRefresher(
-// configuration, process);
-// refresher.startBackgroundRefresh();
-// }
-// } else {
- // wait for process to exit
- while (!process.isTerminated()) {
- try {
- if (monitor.isCanceled()) {
- process.terminate();
- break;
- }
- Thread.sleep(50);
- } catch (InterruptedException e) {
- }
- }
-
- // refresh resources
- RefreshUtil.refreshResources(configuration, monitor);
-// }
- }
-
- private String generateCommandLine(String[] commandLine) {
- if (commandLine.length < 1)
- return ""; //$NON-NLS-1$
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < commandLine.length; i++) {
- buf.append(' ');
- char[] characters = commandLine[i].toCharArray();
- StringBuffer command = new StringBuffer();
- boolean containsSpace = false;
- for (int j = 0; j < characters.length; j++) {
- char character = characters[j];
- if (character == '\"') {
- command.append('\\');
- } else if (character == ' ') {
- containsSpace = true;
- }
- command.append(character);
- }
- if (containsSpace) {
- buf.append('\"');
- buf.append(command);
- buf.append('\"');
- } else {
- buf.append(command);
- }
- }
- return buf.toString();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.debug.core.model.LaunchConfigurationDelegate#getBuildOrder
- * (org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
- */
- protected IProject[] getBuildOrder(ILaunchConfiguration configuration,
- String mode) throws CoreException {
- IProject[] projects = ExternalToolsCoreUtil.getBuildProjects(
- configuration, null);
- if (projects == null) {
- return null;
- }
- boolean isRef = ExternalToolsCoreUtil.isIncludeReferencedProjects(
- configuration, null);
- if (isRef) {
- return computeReferencedBuildOrder(projects);
- }
- return computeBuildOrder(projects);
- }
-}
diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/BuilderCoreUtils.java b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/BuilderCoreUtils.java
deleted file mode 100644
index f3b7acd..0000000
--- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/BuilderCoreUtils.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.externaltools.internal.model;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.externaltools.internal.IExternalToolConstants;
-import org.eclipse.core.externaltools.internal.registry.ExternalToolMigration;
-import org.eclipse.core.resources.ICommand;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-
-/**
- * Utility methods for working with external tool project builders.
- */
-public class BuilderCoreUtils {
-
- public static final String LAUNCH_CONFIG_HANDLE = "LaunchConfigHandle"; //$NON-NLS-1$
-
- /**
- * Constant used to find a builder using the 3.0-interim format
- */
- public static final String BUILDER_FOLDER_NAME = ".externalToolBuilders"; //$NON-NLS-1$
- /**
- * Constant used to represent the current project in the 3.0-final format.
- */
- public static final String PROJECT_TAG = "<project>"; //$NON-NLS-1$
-
- public static final String VERSION_1_0 = "1.0"; //$NON-NLS-1$
- public static final String VERSION_2_1 = "2.1"; //$NON-NLS-1$
- // The format shipped up to and including Eclipse 3.0 RC1
- public static final String VERSION_3_0_interim = "3.0.interim"; //$NON-NLS-1$
- // The format shipped in Eclipse 3.0 final
- public static final String VERSION_3_0_final = "3.0"; //$NON-NLS-1$
-
- private static final String BUILD_TYPE_SEPARATOR = ","; //$NON-NLS-1$
- private static final int[] DEFAULT_BUILD_TYPES = new int[] {
- IncrementalProjectBuilder.INCREMENTAL_BUILD,
- IncrementalProjectBuilder.FULL_BUILD };
-
- /**
- * Returns a launch configuration from the given ICommand arguments. If the
- * given arguments are from an old-style external tool, an unsaved working
- * copy will be created from the arguments and returned.
- *
- * @param commandArgs
- * the builder ICommand arguments
- * @return a launch configuration, a launch configuration working copy, or
- * <code>null</code> if not possible.
- */
- public static ILaunchConfiguration configFromBuildCommandArgs(
- IProject project, Map commandArgs, String[] version) {
- String configHandle = (String) commandArgs.get(LAUNCH_CONFIG_HANDLE);
- if (configHandle == null) {
- // Probably an old-style (Eclipse 1.0 or 2.0) external tool. Try to
- // migrate.
- version[0] = VERSION_1_0;
- return ExternalToolMigration.configFromArgumentMap(commandArgs);
- }
- ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfiguration configuration = null;
- if (configHandle.startsWith(PROJECT_TAG)) {
- version[0] = VERSION_3_0_final;
- IPath path = new Path(configHandle);
- IFile file = project.getFile(path.removeFirstSegments(1));
- if (file.exists()) {
- configuration = manager.getLaunchConfiguration(file);
- }
- } else {
- // Try treating the handle as a file name.
- // This is the format used in 3.0 RC1.
- IPath path = new Path(BUILDER_FOLDER_NAME).append(configHandle);
- IFile file = project.getFile(path);
- if (file.exists()) {
- version[0] = VERSION_3_0_interim;
- configuration = manager.getLaunchConfiguration(file);
- } else {
- try {
- // Treat the configHandle as a memento. This is the format
- // used in Eclipse 2.1.
- configuration = manager
- .getLaunchConfiguration(configHandle);
- } catch (CoreException e) {
- }
- if (configuration != null) {
- version[0] = VERSION_2_1;
- }
- }
- }
- return configuration;
- }
-
- public static void configureTriggers(ILaunchConfiguration config,
- ICommand newCommand) throws CoreException {
- newCommand.setBuilding(IncrementalProjectBuilder.FULL_BUILD, false);
- newCommand.setBuilding(IncrementalProjectBuilder.INCREMENTAL_BUILD,
- false);
- newCommand.setBuilding(IncrementalProjectBuilder.AUTO_BUILD, false);
- newCommand.setBuilding(IncrementalProjectBuilder.CLEAN_BUILD, false);
- String buildKinds = config.getAttribute(
- IExternalToolConstants.ATTR_RUN_BUILD_KINDS, (String) null);
- int[] triggers = BuilderCoreUtils.buildTypesToArray(buildKinds);
- for (int i = 0; i < triggers.length; i++) {
- switch (triggers[i]) {
- case IncrementalProjectBuilder.FULL_BUILD:
- newCommand.setBuilding(IncrementalProjectBuilder.FULL_BUILD,
- true);
- break;
- case IncrementalProjectBuilder.INCREMENTAL_BUILD:
- newCommand.setBuilding(
- IncrementalProjectBuilder.INCREMENTAL_BUILD, true);
- break;
- case IncrementalProjectBuilder.AUTO_BUILD:
- newCommand.setBuilding(IncrementalProjectBuilder.AUTO_BUILD,
- true);
- break;
- case IncrementalProjectBuilder.CLEAN_BUILD:
- newCommand.setBuilding(IncrementalProjectBuilder.CLEAN_BUILD,
- true);
- break;
- }
- }
- if (!config.getAttribute(
- IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, false)) {
- ILaunchConfigurationWorkingCopy copy = config.getWorkingCopy();
- copy.setAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED,
- true);
- copy.doSave();
- }
- }
-
- /**
- * Returns whether the given configuration is an "unmigrated" builder.
- * Unmigrated builders are external tools that are stored in an old format
- * but have not been migrated by the user. Old format builders are always
- * translated into launch config working copies in memory, but they're not
- * considered "migrated" until the config has been saved and the project
- * spec updated.
- *
- * @param config
- * the config to examine
- * @return whether the given config represents an unmigrated builder
- */
- public static boolean isUnmigratedConfig(ILaunchConfiguration config) {
- return config.isWorkingCopy()
- && ((ILaunchConfigurationWorkingCopy) config).getOriginal() == null;
- }
-
- /**
- * Converts the given config to a build command which is stored in the given
- * command.
- *
- * @return the configured build command
- */
- public static ICommand toBuildCommand(IProject project,
- ILaunchConfiguration config, ICommand command) throws CoreException {
- Map args = null;
- if (isUnmigratedConfig(config)) {
- // This config represents an old external tool builder that hasn't
- // been edited. Try to find the old ICommand and reuse the
- // arguments.
- // The goal here is to not change the storage format of old,
- // unedited builders.
- ICommand[] commands = project.getDescription().getBuildSpec();
- for (int i = 0; i < commands.length; i++) {
- ICommand projectCommand = commands[i];
- String name = ExternalToolMigration
- .getNameFromCommandArgs(projectCommand.getArguments());
- if (name != null && name.equals(config.getName())) {
- args = projectCommand.getArguments();
- break;
- }
- }
- } else {
- if (config instanceof ILaunchConfigurationWorkingCopy) {
- ILaunchConfigurationWorkingCopy workingCopy = (ILaunchConfigurationWorkingCopy) config;
- if (workingCopy.getOriginal() != null) {
- config = workingCopy.getOriginal();
- }
- }
- args = new HashMap();
- // Launch configuration builders are stored with a project-relative
- // path
- StringBuffer buffer = new StringBuffer(PROJECT_TAG);
- // Append the project-relative path (workspace path minus first
- // segment)
- buffer.append('/').append(
- config.getFile().getFullPath().removeFirstSegments(1));
- args.put(LAUNCH_CONFIG_HANDLE, buffer.toString());
- }
- command.setBuilderName(ExternalToolBuilder.ID);
- command.setArguments(args);
- return command;
- }
-
- /**
- * Returns the folder where project builders should be stored or
- * <code>null</code> if the folder could not be created
- */
- public static IFolder getBuilderFolder(IProject project, boolean create) {
- IFolder folder = project.getFolder(BUILDER_FOLDER_NAME);
- if (!folder.exists() && create) {
- try {
- folder.create(true, true, new NullProgressMonitor());
- } catch (CoreException e) {
- return null;
- }
- }
- return folder;
- }
-
- /**
- * Migrates the launch configuration working copy, which is based on an old-
- * style external tool builder, to a new, saved launch configuration. The
- * returned launch configuration will contain the same attributes as the
- * given working copy with the exception of the configuration name, which
- * may be changed during the migration. The name of the configuration will
- * only be changed if the current name is not a valid name for a saved
- * config.
- *
- * @param workingCopy
- * the launch configuration containing attributes from an
- * old-style project builder.
- * @return ILaunchConfiguration a new, saved launch configuration whose
- * attributes match those of the given working copy as well as
- * possible
- * @throws CoreException
- * if an exception occurs while attempting to save the new
- * launch configuration
- */
- public static ILaunchConfiguration migrateBuilderConfiguration(
- IProject project, ILaunchConfigurationWorkingCopy workingCopy)
- throws CoreException {
- workingCopy.setContainer(getBuilderFolder(project, true));
- // Before saving, make sure the name is valid
- String name = workingCopy.getName();
- name = name.replace('/', '.');
- if (name.charAt(0) == ('.')) {
- name = name.substring(1);
- }
- IStatus status = ResourcesPlugin.getWorkspace().validateName(name,
- IResource.FILE);
- if (!status.isOK()) {
- name = "ExternalTool"; //$NON-NLS-1$
- }
- name = DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(name);
- workingCopy.rename(name);
- return workingCopy.doSave();
- }
-
- /**
- * Converts the build types string into an array of build kinds.
- *
- * @param buildTypes
- * the string of built types to convert
- * @return the array of build kinds.
- */
- public static int[] buildTypesToArray(String buildTypes) {
- if (buildTypes == null || buildTypes.length() == 0) {
- return DEFAULT_BUILD_TYPES;
- }
-
- int count = 0;
- boolean incremental = false;
- boolean full = false;
- boolean auto = false;
- boolean clean = false;
-
- StringTokenizer tokenizer = new StringTokenizer(buildTypes,
- BUILD_TYPE_SEPARATOR);
- while (tokenizer.hasMoreTokens()) {
- String token = tokenizer.nextToken();
- if (IExternalToolConstants.BUILD_TYPE_INCREMENTAL.equals(token)) {
- if (!incremental) {
- incremental = true;
- count++;
- }
- } else if (IExternalToolConstants.BUILD_TYPE_FULL.equals(token)) {
- if (!full) {
- full = true;
- count++;
- }
- } else if (IExternalToolConstants.BUILD_TYPE_AUTO.equals(token)) {
- if (!auto) {
- auto = true;
- count++;
- }
- } else if (IExternalToolConstants.BUILD_TYPE_CLEAN.equals(token)) {
- if (!clean) {
- clean = true;
- count++;
- }
- }
- }
-
- int[] results = new int[count];
- count = 0;
- if (incremental) {
- results[count] = IncrementalProjectBuilder.INCREMENTAL_BUILD;
- count++;
- }
- if (full) {
- results[count] = IncrementalProjectBuilder.FULL_BUILD;
- count++;
- }
- if (auto) {
- results[count] = IncrementalProjectBuilder.AUTO_BUILD;
- count++;
- }
- if (clean) {
- results[count] = IncrementalProjectBuilder.CLEAN_BUILD;
- count++;
- }
-
- return results;
- }
-}
diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolBuilder.java b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolBuilder.java
deleted file mode 100644
index 244a833..0000000
--- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolBuilder.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Matthew Conway - Bug 175186
- *******************************************************************************/
-package org.eclipse.core.externaltools.internal.model;
-
-
-import java.util.Map;
-
-import org.eclipse.core.externaltools.internal.ExternalToolsCore;
-import org.eclipse.core.externaltools.internal.IExternalToolConstants;
-import org.eclipse.core.externaltools.internal.launchConfigurations.ExternalToolsCoreUtil;
-import org.eclipse.core.externaltools.internal.registry.ExternalToolMigration;
-import org.eclipse.core.resources.ICommand;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.Bundle;
-
-/**
- * This project builder implementation will run an external tool during the
- * build process.
- */
-public final class ExternalToolBuilder extends IncrementalProjectBuilder {
- private final class IgnoreTeamPrivateChanges implements IResourceDeltaVisitor {
- private boolean[] fTrueChange;
- private IgnoreTeamPrivateChanges(boolean[] trueChange) {
- super();
- fTrueChange= trueChange;
- }
- public boolean visit(IResourceDelta visitDelta) throws CoreException {
- IResource resource= visitDelta.getResource();
- if (resource instanceof IFile) {
- fTrueChange[0]= true;
- return false;
- }
- return true;
- }
- }
-
- public static final String ID = "org.eclipse.ui.externaltools.ExternalToolBuilder"; //$NON-NLS-1$;
-
- private static String buildType = IExternalToolConstants.BUILD_TYPE_NONE;
-
- private static IProject buildProject= null;
- private static IResourceDelta buildDelta= null;
-
- /* (non-Javadoc)
- * @see org.eclipse.core.internal.events.InternalBuilder#build(int, java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException {
- if (ExternalToolsCore.getDefault().getBundle().getState() != Bundle.ACTIVE) {
- return null;
- }
-
- ILaunchConfiguration config= BuilderCoreUtils.configFromBuildCommandArgs(getProject(), args, new String[1]);
- if (config == null) {
- throw ExternalToolsCore.newError(ExternalToolsModelMessages.ExternalToolBuilder_0, null);
- }
- IProject[] projectsWithinScope= null;
- IResource[] resources = ExternalToolsCoreUtil.getResourcesForBuildScope(config);
- if (resources != null) {
- projectsWithinScope= new IProject[resources.length];
- for (int i = 0; i < resources.length; i++) {
- projectsWithinScope[i]= resources[i].getProject();
- }
- }
- boolean kindCompatible= commandConfiguredForKind(config, kind);
- if (kindCompatible && configEnabled(config)) {
- doBuildBasedOnScope(resources, kind, config, monitor);
- }
-
- return projectsWithinScope;
- }
-
- private boolean commandConfiguredForKind(ILaunchConfiguration config, int kind) {
- try {
- if (!(config.getAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, false))) {
- ICommand command= getCommand();
- //adapt the builder command to make use of the 3.1 support for setting command build kinds
- //this will only happen once for builder/command defined before the support existed
- BuilderCoreUtils.configureTriggers(config, command);
- IProjectDescription desc= getProject().getDescription();
- ICommand[] commands= desc.getBuildSpec();
- int index= getBuilderCommandIndex(commands, command);
- if (index != -1) {
- commands[index]= command;
- desc.setBuildSpec(commands);
- getProject().setDescription(desc, null);
- ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy();
- copy.setAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, true);
- copy.doSave();
- }
- return command.isBuilding(kind);
- }
- } catch (CoreException e) {
- ExternalToolsCore.log(e);
- return true;
- }
- return true;
- }
-
- private int getBuilderCommandIndex(ICommand[] buildSpec, ICommand command) {
- Map commandArgs= command.getArguments();
- if (commandArgs == null) {
- return -1;
- }
- String handle= (String) commandArgs.get(BuilderCoreUtils.LAUNCH_CONFIG_HANDLE);
- if (handle == null) {
- return -1;
- }
- for (int i = 0; i < buildSpec.length; ++i) {
- ICommand buildSpecCommand= buildSpec[i];
- if (ID.equals(buildSpecCommand.getBuilderName())) {
- Map buildSpecArgs= buildSpecCommand.getArguments();
- if (buildSpecArgs != null) {
- String buildSpecHandle= (String) buildSpecArgs.get(BuilderCoreUtils.LAUNCH_CONFIG_HANDLE);
- if (handle.equals(buildSpecHandle)) {
- return i;
- }
- }
- }
- }
- return -1;
- }
-
- /**
- * Returns whether the given builder config is enabled or not.
- *
- * @param config the config to examine
- * @return whether the config is enabled
- */
- private boolean configEnabled(ILaunchConfiguration config) {
- try {
- return ExternalToolsCoreUtil.isBuilderEnabled(config);
- } catch (CoreException e) {
- ExternalToolsCore.log(e);
- }
- return true;
- }
-
- private void doBuildBasedOnScope(IResource[] resources, int kind, ILaunchConfiguration config, IProgressMonitor monitor) throws CoreException {
- boolean buildForChange = true;
- if (kind != FULL_BUILD) { //scope not applied for full builds
- if (resources != null && resources.length > 0) {
- buildForChange = buildScopeIndicatesBuild(resources);
- }
- }
-
- if (buildForChange) {
- launchBuild(kind, config, monitor);
- }
- }
-
- private void launchBuild(int kind, ILaunchConfiguration config, IProgressMonitor monitor) throws CoreException {
- monitor.subTask(NLS.bind(ExternalToolsModelMessages.ExternalToolBuilder_Running__0_____1, new String[] { config.getName()}));
- buildStarted(kind);
- // The default value for "launch in background" is true in debug core. If
- // the user doesn't go through the UI, the new attribute won't be set. This means
- // that existing Ant builders will try to run in the background (and likely conflict with
- // each other) without migration.
- config= ExternalToolMigration.migrateRunInBackground(config);
- config.launch(ILaunchManager.RUN_MODE, monitor);
- buildEnded();
- }
-
- /**
- * Returns the build type being performed if the
- * external tool is being run as a project builder.
- *
- * @return one of the <code>IExternalToolConstants.BUILD_TYPE_*</code> constants.
- */
- public static String getBuildType() {
- return buildType;
- }
-
- /**
- * Returns the project that is being built and has triggered the current external
- * tool builder. <code>null</code> is returned if no build is currently occurring.
- *
- * @return project being built or <code>null</code>.
- */
- public static IProject getBuildProject() {
- return buildProject;
- }
-
- /**
- * Returns the <code>IResourceDelta</code> that is being built and has triggered the current external
- * tool builder. <code>null</code> is returned if no build is currently occurring.
- *
- * @return resource delta for the build or <code>null</code>
- */
- public static IResourceDelta getBuildDelta() {
- return buildDelta;
- }
-
- /**
- * Stores the currently active build kind and build project when a build begins
- * @param buildKind
- */
- private void buildStarted(int buildKind) {
- switch (buildKind) {
- case IncrementalProjectBuilder.INCREMENTAL_BUILD :
- buildType = IExternalToolConstants.BUILD_TYPE_INCREMENTAL;
- buildDelta = getDelta(getProject());
- break;
- case IncrementalProjectBuilder.FULL_BUILD :
- buildType = IExternalToolConstants.BUILD_TYPE_FULL;
- break;
- case IncrementalProjectBuilder.AUTO_BUILD :
- buildType = IExternalToolConstants.BUILD_TYPE_AUTO;
- buildDelta = getDelta(getProject());
- break;
- case IncrementalProjectBuilder.CLEAN_BUILD :
- buildType = IExternalToolConstants.BUILD_TYPE_CLEAN;
- break;
- default :
- buildType = IExternalToolConstants.BUILD_TYPE_NONE;
- break;
- }
- buildProject= getProject();
- }
-
- /**
- * Clears the current build kind, build project and build delta when a build finishes.
- */
- private void buildEnded() {
- buildType= IExternalToolConstants.BUILD_TYPE_NONE;
- buildProject= null;
- buildDelta= null;
- }
-
- private boolean buildScopeIndicatesBuild(IResource[] resources) {
- for (int i = 0; i < resources.length; i++) {
- IResourceDelta delta = getDelta(resources[i].getProject());
- if (delta == null) {
- //project just added to the workspace..no previous build tree
- return true;
- }
- IPath path= resources[i].getProjectRelativePath();
- IResourceDelta change= delta.findMember(path);
- if (change != null) {
- final boolean[] trueChange= new boolean[1];
- trueChange[0]= false;
- try {
- change.accept(new IgnoreTeamPrivateChanges(trueChange));
- } catch (CoreException e) {
- ExternalToolsCore.log("Internal error resolving changed resources during build", e); //$NON-NLS-1$
- }
-
- return trueChange[0]; //filtered out team private changes
- }
- }
- return false;
- }
-
- protected void clean(IProgressMonitor monitor) throws CoreException {
- ICommand command= getCommand();
- ILaunchConfiguration config= BuilderCoreUtils.configFromBuildCommandArgs(getProject(), command.getArguments(), new String[1]);
- if (!configEnabled(config)) {
- return;
- }
-
- if ((!config.getAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, false))) {
- //old behavior
- super.clean(monitor);
- return;
- }
-
- launchBuild(IncrementalProjectBuilder.CLEAN_BUILD, config, monitor);
- }
-}
\ No newline at end of file
diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolsModelMessages.java b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolsModelMessages.java
deleted file mode 100644
index 9e38b50..0000000
--- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolsModelMessages.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.core.externaltools.internal.model;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ExternalToolsModelMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.core.externaltools.internal.model.ExternalToolsModelMessages";//$NON-NLS-1$
-
- public static String ExternalToolBuilder_Running__0_____1;
- public static String ExternalToolBuilder_0;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ExternalToolsModelMessages.class);
- }
-}
\ No newline at end of file
diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolsModelMessages.properties b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolsModelMessages.properties
deleted file mode 100644
index 0f16fe7..0000000
--- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolsModelMessages.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-ExternalToolBuilder_Running__0_____1=Running {0}...
-ExternalToolBuilder_0=The builder launch configuration could not be found.
diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolMigration.java b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolMigration.java
deleted file mode 100644
index a06bc87..0000000
--- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolMigration.java
+++ /dev/null
@@ -1,410 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.externaltools.internal.registry;
-
-
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.externaltools.internal.ExternalToolsCore;
-import org.eclipse.core.externaltools.internal.IExternalToolConstants;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.RefreshUtil;
-
-
-/**
- * Responsible reading an old external tool format and creating
- * and migrating it to create a new external tool.
- */
-public final class ExternalToolMigration {
- /**
- * Structure to represent a variable definition within a
- * source string.
- */
- public static final class VariableDefinition {
- /**
- * Index in the source text where the variable started
- * or <code>-1</code> if no valid variable start tag
- * identifier found.
- */
- public int start = -1;
-
- /**
- * Index in the source text of the character following
- * the end of the variable or <code>-1</code> if no
- * valid variable end tag found.
- */
- public int end = -1;
-
- /**
- * The variable's name found in the source text, or
- * <code>null</code> if no valid variable found.
- */
- public String name = null;
-
- /**
- * The variable's argument found in the source text, or
- * <code>null</code> if no valid variable found or if
- * the variable did not specify an argument
- */
- public String argument = null;
-
- /**
- * Create an initialized variable definition.
- */
- private VariableDefinition() {
- super();
- }
- }
-
- /**
- * Variable tag indentifiers
- */
- private static final String VAR_TAG_START = "${"; //$NON-NLS-1$
- private static final String VAR_TAG_END = "}"; //$NON-NLS-1$
- private static final String VAR_TAG_SEP = ":"; //$NON-NLS-1$
-
- /**
- * External tool type for Ant build files (value <code>antBuildType</code>).
- */
- public static final String TOOL_TYPE_ANT_BUILD = "antBuildType"; //$NON-NLS-1$;
- /**
- * Ant builder launch configuration type identifier. Ant project builders
- * are of this type.
- */
- public static final String ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.ant.AntBuilderLaunchConfigurationType"; //$NON-NLS-1$
-
- public static final String RUN_TARGETS_ATTRIBUTE = TOOL_TYPE_ANT_BUILD + ".runTargets"; //$NON-NLS-1$;
-
- /**
- * String attribute indicating the Ant targets to execute. Default value is
- * <code>null</code> which indicates that the default target is to be
- * executed. Format is a comma separated listing of targets.
- * NOTE: This value is copied here from org.eclipse.ant.ui.internal.IAntLaunchConfigurationConstants.
- * Ant no longer resides in External Tools and this plug-in. This value is kept here only
- * for migration.
- */
- public static final String ATTR_ANT_TARGETS = IExternalToolConstants.UI_PLUGIN_ID + ".ATTR_ANT_TARGETS"; //$NON-NLS-1$
-
- /*
- * 2.0 External Tool Tags
- */
- public static final String TAG_TOOL_TYPE = "!{tool_type}"; //$NON-NLS-1$
- public static final String TAG_TOOL_NAME = "!{tool_name}"; //$NON-NLS-1$
- public static final String TAG_TOOL_LOCATION = "!{tool_loc}"; //$NON-NLS-1$
- public static final String TAG_TOOL_ARGUMENTS = "!{tool_args}"; //$NON-NLS-1$
- public static final String TAG_TOOL_DIRECTORY = "!{tool_dir}"; //$NON-NLS-1$
- public static final String TAG_TOOL_REFRESH = "!{tool_refresh}"; //$NON-NLS-1$
- public static final String TAG_TOOL_SHOW_LOG = "!{tool_show_log}"; //$NON-NLS-1$
- public static final String TAG_TOOL_BUILD_TYPES = "!{tool_build_types}"; //$NON-NLS-1$
- public static final String TAG_TOOL_BLOCK = "!{tool_block}"; //$NON-NLS-1$
-
- // Known kind of tools
- private static final String TOOL_TYPE_ANT = "org.eclipse.ui.externaltools.type.ant"; //$NON-NLS-1$
- private static final String TOOL_TYPE_PROGRAM = "org.eclipse.ui.externaltools.type.program"; //$NON-NLS-1$
-
- /*
- * 2.1 External Tool Keys
- */
- public static final String TAG_TYPE = "type"; //$NON-NLS-1$
- public static final String TAG_NAME = "name"; //$NON-NLS-1$
- public static final String TAG_LOCATION = "location"; //$NON-NLS-1$
- public static final String TAG_WORK_DIR = "workDirectory"; //$NON-NLS-1$
- public static final String TAG_CAPTURE_OUTPUT = "captureOutput"; //$NON-NLS-1$
- public static final String TAG_SHOW_CONSOLE = "showConsole"; //$NON-NLS-1$
- public static final String TAG_RUN_BKGRND = "runInBackground"; //$NON-NLS-1$
- public static final String TAG_PROMPT_ARGS = "promptForArguments"; //$NON-NLS-1$
- public static final String TAG_ARGS = "arguments"; //$NON-NLS-1$
- public static final String TAG_REFRESH_SCOPE = "refreshScope"; //$NON-NLS-1$
- public static final String TAG_REFRESH_RECURSIVE = "refreshRecursive"; //$NON-NLS-1$
- public static final String TAG_RUN_BUILD_KINDS = "runForBuildKinds"; //$NON-NLS-1$
- public static final String TAG_EXTRA_ATTR = "extraAttribute"; //$NON-NLS-1$
- public static final String TAG_VERSION = "version"; //$NON-NLS-1$
-
- private static final String EXTRA_ATTR_SEPARATOR = "="; //$NON-NLS-1$
-
- private static final String VERSION_21 = "2.1"; //$NON-NLS-1$;
-
- private static final String TRUE = "true"; //$NON-NLS-1$
- private static final String FALSE = "false"; //$NON-NLS-1$
-
- /**
- * Allows no instances.
- */
- private ExternalToolMigration() {
- super();
- }
-
- /**
- * Returns a launch configuration working copy from the argument map or
- * <code>null</code> if the given map cannot be interpreted as a 2.0 or 2.1
- * branch external tool. The returned working copy will be unsaved and its
- * location will be set to the metadata area.
- */
- public static ILaunchConfigurationWorkingCopy configFromArgumentMap(Map args) {
- String version = (String) args.get(TAG_VERSION);
- if (VERSION_21.equals(version)) {
- return configFrom21ArgumentMap(args);
- }
- return configFrom20ArgumentMap(args);
- }
-
- public static ILaunchConfigurationWorkingCopy configFrom21ArgumentMap(Map commandArgs) {
- String name = (String) commandArgs.get(TAG_NAME);
- String type = (String) commandArgs.get(TAG_TYPE);
-
- ILaunchConfigurationWorkingCopy config = newConfig(type, name);
- if (config == null) {
- return null;
- }
-
- config.setAttribute(IExternalToolConstants.ATTR_LOCATION, (String) commandArgs.get(TAG_LOCATION));
- config.setAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, (String) commandArgs.get(TAG_WORK_DIR));
- config.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, TRUE.equals(commandArgs.get(TAG_CAPTURE_OUTPUT)));
- config.setAttribute(IExternalToolConstants.ATTR_SHOW_CONSOLE, TRUE.equals(commandArgs.get(TAG_SHOW_CONSOLE)));
- config.setAttribute(IExternalToolConstants.ATTR_LAUNCH_IN_BACKGROUND, TRUE.equals(commandArgs.get(TAG_RUN_BKGRND)));
- config.setAttribute(IExternalToolConstants.ATTR_PROMPT_FOR_ARGUMENTS, TRUE.equals(commandArgs.get(TAG_PROMPT_ARGS)));
- config.setAttribute(RefreshUtil.ATTR_REFRESH_SCOPE, (String) commandArgs.get(TAG_REFRESH_SCOPE));
- config.setAttribute(RefreshUtil.ATTR_REFRESH_RECURSIVE, TRUE.equals(commandArgs.get(TAG_REFRESH_RECURSIVE)));
-
- config.setAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, (String) commandArgs.get(TAG_RUN_BUILD_KINDS));
-
- String args = (String) commandArgs.get(TAG_ARGS);
- if (args != null) {
- config.setAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, args);
- }
-
- String extraAttributes = (String) commandArgs.get(TAG_EXTRA_ATTR);
- if (extraAttributes != null) {
- StringTokenizer tokenizer = new StringTokenizer(extraAttributes, EXTRA_ATTR_SEPARATOR);
- while (tokenizer.hasMoreTokens()) {
- String key = tokenizer.nextToken();
- if (!tokenizer.hasMoreTokens())
- break;
- String value = tokenizer.nextToken();
- if (key.equals(RUN_TARGETS_ATTRIBUTE)) {
- // 2.1 implementation only defined 1 "extra attribute"
- config.setAttribute(ATTR_ANT_TARGETS, value);
- }
- }
- }
- return config;
- }
-
- /**
- * Creates an external tool from the map.
- */
- public static ILaunchConfigurationWorkingCopy configFrom20ArgumentMap(Map args) {
- // Update the type...
- String type = (String) args.get(TAG_TOOL_TYPE);
- if (TOOL_TYPE_ANT.equals(type)) {
- type = TOOL_TYPE_ANT_BUILD;
- } else if (TOOL_TYPE_PROGRAM.equals(type)){
- type = IExternalToolConstants.TOOL_TYPE_PROGRAM;
- } else {
- return null;
- }
-
- String name = (String) args.get(TAG_TOOL_NAME);
-
- ILaunchConfigurationWorkingCopy config = newConfig(type, name);
- if (config == null) {
- return null;
- }
-
- // Update the location...
- String location = (String) args.get(TAG_TOOL_LOCATION);
- config.setAttribute(IExternalToolConstants.ATTR_LOCATION, location);
-
- // Update the refresh scope...
- String refresh = (String) args.get(TAG_TOOL_REFRESH);
- if (refresh != null) {
- VariableDefinition varDef = extractVariableDefinition(refresh, 0);
- if ("none".equals(varDef.name)) { //$NON-NLS-1$
- refresh = null;
- }
- config.setAttribute(RefreshUtil.ATTR_REFRESH_SCOPE, refresh);
- }
-
- // Update the arguments
- String arguments = (String) args.get(TAG_TOOL_ARGUMENTS);
- if (type.equals(TOOL_TYPE_ANT_BUILD)) {
- String targetNames = null;
- if (arguments != null) {
- int start = 0;
- ArrayList targets = new ArrayList();
- StringBuffer buffer = new StringBuffer();
- VariableDefinition varDef = extractVariableDefinition(arguments, start);
- while (varDef.end != -1) {
- if ("ant_target".equals(varDef.name) && varDef.argument != null) { //$NON-NLS-1$
- targets.add(varDef.argument);
- buffer.append(arguments.substring(start, varDef.start));
- } else {
- buffer.append(arguments.substring(start, varDef.end));
- }
- start = varDef.end;
- varDef = extractVariableDefinition(arguments, start);
- }
- buffer.append(arguments.substring(start, arguments.length()));
- arguments = buffer.toString();
-
- buffer.setLength(0);
- for (int i = 0; i < targets.size(); i++) {
- String target = (String) targets.get(i);
- if (target != null && target.length() > 0) {
- buffer.append(target);
- buffer.append(","); //$NON-NLS-1$
- }
- }
- targetNames = buffer.toString();
- }
- if (targetNames != null && targetNames.length() > 0) {
- config.setAttribute(ATTR_ANT_TARGETS, targetNames);
- }
- }
- config.setAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, arguments);
-
- // Collect the rest of the information
- config.setAttribute(IExternalToolConstants.ATTR_SHOW_CONSOLE, TRUE.equals(args.get(TAG_TOOL_SHOW_LOG)));
- config.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, TRUE.equals(args.get(TAG_TOOL_SHOW_LOG)));
- config.setAttribute(IExternalToolConstants.ATTR_LAUNCH_IN_BACKGROUND, FALSE.equals(args.get(TAG_TOOL_BLOCK)));
- String buildKinds= (String) args.get(TAG_TOOL_BUILD_TYPES);
- if (buildKinds != null) {
- buildKinds= buildKinds.replace(';', ','); // Replace the old separator with the new
- }
- config.setAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, buildKinds);
- config.setAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, (String) args.get(TAG_TOOL_DIRECTORY));
- return config;
- }
-
- /**
- * Returns a new working copy with the given external tool name and external
- * tool type or <code>null</code> if no config could be created.
- */
- private static ILaunchConfigurationWorkingCopy newConfig(String type, String name) {
- if (type == null || name == null) {
- return null;
- }
- ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType configType;
- if (TOOL_TYPE_ANT_BUILD.equals(type)) {
- configType = manager.getLaunchConfigurationType(ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE);
- } else if (IExternalToolConstants.TOOL_TYPE_PROGRAM.equals(type)) {
- configType = manager.getLaunchConfigurationType(IExternalToolConstants.ID_PROGRAM_BUILDER_LAUNCH_CONFIGURATION_TYPE);
- } else {
- return null;
- }
- try {
- if (configType != null) {
- return configType.newInstance(null, name);
- }
- } catch (CoreException e) {
- ExternalToolsCore.log(e);
- }
- return null;
- }
-
- /**
- * Returns the tool name extracted from the given command argument map.
- * Extraction is attempted using 2.0 and 2.1 external tool formats.
- */
- public static String getNameFromCommandArgs(Map commandArgs) {
- String name= (String) commandArgs.get(TAG_NAME);
- if (name == null) {
- name= (String) commandArgs.get(TAG_TOOL_NAME);
- }
- return name;
- }
-
- /**
- * Migrate the old RUN_IN_BACKGROUND launch config attribute to the new
- * LAUNCH_IN_BACKGROUND attribute provided by the debug ui plugin.
- *
- * @param config the config to migrate
- * @return the migrated config
- */
- public static ILaunchConfiguration migrateRunInBackground(ILaunchConfiguration config) {
- String noValueFlag= "NoValue"; //$NON-NLS-1$
- String attr= null;
- try {
- attr = config.getAttribute(IExternalToolConstants.ATTR_LAUNCH_IN_BACKGROUND, noValueFlag);
- } catch (CoreException e) {
- // Exception will occur if the attribute is already set because the attribute is actually a boolean.
- // No migration necessary.
- return config;
- }
- if (noValueFlag.equals(attr)) {
- //the old constant
- String ATTR_RUN_IN_BACKGROUND= IExternalToolConstants.UI_PLUGIN_ID + ".ATTR_RUN_IN_BACKGROUND"; //$NON-NLS-1$
- boolean runInBackground= false;
- try {
- runInBackground = config.getAttribute(ATTR_RUN_IN_BACKGROUND, runInBackground);
- } catch (CoreException e) {
- ExternalToolsCore.log(ExternalToolsMigrationMessages.ExternalToolMigration_37, e);
- }
- try {
- ILaunchConfigurationWorkingCopy workingCopy= config.getWorkingCopy();
- workingCopy.setAttribute(IExternalToolConstants.ATTR_LAUNCH_IN_BACKGROUND, runInBackground);
- config= workingCopy.doSave();
- } catch (CoreException e) {
- ExternalToolsCore.log(ExternalToolsMigrationMessages.ExternalToolMigration_38, e);
- }
- }
- return config;
- }
-
- /**
- * Extracts a variable name and argument from the given string.
- *
- * @param text the source text to parse for a variable tag
- * @param start the index in the string to start the search
- * @return the variable definition
- */
- public static VariableDefinition extractVariableDefinition(String text, int start) {
- VariableDefinition varDef = new VariableDefinition();
-
- varDef.start = text.indexOf(VAR_TAG_START, start);
- if (varDef.start < 0){
- return varDef;
- }
- start = varDef.start + VAR_TAG_START.length();
-
- int end = text.indexOf(VAR_TAG_END, start);
- if (end < 0) {
- return varDef;
- }
- varDef.end = end + VAR_TAG_END.length();
- if (end == start) {
- return varDef;
- }
-
- int mid = text.indexOf(VAR_TAG_SEP, start);
- if (mid < 0 || mid > end) {
- varDef.name = text.substring(start, end);
- } else {
- if (mid > start) {
- varDef.name = text.substring(start, mid);
- }
- mid = mid + VAR_TAG_SEP.length();
- if (mid < end) {
- varDef.argument = text.substring(mid, end);
- }
- }
-
- return varDef;
- }
-}
diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolsMigrationMessages.java b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolsMigrationMessages.java
deleted file mode 100644
index 3e5fa46..0000000
--- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolsMigrationMessages.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.core.externaltools.internal.registry;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ExternalToolsMigrationMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.core.externaltools.internal.registry.launchConfigurations.ExternalToolsUIMessages";//$NON-NLS-1$
-
- public static String ExternalToolMigration_37;
- public static String ExternalToolMigration_38;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME,
- ExternalToolsMigrationMessages.class);
- }
-}
\ No newline at end of file
diff --git a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolsMigrationMessages.properties b/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolsMigrationMessages.properties
deleted file mode 100644
index 1e18e67..0000000
--- a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolsMigrationMessages.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-ExternalToolMigration_37=An exception occurred accessing external tool\'s \"run in background\" attribute
-ExternalToolMigration_38=An exception occurred attempting to migrate external tool\'s \"run in background\" attribute
diff --git a/org.eclipse.core.variables/.classpath b/org.eclipse.core.variables/.classpath
deleted file mode 100644
index ce73933..0000000
--- a/org.eclipse.core.variables/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.core.variables/.cvsignore b/org.eclipse.core.variables/.cvsignore
deleted file mode 100644
index 6938697..0000000
--- a/org.eclipse.core.variables/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-doc
diff --git a/org.eclipse.core.variables/.project b/org.eclipse.core.variables/.project
deleted file mode 100644
index 03df26f..0000000
--- a/org.eclipse.core.variables/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.core.variables</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.core.variables/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.core.variables/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 05664ee..0000000
--- a/org.eclipse.core.variables/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,96 +0,0 @@
-#Thu Feb 26 08:16:51 CST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=disabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.core.variables/.settings/org.eclipse.pde.prefs b/org.eclipse.core.variables/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 7eebeb8..0000000
--- a/org.eclipse.core.variables/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,17 +0,0 @@
-#Tue Jan 30 11:38:48 CST 2007
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.deprecated=1
-compilers.p.illegal-att-value=0
-compilers.p.missing-packages=0
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=1
-compilers.p.unknown-element=0
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.p.unused-element-or-attribute=1
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/org.eclipse.core.variables/META-INF/MANIFEST.MF b/org.eclipse.core.variables/META-INF/MANIFEST.MF
deleted file mode 100644
index b4215c6..0000000
--- a/org.eclipse.core.variables/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.core.variables; singleton:=true
-Bundle-Version: 3.2.300.qualifier
-Bundle-Activator: org.eclipse.core.variables.VariablesPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.core.internal.variables;x-internal:=true,
- org.eclipse.core.variables
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/org.eclipse.core.variables/about.html b/org.eclipse.core.variables/about.html
deleted file mode 100644
index 4602330..0000000
--- a/org.eclipse.core.variables/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.core.variables/build.properties b/org.eclipse.core.variables/build.properties
deleted file mode 100644
index bcf8553..0000000
--- a/org.eclipse.core.variables/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- plugin.properties,\
- .,\
- about.html,\
- META-INF/
-source.. = src/
-src.includes = about.html,\
- schema/
diff --git a/org.eclipse.core.variables/plugin.properties b/org.eclipse.core.variables/plugin.properties
deleted file mode 100644
index 88108aa..0000000
--- a/org.eclipse.core.variables/plugin.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName=Core Variables
-providerName=Eclipse.org
-valueVariablesExtensionPointName=Value Variables
-dynamicVariablesExtensionPointName=Dynamic Variables
-eclipse_home.description=The location of the base installation for the running platform
diff --git a/org.eclipse.core.variables/plugin.xml b/org.eclipse.core.variables/plugin.xml
deleted file mode 100644
index 38ae466..0000000
--- a/org.eclipse.core.variables/plugin.xml
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.core.variables/schema/dynamicVariables.exsd b/org.eclipse.core.variables/schema/dynamicVariables.exsd
deleted file mode 100644
index 5168a89..0000000
--- a/org.eclipse.core.variables/schema/dynamicVariables.exsd
+++ /dev/null
@@ -1,130 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.core.variables">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.core.variables" id="dynamicVariables" name="Dynamic String Substitution Variables"/>
- </appInfo>
- <documentation>
- This extension point provides a mechanism for defining dynamic variables used in string substitution. The value of a dynamic variable is resolved at the time a string substitution is performed, with an optional argument.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="variable" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="variable">
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique name for this variable.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="resolver" type="string" use="required">
- <annotation>
- <documentation>
- specifies a Java class which implements <code>org.eclipse.core.variables.IDynamicVariableResolver</code>, which is used to determine the value of the variable
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.core.variables.IDynamicVariableResolver"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="description" type="string" use="required">
- <annotation>
- <documentation>
- specifies a human-readable description of this variable
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="supportsArgument" type="boolean">
- <annotation>
- <documentation>
- Whether this variable supports an argument. When unspecified, the implied value is <code>true</code>.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 3.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is a definition of a dynamic variable that resolves to the name of the selected resource:
-<pre>
- <extension point="org.eclipse.core.variables.dynamicVariables">
- <variable
- name="resource_name"
- expanderClass="com.example.ResourceNameExpander"
- description="The name of the selected resource">
- </variable>
- </extension>
-</pre>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>resolver</b> must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.core.variables.IDynamicVariableResolver</b>.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2003, 2005 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.core.variables/schema/valueVariables.exsd b/org.eclipse.core.variables/schema/valueVariables.exsd
deleted file mode 100644
index 7dd314c..0000000
--- a/org.eclipse.core.variables/schema/valueVariables.exsd
+++ /dev/null
@@ -1,156 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.core.variables">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.core.variables" id="valueVariables" name="Value Variables"/>
- </appInfo>
- <documentation>
- This extension point provides a mechanism for defining variables used for string substitution. A value variable has a static value.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="variable" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="variable">
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique name for this variable.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="readOnly" type="boolean">
- <annotation>
- <documentation>
- Specifies whether this variable is read only. When true, this variable's value will always be derived from the extension and cannot be edited by the user. When false, this variable's value will be initialized from any <code>initialValue</code> attribtue or initializer class, and can be modified by the user. Once a read-write variable is modified, it's value is persisted and overrides any value specified by an extension's <code>initialValue</code> or initializer class. When unspecified, the value of this attribute is <code>false</code>. This attribute was added in the 3.3 release.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="initialValue" type="string">
- <annotation>
- <documentation>
- specifies the initial value for this variable. When specified, an <code>initializerClass</code> attribute must not be specified.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="initializerClass" type="string">
- <annotation>
- <documentation>
- specifies the fully qualified name of the Java class that implements <code>org.eclipse.core.variables.IValueVariableInitializer</code>. When specified, an <code>initialValue</code> attribute must not be specified.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.core.variables.IValueVariableInitializer"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- specifies a human-readable description of this variable.
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 3.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a value variable contribution with an initial value:
-
-<p>
-<pre>
- <extension point="org.eclipse.core.variables.valueVariables">
- <variable
- name="FOO_HOME"
- initialValue="/usr/local/foo">
- </variable>
- </extension>
-</pre>
-</p>
-
-In the example above, the specified variable is created with the initial value "/usr/local/foo".
-
- The following is an example of a value variable contribution with an initializer class:
-<p>
-<pre>
- <extension point="org.eclipse.core.variables.valueVariables">
- <variable
- name="FOO_HOME"
- initializerClass="com.example.FooLocator">
- </variable>
- </extension>
-</pre>
-</p>
-
-In the example above, the variable FOO_HOME is created and the class "com.example.FooLocator" will be
-used to initialize the value the first time it's requested.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>initializerClass</b> must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.core.variables.IValueVariableInitializer</b>.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2003, 2006 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/ContributedValueVariable.java b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/ContributedValueVariable.java
deleted file mode 100644
index f53bf67..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/ContributedValueVariable.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.variables;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.variables.IValueVariable;
-import org.eclipse.core.variables.IValueVariableInitializer;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Implementation of a value variable.
- */
-public class ContributedValueVariable extends StringVariable implements IValueVariable {
-
- /**
- * Variable value or <code>null</code> if none
- */
- private String fValue;
-
- /**
- * Whether this variable's value has been initialized
- */
- private boolean fInitialized = false;
-
- /**
- * Whether this variable is read only. If true, users cannot change the value.
- */
- private boolean fReadOnly;
-
- /**
- * Constructs a new value variable with the given name, description, read only
- * property and associated configuration element. The value will be initialized
- * from the configuration element the first time getValue() is called.
- *
- * @param name variable name
- * @param description variable description or <code>null</code>
- * @param readOnly whether the variable should be a read only variable
- * @param configurationElement configuration element
- */
- public ContributedValueVariable(String name, String description, boolean readOnly, IConfigurationElement configurationElement) {
- super(name, description, configurationElement);
- fReadOnly = readOnly;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.variables.IValueVariable#setValue(java.lang.String)
- */
- public void setValue(String value) {
- if (!isReadOnly() || !isInitialized()){
- fValue = value;
- setInitialized(true);
- StringVariableManager.getDefault().notifyChanged(this);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.variables.IValueVariable#getValue()
- */
- public String getValue() {
- if (!isInitialized()) {
- initialize();
- }
- return fValue;
- }
-
- /**
- * Initialize this variable's value from the configuration element.
- */
- private void initialize() {
- if (getConfigurationElement() != null) {
- // check for a explicit value specified in plug-in XML
- String value = getConfigurationElement().getAttribute("initialValue"); //$NON-NLS-1$
- if (value == null) {
- // check for initializer
- String className = getConfigurationElement().getAttribute("initializerClass"); //$NON-NLS-1$
- if (className != null) {
- try {
- Object object = getConfigurationElement().createExecutableExtension("initializerClass"); //$NON-NLS-1$
- if (object instanceof IValueVariableInitializer) {
- IValueVariableInitializer initializer = (IValueVariableInitializer)object;
- initializer.initialize(this);
- } else {
- VariablesPlugin.logMessage(NLS.bind("Unable to initialize variable {0} - initializer must be an instance of IValueVariableInitializer.", new String[]{getName()}), null); //$NON-NLS-1$
- }
- } catch (CoreException e) {
- VariablesPlugin.logMessage(NLS.bind("Unable to initialize variable {0}",new String[]{getName()}), e); //$NON-NLS-1$
- }
- }
- } else {
- setValue(value);
- }
- }
- setInitialized(true);
- }
-
- /**
- * Returns whether this variable has been initialized with a value by one of:
- * <ul>
- * <li><code>setValue(String)</code></li>
- * <li>its configuration element's <code>initialValue</code> attribute</li>
- * <li>its configuration element's initializer</li>
- * </ul>
- * @return whether this variable has been initialized with a value
- */
- protected boolean isInitialized() {
- return fInitialized;
- }
-
- /**
- * Sets whether this variable has been initialized with a value.
- *
- * @param initialized whether this variable has been initialized
- */
- protected void setInitialized(boolean initialized) {
- fInitialized = initialized;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.variables.IValueVariable#isReadOnly()
- */
- public boolean isReadOnly() {
- return fReadOnly;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.variables.IValueVariable#isContributed()
- */
- public boolean isContributed() {
- return getConfigurationElement() != null;
- }
-
-}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/DynamicVariable.java b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/DynamicVariable.java
deleted file mode 100644
index f2d48d8..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/DynamicVariable.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.variables;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.variables.IDynamicVariable;
-import org.eclipse.core.variables.IDynamicVariableResolver;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Dynamic variable
- */
-public class DynamicVariable extends StringVariable implements IDynamicVariable {
-
- /**
- * Resolver, or <code>null</code> until needed
- */
- private IDynamicVariableResolver fResolver;
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.stringsubstitution.IContextVariable#getValue(java.lang.String)
- */
- public String getValue(String argument) throws CoreException {
- if (!supportsArgument()) {
- // check for an argument - not supported
- if (argument != null && argument.length() > 0) {
- throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind(VariablesMessages.DynamicVariable_0, new String[]{argument, getName()}), null));
- }
- }
- if (fResolver == null) {
- String name = getConfigurationElement().getAttribute("resolver"); //$NON-NLS-1$
- if (name == null) {
- throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind("Contributed context variable {0} must specify a resolver.",new String[]{getName()}), null)); //$NON-NLS-1$
- }
- Object object = getConfigurationElement().createExecutableExtension("resolver"); //$NON-NLS-1$
- if (object instanceof IDynamicVariableResolver) {
- fResolver = (IDynamicVariableResolver)object;
- } else {
- throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind("Contributed context variable resolver for {0} must be an instance of IContextVariableResolver.",new String[]{getName()}), null)); //$NON-NLS-1$
- }
- }
- return fResolver.resolveValue(this, argument);
- }
-
- /**
- * Constructs a new context variable.
- *
- * @param name variable name
- * @param description variable description or <code>null</code>
- * @param configurationElement configuration element
- */
- public DynamicVariable(String name, String description, IConfigurationElement configurationElement) {
- super(name, description, configurationElement);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.variables.IDynamicVariable#supportsArgument()
- */
- public boolean supportsArgument() {
- String arg = getConfigurationElement().getAttribute("supportsArgument"); //$NON-NLS-1$
- return arg == null || Boolean.valueOf(arg).booleanValue();
- }
-
-}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/EclipseHomeVariableResolver.java b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/EclipseHomeVariableResolver.java
deleted file mode 100644
index ac5e100..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/EclipseHomeVariableResolver.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.variables;
-
-import java.net.URL;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.variables.IDynamicVariable;
-import org.eclipse.core.variables.IDynamicVariableResolver;
-import org.eclipse.osgi.service.datalocation.Location;
-
-/**
- * Resolver for ${eclipse_home}
- *
- * @since 3.2
- */
-public class EclipseHomeVariableResolver implements IDynamicVariableResolver {
-
- public String resolveValue(IDynamicVariable variable, String argument) throws CoreException {
- Location installLocation = Platform.getInstallLocation();
- if (installLocation != null) {
- URL url = installLocation.getURL();
- if (url != null) {
-
- // Try to convert the URL to an OS string, to be consistent with
- // how other variables, like ${workspace_loc} resolve. See
- // ResourceResolver.translateToValue(). [bugzilla 263535]
- String file = url.getFile();
- IPath path = Path.fromOSString(file);
- String osstr = path.toOSString();
- if (osstr.length() != 0) {
- return osstr;
- }
-
- if (file.length() != 0) {
- return file;
- }
- }
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java
deleted file mode 100644
index 94bd5d7..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.variables;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Stack;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.variables.IDynamicVariable;
-import org.eclipse.core.variables.IStringVariableManager;
-import org.eclipse.core.variables.IValueVariable;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Performs string substitution for context and value variables.
- */
-public class StringSubstitutionEngine {
-
- // delimiters
- private static final String VARIABLE_START = "${"; //$NON-NLS-1$
- private static final char VARIABLE_END = '}';
- private static final char VARIABLE_ARG = ':';
- // parsing states
- private static final int SCAN_FOR_START = 0;
- private static final int SCAN_FOR_END = 1;
-
- /**
- * Resulting string
- */
- private StringBuffer fResult;
-
- /**
- * Whether substitutions were performed
- */
- private boolean fSubs;
-
- /**
- * Stack of variables to resolve
- */
- private Stack fStack;
-
- class VariableReference {
-
- // the text inside the variable reference
- private StringBuffer fText;
-
- public VariableReference() {
- fText = new StringBuffer();
- }
-
- public void append(String text) {
- fText.append(text);
- }
-
- public String getText() {
- return fText.toString();
- }
-
- }
-
- /**
- * Performs recursive string substitution and returns the resulting string.
- *
- * @param expression expression to resolve
- * @param reportUndefinedVariables whether to report undefined variables as an error
- * @param manager registry of variables
- * @return the resulting string with all variables recursively
- * substituted
- * @exception CoreException if unable to resolve a referenced variable or if a cycle exists
- * in referenced variables
- */
- public String performStringSubstitution(String expression, boolean reportUndefinedVariables, boolean resolveVariables, IStringVariableManager manager) throws CoreException {
- substitute(expression, reportUndefinedVariables, resolveVariables, manager);
- List resolvedVariableSets = new ArrayList();
- while (fSubs) {
- HashSet resolved = substitute(fResult.toString(), reportUndefinedVariables, true, manager);
-
- for(int i=resolvedVariableSets.size()-1; i>=0; i--) {
-
- HashSet prevSet = (HashSet)resolvedVariableSets.get(i);
-
- if (prevSet.equals(resolved)) {
- HashSet conflictingSet = new HashSet();
- for (; i<resolvedVariableSets.size(); i++)
- conflictingSet.addAll((HashSet)resolvedVariableSets.get(i));
-
- StringBuffer problemVariableList = new StringBuffer();
- for (Iterator it=conflictingSet.iterator(); it.hasNext(); ) {
- problemVariableList.append(it.next().toString());
- problemVariableList.append(", "); //$NON-NLS-1$
- }
- problemVariableList.setLength(problemVariableList.length()-2); //truncate the last ", "
- throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.REFERENCE_CYCLE_ERROR, NLS.bind(VariablesMessages.StringSubstitutionEngine_4, new String[]{problemVariableList.toString()}), null));
- }
- }
-
- resolvedVariableSets.add(resolved);
- }
- return fResult.toString();
- }
-
- /**
- * Performs recursive string validation to ensure that all of the variables
- * contained in the expression exist
- * @param expression expression to validate
- * @param manager registry of variables
- * @exception CoreException if a referenced variable does not exist or if a cycle exists
- * in referenced variables
- */
- public void validateStringVariables(String expression, IStringVariableManager manager) throws CoreException {
- performStringSubstitution(expression, true, false, manager);
- }
-
- /**
- * Makes a substitution pass of the given expression returns a Set of the variables that were resolved in this
- * pass
- *
- * @param expression source expression
- * @param reportUndefinedVariables whether to report undefined variables as an error
- * @param resolveVariables whether to resolve the value of any variables
- * @exception CoreException if unable to resolve a variable
- */
- private HashSet substitute(String expression, boolean reportUndefinedVariables, boolean resolveVariables, IStringVariableManager manager) throws CoreException {
- fResult = new StringBuffer(expression.length());
- fStack = new Stack();
- fSubs = false;
-
- HashSet resolvedVariables = new HashSet();
-
- int pos = 0;
- int state = SCAN_FOR_START;
- while (pos < expression.length()) {
- switch (state) {
- case SCAN_FOR_START:
- int start = expression.indexOf(VARIABLE_START, pos);
- if (start >= 0) {
- int length = start - pos;
- // copy non-variable text to the result
- if (length > 0) {
- fResult.append(expression.substring(pos, start));
- }
- pos = start + 2;
- state = SCAN_FOR_END;
-
- fStack.push(new VariableReference());
- } else {
- // done - no more variables
- fResult.append(expression.substring(pos));
- pos = expression.length();
- }
- break;
- case SCAN_FOR_END:
- // be careful of nested variables
- start = expression.indexOf(VARIABLE_START, pos);
- int end = expression.indexOf(VARIABLE_END, pos);
- if (end < 0) {
- // variables are not completed
- VariableReference tos = (VariableReference)fStack.peek();
- tos.append(expression.substring(pos));
- pos = expression.length();
- } else {
- if (start >= 0 && start < end) {
- // start of a nested variable
- int length = start - pos;
- if (length > 0) {
- VariableReference tos = (VariableReference)fStack.peek();
- tos.append(expression.substring(pos, start));
- }
- pos = start + 2;
- fStack.push(new VariableReference());
- } else {
- // end of variable reference
- VariableReference tos = (VariableReference)fStack.pop();
- String substring = expression.substring(pos, end);
- tos.append(substring);
- resolvedVariables.add(substring);
-
- pos = end + 1;
- String value= resolve(tos, reportUndefinedVariables, resolveVariables, manager);
- if (value == null) {
- value = ""; //$NON-NLS-1$
- }
- if (fStack.isEmpty()) {
- // append to result
- fResult.append(value);
- state = SCAN_FOR_START;
- } else {
- // append to previous variable
- tos = (VariableReference)fStack.peek();
- tos.append(value);
- }
- }
- }
- break;
- }
- }
- // process incomplete variable references
- while (!fStack.isEmpty()) {
- VariableReference tos = (VariableReference)fStack.pop();
- if (fStack.isEmpty()) {
- fResult.append(VARIABLE_START);
- fResult.append(tos.getText());
- } else {
- VariableReference var = (VariableReference)fStack.peek();
- var.append(VARIABLE_START);
- var.append(tos.getText());
- }
- }
-
-
- return resolvedVariables;
- }
-
- /**
- * Resolve and return the value of the given variable reference,
- * possibly <code>null</code>.
- *
- * @param var
- * @param reportUndefinedVariables whether to report undefined variables as
- * an error
- * @param resolveVariables whether to resolve the variables value or just to validate that this variable is valid
- * @param manager variable registry
- * @return variable value, possibly <code>null</code>
- * @exception CoreException if unable to resolve a value
- */
- private String resolve(VariableReference var, boolean reportUndefinedVariables, boolean resolveVariables, IStringVariableManager manager) throws CoreException {
- String text = var.getText();
- int pos = text.indexOf(VARIABLE_ARG);
- String name = null;
- String arg = null;
- if (pos > 0) {
- name = text.substring(0, pos);
- pos++;
- if (pos < text.length()) {
- arg = text.substring(pos);
- }
- } else {
- name = text;
- }
- IValueVariable valueVariable = manager.getValueVariable(name);
- if (valueVariable == null) {
- IDynamicVariable dynamicVariable = manager.getDynamicVariable(name);
- if (dynamicVariable == null) {
- // no variables with the given name
- if (reportUndefinedVariables) {
- throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind(VariablesMessages.StringSubstitutionEngine_3, new String[]{name}), null));
- }
- // leave as is
- return getOriginalVarText(var);
- }
-
- if (resolveVariables) {
- fSubs = true;
- return dynamicVariable.getValue(arg);
- }
- //leave as is
- return getOriginalVarText(var);
- }
-
- if (arg == null) {
- if (resolveVariables) {
- fSubs = true;
- return valueVariable.getValue();
- }
- //leave as is
- return getOriginalVarText(var);
- }
- // error - an argument specified for a value variable
- throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind(VariablesMessages.StringSubstitutionEngine_4, new String[]{valueVariable.getName()}), null));
- }
-
- private String getOriginalVarText(VariableReference var) {
- StringBuffer res = new StringBuffer(var.getText());
- res.insert(0, VARIABLE_START);
- res.append(VARIABLE_END);
- return res.toString();
- }
-}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariable.java b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariable.java
deleted file mode 100644
index 498b411..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariable.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.variables;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.variables.IStringVariable;
-
-/**
- * Common implementation of context and value variables
- */
-public abstract class StringVariable implements IStringVariable {
-
- /**
- * Variable name
- */
- private String fName;
-
- /**
- * Variable description, or <code>null</code>
- */
- private String fDescription;
-
- /**
- * Configuration element associated with this variable, or <code>null</code>
- */
- private IConfigurationElement fConfigurationElement;
-
- /**
- * Constructs a new variable with the given name, description and configuration element.
- *
- * @param name variable name
- * @param description variable description, or <code>null</code>
- * @param configurationElement configuration element or <code>null</code>
- */
- public StringVariable(String name, String description, IConfigurationElement configurationElement) {
- fName = name;
- fDescription = description;
- fConfigurationElement = configurationElement;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.stringsubstitution.IStringVariable#getName()
- */
- public String getName() {
- return fName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.stringsubstitution.IStringVariable#getDescription()
- */
- public String getDescription() {
- return fDescription;
- }
-
- /**
- * Returns the configuration element associated with this variable, or <code>null</code>
- * if none.
- *
- * @return configuration element or <code>null</code>
- */
- protected IConfigurationElement getConfigurationElement() {
- return fConfigurationElement;
- }
-
- /**
- * @see IValueVariable#setDescription(String)
- * @param description
- */
- public void setDescription(String description) {
- fDescription = description;
- }
-
-}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
deleted file mode 100644
index e015008..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
+++ /dev/null
@@ -1,607 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Stefan Liebig - Bug 242685 StringVariableManager - Variable contributions may silently override existing variables
- *******************************************************************************/
-package org.eclipse.core.internal.variables;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
-import org.eclipse.core.variables.IDynamicVariable;
-import org.eclipse.core.variables.IStringVariable;
-import org.eclipse.core.variables.IStringVariableManager;
-import org.eclipse.core.variables.IValueVariable;
-import org.eclipse.core.variables.IValueVariableListener;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.service.prefs.BackingStoreException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Singleton string variable manager.
- */
-public class StringVariableManager implements IStringVariableManager, IPreferenceChangeListener {
-
- /**
- * Dynamic variables - maps variable names to variables.
- */
- private Map fDynamicVariables;
-
- /**
- * Value variables - maps variable names to variables.
- */
- private Map fValueVariables;
-
- /**
- * Variable listeners
- */
- private ListenerList fListeners;
-
- // notifications
- private static final int ADDED = 0;
- private static final int CHANGED = 1;
- private static final int REMOVED = 2;
-
- /**
- * Singleton variable manager.
- */
- private static StringVariableManager fgManager;
-
- // true during internal updates indicates that change notification
- // should be suppressed/ignored.
- private boolean fInternalChange = false;
-
- // Variable extension point constants
- private static final String ATTR_NAME= "name"; //$NON-NLS-1$
- private static final String ATTR_DESCRIPTION="description"; //$NON-NLS-1$
- private static final String ATTR_READ_ONLY="readOnly"; //$NON-NLS-1$
- // Persisted variable XML constants
- private static final String VALUE_VARIABLES_TAG= "valueVariables"; //$NON-NLS-1$
- private static final String VALUE_VARIABLE_TAG= "valueVariable"; //$NON-NLS-1$
- private static final String NAME_TAG= "name"; //$NON-NLS-1$
- private static final String VALUE_TAG= "value"; //$NON-NLS-1$
- private static final String DESCRIPTION_TAG="description"; //$NON-NLS-1$
- private static final String READ_ONLY_TAG="readOnly"; //$NON-NLS-1$
- // XML values
- private static final String TRUE_VALUE= "true"; //$NON-NLS-1$
- private static final String FALSE_VALUE= "false"; //$NON-NLS-1$
- // preference store key for value variables
- private static final String PREF_VALUE_VARIABLES= VariablesPlugin.getUniqueIdentifier() + ".valueVariables"; //$NON-NLS-1$
-
- /**
- * Notifies a string variable listener in a safe runnable to handle
- * exceptions.
- */
- class StringVariableNotifier implements ISafeRunnable {
-
- private IValueVariableListener fListener;
- private int fType;
- private IValueVariable[] fVariables;
-
- /**
- * @see org.eclipse.core.runtime.ISafeRunnable#handleException(java.lang.Throwable)
- */
- public void handleException(Throwable exception) {
- IStatus status = new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, "An exception occurred during string variable change notification", exception); //$NON-NLS-1$
- VariablesPlugin.log(status);
- }
-
- /**
- * @see org.eclipse.core.runtime.ISafeRunnable#run()
- */
- public void run() throws Exception {
- switch (fType) {
- case ADDED:
- fListener.variablesAdded(fVariables);
- break;
- case REMOVED:
- fListener.variablesRemoved(fVariables);
- break;
- case CHANGED:
- fListener.variablesChanged(fVariables);
- break;
- }
- }
-
- /**
- * Notifies the given listener of the add/change/remove
- *
- * @param listener the listener to notify
- * @param launch the launch that has changed
- * @param update the type of change
- */
- public void notify(IValueVariable[] variables, int update) {
- fVariables = variables;
- fType = update;
- Object[] copiedListeners= fListeners.getListeners();
- for (int i= 0; i < copiedListeners.length; i++) {
- fListener = (IValueVariableListener)copiedListeners[i];
- SafeRunner.run(this);
- }
- fVariables = null;
- fListener = null;
- // persist variables whenever there is an add/change/remove
- storeValueVariables();
- }
- }
-
- /**
- * Returns a new notifier.
- *
- * @return a new notifier
- */
- private StringVariableNotifier getNotifier() {
- return new StringVariableNotifier();
- }
-
- /**
- * Returns the default string variable manager
- *
- * @return string variable manager
- */
- public static StringVariableManager getDefault() {
- if (fgManager == null) {
- fgManager = new StringVariableManager();
- }
- return fgManager;
- }
-
- /**
- * Constructs a new string variable manager.
- */
- private StringVariableManager() {
- fListeners = new ListenerList();
- }
-
- /**
- * Load contributed variables and persisted variables
- */
- private synchronized void initialize() {
- if (fDynamicVariables == null) {
- fInternalChange = true;
- fDynamicVariables = new HashMap(5);
- fValueVariables = new HashMap(5);
- loadContributedValueVariables();
- loadPersistedValueVariables();
- loadDynamicVariables();
- new InstanceScope().getNode(VariablesPlugin.PI_CORE_VARIABLES).addPreferenceChangeListener(this);
- fInternalChange = false;
- }
- }
-
- /**
- * Loads contributed dynamic variables
- */
- private void loadDynamicVariables() {
- IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(VariablesPlugin.PI_CORE_VARIABLES, EXTENSION_POINT_DYNAMIC_VARIABLES);
- IConfigurationElement elements[]= point.getConfigurationElements();
- for (int i = 0; i < elements.length; i++) {
- IConfigurationElement element = elements[i];
- String name= element.getAttribute(ATTR_NAME);
- if (name == null) {
- VariablesPlugin.logMessage(NLS.bind("Variable extension missing required 'name' attribute: {0}", new String[] {element.getDeclaringExtension().getLabel()}), null); //$NON-NLS-1$
- continue;
- }
- String description= element.getAttribute(ATTR_DESCRIPTION);
- DynamicVariable variable= new DynamicVariable(name, description, element);
- Object old = fDynamicVariables.put(variable.getName(), variable);
- if (old != null) {
- DynamicVariable oldVariable = (DynamicVariable)old;
- VariablesPlugin.logMessage(NLS.bind("Dynamic variable extension from bundle ''{0}'' overrides existing extension variable ''{1}'' from bundle ''{2}''", //$NON-NLS-1$
- new String[] {element.getDeclaringExtension().getContributor().getName(),oldVariable.getName(),
- oldVariable.getConfigurationElement().getDeclaringExtension().getContributor().getName()}), null);
- }
- }
- }
-
- /**
- * Loads contributed value variables. This is done before loading persisted values.
- */
- private void loadContributedValueVariables() {
- IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(VariablesPlugin.PI_CORE_VARIABLES, EXTENSION_POINT_VALUE_VARIABLES);
- IConfigurationElement elements[]= point.getConfigurationElements();
- for (int i = 0; i < elements.length; i++) {
- IConfigurationElement element = elements[i];
- String name= element.getAttribute(ATTR_NAME);
- if (name == null) {
- VariablesPlugin.logMessage(NLS.bind("Variable extension missing required 'name' attribute: {0}", new String[] {element.getDeclaringExtension().getLabel()}), null); //$NON-NLS-1$
- continue;
- }
- String description= element.getAttribute(ATTR_DESCRIPTION);
- boolean isReadOnly = TRUE_VALUE.equals(element.getAttribute(ATTR_READ_ONLY));
-
- IValueVariable variable = new ContributedValueVariable(name, description, isReadOnly, element);
- Object old = fValueVariables.put(name, variable);
- if (old != null) {
- StringVariable oldVariable = (StringVariable)old;
- VariablesPlugin.logMessage(NLS.bind("Contributed variable extension from bundle ''{0}'' overrides existing extension variable ''{1}'' from bundle ''{2}''", //$NON-NLS-1$
- new String[] {element.getDeclaringExtension().getContributor().getName(),oldVariable.getName(),
- oldVariable.getConfigurationElement().getDeclaringExtension().getContributor().getName()}), null);
- }
- }
- }
-
- /**
- * Loads persisted value variables from the preference store. This is done after
- * loading value variables from the extension point. If a persisted variable has the
- * same name as a extension contributed variable the variable's value will be set to
- * the persisted value unless either a) The persisted value is <code>null</code>, or
- * b) the variable is read-only.
- */
- private void loadPersistedValueVariables() {
- String variablesString = Platform.getPreferencesService().getString(VariablesPlugin.PI_CORE_VARIABLES, PREF_VALUE_VARIABLES, "", null); //$NON-NLS-1$
- if (variablesString.length() == 0) {
- return;
- }
- Element root= null;
- try {
- ByteArrayInputStream stream = new ByteArrayInputStream(variablesString.getBytes("UTF-8")); //$NON-NLS-1$
- DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- parser.setErrorHandler(new DefaultHandler());
- root = parser.parse(stream).getDocumentElement();
- } catch (Exception e) {
- VariablesPlugin.logMessage("An exception occurred while loading persisted value variables.", e); //$NON-NLS-1$
- return;
- }
- if (!root.getNodeName().equals(VALUE_VARIABLES_TAG)) {
- VariablesPlugin.logMessage("Invalid format encountered while loading persisted value variables.", null); //$NON-NLS-1$
- return;
- }
- NodeList list= root.getChildNodes();
- for (int i= 0, numItems= list.getLength(); i < numItems; i++) {
- Node node= list.item(i);
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- Element element= (Element) node;
- if (!element.getNodeName().equals(VALUE_VARIABLE_TAG)) {
- VariablesPlugin.logMessage(NLS.bind("Invalid XML element encountered while loading value variables: {0}", new String[] {node.getNodeName()}), null); //$NON-NLS-1$
- continue;
- }
- String name= element.getAttribute(NAME_TAG);
- if (name.length() > 0) {
- String value= element.getAttribute(VALUE_TAG);
- String description= element.getAttribute(DESCRIPTION_TAG);
- boolean readOnly= TRUE_VALUE.equals(element.getAttribute(READ_ONLY_TAG));
-
- IValueVariable existing = getValueVariable(name);
- if (existing == null){
- ValueVariable variable = new ValueVariable(name, description, readOnly, value);
- fValueVariables.put(name, variable);
- } else if (!existing.isReadOnly() && value != null){
- existing.setValue(value);
- }
- } else {
- VariablesPlugin.logMessage("Invalid variable entry encountered while loading value variables. Variable name is null.", null); //$NON-NLS-1$
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.stringsubstitution.IStringVariableManager#getVariables()
- */
- public synchronized IStringVariable[] getVariables() {
- initialize();
- List list = new ArrayList(fDynamicVariables.size() + fValueVariables.size());
- list.addAll(fDynamicVariables.values());
- list.addAll(fValueVariables.values());
- return (IStringVariable[]) list.toArray(new IStringVariable[list.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.stringsubstitution.IStringVariableManager#getValueVariables()
- */
- public synchronized IValueVariable[] getValueVariables() {
- initialize();
- return (IValueVariable[]) fValueVariables.values().toArray(new IValueVariable[fValueVariables.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.stringsubstitution.IStringVariableManager#getDynamicVariables()
- */
- public synchronized IDynamicVariable[] getDynamicVariables() {
- initialize();
- return (IDynamicVariable[]) fDynamicVariables.values().toArray(new IDynamicVariable[fDynamicVariables.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.stringsubstitution.IStringVariableManager#performStringSubstitution(java.lang.String)
- */
- public String performStringSubstitution(String expression) throws CoreException {
- return performStringSubstitution(expression, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.stringsubstitution.IStringVariableManager#newValueVariable(java.lang.String, java.lang.String)
- */
- public IValueVariable newValueVariable(String name, String description) {
- return newValueVariable(name, description, false, null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.variables.IStringVariableManager#newValueVariable(java.lang.String, java.lang.String, boolean, java.lang.String)
- */
- public IValueVariable newValueVariable(String name, String description, boolean readOnly, String value) {
- return new ValueVariable(name, description, readOnly, value);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.stringsubstitution.IStringVariableManager#addVariables(org.eclipse.debug.internal.core.stringsubstitution.IValueVariable[])
- */
- public synchronized void addVariables(IValueVariable[] variables) throws CoreException {
- initialize();
- MultiStatus status = new MultiStatus(VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, VariablesMessages.StringVariableManager_26, null);
- for (int i = 0; i < variables.length; i++) {
- IValueVariable variable = variables[i];
- if (getValueVariable(variable.getName()) != null) {
- status.add(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, NLS.bind(VariablesMessages.StringVariableManager_27, new String[]{variable.getName()}), null));
- }
- }
- if (status.isOK()) {
- for (int i = 0; i < variables.length; i++) {
- IValueVariable variable = variables[i];
- fValueVariables.put(variable.getName(), variable);
- }
- IValueVariable[] copy = new IValueVariable[variables.length];
- System.arraycopy(variables, 0, copy, 0, variables.length);
- getNotifier().notify(copy, ADDED);
- return;
- }
- throw new CoreException(status);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.stringsubstitution.IStringVariableManager#removeVariables(org.eclipse.debug.internal.core.stringsubstitution.IValueVariable[])
- */
- public synchronized void removeVariables(IValueVariable[] variables) {
- initialize();
- List removed = new ArrayList(variables.length);
- for (int i = 0; i < variables.length; i++) {
- IValueVariable variable = variables[i];
- if (fValueVariables.remove(variable.getName()) != null) {
- removed.add(variable);
- }
- }
- if (removed.size() > 0) {
- getNotifier().notify((IValueVariable[])removed.toArray(new IValueVariable[removed.size()]), REMOVED);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.stringsubstitution.IStringVariableManager#getDynamicVariable(java.lang.String)
- */
- public synchronized IDynamicVariable getDynamicVariable(String name) {
- initialize();
- return (IDynamicVariable) fDynamicVariables.get(name);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.stringsubstitution.IStringVariableManager#getValueVariable(java.lang.String)
- */
- public synchronized IValueVariable getValueVariable(String name) {
- initialize();
- return (IValueVariable) fValueVariables.get(name);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.stringsubstitution.IStringVariableManager#addValueVariableListener(org.eclipse.debug.internal.core.stringsubstitution.IValueVariableListener)
- */
- public void addValueVariableListener(IValueVariableListener listener) {
- fListeners.add(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.stringsubstitution.IStringVariableManager#removeValueVariableListener(org.eclipse.debug.internal.core.stringsubstitution.IValueVariableListener)
- */
- public void removeValueVariableListener(IValueVariableListener listener) {
- fListeners.remove(listener);
- }
-
- /**
- * Returns a memento representing the value variables currently registered.
- *
- * @return memento representing the value variables currently registered
- * @throws IOException if an I/O exception occurs while creating the XML.
- */
- private String getValueVariablesAsXML() throws IOException, ParserConfigurationException, TransformerException {
- IValueVariable[] variables = getValueVariables();
-
- Document document= getDocument();
- Element rootElement= document.createElement(VALUE_VARIABLES_TAG);
- document.appendChild(rootElement);
- for (int i = 0; i < variables.length; i++) {
- IValueVariable variable = variables[i];
- if (!variable.isReadOnly()){
- // don't persist read-only variables or un-initialized contributed variables
- if (!variable.isContributed() || ((ContributedValueVariable)variable).isInitialized()) {
- Element element= document.createElement(VALUE_VARIABLE_TAG);
- element.setAttribute(NAME_TAG, variable.getName());
- String value= variable.getValue();
- if (value != null) {
- element.setAttribute(VALUE_TAG, value);
- }
- element.setAttribute(READ_ONLY_TAG, variable.isReadOnly() ? TRUE_VALUE : FALSE_VALUE);
- String description= variable.getDescription();
- if (description != null) {
- element.setAttribute(DESCRIPTION_TAG, description);
- }
- rootElement.appendChild(element);
- }
- }
- }
- return serializeDocument(document);
- }
-
- private Document getDocument() throws ParserConfigurationException {
- DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
- Document doc =docBuilder.newDocument();
- return doc;
- }
-
- /**
- * Serializes a XML document into a string - encoded in UTF8 format,
- * with platform line separators.
- *
- * @param doc document to serialize
- * @return the document as a string
- * @throws TransformerException if an unrecoverable error occurs during the serialization
- * @throws IOException if the encoding attempted to be used is not supported
- */
- private String serializeDocument(Document doc) throws TransformerException, UnsupportedEncodingException {
- ByteArrayOutputStream s= new ByteArrayOutputStream();
-
- TransformerFactory factory= TransformerFactory.newInstance();
- Transformer transformer= factory.newTransformer();
- transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
- transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
-
- DOMSource source= new DOMSource(doc);
- StreamResult outputTarget= new StreamResult(s);
- transformer.transform(source, outputTarget);
-
- return s.toString("UTF8"); //$NON-NLS-1$
- }
-
- /**
- * Saves the value variables currently registered in the
- * preference store.
- */
- private synchronized void storeValueVariables() {
- String variableString= ""; //$NON-NLS-1$
- if (!fValueVariables.isEmpty()) {
- try {
- variableString= getValueVariablesAsXML();
- } catch (IOException e) {
- VariablesPlugin.log(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), IStatus.ERROR, "An exception occurred while storing launch configuration variables.", e)); //$NON-NLS-1$
- return;
- } catch (ParserConfigurationException e) {
- VariablesPlugin.log(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), IStatus.ERROR, "An exception occurred while storing launch configuration variables.", e)); //$NON-NLS-1$
- return;
- } catch (TransformerException e) {
- VariablesPlugin.log(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), IStatus.ERROR, "An exception occurred while storing launch configuration variables.", e)); //$NON-NLS-1$
- return;
- }
- }
- fInternalChange = true;
- try {
- IEclipsePreferences prefs = new InstanceScope().getNode(VariablesPlugin.PI_CORE_VARIABLES);
- prefs.put(PREF_VALUE_VARIABLES, variableString);
- prefs.flush();
- }
- catch(BackingStoreException bse) {
- VariablesPlugin.log(bse);
- }
- fInternalChange = false;
- }
-
- /**
- * Fire a change notification for the given variable.
- *
- * @param variable the variable that has changed
- */
- protected void notifyChanged(IValueVariable variable) {
- if (!fInternalChange) {
- IValueVariable existing = getValueVariable(variable.getName());
- if (variable.equals(existing)) {
- // do not do change notification for unregistered variables
- getNotifier().notify(new IValueVariable[]{variable}, CHANGED);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.stringsubstitution.IStringVariableManager#generateVariableExpression(java.lang.String, java.lang.String)
- */
- public String generateVariableExpression(String varName, String arg) {
- StringBuffer buffer = new StringBuffer();
- buffer.append("${"); //$NON-NLS-1$
- buffer.append(varName);
- if (arg != null) {
- buffer.append(":"); //$NON-NLS-1$
- buffer.append(arg);
- }
- buffer.append("}"); //$NON-NLS-1$
- return buffer.toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.stringsubstitution.IStringVariableManager#performStringSubstitution(java.lang.String, boolean)
- */
- public String performStringSubstitution(String expression, boolean reportUndefinedVariables) throws CoreException {
- return new StringSubstitutionEngine().performStringSubstitution(expression, reportUndefinedVariables, true, this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.variables.IStringVariableManager#validateStringVariables(java.lang.String)
- */
- public void validateStringVariables(String expression) throws CoreException {
- new StringSubstitutionEngine().validateStringVariables(expression, this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.variables.IStringVariableManager#getContributingPluginId(org.eclipse.core.variables.IStringVariable)
- */
- public String getContributingPluginId(IStringVariable variable) {
- if (variable instanceof StringVariable) {
- return ((StringVariable) variable).getConfigurationElement().getContributor().getName();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener#preferenceChange(org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent)
- */
- public void preferenceChange(PreferenceChangeEvent event) {
- if (PREF_VALUE_VARIABLES.equals(event.getKey())) {
- synchronized (this) {
- if (!fInternalChange) {
- fValueVariables.clear();
- loadPersistedValueVariables();
- loadContributedValueVariables();
- }
- }
- }
- }
-}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/ValueVariable.java b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/ValueVariable.java
deleted file mode 100644
index 3bac3d0..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/ValueVariable.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.variables;
-
-import org.eclipse.core.variables.IValueVariable;
-
-/**
- * Implementation of a value variable.
- */
-public class ValueVariable extends StringVariable implements IValueVariable {
-
- /**
- * Variable value or <code>null</code> if none
- */
- private String fValue;
-
- /**
- * Whether this variable is read only. If true, users cannot change the value.
- */
- private boolean fReadOnly;
-
- /**
- * Constructs a new value variable with the given name, description, read only
- * property and string value. Value can be null.
- *
- * @param name variable name
- * @param description variable description or <code>null</code>
- * @param readOnly whether the variable should be a read only variable
- * @param value the initial value of the variable or <code>null</code>
- */
- public ValueVariable(String name, String description, boolean readOnly, String value) {
- super(name, description, null);
- fReadOnly = readOnly;
- fValue = value;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.variables.IValueVariable#setValue(java.lang.String)
- */
- public void setValue(String value) {
- if (!isReadOnly()){
- fValue = value;
- StringVariableManager.getDefault().notifyChanged(this);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.variables.IValueVariable#getValue()
- */
- public String getValue() {
- return fValue;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.variables.IValueVariable#isReadOnly()
- */
- public boolean isReadOnly() {
- return fReadOnly;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.variables.IValueVariable#isContributed()
- */
- public boolean isContributed() {
- return false;
- }
-
-}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/VariablesMessages.java b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/VariablesMessages.java
deleted file mode 100644
index d6afcfd..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/VariablesMessages.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.core.internal.variables;
-
-import org.eclipse.osgi.util.NLS;
-
-public class VariablesMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.core.internal.variables.VariablesMessages";//$NON-NLS-1$
-
- public static String StringSubstitutionEngine_3;
- public static String StringSubstitutionEngine_4;
-
- public static String StringVariableManager_26;
- public static String StringVariableManager_27;
-
- public static String DynamicVariable_0;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, VariablesMessages.class);
- }
-}
\ No newline at end of file
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/VariablesMessages.properties b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/VariablesMessages.properties
deleted file mode 100644
index 945dbd3..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/VariablesMessages.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-StringSubstitutionEngine_3=Reference to undefined variable {0}
-StringSubstitutionEngine_4=Variable {0} does not accept arguments
-
-StringVariableManager_26=Variables with the specified names are already registered.
-StringVariableManager_27=Variable named {0} already registered
-
-DynamicVariable_0=Unsupported argument {0} specified for variable {1}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/variables/IDynamicVariable.java b/org.eclipse.core.variables/src/org/eclipse/core/variables/IDynamicVariable.java
deleted file mode 100644
index b81fff7..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/variables/IDynamicVariable.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.variables;
-
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * A dynamic variable is a variable whose value is computed dynamically
- * by a resolver at the time a string substitution is performed. A dynamic
- * variable is contributed by an extension.
- * <p>
- * The following is a definition of a dynamic variable that resolves to the name of the selected resource:
- * <pre>
- * <extension point="org.eclipse.core.variables.dynamicVariables">
- * <variable
- * name="resource_name"
- * resolver="com.example.ResourceNameResolver"
- * description="The name of the selected resource"
- * supportsArgument="false">
- * </variable>
- * </extension>
- * </pre>
- * </p>
- * <p>
- * Clients contributing a dynamic variable provide an implementation of
- * {@link org.eclipse.core.variables.IDynamicVariableResolver}.
- * </p>
- * @since 3.0
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IDynamicVariable extends IStringVariable {
-
- /**
- * Returns the value of this variable when referenced with the given
- * argument, possibly <code>null</code>.
- *
- * @param argument argument present in variable expression or <code>null</code>
- * if none
- * @return value of this variable when referenced with the given argument, possibly
- * <code>null</code>
- * @throws CoreException if unable to resolve a value for this variable
- */
- public String getValue(String argument) throws CoreException;
-
- /**
- * Returns whether this variable supports an argument, as specified
- * by this variable's extension definition in plug-in XML.
- *
- * @return whether this variable supports an argument
- */
- public boolean supportsArgument();
-}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/variables/IDynamicVariableResolver.java b/org.eclipse.core.variables/src/org/eclipse/core/variables/IDynamicVariableResolver.java
deleted file mode 100644
index b5cefaa..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/variables/IDynamicVariableResolver.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.variables;
-
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * Resolves the value for a dynamic variable. A dynamic variable extension
- * contributes a resolver which must implement this interface.
- * <p>
- * Clients contributing a dynamic variable are intended to provide an implementation
- * of this interface.
- * </p>
- * @since 3.0
- */
-public interface IDynamicVariableResolver {
-
- /**
- * Resolves and returns a value for the specified variable when referenced
- * with the given argument, possibly <code>null</code>
- *
- * @param variable variable to resolve a value for
- * @param argument argument present in expression or <code>null</code> if none
- * @return variable value, possibly <code>null</code>
- * @throws CoreException if unable to resolve a value for the given variable
- */
- public String resolveValue(IDynamicVariable variable, String argument) throws CoreException;
-}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/variables/IStringVariable.java b/org.eclipse.core.variables/src/org/eclipse/core/variables/IStringVariable.java
deleted file mode 100644
index 70c3e25..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/variables/IStringVariable.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.variables;
-
-
-/**
- * A variable that can be referenced in an expression, which resolves to a string
- * value. Variables are referenced in expressions via their name, in the following
- * format.
- * <pre>
- * ${varname} or ${varname:argument}
- * </pre>
- * <p>
- * A variable is identified by its name, and optionally accepts an argument. When an
- * argument is present, a colon separates the variable name from its argument.
- * </p>
- * <p>
- * Variables can be contributed by extensions or programmatically. There are two
- * kinds of variables.
- * <ul>
- * <li><code>IValueVariable</code> - variables that have a value (with getter and setter), and
- * accept no arguments. The value of this type of variable is resolved at the time
- * its value is set via its setter API.</li>
- * <li><code>IDynamicVariable</code> - variables whose value is resolved at the time
- * a string substitution is performed by a contributed resolver. Dynamic variables
- * may accept an argument.</li>
- * </ul>
- * </p>
- * @since 3.0
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IStringVariable {
-
- /**
- * Returns the name of this variable. A variable is uniquely identified by
- * its name.
- *
- * @return variable name
- */
- public String getName();
-
- /**
- * Returns a human readable description of this variable, possibly <code>null</code>
- *
- * @return a description of this variable, or <code>null</code> if none
- */
- public String getDescription();
-
-}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/variables/IStringVariableManager.java b/org.eclipse.core.variables/src/org/eclipse/core/variables/IStringVariableManager.java
deleted file mode 100644
index e3502e9..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/variables/IStringVariableManager.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.variables;
-
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * Registry for string variables.
- * @since 3.0
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IStringVariableManager {
-
- /**
- * Simple identifier constant (value <code>"dynamicVariables"</code>) for the
- * dynamic variables extension point.
- */
- public static final String EXTENSION_POINT_DYNAMIC_VARIABLES = "dynamicVariables"; //$NON-NLS-1$
-
- /**
- * Simple identifier constant (value <code>"valueVariables"</code>) for the
- * value variables extension point.
- */
- public static final String EXTENSION_POINT_VALUE_VARIABLES = "valueVariables"; //$NON-NLS-1$
-
- /**
- * Returns all registered variables.
- *
- * @return a collection of all registered variables
- */
- public IStringVariable[] getVariables();
-
- /**
- * Returns all registered value variables.
- *
- * @return a collection of all registered value variables
- */
- public IValueVariable[] getValueVariables();
-
- /**
- * Returns the value variable with the given name, or <code>null</code>
- * if none.
- *
- * @param name variable name
- * @return the value variable with the given name, or <code>null</code>
- * if none
- */
- public IValueVariable getValueVariable(String name);
-
- /**
- * Returns all registered dynamic variables.
- *
- * @return a collection of all registered dynamic variables
- */
- public IDynamicVariable[] getDynamicVariables();
-
- /**
- * Returns the dynamic variable with the given name or <code>null</code>
- * if none.
- *
- * @param name variable name
- * @return the dynamic variable with the given name or <code>null</code>
- * if none
- */
- public IDynamicVariable getDynamicVariable(String name);
-
- /**
- * Returns the plug-in identifier of the plug-in that contributed the
- * given variable via extension or <code>null</code> if the given
- * variable wasn't contributed via extension.
- *
- * @param variable the variable
- * @return the plug-in identifier of the plug-in that contributed the
- * given variable or <code>null</code>
- * @since 3.1
- */
- public String getContributingPluginId(IStringVariable variable);
-
- /**
- * Recursively resolves and replaces all variable references in the given
- * expression with their corresponding values. Reports errors for references
- * to undefined variables (equivalent to calling
- * <code>performStringSubstitution(expression, true)</code>).
- *
- * @param expression expression referencing variables
- * @return expression with variable references replaced with variable values
- * @throws CoreException if unable to resolve the value of one or more variables
- */
- public String performStringSubstitution(String expression) throws CoreException;
-
- /**
- * Recursively resolves and replaces all variable references in the given
- * expression with their corresponding values. Allows the client to control
- * whether references to undefined variables are reported as an error (i.e.
- * an exception is thrown).
- *
- * @param expression expression referencing variables
- * @param reportUndefinedVariables whether a reference to an undefined variable
- * is to be considered an error (i.e. throw an exception)
- * @return expression with variable references replaced with variable values
- * @throws CoreException if unable to resolve the value of one or more variables
- */
- public String performStringSubstitution(String expression, boolean reportUndefinedVariables) throws CoreException;
-
- /**
- * Validates variables references in the given expression and reports errors
- * for references to undefined variables.
- *
- * @param expression expression referencing variables
- * @throws CoreException if one or more referenced variables do not exist
- */
- public void validateStringVariables(String expression) throws CoreException;
-
- /**
- * Returns a new read-write value variable with the given name and description
- * with a <code>null</code> value.
- *
- * @param name variable name, cannot be <code>null</code>
- * @param description variable description, possibly <code>null</code>
- * @return a new value variable
- */
- public IValueVariable newValueVariable(String name, String description);
-
- /**
- * Returns a new value variable with the given properties.
- *
- * @param name variable name, cannot be <code>null</code>
- * @param description variable description, possibly <code>null</code>
- * @param readOnly whether this variable is to be a read only variable
- * @param value the string value to initialize this variable to - should
- * not be <code>null</code> for read-only variables
- * @return a new value variable
- * @since 3.3
- */
- public IValueVariable newValueVariable(String name, String description, boolean readOnly, String value);
-
- /**
- * Adds the given variables to the variable registry.
- *
- * @param variables the variables to add
- * @throws CoreException if one or more variables to add has a name collision with
- * an existing variable
- */
- public void addVariables(IValueVariable[] variables) throws CoreException;
-
- /**
- * Removes the given variables from the registry. Has no effect for unregistered
- * variables.
- *
- * @param variables variables to remove
- */
- public void removeVariables(IValueVariable[] variables);
-
- /**
- * Registers the given listener for value variable notifications. Has no effect
- * if an identical listener is already registered.
- *
- * @param listener value variable listener to add
- */
- public void addValueVariableListener(IValueVariableListener listener);
-
- /**
- * Removes the given listener from the list of registered value variable
- * listeners. Has no effect if an identical listener is not already registered.
- *
- * @param listener value variable listener to remove
- */
- public void removeValueVariableListener(IValueVariableListener listener);
-
- /**
- * Convenience method that returns an expression referencing the given
- * variable and optional argument. For example, calling the method with
- * a <code>varName</code> of <code>my_var</code> and an <code>argument</code>
- * of <code>my_arg</code> results in the string <code>$(my_var:my_arg}</code>.
- *
- * @param varName variable name
- * @param arg argument text or <code>null</code>
- * @return an expression referencing the given variable and
- * optional argument
- */
- public String generateVariableExpression(String varName, String arg);
-
-}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/variables/IValueVariable.java b/org.eclipse.core.variables/src/org/eclipse/core/variables/IValueVariable.java
deleted file mode 100644
index 4b25138..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/variables/IValueVariable.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.variables;
-
-/**
- * A variable with a value that can be set and retrieved. The context in which
- * a value variable is referenced does not effect the value of the variable.
- * A value variable can be contributed by an extension or created programmatically.
- * A contributor may optionally specify an initial value for a variable, or
- * provide a delegate that will initialize the variable with a value.
- * <p>
- * Since 3.3, a variable can be specified as a "read only" preventing users from changing
- * the value after it has been initialized. Furthermore, a read only variable that is
- * contributed by an extension will always load the value from the extension.
- * </p>
- * <p>
- * Example of a value variable contribution with an initial value, the specified
- * variable is created with the initial value "/usr/local/foo".
- * <pre>
- * <extension point="org.eclipse.core.variables.valueVariables">
- * <variable
- * name="FOO_HOME"
- * initialValue="/usr/local/foo">
- * </variable>
- * </extension>
- * </pre>
- * </p>
- * <p>
- * Example of a value variable contribution with an initializer class, the class
- * "com.example.FooLocator" will be used to initialize the value the first time
- * it's requested.
- * <pre>
- * <extension point="org.eclipse.core.variables.valueVariables">
- * <variable
- * name="FOO_HOME"
- * initializerClass="com.example.FooLocator">
- * </variable>
- * </extension>
- * </pre>
- * </p>
- * @since 3.0
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IValueVariable extends IStringVariable {
-
- /**
- * Sets the value of this variable to the given value.
- * Since 3.3, this has no effect if this variable is read only.
- *
- * @param value variable value
- */
- public void setValue(String value);
-
- /**
- * Returns the value of this variable, or <code>null</code> if none.
- *
- * @return the value of this variable, or <code>null</code> if none
- */
- public String getValue();
-
- /**
- * Returns whether this variable was contributed by an extension.
- *
- * @return whether this variable was contributed by an extension
- */
- public boolean isContributed();
-
- /**
- * Returns whether this variable is read only.
- *
- * @return whether this variable is read only
- * @since 3.3
- */
- public boolean isReadOnly();
-
- /**
- * Sets the description of this variable to the given value.
- *
- * @param description variable description, possibly <code>null</code>
- */
- public void setDescription(String description);
-
-}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/variables/IValueVariableInitializer.java b/org.eclipse.core.variables/src/org/eclipse/core/variables/IValueVariableInitializer.java
deleted file mode 100644
index 035a907..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/variables/IValueVariableInitializer.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.variables;
-
-/**
- * Value variable initializers compute an initial value for a value
- * variable contributed by an extension, which is not defined with an initial
- * value. This provides a mechanism for programmatically computing the initial
- * value of a value variable.
- * <p>
- * Clients may implement this interface.
- * </p>
- * @since 3.0
- */
-public interface IValueVariableInitializer {
- /**
- * Initializes the specified variable.
- *
- * @param variable variable to initialize
- */
- public void initialize(IValueVariable variable);
-}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/variables/IValueVariableListener.java b/org.eclipse.core.variables/src/org/eclipse/core/variables/IValueVariableListener.java
deleted file mode 100644
index 37dac25..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/variables/IValueVariableListener.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.variables;
-
-/**
- * A string variable listener is notified of variables as they are added
- * and removed from the string variable manager. As well, listeners are
- * notified when a value variable changes value.
- * <p>
- * Clients may implement this interface.
- * </p>
- * @since 3.0
- */
-public interface IValueVariableListener {
-
- /**
- * Notification the given variables have been added to the variable
- * manager.
- *
- * @param variables added variables
- */
- public void variablesAdded(IValueVariable[] variables);
-
- /**
- * Notification the given variables have been removed from the variable
- * manager.
- *
- * @param variables removed variables
- */
- public void variablesRemoved(IValueVariable[] variables);
-
- /**
- * Notification the given variables have been changed value.
- *
- * @param variables changed variables
- */
- public void variablesChanged(IValueVariable[] variables);
-
-}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/variables/VariablesPlugin.java b/org.eclipse.core.variables/src/org/eclipse/core/variables/VariablesPlugin.java
deleted file mode 100644
index 4fa1b74..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/variables/VariablesPlugin.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.core.variables;
-
-import org.eclipse.core.internal.variables.StringVariableManager;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-
-/**
- * The plug-in runtime class for the Core Variables plug-in.
- * @since 3.0
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class VariablesPlugin extends Plugin {
-
- /**
- * Status code indicating an unexpected internal error.
- */
- public static final int INTERNAL_ERROR = 120;
-
- /**
- * Status code indicating a variable reference cycle error.
- */
- public static final int REFERENCE_CYCLE_ERROR = 130;
-
- /**
- * The single instance of this plug-in runtime class.
- */
- private static VariablesPlugin plugin;
-
- /**
- * Unique identifier constant (value <code>"org.eclipse.core.variables"</code>)
- * for the Core Variables plug-in.
- */
- public static final String PI_CORE_VARIABLES = "org.eclipse.core.variables"; //$NON-NLS-1$
-
-
- /**
- * Constructs an instance of this plug-in runtime class.
- * <p>
- * An instance of this plug-in runtime class is automatically created
- * when the facilities provided by the Variables plug-in are required.
- * <b>Clients must never explicitly instantiate a plug-in runtime class.</b>
- * </p>
- */
- public VariablesPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns this plug-in instance.
- *
- * @return the single instance of this plug-in runtime class
- */
- public static VariablesPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Logs the specified throwable with this plug-in's log.
- *
- * @param t throwable to log
- */
- public static void log(Throwable t) {
- log(new Status(IStatus.ERROR, PI_CORE_VARIABLES, INTERNAL_ERROR, "Error logged from Core Variables: ", t)); //$NON-NLS-1$
- }
-
- /**
- * Logs the given message with this plug-in's log and the given
- * throwable or <code>null</code> if none.
- * @param message the message to log
- * @param throwable the exception that occurred or <code>null</code> if none
- */
- public static void logMessage(String message, Throwable throwable) {
- log(new Status(IStatus.ERROR, getUniqueIdentifier(), INTERNAL_ERROR, message, throwable));
- }
-
- /**
- * Logs the specified status with this plug-in's log.
- *
- * @param status status to log
- */
- public static void log(IStatus status) {
- getDefault().getLog().log(status);
- }
-
- /**
- * Convenience method which returns the unique identifier of this plug-in.
- */
- public static String getUniqueIdentifier() {
- return PI_CORE_VARIABLES;
- }
-
- /**
- * Returns the string variable manager.
- *
- * @return the string variable manager
- */
- public IStringVariableManager getStringVariableManager() {
- return StringVariableManager.getDefault();
- }
-}
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/variables/package.html b/org.eclipse.core.variables/src/org/eclipse/core/variables/package.html
deleted file mode 100644
index 0d27de0..0000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/variables/package.html
+++ /dev/null
@@ -1,45 +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 Platform</title>
-</head>
-
-<body bgcolor="#FFFFFF">
-
-<p>Provides support for defining and contributing variables for the purpose of
- string substitution.</p>
-
-<h2>Package Specification</h2>
-
-<p>This package provides classes and interfaces to support the definition and
- contribution of variables for the purpose of string substitution. The plug-in
- supports the recursive replacement of variables referenced by name in arbitrary
- strings with the value of the variable. Two types of variables are provided
- - value variables (<code>IValueVariable</code>) and dynamic variables (<code>IDynamicVariable</code>).
- A value variable has a simple setter and getter for its current value. A dynamic
- variable has an associated resolver that provides a variable's value each time
- it is referenced (replaced) in a string substitution. A dynamic variable may
- also provide an argument in its reference that can be used by its resolver to
- determine its substitution value.</p>
-<p>A variable manager (<code>IStringVariableManager</code>) is provided to manage
- the set of defined variables. Value variables may be created via API on the
- variable manager, or contributed via the <code>valueVariables</code> extension
- point. Dynamic variables must be contributed via the <code>dynamicVariables</code>
- extension point. The variable manager also provides change notification for
- value variables. The variable manager also provides an API for performing string
- substitution, which accepts a string, and returns a string with all variable
- references replaced by associated variable values.</p>
-<p>Variables are referenced in strings by enclosing them in braces, preceded with
- a dollar sign. For example, consider a variable defined with the name <code>foo</code>,
- and referenced in the following string: <code>"abc${foo}ghi"</code>.
- If the value of <code>foo</code> is <code>"def"</code>, the result
- of a string substitution would be <code>"abcdefghi"</code>. In the
- case of a dynamic variable, an (optional) argument is supplied by appending
- a colon and argument value after the variable name. For example <code>"${foo:bar}"</code>.
- In this case, the resolver associated with <code>foo</code> would be provided
- with the referenced argument (<code>bar</code>) when asked to resolve a value
- for the variable <code>foo</code>. </p>
-</body>
-</html>
diff --git a/org.eclipse.debug.examples.core/.classpath b/org.eclipse.debug.examples.core/.classpath
deleted file mode 100644
index 9f8cf0e..0000000
--- a/org.eclipse.debug.examples.core/.classpath
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="src_ant"/>
- <classpathentry kind="src" path="pdavm/src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.debug.examples.core/.cvsignore b/org.eclipse.debug.examples.core/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/org.eclipse.debug.examples.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/org.eclipse.debug.examples.core/.project b/org.eclipse.debug.examples.core/.project
deleted file mode 100644
index b1f1fe3..0000000
--- a/org.eclipse.debug.examples.core/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.debug.examples.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.debug.examples.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.debug.examples.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index d6de6c1..0000000
--- a/org.eclipse.debug.examples.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,47 +0,0 @@
-#Mon Jan 24 20:23:34 CST 2005
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/org.eclipse.debug.examples.core/META-INF/MANIFEST.MF b/org.eclipse.debug.examples.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 7e1ec2a..0000000
--- a/org.eclipse.debug.examples.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Example Debug Core Plug-in
-Bundle-SymbolicName: org.eclipse.debug.examples.core;singleton:=true
-Bundle-Version: 1.2.0
-Bundle-Activator: org.eclipse.debug.examples.core.pda.DebugCorePlugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.core.variables,
- org.eclipse.debug.core,
- org.apache.ant;bundle-version="1.7.0";resolution:=optional
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.debug.examples.core.midi.launcher,
- org.eclipse.debug.examples.core.pda,
- org.eclipse.debug.examples.core.pda.breakpoints,
- org.eclipse.debug.examples.core.pda.launcher,
- org.eclipse.debug.examples.core.pda.model,
- org.eclipse.debug.examples.core.pda.protocol,
- org.eclipse.debug.examples.core.pda.sourcelookup
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.debug.examples.core/about.html b/org.eclipse.debug.examples.core/about.html
deleted file mode 100644
index 4602330..0000000
--- a/org.eclipse.debug.examples.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.debug.examples.core/build.properties b/org.eclipse.debug.examples.core/build.properties
deleted file mode 100644
index f50444b..0000000
--- a/org.eclipse.debug.examples.core/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- pdavm/,\
- META-INF/,\
- about.html,\
- .,\
- readme.html,\
- samples/
-src.includes = about.html,\
- src/
diff --git a/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java b/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java
deleted file mode 100644
index e140e10..0000000
--- a/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java
+++ /dev/null
@@ -1,1427 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Bjorn Freeman-Benson - initial API and implementation
- * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
- *******************************************************************************/
-package org.eclipse.debug.examples.pdavm;
-
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.io.StringWriter;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-import java.util.TreeSet;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Push Down Automata interpreter.
- *
- * @since 3.5
- */
-public class PDAVirtualMachine {
-
- static class Stack extends LinkedList {
- private static final long serialVersionUID = 1L;
-
- public Object pop() {
- return isEmpty() ? new Integer(0) : remove(size() - 1);
- }
-
- public void push(Object value) {
- add(value);
- }
- }
-
- static class Register {
- Register(String name) {
- fName = name;
- }
- String fName;
- String fGroup = "<no_group>";
- boolean fIsWriteable = true;
- Map fBitFields = new LinkedHashMap(0);
- int fValue;
- }
-
- static class BitField {
- BitField(String name) {
- fName = name;
- }
- String fName;
- int fBitOffset;
- int fBitCount;
- Map fMnemonics = new LinkedHashMap(0);
- }
-
- Map fRegisters = new LinkedHashMap(0);
-
- class Args {
- final String[] fArgs;
-
- int next = 0;
-
- Args(String[] args) {
- fArgs = args;
- }
-
- boolean hasNextArg() {
- return fArgs.length > next;
- }
-
- String getNextStringArg() {
- if (fArgs.length > next) {
- return fArgs[next++];
- }
- return "";
- }
-
- int getNextIntArg() {
- String arg = getNextStringArg();
- try {
- return Integer.parseInt(arg);
- } catch (NumberFormatException e) {
- }
- return 0;
- }
-
- boolean getNextBooleanArg() {
- String arg = getNextStringArg();
- try {
- return Boolean.getBoolean(arg);
- } catch (NumberFormatException e) {
- }
- return false;
- }
-
- Object getNextIntOrStringArg() {
- String arg = getNextStringArg();
- try {
- return new Integer(arg);
- } catch (NumberFormatException e) {
- }
- return arg;
- }
-
- PDAThread getThreadArg() {
- int id = getNextIntArg();
- return (PDAThread)fThreads.get( new Integer(id) );
- }
- }
-
- class PDAThread {
- final int fID;
-
- /** The push down automata data stack (the data stack). */
- final Stack fStack = new Stack();
-
- /**
- * PDAThread copy of the code. It can differ from the program if
- * performing an evaluation.
- */
- String[] fThreadCode;
-
- /** PDAThread copy of the labels. */
- Map fThreadLabels;
-
- /** The stack of stack frames (the control stack) */
- final List fFrames = new LinkedList();
-
- /** Current stack frame (not includced in fFrames) */
- Frame fCurrentFrame;
-
- /**
- * The run flag is true if the thread is running. If the run flag is
- * false, the thread exits the next time the main instruction loop runs.
- */
- boolean fRun = true;
-
- String fSuspend = null;
-
- boolean fStep = false;
-
- boolean fStepReturn = false;
-
- int fSavedPC;
-
- boolean fPerformingEval = false;
-
- PDAThread(int id, String function, int pc) {
- fID = id;
- fCurrentFrame = new Frame(function, pc);
- fThreadCode = fCode;
- fThreadLabels = fLabels;
- }
- }
-
- final Map fThreads = new LinkedHashMap();
-
- int fNextThreadId = 1;
-
- boolean fStarted = true;
- /**
- * The code is stored as an array of strings, each line of the source file
- * being one entry in the array.
- */
- final String[] fCode;
-
- /** A mapping of labels to indicies in the code array */
- final Map fLabels;
-
- /** Each stack frame is a mapping of variable names to values. */
- class Frame {
- final Map fLocalVariables = new LinkedHashMap();
-
- /**
- * The name of the function in this frame
- */
- final String fFunction;
-
- /**
- * The current program counter in the frame the pc points to the next
- * instruction to be executed
- */
- int fPC;
-
- Frame(String function, int pc) {
- fFunction = function;
- fPC = pc;
- }
-
- void set(String name, Object value) {
- if (name.startsWith("$")) {
- setRegisterValue(name, value);
- } else {
- fLocalVariables.put(name, value);
- }
- }
-
- Object get(String name) {
- if (name.startsWith("$")) {
- return getRegisterValue(name);
- } else {
- return fLocalVariables.get(name);
- }
- }
- }
-
- void setRegisterValue(String name, Object value) {
- Register reg = (Register)fRegisters.get(getRegisterPartOfName(name));
- if (reg == null) return;
- String bitFieldName = getBitFieldPartOfName(name);
- if (bitFieldName != null) {
- BitField bitField = (BitField)reg.fBitFields.get(bitFieldName);
- if (bitField == null) return;
- Integer intValue = null;
- if (value instanceof Integer) {
- intValue = (Integer)value;
- } else if (value instanceof String) {
- intValue = (Integer)bitField.fMnemonics.get(value);
- }
- if (intValue != null) {
- int bitFieldMask = 2^(bitField.fBitCount - 1);
- int registerMask = ~(bitFieldMask << bitField.fBitOffset);
- int bitFieldValue = intValue.intValue() & bitFieldMask;
- reg.fValue = (reg.fValue & registerMask) | (bitFieldValue << bitField.fBitOffset);
- }
- } else if (value instanceof Integer) {
- reg.fValue = ((Integer)value).intValue();
- }
- }
-
- Object getRegisterValue(String name) {
- Register reg = (Register)fRegisters.get(getRegisterPartOfName(name));
- if (reg == null) return null;
- String bitFieldName = getBitFieldPartOfName(name);
- if (bitFieldName != null) {
- BitField bitField = (BitField)reg.fBitFields.get(bitFieldName);
- if (bitField == null) return null;
- int bitFieldMask = 2^(bitField.fBitCount - 1);
- int registerMask = bitFieldMask << bitField.fBitOffset;
- return new Integer( (reg.fValue & registerMask) >> bitField.fBitOffset );
- } else {
- return new Integer(reg.fValue);
- }
- }
-
- /**
- * Breakpoints are stored per each each line of code. The boolean indicates
- * whether the whole VM should suspend or just the triggering thread.
- */
- final Map fBreakpoints = new HashMap();
-
- /**
- * The suspend flag is true if the VM should suspend running the program and
- * just listen for debug commands.
- */
- String fSuspendVM;
-
- /** Flag indicating whether the debugger is performing a step. */
- boolean fStepVM = false;
-
- /** Flag indicating whether the debugger is performing a step return */
- boolean fStepReturnVM = false;
-
- int fSteppingThread = 0;
-
- /** Name of the pda program being debugged */
- final String fFilename;
-
- /** The command line argument to start a debug session. */
- final boolean fDebug;
-
- /** The port to listen for debug commands on */
- final int fCommandPort;
-
- /**
- * Command socket for receiving debug commands and sending command responses
- */
- Socket fCommandSocket;
-
- /** Command socket reader */
- BufferedReader fCommandReceiveStream;
-
- /** Command socket write stream. */
- OutputStream fCommandResponseStream;
-
- /** The port to send debug events to */
- final int fEventPort;
-
- /** Event socket */
- Socket fEventSocket;
-
- /** Event socket and write stream. */
- OutputStream fEventStream;
-
- /** The eventstops table holds which events cause suspends and which do not. */
- final Map fEventStops = new HashMap();
- {
- fEventStops.put("unimpinstr", Boolean.FALSE);
- fEventStops.put("nosuchlabel", Boolean.FALSE);
- }
-
- /**
- * The watchpoints table holds watchpoint information.
- * <p/>
- * variablename_stackframedepth => N
- * <ul>
- * <li>N = 0 is no watch</li>
- * <li>N = 1 is read watch</li>
- * <li>N = 2 is write watch</li>
- * <li>N = 3 is both, etc.</li>
- */
- final Map fWatchpoints = new HashMap();
-
- public static void main(String[] args) {
- String programFile = args.length >= 1 ? args[0] : null;
- if (programFile == null) {
- System.err.println("Error: No program specified");
- return;
- }
-
- String debugFlag = args.length >= 2 ? args[1] : "";
- boolean debug = "-debug".equals(debugFlag);
- int commandPort = 0;
- int eventPort = 0;
-
- if (debug) {
- String commandPortStr = args.length >= 3 ? args[2] : "";
- try {
- commandPort = Integer.parseInt(commandPortStr);
- } catch (NumberFormatException e) {
- System.err.println("Error: Invalid command port");
- return;
- }
-
- String eventPortStr = args.length >= 4 ? args[3] : "";
- try {
- eventPort = Integer.parseInt(eventPortStr);
- } catch (NumberFormatException e) {
- System.err.println("Error: Invalid event port");
- return;
- }
- }
-
- PDAVirtualMachine pdaVM = null;
- try {
- pdaVM = new PDAVirtualMachine(programFile, debug, commandPort, eventPort);
- pdaVM.startDebugger();
- } catch (IOException e) {
- System.err.println("Error: " + e.toString());
- return;
- }
- pdaVM.run();
- }
-
- PDAVirtualMachine(String inputFile, boolean debug, int commandPort, int eventPort) throws IOException {
- fFilename = inputFile;
-
- // Load all the code into memory
- FileReader fileReader = new FileReader(inputFile);
- StringWriter stringWriter = new StringWriter();
- List code = new LinkedList();
- int c = fileReader.read();
- while (c != -1) {
- if (c == '\n') {
- code.add(stringWriter.toString().trim());
- stringWriter = new StringWriter();
- } else {
- stringWriter.write(c);
- }
- c = fileReader.read();
- }
- code.add(stringWriter.toString().trim());
- fCode = (String[])code.toArray(new String[code.size()]);
-
- fLabels = mapLabels(fCode);
-
- fDebug = debug;
- fCommandPort = commandPort;
- fEventPort = eventPort;
- }
-
- /**
- * Initializes the labels map
- */
- Map mapLabels(String[] code) {
- Map labels = new HashMap();
- for (int i = 0; i < code.length; i++) {
- if (code[i].length() != 0 && code[i].charAt(0) == ':') {
- labels.put(code[i].substring(1), new Integer(i));
- }
- }
- return labels;
- }
-
- void sendCommandResponse(String response) {
- try {
- fCommandResponseStream.write(response.getBytes());
- fCommandResponseStream.flush();
- } catch (IOException e) {
- }
- }
-
- void sendDebugEvent(String event, boolean error) {
- if (fDebug) {
- try {
- fEventStream.write(event.getBytes());
- fEventStream.write('\n');
- fEventStream.flush();
- } catch (IOException e) {
- System.err.println("Error: " + e);
- System.exit(1);
- }
- } else if (error) {
- System.err.println("Error: " + event);
- }
- }
-
- void startDebugger() throws IOException {
- if (fDebug) {
- System.out.println("-debug " + fCommandPort + " " + fEventPort);
- }
-
- ServerSocket commandServerSocket = new ServerSocket(fCommandPort);
- fCommandSocket = commandServerSocket.accept();
- fCommandReceiveStream = new BufferedReader(new InputStreamReader(fCommandSocket.getInputStream()));
- fCommandResponseStream = new PrintStream(fCommandSocket.getOutputStream());
- commandServerSocket.close();
-
- ServerSocket eventServerSocket = new ServerSocket(fEventPort);
- fEventSocket = eventServerSocket.accept();
- fEventStream = new PrintStream(fEventSocket.getOutputStream());
- eventServerSocket.close();
-
- System.out.println("debug connection accepted");
-
- fSuspendVM = "client";
- }
-
- void run() {
- int id = fNextThreadId++;
- sendDebugEvent("vmstarted", false);
- fThreads.put(new Integer(id), new PDAThread(id, "main", 0));
- if (fDebug) {
- sendDebugEvent("started " + id, false);
- }
-
- boolean allThreadsSuspended = false;
- while (!fThreads.isEmpty()) {
- checkForBreakpoint();
-
- if (fSuspendVM != null) {
- debugUI();
- } else {
- yieldToDebug(allThreadsSuspended);
- if (fSuspendVM != null) {
- // Received a command to suspend VM, skip executing threads.
- continue;
- }
- }
-
- PDAThread[] threadsCopy = (PDAThread[])fThreads.values().toArray(new PDAThread[fThreads.size()]);
- allThreadsSuspended = true;
- for (int i = 0; i < threadsCopy.length; i++) {
- PDAThread thread = threadsCopy[i];
- if (thread.fSuspend == null) {
- allThreadsSuspended = false;
-
- String instruction = thread.fThreadCode[thread.fCurrentFrame.fPC];
- thread.fCurrentFrame.fPC++;
- doOneInstruction(thread, instruction);
- if (thread.fCurrentFrame.fPC >= thread.fThreadCode.length) {
- // Thread reached end of code, exit from the thread.
- thread.fRun = false;
- } else if (thread.fStepReturn) {
- // If this thread is in a step-return operation, check
- // if we've returned from a call.
- instruction = thread.fThreadCode[thread.fCurrentFrame.fPC];
- if ("return".equals(instruction)) {
- // Note: this will only be triggered if the current
- // thread also has the fStepReturn flag set.
- if (fStepReturnVM) {
- fSuspendVM = thread.fID + " step";
- } else {
- thread.fSuspend = "step";
- }
- }
- }
- if (!thread.fRun) {
- sendDebugEvent("exited " + thread.fID, false);
- fThreads.remove(new Integer(thread.fID));
- } else if (thread.fSuspend != null) {
- sendDebugEvent("suspended " + thread.fID + " " + thread.fSuspend, false);
- thread.fStep = thread.fStepReturn = thread.fPerformingEval = false;
- }
- }
- }
-
- // Force thread context switch to avoid starving out other
- // processes in the system.
- Thread.yield();
- }
-
- sendDebugEvent("vmterminated", false);
- if (fDebug) {
- try {
- fCommandReceiveStream.close();
- fCommandResponseStream.close();
- fCommandSocket.close();
- fEventStream.close();
- fEventSocket.close();
- } catch (IOException e) {
- System.out.println("Error: " + e);
- }
- }
-
- }
-
- void doOneInstruction(PDAThread thread, String instr) {
- StringTokenizer tokenizer = new StringTokenizer(instr);
- String op = tokenizer.nextToken();
- List tokens = new LinkedList();
- while (tokenizer.hasMoreTokens()) {
- tokens.add(tokenizer.nextToken());
- }
- Args args = new Args( (String[])tokens.toArray(new String[tokens.size()]) );
-
- boolean opValid = true;
- if (op.equals("add")) iAdd(thread, args);
- else if (op.equals("branch_not_zero")) iBranchNotZero(thread, args);
- else if (op.equals("call")) iCall(thread, args);
- else if (op.equals("dec")) iDec(thread, args);
- else if (op.equals("def")) iDef(thread, args);
- else if (op.equals("dup")) iDup(thread, args);
- else if (op.equals("exec")) iExec(thread, args);
- else if (op.equals("halt")) iHalt(thread, args);
- else if (op.equals("output")) iOutput(thread, args);
- else if (op.equals("pop")) iPop(thread, args);
- else if (op.equals("push")) iPush(thread, args);
- else if (op.equals("return")) iReturn(thread, args);
- else if (op.equals("var")) iVar(thread, args);
- else if (op.equals("xyzzy")) iInternalEndEval(thread, args);
- else if (op.startsWith(":")) {} // label
- else if (op.startsWith("#")) {} // comment
- else {
- opValid = false;
- }
-
- if (!opValid) {
- sendDebugEvent("unimplemented instruction " + op, true);
- if ( ((Boolean)fEventStops.get("unimpinstr")).booleanValue() ) {
- fSuspendVM = thread.fID + " event unimpinstr";
- thread.fCurrentFrame.fPC--;
- }
- } else if (thread.fStep) {
- if (fStepVM) {
- fSuspendVM = thread.fID + " step";
- fStepVM = false;
- } else {
- thread.fSuspend = "step";
- }
- thread.fStep = false;
- }
- }
-
- void checkForBreakpoint() {
- if (fDebug) {
- for (Iterator itr = fThreads.values().iterator(); itr.hasNext();) {
- PDAThread thread = (PDAThread)itr.next();
- Integer pc = new Integer(thread.fCurrentFrame.fPC);
- // Suspend for breakpoint if:
- // - the VM is not yet set to suspend, for e.g. as a result of step end,
- // - the thread is not yet suspended and is not performing an evaluation
- // - the breakpoints table contains a breakpoint for the given line.
- if (fSuspendVM == null &&
- thread.fSuspend == null && !thread.fPerformingEval &&
- fBreakpoints.containsKey(pc))
- {
- if ( ((Boolean)fBreakpoints.get(pc)).booleanValue() ) {
- fSuspendVM = thread.fID + " breakpoint " + pc;
- } else {
- thread.fSuspend = "breakpoint " + pc;
- thread.fStep = thread.fStepReturn = false;
- sendDebugEvent("suspended " + thread.fID + " " + thread.fSuspend, false);
- }
- }
- }
- }
- }
-
- /**
- * After each instruction, we check the debug command channel for control input. If
- * there are commands, process them.
- */
- void yieldToDebug(boolean allThreadsSuspended) {
- if (fDebug) {
- String line = "";
- try {
- if (allThreadsSuspended || fCommandReceiveStream.ready()) {
- line = fCommandReceiveStream.readLine();
- processDebugCommand(line);
- }
- } catch (IOException e) {
- System.err.println("Error: " + e);
- System.exit(1);
- }
- }
- }
-
- /**
- * Service the debugger commands while the VM is suspended
- */
- void debugUI() {
- if (!fStarted) {
- sendDebugEvent("vmsuspended " + fSuspendVM, false);
- } else {
- fStarted = false;
- }
-
- // Clear all stepping flags. In case the VM suspended while
- // a step operation was being performed for the VM or some thread.
- fStepVM = fStepReturnVM = false;
- for (Iterator itr = fThreads.values().iterator(); itr.hasNext();) {
- PDAThread thread = (PDAThread)itr.next();
- thread.fSuspend = null;
- thread.fStep = thread.fStepReturn = thread.fPerformingEval = false;
- }
-
- while (fSuspendVM != null) {
- String line = "";
- try {
- line = fCommandReceiveStream.readLine();
- } catch (IOException e) {
- System.err.println("Error: " + e);
- System.exit(1);
- return;
- }
- processDebugCommand(line);
- }
-
- if (fStepVM || fStepReturnVM) {
- sendDebugEvent("vmresumed step", false);
- } else {
- sendDebugEvent("vmresumed client", false);
- }
- }
-
- void processDebugCommand(String line) {
- StringTokenizer tokenizer = new StringTokenizer(line.trim());
- if (line.length() == 0) {
- return;
- }
-
- String command = tokenizer.nextToken();
- List tokens = new LinkedList();
- while (tokenizer.hasMoreTokens()) {
- tokens.add(tokenizer.nextToken());
- }
- Args args = new Args( (String[])tokens.toArray(new String[tokens.size()]));
-
- if ("children".equals(command)) debugChildren(args);
- else if ("clear".equals(command)) debugClearBreakpoint(args);
- else if ("data".equals(command)) debugData(args);
- else if ("drop".equals(command)) debugDropFrame(args);
- else if ("eval".equals(command)) debugEval(args);
- else if ("eventstop".equals(command)) debugEventStop(args);
- else if ("frame".equals(command)) debugFrame(args);
- else if ("groups".equals(command)) debugGroups(args);
- else if ("popdata".equals(command)) debugPopData(args);
- else if ("pushdata".equals(command)) debugPushData(args);
- else if ("registers".equals(command)) debugRegisters(args);
- else if ("restart".equals(command)) debugRestart(args);
- else if ("resume".equals(command)) debugResume(args);
- else if ("set".equals(command)) debugSetBreakpoint(args);
- else if ("setdata".equals(command)) debugSetData(args);
- else if ("setvar".equals(command)) debugSetVariable(args);
- else if ("stack".equals(command)) debugStack(args);
- else if ("stackdepth".equals(command)) debugStackDepth(args);
- else if ("state".equals(command)) debugState(args);
- else if ("step".equals(command)) debugStep(args);
- else if ("stepreturn".equals(command)) debugStepReturn(args);
- else if ("suspend".equals(command)) debugSuspend(args);
- else if ("terminate".equals(command)) debugTerminate();
- else if ("threads".equals(command)) debugThreads();
- else if ("var".equals(command)) debugVar(args);
- else if ("vmresume".equals(command)) debugVMResume();
- else if ("vmsuspend".equals(command)) debugVMSuspend();
- else if ("watch".equals(command)) debugWatch(args);
- else {
- sendCommandResponse("error: invalid command\n");
- }
- }
-
- void debugChildren(Args args) {
- PDAThread thread = args.getThreadArg();
- if (thread == null) {
- sendCommandResponse("error: invalid thread\n");
- return;
- }
-
- int sfnumber = args.getNextIntArg();
- String var = args.getNextStringArg();
-
- Frame frame = sfnumber >= thread.fFrames.size()
- ? thread.fCurrentFrame : (Frame)thread.fFrames.get(sfnumber);
-
- String varDot = var + ".";
- List children = new ArrayList();
- for (Iterator itr = frame.fLocalVariables.keySet().iterator(); itr.hasNext();) {
- String localVar = (String)itr.next();
- if (localVar.startsWith(varDot) && localVar.indexOf('.', varDot.length() + 1) == -1) {
- children.add(localVar);
- }
- }
-
- StringBuffer result = new StringBuffer();
- for (Iterator itr = children.iterator(); itr.hasNext();) {
- result.append(itr.next());
- result.append('|');
- }
- result.append('\n');
-
- sendCommandResponse(result.toString());
- }
-
- void debugClearBreakpoint(Args args) {
- int line = args.getNextIntArg();
-
- fBreakpoints.remove( new Integer(line) );
- sendCommandResponse("ok\n");
- }
-
- private static Pattern fPackPattern = Pattern.compile("%([a-fA-F0-9][a-fA-F0-9])");
-
- void debugData(Args args) {
- PDAThread thread = args.getThreadArg();
- if (thread == null) {
- sendCommandResponse("error: invalid thread\n");
- return;
- }
-
- StringBuffer result = new StringBuffer();
- for (Iterator itr = thread.fStack.iterator(); itr.hasNext();) {
- result.append(itr.next());
- result.append('|');
- }
- result.append('\n');
- sendCommandResponse(result.toString());
- }
-
- void debugDropFrame(Args args) {
- PDAThread thread = args.getThreadArg();
- if (thread == null) {
- sendCommandResponse("error: invalid thread\n");
- return;
- }
-
- if (!thread.fFrames.isEmpty()) {
- thread.fCurrentFrame = (Frame)thread.fFrames.remove(thread.fFrames.size() - 1);
- }
- thread.fCurrentFrame.fPC--;
- sendCommandResponse("ok\n");
- if (fSuspendVM != null) {
- sendDebugEvent("vmresumed drop", false);
- sendDebugEvent("vmsuspended " + thread.fID + " drop", false);
- } else {
- sendDebugEvent("resumed " + thread.fID + " drop", false);
- sendDebugEvent("suspended " + thread.fID + " drop", false);
- }
- }
-
- void debugEval(Args args) {
- if (fSuspendVM != null) {
- sendCommandResponse("error: cannot evaluate while vm is suspended\n");
- return;
- }
-
- PDAThread thread = args.getThreadArg();
- if (thread == null) {
- sendCommandResponse("error: invalid thread\n");
- return;
- }
-
- if (thread.fSuspend == null) {
- sendCommandResponse("error: thread running\n");
- return;
- }
-
- StringTokenizer tokenizer = new StringTokenizer(args.getNextStringArg(), "|");
- tokenizer.countTokens();
-
- int numEvalLines = tokenizer.countTokens();
- thread.fThreadCode = new String[fCode.length + numEvalLines + 1];
- System.arraycopy(fCode, 0, thread.fThreadCode, 0, fCode.length);
- for (int i = 0; i < numEvalLines; i++) {
- String line = tokenizer.nextToken();
- StringBuffer lineBuf = new StringBuffer(line.length());
- Matcher matcher = fPackPattern.matcher(line);
- int lastMatchEnd = 0;
- while (matcher.find()) {
- lineBuf.append(line.substring(lastMatchEnd, matcher.start()));
- String charCode = line.substring(matcher.start() + 1, matcher.start() + 3);
- try {
- lineBuf.append((char) Integer.parseInt(charCode, 16));
- } catch (NumberFormatException e) {
- }
- lastMatchEnd = matcher.end();
- }
- if (lastMatchEnd < line.length()) {
- lineBuf.append(line.substring(lastMatchEnd));
- }
- thread.fThreadCode[fCode.length + i] = lineBuf.toString();
- }
- thread.fThreadCode[fCode.length + numEvalLines] = "xyzzy";
- thread.fThreadLabels = mapLabels(fCode);
-
- thread.fSavedPC = thread.fCurrentFrame.fPC;
- thread.fCurrentFrame.fPC = fCode.length;
- thread.fPerformingEval = true;
-
- thread.fSuspend = null;
-
- sendCommandResponse("ok\n");
-
- sendDebugEvent("resumed " + thread.fID + " eval", false);
- }
-
- void debugEventStop(Args args) {
- String event = args.getNextStringArg();
- int stop = args.getNextIntArg();
- fEventStops.put(event, new Boolean(stop > 0));
- sendCommandResponse("ok\n");
- }
-
- void debugTerminate() {
- sendCommandResponse("ok\n");
- sendDebugEvent("vmterminated", false);
- System.exit(0);
- }
-
- void debugFrame(Args args) {
- PDAThread thread = args.getThreadArg();
- if (thread == null) {
- sendCommandResponse("error: invalid thread\n");
- return;
- }
-
- int sfnumber = args.getNextIntArg();
- Frame frame = null;
- if (sfnumber >= thread.fFrames.size()) {
- frame = thread.fCurrentFrame;
- } else {
- frame = (Frame)thread.fFrames.get(sfnumber);
- }
- sendCommandResponse(printFrame(frame) + "\n");
- }
-
- void debugGroups(Args args) {
- TreeSet groups = new TreeSet();
- for (Iterator itr = fRegisters.values().iterator(); itr.hasNext();) {
- Register reg = (Register)itr.next();
- groups.add(reg.fGroup);
- }
- StringBuffer response = new StringBuffer();
- for (Iterator itr = groups.iterator(); itr.hasNext();) {
- response.append(itr.next());
- response.append('|');
- }
- response.append('\n');
- sendCommandResponse(response.toString());
- }
-
- void debugPopData(Args args) {
- PDAThread thread = args.getThreadArg();
- if (thread == null) {
- sendCommandResponse("error: invalid thread\n");
- return;
- }
-
- thread.fStack.pop();
- sendCommandResponse("ok\n");
- }
-
- void debugPushData(Args args) {
- PDAThread thread = args.getThreadArg();
- if (thread == null) {
- sendCommandResponse("error: invalid thread\n");
- return;
- }
-
- Object val = args.getNextIntOrStringArg();
- thread.fStack.push(val);
- sendCommandResponse("ok\n");
- }
-
- void debugRegisters(Args args) {
- String group = args.getNextStringArg();
-
- StringBuffer response = new StringBuffer();
- for (Iterator itr = fRegisters.values().iterator(); itr.hasNext();) {
- Register reg = (Register)itr.next();
- if (group.equals(reg.fGroup)) {
- response.append(reg.fName);
- response.append(' ');
- response.append(reg.fIsWriteable);
- for (Iterator itr2 = reg.fBitFields.values().iterator(); itr2.hasNext();) {
- BitField bitField = (BitField)itr2.next();
- response.append('|');
- response.append(bitField.fName);
- response.append(' ');
- response.append(bitField.fBitOffset);
- response.append(' ');
- response.append(bitField.fBitCount);
- response.append(' ');
- for (Iterator itr3 = bitField.fMnemonics.entrySet().iterator(); itr3.hasNext();) {
- Map.Entry mnemonicEntry = (Map.Entry)itr3.next();
- response.append(mnemonicEntry.getKey());
- response.append(' ');
- response.append(mnemonicEntry.getValue());
- response.append(' ');
- }
- }
-
- response.append('#');
- }
- }
- response.append('\n');
- sendCommandResponse(response.toString());
- }
-
- void debugRestart(Args args) {
- fSuspendVM = "restart";
-
- for (Iterator itr = fThreads.keySet().iterator(); itr.hasNext();) {
- Integer id = (Integer)itr.next();
- sendDebugEvent("exited " + id, false);
- }
- fThreads.clear();
-
- int id = fNextThreadId++;
- fThreads.put(new Integer(id), new PDAThread(id, "main", 0));
- sendDebugEvent("started " + id, false);
-
- fRegisters.clear();
-
- sendCommandResponse("ok\n");
- }
-
- void debugResume(Args args) {
- PDAThread thread = args.getThreadArg();
- if (thread == null) {
- sendCommandResponse("error: invalid thread\n");
- return;
- }
- if (fSuspendVM != null) {
- sendCommandResponse("error: cannot resume thread when vm is suspended\n");
- return;
- }
- if (thread.fSuspend == null) {
- sendCommandResponse("error: thread already running\n");
- return;
- }
-
- thread.fSuspend = null;
- sendDebugEvent("resumed " + thread.fID + " client", false);
-
- sendCommandResponse("ok\n");
- }
-
- void debugSetBreakpoint(Args args) {
- int line = args.getNextIntArg();
- int stopVM = args.getNextIntArg();
-
- fBreakpoints.put(new Integer(line), new Boolean(stopVM != 0));
- sendCommandResponse("ok\n");
- }
-
- void debugSetData(Args args) {
- PDAThread thread = args.getThreadArg();
- if (thread == null) {
- sendCommandResponse("error: invalid thread\n");
- return;
- }
-
- int offset = args.getNextIntArg();
- Object val = args.getNextIntOrStringArg();
-
- if (offset < thread.fStack.size()) {
- thread.fStack.set(offset, val);
- } else {
- thread.fStack.add(0, val);
- }
- sendCommandResponse("ok\n");
- }
-
- void debugSetVariable(Args args) {
- PDAThread thread = args.getThreadArg();
- if (thread == null) {
- sendCommandResponse("error: invalid thread\n");
- return;
- }
-
- int sfnumber = args.getNextIntArg();
- String var = args.getNextStringArg();
- Object val = args.getNextIntOrStringArg();
- while (args.hasNextArg()) {
- val = val.toString() + " " + args.getNextStringArg();
- }
-
- if (sfnumber >= thread.fFrames.size()) {
- thread.fCurrentFrame.set(var, val);
- } else {
- ((Frame)thread.fFrames.get(sfnumber)).set(var, val);
- }
- sendCommandResponse("ok\n");
- }
-
- void debugStack(Args args) {
- PDAThread thread = args.getThreadArg();
- if (thread == null) {
- sendCommandResponse("error: invalid thread\n");
- return;
- }
-
- StringBuffer result = new StringBuffer();
-
- for (Iterator itr = thread.fFrames.iterator(); itr.hasNext();) {
- Frame frame = (Frame)itr.next();
- result.append(printFrame(frame));
- result.append('#');
- }
- result.append(printFrame(thread.fCurrentFrame));
- result.append('\n');
- sendCommandResponse(result.toString());
- }
-
- void debugStackDepth(Args args) {
- PDAThread thread = args.getThreadArg();
- if (thread == null) {
- sendCommandResponse("error: invalid thread\n");
- return;
- }
- sendCommandResponse( Integer.toString(thread.fFrames.size() + 1) + "\n" );
- }
-
-
- /**
- * The stack frame output is: frame # frame # frame ... where each frame is:
- * filename | line number | function name | var | var | var | var ...
- */
- private String printFrame(Frame frame) {
- StringBuffer buf = new StringBuffer();
- buf.append(fFilename);
- buf.append('|');
- buf.append(frame.fPC);
- buf.append('|');
- buf.append(frame.fFunction);
- for (Iterator itr = frame.fLocalVariables.keySet().iterator(); itr.hasNext();) {
- String var = (String)itr.next();
- if (var.indexOf('.') == -1) {
- buf.append('|');
- buf.append(var);
- }
- }
- return buf.toString();
- }
-
- void debugState(Args args) {
- PDAThread thread = args.getThreadArg();
- String response = null;
- if (thread == null) {
- response = fSuspendVM == null ? "running" : fSuspendVM;
- } else if (fSuspendVM != null) {
- response = "vm";
- } else {
- response = thread.fSuspend == null ? "running" : thread.fSuspend;
- }
- sendCommandResponse(response + "\n");
- }
-
- void debugStep(Args args) {
- PDAThread thread = args.getThreadArg();
- if (thread == null) {
- sendCommandResponse("error: invalid thread\n");
- return;
- }
-
- // Set suspend to null to allow the debug loop to exit back to the
- // instruction loop and thus run an instruction. However, we want to
- // come back to the debug loop right away, so the step flag is set to
- // true which will cause the suspend flag to get set to true when we
- // get to the next instruction.
- if (fSuspendVM != null) {
- // All threads are suspended, so suspend all threads again when
- // step completes.
- fSuspendVM = null;
- fStepVM = true;
- // Also mark the thread that initiated the step to mark it as
- // the triggering thread when suspending.
- thread.fStep = true;
- } else {
- if (thread.fSuspend == null) {
- sendCommandResponse("error: thread already running\n");
- return;
- }
- thread.fSuspend = null;
- thread.fStep = true;
- sendDebugEvent("resumed " + thread.fID + " step", false);
- }
- sendCommandResponse("ok\n");
- }
-
- void debugStepReturn(Args args) {
- PDAThread thread = args.getThreadArg();
- if (thread == null) {
- sendCommandResponse("error: invalid thread\n");
- return;
- }
-
- if (fSuspendVM != null) {
- fSuspendVM = null;
- fStepReturnVM = true;
- thread.fStepReturn = true;
- } else {
- if (thread.fSuspend == null) {
- sendCommandResponse("error: thread running\n");
- return;
- }
- thread.fSuspend = null;
- thread.fStepReturn = true;
- sendDebugEvent("resumed " + thread.fID + " step", false);
- }
- sendCommandResponse("ok\n");
- }
-
- void debugSuspend(Args args) {
- PDAThread thread = args.getThreadArg();
- if (thread == null) {
- sendCommandResponse("error: invalid thread\n");
- return;
- }
- if (fSuspendVM != null) {
- sendCommandResponse("error: vm already suspended\n");
- return;
- }
- if (thread.fSuspend != null) {
- sendCommandResponse("error: thread already suspended\n");
- return;
- }
-
- thread.fSuspend = "client";
- sendDebugEvent("suspended " + thread.fID + " client", false);
- sendCommandResponse("ok\n");
- }
-
- void debugThreads() {
- StringBuffer response = new StringBuffer();
- for (Iterator itr = fThreads.keySet().iterator(); itr.hasNext();) {
- response.append(itr.next());
- response.append(' ');
- }
- sendCommandResponse(response.toString().trim() + "\n");
- }
-
- void debugVar(Args args) {
- PDAThread thread = args.getThreadArg();
- if (thread == null) {
- sendCommandResponse("error: invalid thread\n");
- return;
- }
-
- int sfnumber = args.getNextIntArg();
- String var = args.getNextStringArg();
-
- Frame frame = sfnumber >= thread.fFrames.size()
- ? thread.fCurrentFrame : (Frame)thread.fFrames.get(sfnumber);
-
- Object val = frame.get(var);
- if (val == null) {
- sendCommandResponse("error: variable undefined\n");
- } else {
- sendCommandResponse(val.toString() + "\n");
- }
- }
-
- void debugVMResume() {
- if (fSuspendVM == null) {
- sendCommandResponse("error: vm already running\n");
- return;
- }
-
- fSuspendVM = null;
- sendCommandResponse("ok\n");
- }
-
- void debugVMSuspend() {
- if (fSuspendVM != null) {
- sendCommandResponse("error: vm already suspended\n");
- return;
- }
-
- fSuspendVM = "client";
- sendCommandResponse("ok\n");
- }
-
- void debugWatch(Args args) {
- String funcAndVar = args.getNextStringArg();
- int flags = args.getNextIntArg();
- fWatchpoints.put(funcAndVar, new Integer(flags));
- sendCommandResponse("ok\n");
- }
-
- void iAdd(PDAThread thread, Args args) {
- Object val1 = thread.fStack.pop();
- Object val2 = thread.fStack.pop();
- if (val1 instanceof Integer && val2 instanceof Integer) {
- int intVal1 = ((Integer) val1).intValue();
- int intVal2 = ((Integer) val2).intValue();
- thread.fStack.push( new Integer(intVal1 + intVal2) );
- } else {
- thread.fStack.push( new Integer(-1) );
- }
- }
-
- void iBranchNotZero(PDAThread thread, Args args) {
- Object val = thread.fStack.pop();
- if (val instanceof Integer && ((Integer) val).intValue() != 0) {
- String label = args.getNextStringArg();
- if (thread.fThreadLabels.containsKey(label)) {
- thread.fCurrentFrame.fPC = ((Integer)thread.fThreadLabels.get(label)).intValue();
- } else {
- sendDebugEvent("no such label " + label, true);
- if ( ((Boolean)fEventStops.get("nosuchlabel")).booleanValue() ) {
- fSuspendVM = thread.fID + " event nosuchlabel";
- thread.fStack.push(val);
- thread.fCurrentFrame.fPC--;
- }
- }
- }
- }
-
- void iCall(PDAThread thread, Args args) {
- String label = args.getNextStringArg();
- if (thread.fThreadLabels.containsKey(label)) {
- thread.fFrames.add(thread.fCurrentFrame);
- thread.fCurrentFrame = new Frame(label, ((Integer)thread.fThreadLabels.get(label)).intValue());
- } else {
- sendDebugEvent("no such label " + label, true);
- if ( ((Boolean)fEventStops.get("nosuchlabel")).booleanValue() ) {
- fSuspendVM = thread.fID + " event nosuchlabel";
- thread.fCurrentFrame.fPC--;
- }
- }
- }
-
- void iDec(PDAThread thread, Args args) {
- Object val = thread.fStack.pop();
- if (val instanceof Integer) {
- val = new Integer(((Integer) val).intValue() - 1);
- }
- thread.fStack.push(val);
- }
-
- void iDef(PDAThread thread, Args args) {
- String type = args.getNextStringArg();
-
- String name = args.getNextStringArg();
- String regName = getRegisterPartOfName(name);
- String bitFieldName = getBitFieldPartOfName(name);
-
- if ("register".equals(type)) {
- Register reg = new Register(regName);
- reg.fGroup = args.getNextStringArg();
- fRegisters.put(regName, reg);
- reg.fIsWriteable = args.getNextBooleanArg();
- } else if ("bitfield".equals(type)) {
- Register reg = (Register)fRegisters.get(regName);
- if (reg == null) return;
- BitField bitField = new BitField(bitFieldName);
- bitField.fBitOffset = args.getNextIntArg();
- bitField.fBitCount = args.getNextIntArg();
- reg.fBitFields.put(bitFieldName, bitField);
- } else if ("mnemonic".equals(type)) {
- Register reg = (Register)fRegisters.get(regName);
- if (reg == null) return;
- BitField bitField = (BitField)reg.fBitFields.get(bitFieldName);
- if (bitField == null) return;
- bitField.fMnemonics.put(args.getNextStringArg(), new Integer(args.getNextIntArg()));
- }
- sendDebugEvent("registers", false);
- }
-
- private String getRegisterPartOfName(String name) {
- if (name.startsWith("$")) {
- int end = name.indexOf('.');
- end = end != -1 ? end : name.length();
- return name.substring(1, end);
- }
- return null;
- }
-
- private String getBitFieldPartOfName(String name) {
- int start = name.indexOf('.');
- if (name.startsWith("$") && start != -1) {
- return name.substring(start + 1, name.length());
- }
- return null;
- }
-
- void iDup(PDAThread thread, Args args) {
- Object val = thread.fStack.pop();
- thread.fStack.push(val);
- thread.fStack.push(val);
- }
-
- void iExec(PDAThread thread, Args args) {
- String label = args.getNextStringArg();
- if (fLabels.containsKey(label)) {
- int id = fNextThreadId++;
- fThreads.put( new Integer(id), new PDAThread(id, label, ((Integer)fLabels.get(label)).intValue()) );
- sendDebugEvent("started " + id, false);
- } else {
- sendDebugEvent("no such label " + label, true);
- if ( ((Boolean)fEventStops.get("nosuchlabel")).booleanValue() ) {
- thread.fSuspend = "event nosuchlabel";
- thread.fCurrentFrame.fPC--;
- }
- }
- }
-
- void iHalt(PDAThread thread, Args args) {
- thread.fRun = false;
- }
-
- void iOutput(PDAThread thread, Args args) {
- System.out.println(thread.fStack.pop());
- }
-
- void iPop(PDAThread thread, Args args) {
- String arg = args.getNextStringArg();
- if (arg.startsWith("$")) {
- String var = arg.substring(1);
- thread.fCurrentFrame.set(var, thread.fStack.pop());
- String key = thread.fCurrentFrame.fFunction + "::" + var;
- if ( fWatchpoints.containsKey(key) && (((Integer)fWatchpoints.get(key)).intValue() & 2) != 0 ) {
- fSuspendVM = thread.fID + " watch write " + key;
- }
- } else {
- thread.fStack.pop();
- }
- }
-
- void iPush(PDAThread thread, Args args) {
- String arg = args.getNextStringArg();
- while (arg.length() != 0) {
- if (arg.startsWith("$")) {
- String var = arg.substring(1);
- Object val = thread.fCurrentFrame.get(var);
- if (val == null) val = "<undefined>";
- thread.fStack.push(val);
- String key = thread.fCurrentFrame.fFunction + "::" + var;
- if (fWatchpoints.containsKey(key) && (((Integer)fWatchpoints.get(key)).intValue() & 1) != 0) {
- fSuspendVM = thread.fID + " watch read " + key;
- }
- } else {
- Object val = arg;
- if (args.hasNextArg()) {
- while (args.hasNextArg()) {
- val = val.toString() + " " + args.getNextStringArg();
- }
- } else {
- try {
- val = new Integer(arg);
- } catch (NumberFormatException e) {
- }
- }
- thread.fStack.push(val);
- }
-
- arg = args.getNextStringArg();
- }
- }
-
- void iReturn(PDAThread thread, Args args) {
- if (!thread.fFrames.isEmpty()) {
- thread.fCurrentFrame = (Frame)thread.fFrames.remove(thread.fFrames.size() - 1);
- } else {
- // Execution returned from the top frame, which means this thread
- // should exit.
- thread.fRun = false;
- }
- }
-
- void iVar(PDAThread thread, Args args) {
- String var = args.getNextStringArg();
- thread.fCurrentFrame.set(var, new Integer(0));
- }
-
- void iInternalEndEval(PDAThread thread, Args args) {
- Object result = thread.fStack.pop();
- thread.fThreadCode = fCode;
- thread.fThreadLabels = fLabels;
- thread.fCurrentFrame.fPC = thread.fSavedPC;
- sendDebugEvent("evalresult " + result, false);
- thread.fSuspend = "eval";
- thread.fPerformingEval = false;
- }
-
-}
diff --git a/org.eclipse.debug.examples.core/pdavm/tests/vmtest10.pda b/org.eclipse.debug.examples.core/pdavm/tests/vmtest10.pda
deleted file mode 100644
index 837277f..0000000
--- a/org.eclipse.debug.examples.core/pdavm/tests/vmtest10.pda
+++ /dev/null
@@ -1,38 +0,0 @@
-def register $reg1 group1 true
-def register $reg2 group1 false
-def register $reg3 group2 true
-def bitfield $reg1.field1 0 2
-def bitfield $reg1.field2 2 2
-def mnemonic $reg1.field2 zero 0
-def mnemonic $reg1.field2 one 1
-def mnemonic $reg1.field2 two 2
-def mnemonic $reg1.field2 three 3
-push 1
-pop $$reg1
-push $$reg1
-output
-push 2
-pop $$reg1.field1
-push $$reg1.field1
-output
-push 4
-pop $$reg1.field1
-push $$reg1.field1
-output
-push 1
-pop $$reg1.field2
-push $$reg1
-output
-push zero
-pop $$reg1.field2
-push $$reg1.field2
-output
-push $$reg1
-output
-push 2
-pop $$reg1.field2
-push $$reg1.field2
-output
-push $$reg1
-output
-halt
\ No newline at end of file
diff --git a/org.eclipse.debug.examples.core/pdavm/tests/vmtest2.pda b/org.eclipse.debug.examples.core/pdavm/tests/vmtest2.pda
deleted file mode 100644
index 95a35f0..0000000
--- a/org.eclipse.debug.examples.core/pdavm/tests/vmtest2.pda
+++ /dev/null
@@ -1,48 +0,0 @@
-push 6
-push 7
-push 8
-push 9
-push 10
-call sub1
-output
-call sub3
-call sub5
-push 3
-halt
-:sub2
-push 27
-return
-:sub1
-var m
-var n
-call sub2
-pop $n
-pop $m
-push $n
-push $m
-return
-# zero-based line 23
-:sub3
-push 1
-call sub4
-push 2
-call sub4
-push 3
-return
-:sub4
-push 4
-return
-# zero-based line 34
-:sub5
-var a
-var b
-var c
-pop $c
-pop $b
-call sub6
-push $a
-return
-:sub6
-var b
-pop $b
-return
diff --git a/org.eclipse.debug.examples.core/pdavm/tests/vmtest3.pda b/org.eclipse.debug.examples.core/pdavm/tests/vmtest3.pda
deleted file mode 100644
index 5aecdc5..0000000
--- a/org.eclipse.debug.examples.core/pdavm/tests/vmtest3.pda
+++ /dev/null
@@ -1,13 +0,0 @@
-push 1
-push 2
-push 3
-foobar swish
-push 4
-add
-add
-call zippy
-add
-output
-push 1
-branch_not_zero swishy
-halt
diff --git a/org.eclipse.debug.examples.core/pdavm/tests/vmtest6.pda b/org.eclipse.debug.examples.core/pdavm/tests/vmtest6.pda
deleted file mode 100644
index d90a960..0000000
--- a/org.eclipse.debug.examples.core/pdavm/tests/vmtest6.pda
+++ /dev/null
@@ -1,31 +0,0 @@
-var a
-var b
-push 1
-pop $a
-push 2
-pop $b
-push 3
-push 4
-#
-call inner
-#
-push $a
-push 2
-add
-pop $b
-output
-#
-halt
-#
-:inner
-var a
-var c
-pop $a
-pop $c
-push $a
-push $a
-add
-return
-:other
-push 15
-return
\ No newline at end of file
diff --git a/org.eclipse.debug.examples.core/pdavm/tests/vmtest8.pda b/org.eclipse.debug.examples.core/pdavm/tests/vmtest8.pda
deleted file mode 100644
index 7729409..0000000
--- a/org.eclipse.debug.examples.core/pdavm/tests/vmtest8.pda
+++ /dev/null
@@ -1,14 +0,0 @@
-var a
-call inner
-push 1
-output
-halt
-:inner
-var b
-call inner2
-push 2
-return
-:inner2
-var c
-push 3
-return
diff --git a/org.eclipse.debug.examples.core/pdavm/tests/vmtest9.pda b/org.eclipse.debug.examples.core/pdavm/tests/vmtest9.pda
deleted file mode 100644
index 336a251..0000000
--- a/org.eclipse.debug.examples.core/pdavm/tests/vmtest9.pda
+++ /dev/null
@@ -1,23 +0,0 @@
-push 5
-:thread_create
-exec foo
-dec
-dup
-branch_not_zero thread_create
-push finished
-output
-halt
-:foo
-push thread_created
-output
-call inner
-halt
-:inner
-var b
-call inner2
-push 2
-return
-:inner2
-var c
-push 3
-return
diff --git a/org.eclipse.debug.examples.core/pdavm/tests/vmtest_children.pda b/org.eclipse.debug.examples.core/pdavm/tests/vmtest_children.pda
deleted file mode 100644
index b0bbd16..0000000
--- a/org.eclipse.debug.examples.core/pdavm/tests/vmtest_children.pda
+++ /dev/null
@@ -1,8 +0,0 @@
-var a
-var a.b
-var a.c
-push 1
-pop $a.b
-push $a.b
-output
-halt
diff --git a/org.eclipse.debug.examples.core/plugin.xml b/org.eclipse.debug.examples.core/plugin.xml
deleted file mode 100644
index dadb0fe..0000000
--- a/org.eclipse.debug.examples.core/plugin.xml
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.examples.core/readme.html b/org.eclipse.debug.examples.core/readme.html
deleted file mode 100644
index 2a7cb9d..0000000
--- a/org.eclipse.debug.examples.core/readme.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<h1>Debug Examples ReadMe Notes</h1>
-<h2>PDA Debugger Example</h2>
-<p>In order to actually run the PDA debugger example, you will need a Perl interpreter.
- Linux®™ comes with Perl. For Microsoft® Windows®, we use either
- ActivePerl (<a href="http://www.activeperl.com/">http://www.activeperl.com/</a>) or Indigo Perl
- (<a href="http://www.indigostar.com/">http://www.indigostar.com/</a>). You also
- have to set the string substitution variable named “perlExecutable”
- to the complete path to your Perl interpreter. (For example, ours was C:\perl\bin\perl.exe)
- To set a string substitution variable, use the Windows > Preferences >
- Run/Debug > String Substitution preferences page.<br>
-</p>
diff --git a/org.eclipse.debug.examples.core/samples/counter.pda b/org.eclipse.debug.examples.core/samples/counter.pda
deleted file mode 100644
index 9b2b731..0000000
--- a/org.eclipse.debug.examples.core/samples/counter.pda
+++ /dev/null
@@ -1,11 +0,0 @@
-push 0
-:main
-var n
-pop $n
-push $n
-push 1
-add
-dup
-push $n
-output
-branch_not_zero main
\ No newline at end of file
diff --git a/org.eclipse.debug.examples.core/samples/drop.pda b/org.eclipse.debug.examples.core/samples/drop.pda
deleted file mode 100644
index 84f60fe..0000000
--- a/org.eclipse.debug.examples.core/samples/drop.pda
+++ /dev/null
@@ -1,12 +0,0 @@
-call one
-:one
-call two
-:two
-call three
-:three
-call four
-:four
-push DONE
-output
-
-
diff --git a/org.eclipse.debug.examples.core/samples/example.pda b/org.eclipse.debug.examples.core/samples/example.pda
deleted file mode 100644
index a958863..0000000
--- a/org.eclipse.debug.examples.core/samples/example.pda
+++ /dev/null
@@ -1,35 +0,0 @@
-push "hello"
-output
-call foobar
-push 3
-:label
-dup
-push 4
-push 5
-add
-add
-output
-dec
-dup
-branch_not_zero label
-call foobar
-push "end"
-output
-halt
-:foobar
-var a
-var b
-call barfoo
-push "first"
-push "second"
-pop $a
-pop $b
-push $a
-push $b
-output
-output
-return
-:barfoo
-push "barfoo"
-output
-return
diff --git a/org.eclipse.debug.examples.core/samples/fibonacci.pda b/org.eclipse.debug.examples.core/samples/fibonacci.pda
deleted file mode 100644
index e39595a..0000000
--- a/org.eclipse.debug.examples.core/samples/fibonacci.pda
+++ /dev/null
@@ -1,32 +0,0 @@
-push 6
-call fibonacci
-output
-halt
-#
-# f(n) = f(n-1) + f(n-2)
-# f(0) = 1
-# f(1) = 1
-#
-:fibonacci
-var n
-pop $n
-push $n
-branch_not_zero gt0
-push 1
-return
-:gt0
-push $n
-dec
-branch_not_zero gt1
-push 1
-return
-:gt1
-push $n
-dec
-call fibonacci
-push $n
-dec
-dec
-call fibonacci
-add
-return
diff --git a/org.eclipse.debug.examples.core/samples/registers.pda b/org.eclipse.debug.examples.core/samples/registers.pda
deleted file mode 100644
index 97fd8d4..0000000
--- a/org.eclipse.debug.examples.core/samples/registers.pda
+++ /dev/null
@@ -1,72 +0,0 @@
-def register $pc General true
-def register $sp General true
-def register $status General true
-def bitfield $status.BITS_00_07 0 8
-def bitfield $status.BITS_08_15 8 8
-def bitfield $status.BITS_16_23 16 8
-def bitfield $status.BITS_24_31 24 8
-def mnemonic $status.BITS_24_31 three 3
-def mnemonic $status.BITS_24_31 twelve 12
-def mnemonic $status.BITS_24_31 fourty_eight 48
-def mnemonic $status.BITS_24_31 one_nighty_two 192
-def register $stackdepth General true
-def register $stack[0] General true
-def register $stack[1] General true
-def register $stack[2] General true
-def register $stack[3] General true
-def register $stack[4] General true
-push 103
-pop $$pc
-push 306
-push 2
-pop $$sp
-push 400
-pop $$status
-push 5
-pop $$stackdepth
-push 12
-pop $$stack[0]
-push 45
-pop $$stack[1]
-push 146
-pop $$stack[2]
-push 215
-pop $$stack[3]
-push 251
-pop $$stack[4]
-push 306
-pop $$stack[5]
-def register $total-instructions Analysis false
-def register $add-instructions Analysis false
-def register $call-instructions Analysis false
-def register $dec-instructions Analysis false
-def register $dup-instructions Analysis false
-def register $halt-instructions Analysis false
-def register $output-instructions Analysis false
-def register $pop-instructions Analysis false
-def register $push-instructions Analysis false
-def register $return-instructions Analysis false
-def register $var-instructions Analysis false
-push 1046
-pop $$total-instructions
-push 12
-pop $$add-instructions
-push 24
-pop $$call-instructions
-push 36
-pop $$dec-instructions
-push 50
-pop $$dup-instructions
-push 62
-pop $$halt-instructions
-push 74
-pop $$output-instructions
-push 106
-pop $$pop-instructions
-push 120
-pop $$push-instructions
-push 132
-pop $$return-instructions
-push 144
-pop $$var-instructions
-halt
\ No newline at end of file
diff --git a/org.eclipse.debug.examples.core/samples/stack.pda b/org.eclipse.debug.examples.core/samples/stack.pda
deleted file mode 100644
index c7fa162..0000000
--- a/org.eclipse.debug.examples.core/samples/stack.pda
+++ /dev/null
@@ -1,21 +0,0 @@
-push 5
-:thread_create
-exec stack
-dec
-dup
-branch_not_zero thread_create
-push finished
-output
-halt
-:stack
-push 100
-:inner
-dup
-output
-dup
-branch_not_zero descend
-return
-:descend
-dec
-call inner
-return
\ No newline at end of file
diff --git a/org.eclipse.debug.examples.core/samples/structures.pda b/org.eclipse.debug.examples.core/samples/structures.pda
deleted file mode 100644
index 4cc8817..0000000
--- a/org.eclipse.debug.examples.core/samples/structures.pda
+++ /dev/null
@@ -1,29 +0,0 @@
-push a
-push b
-push c
-push x
-push y
-push z
-push one two three
-push 1 2 3
-push I II III
-var x
-var x.a
-var x.b
-var y
-var y.c
-var y.d
-var y.d.1
-var y.d.2
-var y.d.3
-pop $x
-pop $x.a
-pop $x.b
-pop $y
-pop $y.c
-pop $y.d
-pop $y.d.1
-pop $y.d.2
-pop $y.d.3
-push Done
-output
\ No newline at end of file
diff --git a/org.eclipse.debug.examples.core/scripts/build.xml b/org.eclipse.debug.examples.core/scripts/build.xml
deleted file mode 100644
index df434e6..0000000
--- a/org.eclipse.debug.examples.core/scripts/build.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0"?>
-<!-- ======================================================================
- Copyright (c) 2005, 2008 IBM Corporation and others.\
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
- Contributors:
- IBM Corporation - initial API and implementation
-
- EclipseCon
- Debug Tutorial Exercises
- ====================================================================== -->
-<project name="EclipseCon" default="generateAll">
- <description>
- Debug Tutorial Exercises
- </description>
-
- <taskdef name="preprocess" classname="org.eclipse.debug.examples.ant.tasks.PreProcessor" classpath="../bin" />
- <property name="destBase" location="c:\temp\example" />
- <property name="workspace" location="c:\eclipse-dev\dev-3.4" />
- <property name="coreSource" location="${workspace}\org.eclipse.debug.examples.core" />
- <property name="uiSource" location="${workspace}\org.eclipse.debug.examples.ui" />
-
- <!-- =================================
- target: generateAll
- ================================= -->
- <target name="generateAll" description="--> Debug Tutorial Exercises">
-
- <!-- = = = = = = = = = = = = = = = = =
- macrodef: process
- = = = = = = = = = = = = = = = = = -->
- <macrodef name="process">
- <attribute name="destdir"/>
- <attribute name="symbols"/>
- <sequential>
- <delete dir="@{destdir}"/>
- <mkdir dir="@{destdir}\org.eclipse.debug.examples.core"/>
- <mkdir dir="@{destdir}\org.eclipse.debug.examples.ui"/>
- <preprocess destdir="@{destdir}\org.eclipse.debug.examples.core" symbols="@{symbols}">
- <fileset dir="${coreSource}">
- <exclude name="**/*.class"/>
- <exclude name="**/PreProcessor.java"/>
- </fileset>
- </preprocess>
- <preprocess destdir="@{destdir}\org.eclipse.debug.examples.ui" symbols="@{symbols}">
- <fileset dir="${uiSource}">
- <exclude name="**/*.class"/>
- </fileset>
- </preprocess>
- </sequential>
- </macrodef>
-
- <process destdir="${destBase}\exercise1.1" symbols="ex1"/>
- <process destdir="${destBase}\exercise2.1" symbols="ex2"/>
- <process destdir="${destBase}\exercise3.1" symbols="ex3"/>
- <process destdir="${destBase}\exercise4.1" symbols="ex4"/>
- <process destdir="${destBase}\exercise5.1" symbols="ex5"/>
- <process destdir="${destBase}\exercise6.1" symbols="ex6"/>
- <process destdir="${destBase}\exercise7.1" symbols="ex7"/>
- <process destdir="${destBase}\answer" symbols="answer"/>
- </target>
-
-</project>
-
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/ClockControl.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/ClockControl.java
deleted file mode 100644
index 639f1ac..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/ClockControl.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.midi.launcher;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
-
-/**
- * Controls the location of the sequencer in microseconds.
- *
- * @since 1.0
- */
-public class ClockControl extends TimeControl {
-
- /**
- * @param launch
- */
- public ClockControl(MidiLaunch launch) {
- super("Time" , launch);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.midi.launcher.TimeControl#getTimeValue()
- */
- protected long getTimeValue() {
- return getSequencer().getMicrosecondPosition();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.midi.launcher.SequencerControl#isEditable()
- */
- public boolean isEditable() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.midi.launcher.SequencerControl#setValue(java.lang.String)
- */
- public IStatus setValue(String newValue) {
- try {
- long value = getLong(newValue);
- getSequencer().setMicrosecondPosition(value);
- fireEvent(new DebugEvent(this, DebugEvent.CHANGE));
- return Status.OK_STATUS;
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.midi.launcher.SequencerControl#validateValue(java.lang.String)
- */
- public IStatus validateValue(String value) {
- try {
- getLong(value);
- return Status.OK_STATUS;
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
-
- /**
- * Returns a float for the string.
- *
- * @param value string
- * @return float
- * @throws CoreException if not a valid value
- */
- protected long getLong(String value) throws CoreException {
- try {
- if (value.indexOf(':') == -1) {
- long secs = Long.parseLong(value);
- return secs * 1000000;
- }
- } catch (NumberFormatException e) {
- throw new CoreException(new Status(IStatus.ERROR, DebugCorePlugin.PLUGIN_ID, "Time must be an integer (seconds) or 00:00 (minutes:seconds) format", e));
- }
- return 0L;
- }
-
-
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/LengthControl.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/LengthControl.java
deleted file mode 100644
index 3a754c9..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/LengthControl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.midi.launcher;
-
-
-/**
- * Describes the length of the sequence in microseconds.
- *
- * @since 1.0
- */
-public class LengthControl extends TimeControl {
-
- /**
- * @param launch
- */
- public LengthControl(MidiLaunch launch) {
- super("Duration" , launch);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.midi.launcher.TimeControl#getTimeValue()
- */
- protected long getTimeValue() {
- return getSequencer().getMicrosecondLength();
- }
-
-
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/MidiLaunch.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/MidiLaunch.java
deleted file mode 100644
index 75801ec..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/MidiLaunch.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.midi.launcher;
-
-import javax.sound.midi.MidiFileFormat;
-import javax.sound.midi.Sequencer;
-
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.Launch;
-import org.eclipse.debug.core.model.ISuspendResume;
-
-/**
- * A launch containing a MIDI sequencer.
- *
- * @since 1.0
- */
-public class MidiLaunch extends Launch implements ISuspendResume {
-
- /**
- * MIDI Sequencer
- */
- private Sequencer fSequencer;
-
- /**
- * MIDI file format
- */
- private MidiFileFormat fFormat;
-
- /**
- * Constructs a new MIDI launch.
- *
- * @param launchConfiguration configuration to play
- * @param mode mode to play in
- */
- public MidiLaunch(ILaunchConfiguration launchConfiguration, String mode) {
- super(launchConfiguration, mode, null);
- }
-
- /**
- * Sets the sequencer used to play MIDI files.
- *
- * @param sequencer
- */
- public void setSequencer(Sequencer sequencer) {
- fSequencer = sequencer;
- fireChanged();
- }
-
- /**
- * Sets the format of the sequence
- * @param format
- */
- public void setFormat(MidiFileFormat format) {
- fFormat = format;
- }
-
- /**
- * Returns the file format of the sequence.
- *
- * @return file format
- */
- public MidiFileFormat getFormat() {
- return fFormat;
- }
- /**
- * Returns the sequencer used to play MIDI files.
- *
- * @return the sequencer used to play MIDI files
- */
- public Sequencer getSequencer() {
- return fSequencer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.Launch#canTerminate()
- */
- public boolean canTerminate() {
- return getSequencer().isOpen();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.Launch#isTerminated()
- */
- public boolean isTerminated() {
- if (fSequencer != null) {
- return !fSequencer.isOpen();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.Launch#terminate()
- */
- public void terminate() throws DebugException {
- getSequencer().stop();
- getSequencer().close();
- fireTerminate();
- DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[]{new DebugEvent(getSequencer(), DebugEvent.TERMINATE)});
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
- */
- public boolean canResume() {
- return isSuspended();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend()
- */
- public boolean canSuspend() {
- if (fSequencer != null) {
- return fSequencer.isRunning();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
- */
- public boolean isSuspended() {
- if (fSequencer != null) {
- return fSequencer.isOpen() & !fSequencer.isRunning();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#resume()
- */
- public void resume() throws DebugException {
- getSequencer().start();
- fireChanged();
- fireEvent(new DebugEvent(getSequencer(), DebugEvent.RESUME, DebugEvent.CLIENT_REQUEST));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#suspend()
- */
- public void suspend() throws DebugException {
- getSequencer().stop();
- fireChanged();
- fireEvent(new DebugEvent(getSequencer(), DebugEvent.SUSPEND, DebugEvent.CLIENT_REQUEST));
- }
-
- /**
- * Fires a debug event.
- *
- * @param event debug event to fire
- */
- protected void fireEvent(DebugEvent event) {
- DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[] {event});
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/MidiLaunchDelegate.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/MidiLaunchDelegate.java
deleted file mode 100644
index b5538a7..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/MidiLaunchDelegate.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.midi.launcher;
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-
-import javax.sound.midi.InvalidMidiDataException;
-import javax.sound.midi.MidiFileFormat;
-import javax.sound.midi.MidiSystem;
-import javax.sound.midi.MidiUnavailableException;
-import javax.sound.midi.Sequencer;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
-import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
-
-/**
- * Creates and starts a MIDI sequencer.
- *
- * @since 1.0
- */
-public class MidiLaunchDelegate extends LaunchConfigurationDelegate {
-
- /**
- * Identifier for the MIDI launch configuration type
- * (value <code>midi.launchType</code>)
- */
- public static final String ID_MIDI_LAUNCH_CONFIGURATION_TYPE = "midi.launchType";
-
- /**
- * Launch configuration attribute for the MIDI file to play
- * (value <code>midi.file</code>)
- */
- public static final String ATTR_MIDI_FILE = "midi.file";
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
- String fileName = configuration.getAttribute(ATTR_MIDI_FILE, (String)null);
- if (fileName == null) {
- abort("MIDI file not specified.", null);
- }
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IFile file = root.getFile(new Path(fileName));
- if (!file.exists()) {
- abort("MIDI file does not exist.", null);
- }
- Sequencer sequencer = null;
- MidiFileFormat fileFormat = null;
- try {
- sequencer = MidiSystem.getSequencer();
- sequencer.open();
- IPath location = file.getLocation();
- if (location != null) {
- fileFormat = MidiSystem.getMidiFileFormat(location.toFile());
- }
- } catch (MidiUnavailableException e) {
- abort("Cannot initialize sequencer.", e);
- } catch (InvalidMidiDataException e) {
- abort("Invalid MIDI file.", e);
- } catch (IOException e) {
- abort("Error reading MIDI file.", e);
- }
- BufferedInputStream stream = new BufferedInputStream(file.getContents());
- try {
- sequencer.setSequence(stream);
- } catch (IOException e) {
- abort("Error reading MIDI file", e);
- } catch (InvalidMidiDataException e) {
- abort("Inavlid MIDI file.", e);
- }
- MidiLaunch midiLaunch = (MidiLaunch)launch;
- midiLaunch.setSequencer(sequencer);
- midiLaunch.setFormat(fileFormat);
- sequencer.start();
- }
-
- /**
- * Throws an exception with a new status containing the given
- * message and optional exception.
- *
- * @param message error message
- * @param e underlying exception
- * @throws CoreException
- */
- private void abort(String message, Throwable e) throws CoreException {
- throw new CoreException(new Status(IStatus.ERROR, DebugCorePlugin.PLUGIN_ID, 0, message, e));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate2#getLaunch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
- */
- public ILaunch getLaunch(ILaunchConfiguration configuration, String mode) throws CoreException {
- return new MidiLaunch(configuration, mode);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#buildForLaunch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
- public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
- return false;
- }
-
-
-
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/SequencerControl.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/SequencerControl.java
deleted file mode 100644
index 3274582..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/SequencerControl.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.midi.launcher;
-
-import javax.sound.midi.Sequencer;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-
-/**
- * Controls some aspect of a MIDI sequencer.
- *
- * @since 1.0
- */
-public abstract class SequencerControl {
-
- /**
- * The launch
- */
- private MidiLaunch fLaunch;
-
- /**
- * Control name
- */
- private String fName;
-
- /**
- * Constructs a control with the given name.
- */
- public SequencerControl(String name, MidiLaunch launch) {
- fName = name;
- fLaunch = launch;
- }
-
- /**
- * Returns the launch this control is associated with.
- *
- * @return MIDI launch
- */
- public MidiLaunch getLaunch() {
- return fLaunch;
- }
-
- /**
- * Returns the sequencer associated with this control.
- *
- * @return associated sequencer
- */
- public Sequencer getSequencer() {
- return fLaunch.getSequencer();
- }
-
- /**
- * Returns the name of this control.
- *
- * @return control name
- */
- public String getName() {
- return fName;
- }
-
- /**
- * Returns this controls current value.
- *
- * @return current value
- */
- public abstract String getValue();
-
- /**
- * Whether this contol's value can be modified.
- *
- * @return Whether this contol's value can be modified
- */
- public abstract boolean isEditable();
-
- /**
- * Returns a status indicating if the given value is
- * a valid value for this control to accept.
- *
- * @param value new value
- * @return whether the value is valid
- */
- public abstract IStatus validateValue(String value);
-
- /**
- * Sets the value of this control to the given value
- * and returns a status indicating if the value was
- * successfully set.
- *
- * @param newValue value
- * @return whether successful
- */
- public abstract IStatus setValue(String newValue);
-
- /**
- * Fires a debug event.
- *
- * @param event debug event to fire
- */
- public void fireEvent(DebugEvent event) {
- DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[] {event});
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj != null) {
- if (getClass().equals(obj.getClass())) {
- return ((SequencerControl)obj).getSequencer().equals(getSequencer());
-
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getSequencer().hashCode() + getClass().hashCode();
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TempoControl.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TempoControl.java
deleted file mode 100644
index feb3b32..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TempoControl.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.midi.launcher;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
-
-/**
- * Controls the tempo of a sequencer.
- *
- * @since 1.0
- */
-public class TempoControl extends SequencerControl {
-
- /**
- * Constructs a tempo control for the given launch.
- */
- public TempoControl(MidiLaunch launch) {
- super("Tempo (BPM)", launch);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.midi.launcher.SequencerControl#getValue()
- */
- public String getValue() {
- float bpm = getSequencer().getTempoInBPM();
- return Float.toString(bpm);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.midi.launcher.SequencerControl#isEditable()
- */
- public boolean isEditable() {
- return getSequencer().isOpen();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.midi.launcher.SequencerControl#setValue(java.lang.String)
- */
- public IStatus setValue(String newValue) {
- try {
- float value = getFloat(newValue);
- getSequencer().setTempoInBPM(value);
- fireEvent(new DebugEvent(this, DebugEvent.CHANGE));
- return Status.OK_STATUS;
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.midi.launcher.SequencerControl#validateValue(java.lang.String)
- */
- public IStatus validateValue(String value) {
- try {
- getFloat(value);
- return Status.OK_STATUS;
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
-
- /**
- * Returns a float for the string.
- *
- * @param value string
- * @return float
- * @throws CoreException if not a valid value
- */
- protected float getFloat(String value) throws CoreException {
- try {
- return Float.parseFloat(value);
- } catch (NumberFormatException e) {
- throw new CoreException(new Status(IStatus.ERROR, DebugCorePlugin.PLUGIN_ID, "Tempo must be a number", e));
- }
- }
-
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TimeControl.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TimeControl.java
deleted file mode 100644
index 93aa54d..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TimeControl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.midi.launcher;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * Displays a time value based on underlying microsecond value
- *
- * @since 1.0
- */
-public abstract class TimeControl extends SequencerControl {
-
- /**
- * Constructs a time control with the given name for the
- * given launch.
- *
- * @param name
- * @param launch
- */
- public TimeControl(String name, MidiLaunch launch) {
- super(name, launch);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.midi.launcher.SequencerControl#getValue()
- */
- public String getValue() {
- long position = getTimeValue();
- int milli = (int) (position & 0x3F);
- int sec = (int) (position / 1000000);
- int min = sec / 60;
- sec = sec % 60;
- StringBuffer clock = new StringBuffer();
- clock.append(min);
- while (clock.length() < 2) {
- clock.insert(0, 0);
- }
- clock.append(':');
- clock.append(sec);
- while (clock.length() < 5) {
- clock.insert(3, 0);
- }
- clock.append(':');
- clock.append(milli);
- while (clock.length() < 8) {
- clock.insert(6, 0);
- }
- return clock.toString();
- }
-
- /**
- * Provided by subclasses for the control.
- *
- * @return time in microseconds
- */
- protected abstract long getTimeValue();
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.midi.launcher.SequencerControl#isEditable()
- */
- public boolean isEditable() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.midi.launcher.SequencerControl#setValue(java.lang.String)
- */
- public IStatus setValue(String newValue) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.midi.launcher.SequencerControl#validateValue(java.lang.String)
- */
- public IStatus validateValue(String value) {
- return null;
- }
-
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/DebugCorePlugin.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/DebugCorePlugin.java
deleted file mode 100644
index be74eb7..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/DebugCorePlugin.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.*;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class DebugCorePlugin extends Plugin {
- //The shared instance.
- private static DebugCorePlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
- /**
- * Unique identifier for the PDA debug model (value
- * <code>pda.debugModel</code>).
- */
- public static final String ID_PDA_DEBUG_MODEL = "pda.debugModel";
-
- /**
- * Name of the string substitution variable that resolves to the
- * location of a local Perl executable (value <code>perlExecutable</code>).
- */
- public static final String VARIALBE_PERL_EXECUTABLE = "perlExecutable";
- /**
- * Launch configuration attribute key. Value is a path to a perl
- * program. The path is a string representing a full path
- * to a perl program in the workspace.
- */
- public static final String ATTR_PDA_PROGRAM = ID_PDA_DEBUG_MODEL + ".ATTR_PDA_PROGRAM";
-
- /**
- * Identifier for the PDA launch configuration type
- * (value <code>pda.launchType</code>)
- */
- public static final String ID_PDA_LAUNCH_CONFIGURATION_TYPE = "pda.launchType";
-
- /**
- * Plug-in identifier.
- */
- public static final String PLUGIN_ID = "org.eclipse.debug.examples.core";
-
- /**
- * The constructor.
- */
- public DebugCorePlugin() {
- super();
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- resourceBundle = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static DebugCorePlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = DebugCorePlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle.getBundle("org.eclipse.debug.examples.core.pda.DebugCorePluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-
- /**
- * Return a <code>java.io.File</code> object that corresponds to the specified
- * <code>IPath</code> in the plugin directory, or <code>null</code> if none.
- */
- public static File getFileInPlugin(IPath path) {
- try {
- URL installURL =
- new URL(getDefault().getDescriptor().getInstallURL(), path.toString());
- URL localURL = Platform.asLocalURL(installURL);
- return new File(localURL.getFile());
- } catch (IOException ioe) {
- return null;
- }
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDALineBreakpoint.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDALineBreakpoint.java
deleted file mode 100644
index 45f2a06..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDALineBreakpoint.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.breakpoints;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.LineBreakpoint;
-import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
-import org.eclipse.debug.examples.core.pda.model.IPDAEventListener;
-import org.eclipse.debug.examples.core.pda.model.PDADebugTarget;
-import org.eclipse.debug.examples.core.pda.model.PDAThread;
-import org.eclipse.debug.examples.core.pda.protocol.PDAClearBreakpointCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDAEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDARunControlEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDASetBreakpointCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDASuspendedEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDAVMSuspendedEvent;
-
-
-/**
- * PDA line breakpoint
- */
-public class PDALineBreakpoint extends LineBreakpoint implements IPDAEventListener {
-
- // target currently installed in
- private PDADebugTarget fTarget;
-
- /**
- * Default constructor is required for the breakpoint manager
- * to re-create persisted breakpoints. After instantiating a breakpoint,
- * the <code>setMarker(...)</code> method is called to restore
- * this breakpoint's attributes.
- */
- public PDALineBreakpoint() {
- }
-
- /**
- * Constructs a line breakpoint on the given resource at the given
- * line number. The line number is 1-based (i.e. the first line of a
- * file is line number 1). The PDA VM uses 0-based line numbers,
- * so this line number translation is done at breakpoint install time.
- *
- * @param resource file on which to set the breakpoint
- * @param lineNumber 1-based line number of the breakpoint
- * @throws CoreException if unable to create the breakpoint
- */
- public PDALineBreakpoint(final IResource resource, final int lineNumber) throws CoreException {
- IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- IMarker marker = resource.createMarker("org.eclipse.debug.examples.core.pda.markerType.lineBreakpoint");
- setMarker(marker);
- marker.setAttribute(IBreakpoint.ENABLED, Boolean.TRUE);
- marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
- marker.setAttribute(IBreakpoint.ID, getModelIdentifier());
- marker.setAttribute(IMarker.MESSAGE, "Line Breakpoint: " + resource.getName() + " [line: " + lineNumber + "]");
- }
- };
- run(getMarkerRule(resource), runnable);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IBreakpoint#getModelIdentifier()
- */
- public String getModelIdentifier() {
- return DebugCorePlugin.ID_PDA_DEBUG_MODEL;
- }
-
- /**
- * Returns whether this breakpoint is a run-to-line breakpoint
- *
- * @return whether this breakpoint is a run-to-line breakpoint
- */
- public boolean isRunToLineBreakpoint() {
- return false;
- }
-
- /**
- * Installs this breakpoint in the given interprettor.
- * Registeres this breakpoint as an event listener in the
- * given target and creates the breakpoint specific request.
- *
- * @param target PDA interprettor
- * @throws CoreException if installation fails
- */
- public void install(PDADebugTarget target) throws CoreException {
- fTarget = target;
- target.addEventListener(this);
- createRequest(target);
- }
-
- /**
- * Create the breakpoint specific request in the target. Subclasses
- * should override.
- *
- * @param target PDA interprettor
- * @throws CoreException if request creation fails
- */
- protected void createRequest(PDADebugTarget target) throws CoreException {
- //#ifdef ex3
-//# // TODO: Exercise 3 - create breakpoint request in interpreter
- //#else
- target.sendCommand(new PDASetBreakpointCommand((getLineNumber() - 1), false));
- //#endif
- }
-
- /**
- * Removes this breakpoint's event request from the target. Subclasses
- * should override.
- *
- * @param target PDA interprettor
- * @throws CoreException if clearing the request fails
- */
- protected void clearRequest(PDADebugTarget target) throws CoreException {
- //#ifdef ex3
-//# // TODO: Exercise 3 - clear breakpoint request in interpreter
- //#else
- target.sendCommand(new PDAClearBreakpointCommand((getLineNumber() - 1)));
- //#endif
- }
-
- /**
- * Removes this breakpoint from the given interprettor.
- * Removes this breakpoint as an event listener and clears
- * the request for the interprettor.
- *
- * @param target PDA interprettor
- * @throws CoreException if removal fails
- */
- public void remove(PDADebugTarget target) throws CoreException {
- target.removeEventListener(this);
- clearRequest(target);
- fTarget = null;
-
- }
-
- /**
- * Returns the target this breakpoint is installed in or <code>null</code>.
- *
- * @return the target this breakpoint is installed in or <code>null</code>
- */
- protected PDADebugTarget getDebugTarget() {
- return fTarget;
- }
-
- /**
- * Notify's the PDA interprettor that this breakpoint has been hit.
- */
- protected void notifyThread(int threadId) {
- if (fTarget != null) {
- PDAThread thread = fTarget.getThread(threadId);
- if (thread != null) {
- thread.suspendedBy(this);
- }
- }
- }
-
- /* (non-Javadoc)
- *
- * Subclasses should override to handle their breakpoint specific event.
- *
- * @see org.eclipse.debug.examples.core.pda.model.IPDAEventListener#handleEvent(java.lang.String)
- */
- public void handleEvent(PDAEvent event) {
- if (event instanceof PDASuspendedEvent || event instanceof PDAVMSuspendedEvent) {
- PDARunControlEvent rcEvent = (PDARunControlEvent)event;
- if (rcEvent.fReason.equals("breakpoint")) {
- handleHit(rcEvent);
- }
- }
- }
-
- /**
- * Determines if this breakpoint was hit and notifies the thread.
- *
- * @param event breakpoint event
- */
- private void handleHit(PDARunControlEvent event) {
- int lastSpace = event.fMessage.lastIndexOf(' ');
- if (lastSpace > 0) {
- String line = event.fMessage.substring(lastSpace + 1);
- int lineNumber = Integer.parseInt(line);
- // breakpoints event line numbers are 0 based, model objects are 1 based
- lineNumber++;
- try {
- if (getLineNumber() == lineNumber) {
- notifyThread(event.fThreadId);
- }
- } catch (CoreException e) {
- }
- }
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDARunToLineBreakpoint.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDARunToLineBreakpoint.java
deleted file mode 100644
index b861fff..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDARunToLineBreakpoint.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.breakpoints;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IBreakpoint;
-
-/**
- * A run to line breakpoint.
- */
-public class PDARunToLineBreakpoint extends PDALineBreakpoint {
-
- private IFile fSourceFile;
-
- /**
- * Constructs a run-to-line breakpoint in the given PDA program.
- *
- * @param resource PDA source file
- * @param lineNumber line to run to
- * @exception DebugException if unable to create the breakpoint
- */
- public PDARunToLineBreakpoint(final IFile resource, final int lineNumber) throws DebugException {
- IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- // associate with workspace root to avoid drawing in editor ruler
- IMarker marker = ResourcesPlugin.getWorkspace().getRoot().createMarker("org.eclipse.debug.examples.core.pda.markerType.lineBreakpoint");
- setMarker(marker);
- marker.setAttribute(IBreakpoint.ENABLED, Boolean.TRUE);
- marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
- marker.setAttribute(IBreakpoint.ID, getModelIdentifier());
- setRegistered(false);
- fSourceFile = resource;
- }
- };
- run(getMarkerRule(resource), runnable);
- }
-
- /**
- * Returns whether this breakpoint is a run-to-line breakpoint
- *
- * @return whether this breakpoint is a run-to-line breakpoint
- */
- public boolean isRunToLineBreakpoint() {
- return true;
- }
-
- /**
- * Returns the source file this breakpoint is contained in.
- *
- * @return the source file this breakpoint is contained in
- */
- public IFile getSourceFile() {
- return fSourceFile;
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDAWatchpoint.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDAWatchpoint.java
deleted file mode 100644
index f013f83..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDAWatchpoint.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.breakpoints;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IWatchpoint;
-import org.eclipse.debug.examples.core.pda.model.PDADebugTarget;
-import org.eclipse.debug.examples.core.pda.protocol.PDAEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDARunControlEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDASuspendedEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDAVMSuspendedEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDAWatchCommand;
-
-
-/**
- * A watchpoint.
- */
-public class PDAWatchpoint extends PDALineBreakpoint implements IWatchpoint {
-
- // 'read' or 'write' depending on what caused the last suspend for this watchpoint
- private String fLastSuspendType;
-
- // marker attributes
- public static final String ACCESS = "ACCESS";
- public static final String MODIFICATION = "MODIFICATION";
- public static final String FUNCTION_NAME = "FUNCTION_NAME";
- public static final String VAR_NAME = "VAR_NAME";
-
- /**
- * Default constructor is required for the breakpoint manager
- * to re-create persisted breakpoints. After instantiating a breakpoint,
- * the <code>setMarker(...)</code> method is called to restore
- * this breakpoint's attributes.
- */
- public PDAWatchpoint() {
- }
- /**
- * Constructs a line breakpoint on the given resource at the given
- * line number. The line number is 1-based (i.e. the first line of a
- * file is line number 1). The PDA VM uses 0-based line numbers,
- * so this line number translation is done at breakpoint install time.
- *
- * @param resource file on which to set the breakpoint
- * @param lineNumber 1-based line number of the breakpoint
- * @param functionName function name the variable is defined in
- * @param varName variable name that watchpoint is set on
- * @param access whether this is an access watchpoint
- * @param modification whether this in a modification watchpoint
- * @throws CoreException if unable to create the watchpoint
- */
- public PDAWatchpoint(final IResource resource, final int lineNumber, final String functionName, final String varName, final boolean access, final boolean modification) throws CoreException {
- IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- IMarker marker = resource.createMarker("org.eclipse.debug.examples.core.pda.markerType.watchpoint");
- setMarker(marker);
- setEnabled(true);
- ensureMarker().setAttribute(IMarker.LINE_NUMBER, lineNumber);
- ensureMarker().setAttribute(IBreakpoint.ID, getModelIdentifier());
- setAccess(access);
- setModification(modification);
- setVariable(functionName, varName);
- marker.setAttribute(IMarker.MESSAGE, "Watchpoint: " + resource.getName() + " [line: " + lineNumber + "]");
- }
- };
- run(getMarkerRule(resource), runnable);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IWatchpoint#isAccess()
- */
- public boolean isAccess() throws CoreException {
- return getMarker().getAttribute(ACCESS, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IWatchpoint#setAccess(boolean)
- */
- public void setAccess(boolean access) throws CoreException {
- setAttribute(ACCESS, access);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IWatchpoint#isModification()
- */
- public boolean isModification() throws CoreException {
- return getMarker().getAttribute(MODIFICATION, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IWatchpoint#setModification(boolean)
- */
- public void setModification(boolean modification) throws CoreException {
- setAttribute(MODIFICATION, modification);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IWatchpoint#supportsAccess()
- */
- public boolean supportsAccess() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IWatchpoint#supportsModification()
- */
- public boolean supportsModification() {
- return true;
- }
-
- /**
- * Sets the variable and function names the watchpoint is set on.
- *
- * @param functionName function name
- * @param variableName variable name
- * @throws CoreException if an exception occurrs setting marker attribtues
- */
- protected void setVariable(String functionName, String variableName) throws CoreException {
- setAttribute(VAR_NAME, variableName);
- setAttribute(FUNCTION_NAME, functionName);
- }
-
- /**
- * Returns the name of the variable this watchpoint is set on.
- *
- * @return the name of the variable this watchpoint is set on
- * @throws CoreException if unable to access the attribute
- */
- public String getVariableName() throws CoreException {
- return getMarker().getAttribute(VAR_NAME, (String)null);
- }
-
- /**
- * Returns the name of the function the variable associted with this watchpoint is defined in.
- *
- * @return the name of the function the variable associted with this watchpoint is defined in
- * @throws CoreException if unable to access the attribute
- */
- public String getFunctionName() throws CoreException {
- return getMarker().getAttribute(FUNCTION_NAME, (String)null);
- }
-
- /**
- * Sets the type of event that causes the last suspend event.
- *
- * @param description one of 'read' or 'write'
- */
- public void setSuspendType(String description) {
- fLastSuspendType = description;
- }
-
- /**
- * Returns the type of event that caused the last suspend.
- *
- * @return 'read', 'write', or <code>null</code> if undefined
- */
- public String getSuspendType() {
- return fLastSuspendType;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.pda.breakpoints.PDALineBreakpoint#createRequest(org.eclipse.debug.examples.core.pda.model.PDADebugTarget)
- */
- protected void createRequest(PDADebugTarget target) throws CoreException {
- int flag = 0;
- if (isAccess()) {
- flag = flag | 1;
- }
- if (isModification()) {
- flag = flag | 2;
- }
- target.sendCommand(new PDAWatchCommand(getFunctionName(), getVariableName(), flag));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.pda.breakpoints.PDALineBreakpoint#clearRequest(org.eclipse.debug.examples.core.pda.model.PDADebugTarget)
- */
- protected void clearRequest(PDADebugTarget target) throws CoreException {
- target.sendCommand(new PDAWatchCommand(getFunctionName(), getVariableName(), 0));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.pda.model.IPDAEventListener#handleEvent(java.lang.String)
- */
- public void handleEvent(PDAEvent event) {
- if (event instanceof PDASuspendedEvent || event instanceof PDAVMSuspendedEvent) {
- PDARunControlEvent rcEvent = (PDARunControlEvent)event;
- if (rcEvent.fReason.equals("watch")) {
- handleHit(rcEvent);
- }
- }
- }
-
- /**
- * Determines if this breakpoint was hit and notifies the thread.
- *
- * @param event breakpoint event
- */
- private void handleHit(PDARunControlEvent event) {
- String[] strings = event.fMessage.split(" ");
- if (strings.length == 4) {
- String fv = strings[3];
- int j = fv.indexOf("::");
- if (j > 0) {
- String fcn = fv.substring(0, j);
- String var = fv.substring(j + 2);
- try {
- if (getVariableName().equals(var) && getFunctionName().equals(fcn)) {
- setSuspendType(strings[2]);
- notifyThread(event.fThreadId);
- }
- } catch (CoreException e) {
- }
- }
- }
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/launcher/PDALaunchDelegate.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/launcher/PDALaunchDelegate.java
deleted file mode 100644
index cebc209..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/launcher/PDALaunchDelegate.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.launcher;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
-import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
-import org.eclipse.debug.examples.core.pda.model.PDADebugTarget;
-
-
-/**
- * Launches PDA program on a PDA interpretter written in Perl
- */
-public class PDALaunchDelegate extends LaunchConfigurationDelegate {
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
- //#ifdef ex1
-//# // TODO: Exercise 1 - Launch a command shell as a system process to echo "foo"
- //#elseif ex1_answer
-//# Process process = DebugPlugin.exec(new String[]{"cmd", "/C", "\"echo foo\""}, null);
-//# new RuntimeProcess(launch, process, "Hello", null);
- //#else
-
- List commandList = new ArrayList();
-
- // Get Java VM path
- String javaVMHome = System.getProperty("java.home");
- String javaVMExec = javaVMHome + File.separatorChar + "bin" + File.separatorChar + "java";
- if (File.separatorChar == '\\') {
- javaVMExec += ".exe";
- }
- File exe = new File(javaVMExec);
- if (!exe.exists()) {
- abort(MessageFormat.format("Specified java VM executable {0} does not exist.", new Object[]{javaVMExec}), null);
- }
- commandList.add(javaVMExec);
-
- commandList.add("-cp");
- commandList.add(File.pathSeparator + DebugCorePlugin.getFileInPlugin(new Path("bin")));
-
- commandList.add("org.eclipse.debug.examples.pdavm.PDAVirtualMachine");
-
- // program name
- String program = configuration.getAttribute(DebugCorePlugin.ATTR_PDA_PROGRAM, (String)null);
- if (program == null) {
- abort("Perl program unspecified.", null);
- }
-
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(program));
- if (!file.exists()) {
- abort(MessageFormat.format("Perl program {0} does not exist.", new String[] {file.getFullPath().toString()}), null);
- }
-
- commandList.add(file.getLocation().toOSString());
-
- // if in debug mode, add debug arguments - i.e. '-debug requestPort eventPort'
- int requestPort = -1;
- int eventPort = -1;
- if (mode.equals(ILaunchManager.DEBUG_MODE)) {
- requestPort = findFreePort();
- eventPort = findFreePort();
- if (requestPort == -1 || eventPort == -1) {
- abort("Unable to find free port", null);
- }
- commandList.add("-debug");
- commandList.add("" + requestPort);
- commandList.add("" + eventPort);
- }
-
- String[] commandLine = (String[]) commandList.toArray(new String[commandList.size()]);
- Process process = DebugPlugin.exec(commandLine, null);
- IProcess p = DebugPlugin.newProcess(launch, process, javaVMExec);
- // if in debug mode, create a debug target
- if (mode.equals(ILaunchManager.DEBUG_MODE)) {
- IDebugTarget target = new PDADebugTarget(launch, p, requestPort, eventPort);
- launch.addDebugTarget(target);
- }
- //#endif
- }
-
- /**
- * Throws an exception with a new status containing the given
- * message and optional exception.
- *
- * @param message error message
- * @param e underlying exception
- * @throws CoreException
- */
- private void abort(String message, Throwable e) throws CoreException {
- throw new CoreException(new Status(IStatus.ERROR, DebugCorePlugin.getDefault().getDescriptor().getUniqueIdentifier(), 0, message, e));
- }
-
- /**
- * Returns a free port number on localhost, or -1 if unable to find a free port.
- *
- * @return a free port number on localhost, or -1 if unable to find a free port
- */
- public static int findFreePort() {
- ServerSocket socket= null;
- try {
- socket= new ServerSocket(0);
- return socket.getLocalPort();
- } catch (IOException e) {
- } finally {
- if (socket != null) {
- try {
- socket.close();
- } catch (IOException e) {
- }
- }
- }
- return -1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#buildForLaunch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
- */
- public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
- return false;
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/IPDAEventListener.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/IPDAEventListener.java
deleted file mode 100644
index 257c418..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/IPDAEventListener.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.model;
-
-import org.eclipse.debug.examples.core.pda.protocol.PDAEvent;
-
-/**
- * Listeners are notified of events occurring in a PDA program
- * being interpreted.
- *
- * @see org.eclipse.debug.examples.core.protocol.PDAVMStarted
- * @see org.eclipse.debug.examples.core.protocol.PDAVMTerminated
- * @see org.eclipse.debug.examples.core.protocol.PDAVMSuspneded
- * @see org.eclipse.debug.examples.core.protocol.PDAVMResumed
- * @see org.eclipse.debug.examples.core.protocol.PDAStarted
- * @see org.eclipse.debug.examples.core.protocol.PDAExited
- * @see org.eclipse.debug.examples.core.protocol.PDASuspended
- * @see org.eclipse.debug.examples.core.protocol.PDAResumed
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAUnimplementedInstructionEvent
- * @see org.eclipse.debug.examples.core.pda.protocol.PDARegisterData
- * @see org.eclipse.debug.examples.core.pda.protocol.PDANoSuchLabelEvent
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAEvalResultEvent
- */
-public interface IPDAEventListener {
-
- /**
- * Notification the given event occurred in the target program
- * being interpreted.
- *
- * @param event the event
- */
- public void handleEvent(PDAEvent event);
-
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAArray.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAArray.java
deleted file mode 100644
index bcc07ba..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAArray.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.model;
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IVariable;
-
-public class PDAArray extends PDAValue {
-
- /**
- * An array splits a value into its words
- *
- * @param value existing value
- * @throws DebugException
- */
- public PDAArray(PDAValue value) throws DebugException {
- super(value.getVariable(), value.getValueString());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#hasVariables()
- */
- public boolean hasVariables() throws DebugException {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#getVariables()
- */
- public IVariable[] getVariables() throws DebugException {
- String string = getValueString();
- String[] words = string.split("\\W+");
- IVariable[] variables = new IVariable[words.length];
- for (int i = 0; i < words.length; i++) {
- String word = words[i];
- variables[i] = new PDAArrayEntry(getPDADebugTarget(), i, new PDAValue(getVariable(), word));
- }
- return variables;
- }
-
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAArrayEntry.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAArrayEntry.java
deleted file mode 100644
index 9ff3ca7..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAArrayEntry.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.model;
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.core.model.IVariable;
-
-public class PDAArrayEntry extends PDADebugElement implements IVariable {
-
- private IValue fValue;
- private int fIndex;
-
- /**
- * Constructs a new array entry
- *
- * @param target debug target
- * @param index index in the array
- * @param value value of the entry
- */
- public PDAArrayEntry(IDebugTarget target, int index, IValue value) {
- super(target);
- fValue = value;
- fIndex = index;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IVariable#getValue()
- */
- public IValue getValue() throws DebugException {
- return fValue;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IVariable#getName()
- */
- public String getName() throws DebugException {
- return "[" + fIndex + "]";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IVariable#getReferenceTypeName()
- */
- public String getReferenceTypeName() throws DebugException {
- return "String";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IVariable#hasValueChanged()
- */
- public boolean hasValueChanged() throws DebugException {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValueModification#setValue(java.lang.String)
- */
- public void setValue(String expression) throws DebugException {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValueModification#setValue(org.eclipse.debug.core.model.IValue)
- */
- public void setValue(IValue value) throws DebugException {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValueModification#supportsValueModification()
- */
- public boolean supportsValueModification() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValueModification#verifyValue(java.lang.String)
- */
- public boolean verifyValue(String expression) throws DebugException {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValueModification#verifyValue(org.eclipse.debug.core.model.IValue)
- */
- public boolean verifyValue(IValue value) throws DebugException {
- return false;
- }
-
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugElement.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugElement.java
deleted file mode 100644
index fb854ba..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugElement.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.model;
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IBreakpointManager;
-import org.eclipse.debug.core.model.DebugElement;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
-import org.eclipse.debug.examples.core.pda.protocol.PDACommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDACommandResult;
-
-
-/**
- * Common function for PDA debug elements.
- */
-public class PDADebugElement extends DebugElement {
-
- /**
- * Constructs a new debug element in the given target.
- *
- * @param target debug target
- */
- public PDADebugElement(IDebugTarget target) {
- super(target);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugElement#getModelIdentifier()
- */
- public String getModelIdentifier() {
- return DebugCorePlugin.ID_PDA_DEBUG_MODEL;
- }
-
- /**
- * Sends a request to the PDA interpreter, waits for and returns the reply.
- *
- * @param request command
- * @return reply
- * @throws DebugException if the request fails
- *
- * @see org.eclipse.debug.examples.core.pda.protocol.PDATerminateCommand
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAVMSuspendCommand
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAVMResumeCommand
- *
- * @see org.eclipse.debug.examples.core.pda.protocol.PDASuspendCommand
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAResumeCommand
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAStepCommand
- * @see org.eclipse.debug.examples.core.pda.protocol.PDADropFrameCommand
- *
- * @see org.eclipse.debug.examples.core.pda.protocol.PDASetBreakpointCommand
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAClearBreakpointCommand
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAWatchCommand
- *
- * @see org.eclipse.debug.examples.core.pda.protocol.PDADataCommand
- * @see org.eclipse.debug.examples.core.pda.protocol.PDASetDataCommand
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAPopDataCommand
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAPushDataCommand
- *
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAEvalCommand
- *
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAEventStopCommand
- *
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAStackCommand
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAStackDepthCommand
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAFrameCommand
- *
- * @see org.eclipse.debug.examples.core.pda.protocol.PDASetVarCommand
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAVarCommand
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAChildrenCommand
- *
- * @see org.eclipse.debug.examples.core.pda.protocol.PDAGroupsCommand
- * @see org.eclipse.debug.examples.core.pda.protocol.PDARegistersCommand
- *
- * @since 3.5
- */
- public PDACommandResult sendCommand(PDACommand command) throws DebugException {
- return getPDADebugTarget().sendCommand(command);
- }
-
- /**
- * Returns the debug target as a PDA target.
- *
- * @return PDA debug target
- */
- protected PDADebugTarget getPDADebugTarget() {
- return (PDADebugTarget) getDebugTarget();
- }
-
- /**
- * Returns the breakpoint manager
- *
- * @return the breakpoint manager
- */
- protected IBreakpointManager getBreakpointManager() {
- return DebugPlugin.getDefault().getBreakpointManager();
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugTarget.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugTarget.java
deleted file mode 100644
index 92a5a99..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugTarget.java
+++ /dev/null
@@ -1,582 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.model;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.net.Socket;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.IBreakpointManager;
-import org.eclipse.debug.core.IBreakpointManagerListener;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IMemoryBlock;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
-import org.eclipse.debug.examples.core.pda.breakpoints.PDALineBreakpoint;
-import org.eclipse.debug.examples.core.pda.breakpoints.PDARunToLineBreakpoint;
-import org.eclipse.debug.examples.core.pda.protocol.PDACommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDACommandResult;
-import org.eclipse.debug.examples.core.pda.protocol.PDAEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDAEventStopCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDAExitedEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDARestartCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDAStartedEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDATerminateCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDAVMResumeCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDAVMResumedEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDAVMStartedEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDAVMSuspendCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDAVMSuspendedEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDAVMTerminatedEvent;
-
-
-/**
- * PDA Debug Target
- */
-public class PDADebugTarget extends PDADebugElement implements IDebugTarget, IBreakpointManagerListener, IPDAEventListener {
-
- // associated system process (VM)
- private IProcess fProcess;
-
- // containing launch object
- private ILaunch fLaunch;
-
- // sockets to communicate with VM
- private Socket fRequestSocket;
- private PrintWriter fRequestWriter;
- private BufferedReader fRequestReader;
- private Socket fEventSocket;
- private BufferedReader fEventReader;
-
- // suspended state
- private boolean fVMSuspended = false;
-
- // terminated state
- private boolean fTerminated = false;
-
- // threads
- private Map fThreads = Collections.synchronizedMap(new LinkedHashMap());
-
- // event dispatch job
- private EventDispatchJob fEventDispatch;
-
- // event listeners
- private List fEventListeners = Collections.synchronizedList(new ArrayList());
-
- /**
- * Listens to events from the PDA VM and fires corresponding
- * debug events.
- */
- class EventDispatchJob extends Job {
-
- public EventDispatchJob() {
- super("PDA Event Dispatch");
- setSystem(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus run(IProgressMonitor monitor) {
- String message = "";
- while (!isTerminated() && message != null) {
- try {
- message = fEventReader.readLine();
- if (message != null) {
- PDAEvent event = null;
- try {
- event = PDAEvent.parseEvent(message);
- }
- catch (IllegalArgumentException e) {
- DebugCorePlugin.getDefault().getLog().log(
- new Status (IStatus.ERROR, "org.eclipse.debug.examples.core", "Error parsing PDA event", e));
- continue;
- }
- Object[] listeners = fEventListeners.toArray();
- for (int i = 0; i < listeners.length; i++) {
- ((IPDAEventListener)listeners[i]).handleEvent(event);
- }
- }
- } catch (IOException e) {
- vmTerminated();
- }
- }
- return Status.OK_STATUS;
- }
-
- }
-
- /**
- * Registers the given event listener. The listener will be notified of
- * events in the program being interpretted. Has no effect if the listener
- * is already registered.
- *
- * @param listener event listener
- */
- public void addEventListener(IPDAEventListener listener) {
- synchronized(fEventListeners) {
- if (!fEventListeners.contains(listener)) {
- fEventListeners.add(listener);
- }
- }
- }
-
- /**
- * Deregisters the given event listener. Has no effect if the listener is
- * not currently registered.
- *
- * @param listener event listener
- */
- public void removeEventListener(IPDAEventListener listener) {
- fEventListeners.remove(listener);
- }
-
- /**
- * Constructs a new debug target in the given launch for the
- * associated PDA VM process.
- *
- * @param launch containing launch
- * @param process PDA VM
- * @param requestPort port to send requests to the VM
- * @param eventPort port to read events from
- * @exception CoreException if unable to connect to host
- */
- public PDADebugTarget(ILaunch launch, IProcess process, int requestPort, int eventPort) throws CoreException {
- super(null);
- fLaunch = launch;
- fProcess = process;
- addEventListener(this);
- try {
- // give interpreter a chance to start
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- }
- fRequestSocket = new Socket("localhost", requestPort);
- fRequestWriter = new PrintWriter(fRequestSocket.getOutputStream());
- fRequestReader = new BufferedReader(new InputStreamReader(fRequestSocket.getInputStream()));
- // give interpreter a chance to open next socket
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- }
- fEventSocket = new Socket("localhost", eventPort);
- fEventReader = new BufferedReader(new InputStreamReader(fEventSocket.getInputStream()));
- } catch (UnknownHostException e) {
- requestFailed("Unable to connect to PDA VM", e);
- } catch (IOException e) {
- requestFailed("Unable to connect to PDA VM", e);
- }
- fEventDispatch = new EventDispatchJob();
- fEventDispatch.schedule();
- IBreakpointManager breakpointManager = getBreakpointManager();
- breakpointManager.addBreakpointListener(this);
- breakpointManager.addBreakpointManagerListener(this);
- // initialize error hanlding to suspend on 'unimplemented instructions'
- // and 'no such label' errors
- sendCommand(new PDAEventStopCommand(PDAEventStopCommand.UNIMPINSTR, true));
- sendCommand(new PDAEventStopCommand(PDAEventStopCommand.NOSUCHLABEL, true));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugTarget#getProcess()
- */
- public IProcess getProcess() {
- return fProcess;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugTarget#getThreads()
- */
- public IThread[] getThreads() throws DebugException {
- synchronized (fThreads) {
- return (IThread[])fThreads.values().toArray(new IThread[fThreads.size()]);
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugTarget#hasThreads()
- */
- public boolean hasThreads() throws DebugException {
- return fThreads.size() > 0;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugTarget#getName()
- */
- public String getName() throws DebugException {
- return "PDA";
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugTarget#supportsBreakpoint(org.eclipse.debug.core.model.IBreakpoint)
- */
- public boolean supportsBreakpoint(IBreakpoint breakpoint) {
- if (!isTerminated() && breakpoint.getModelIdentifier().equals(getModelIdentifier())) {
- try {
- String program = getLaunch().getLaunchConfiguration().getAttribute(DebugCorePlugin.ATTR_PDA_PROGRAM, (String)null);
- if (program != null) {
- IResource resource = null;
- if (breakpoint instanceof PDARunToLineBreakpoint) {
- PDARunToLineBreakpoint rtl = (PDARunToLineBreakpoint) breakpoint;
- resource = rtl.getSourceFile();
- } else {
- IMarker marker = breakpoint.getMarker();
- if (marker != null) {
- resource = marker.getResource();
- }
- }
- if (resource != null) {
- IPath p = new Path(program);
- return resource.getFullPath().equals(p);
- }
- }
- } catch (CoreException e) {
- }
- }
- return false;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugElement#getDebugTarget()
- */
- public IDebugTarget getDebugTarget() {
- return this;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDebugElement#getLaunch()
- */
- public ILaunch getLaunch() {
- return fLaunch;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
- */
- public boolean canTerminate() {
- return getProcess().canTerminate();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
- */
- public synchronized boolean isTerminated() {
- return fTerminated || getProcess().isTerminated();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#terminate()
- */
- public void terminate() throws DebugException {
-//#ifdef ex2
-//# // TODO: Exercise 2 - send termination request to interpreter
-//#else
- sendCommand(new PDATerminateCommand());
-//#endif
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
- */
- public boolean canResume() {
- return !isTerminated() && isSuspended();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend()
- */
- public boolean canSuspend() {
- return !isTerminated() && !isSuspended();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
- */
- public synchronized boolean isSuspended() {
- return !isTerminated() && fVMSuspended;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#resume()
- */
- public void resume() throws DebugException {
- sendCommand(new PDAVMResumeCommand());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#suspend()
- */
- public void suspend() throws DebugException {
- sendCommand(new PDAVMSuspendCommand());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointListener#breakpointAdded(org.eclipse.debug.core.model.IBreakpoint)
- */
- public void breakpointAdded(IBreakpoint breakpoint) {
- if (supportsBreakpoint(breakpoint)) {
- try {
- if ((breakpoint.isEnabled() && getBreakpointManager().isEnabled()) || !breakpoint.isRegistered()) {
- PDALineBreakpoint pdaBreakpoint = (PDALineBreakpoint)breakpoint;
- pdaBreakpoint.install(this);
- }
- } catch (CoreException e) {
- }
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointListener#breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)
- */
- public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
- if (supportsBreakpoint(breakpoint)) {
- try {
- PDALineBreakpoint pdaBreakpoint = (PDALineBreakpoint)breakpoint;
- pdaBreakpoint.remove(this);
- } catch (CoreException e) {
- }
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointListener#breakpointChanged(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)
- */
- public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
- if (supportsBreakpoint(breakpoint)) {
- try {
- if (breakpoint.isEnabled() && getBreakpointManager().isEnabled()) {
- breakpointAdded(breakpoint);
- } else {
- breakpointRemoved(breakpoint, null);
- }
- } catch (CoreException e) {
- }
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDisconnect#canDisconnect()
- */
- public boolean canDisconnect() {
- return false;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDisconnect#disconnect()
- */
- public void disconnect() throws DebugException {
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IDisconnect#isDisconnected()
- */
- public boolean isDisconnected() {
- return false;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockRetrieval#supportsStorageRetrieval()
- */
- public boolean supportsStorageRetrieval() {
- return false;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IMemoryBlockRetrieval#getMemoryBlock(long, long)
- */
- public IMemoryBlock getMemoryBlock(long startAddress, long length) throws DebugException {
- return null;
- }
-
- /**
- * Notification we have connected to the VM and it has started.
- * Resume the VM.
- */
- private void vmStarted(PDAVMStartedEvent event) {
- fireCreationEvent();
- installDeferredBreakpoints();
- try {
- resume();
- } catch (DebugException e) {
- }
- }
-
- /**
- * Install breakpoints that are already registered with the breakpoint
- * manager.
- */
- private void installDeferredBreakpoints() {
- IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints(getModelIdentifier());
- for (int i = 0; i < breakpoints.length; i++) {
- breakpointAdded(breakpoints[i]);
- }
- }
-
- /**
- * Called when this debug target terminates.
- */
- private void vmTerminated() {
- setTerminated(true);
- fThreads.clear();
- IBreakpointManager breakpointManager = getBreakpointManager();
- breakpointManager.removeBreakpointListener(this);
- breakpointManager.removeBreakpointManagerListener(this);
- fireTerminateEvent();
- removeEventListener(this);
- }
-
- private void vmResumed(PDAVMResumedEvent event) {
- setVMSuspended(false);
- fireResumeEvent(calcDetail(event.fReason));
- }
-
- private void vmSuspended(PDAVMSuspendedEvent event) {
- setVMSuspended(true);
- fireSuspendEvent(calcDetail(event.fReason));
- }
-
- private int calcDetail(String reason) {
- if (reason.equals("breakpoint") || reason.equals("watch")) {
- return DebugEvent.BREAKPOINT;
- } else if (reason.equals("step")) {
- return DebugEvent.STEP_OVER;
- } else if (reason.equals("drop")) {
- return DebugEvent.STEP_RETURN;
- } else if (reason.equals("client")) {
- return DebugEvent.CLIENT_REQUEST;
- } else if (reason.equals("event")) {
- return DebugEvent.BREAKPOINT;
- } else {
- return DebugEvent.UNSPECIFIED;
- }
- }
-
- private void started(PDAStartedEvent event) {
- PDAThread newThread = new PDAThread(this, event.fThreadId);
- fThreads.put(new Integer(event.fThreadId), newThread);
- newThread.start();
- }
-
- private void exited(PDAExitedEvent event) {
- PDAThread thread = (PDAThread)fThreads.remove(new Integer(event.fThreadId));
- if (thread != null) {
- thread.exit();
- }
- }
-
- private synchronized void setVMSuspended(boolean suspended) {
- fVMSuspended = suspended;
- }
-
- private synchronized void setTerminated(boolean terminated) {
- fTerminated = terminated;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.pda.model.PDADebugElement#sendRequest(java.lang.String)
- */
- private String sendRequest(String request) throws DebugException {
- synchronized (fRequestSocket) {
- fRequestWriter.println(request);
- fRequestWriter.flush();
- try {
- // wait for reply
- String retVal = fRequestReader.readLine();
- if (retVal == null) {
- requestFailed("Request failed: " + request + ". Debugger connection closed.", null);
- }
- return retVal;
- } catch (IOException e) {
- requestFailed("Request failed: " + request, e);
- }
- }
- // Should never reach this satement.
- return null;
- }
-
- public PDACommandResult sendCommand(PDACommand command) throws DebugException {
- String response = sendRequest(command.getRequest());
- return command.createResult(response);
- }
-
- /**
- * When the breakpoint manager disables, remove all registered breakpoints
- * requests from the VM. When it enables, reinstall them.
- */
- public void breakpointManagerEnablementChanged(boolean enabled) {
- IBreakpoint[] breakpoints = getBreakpointManager().getBreakpoints(getModelIdentifier());
- for (int i = 0; i < breakpoints.length; i++) {
- if (enabled) {
- breakpointAdded(breakpoints[i]);
- } else {
- breakpointRemoved(breakpoints[i], null);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.pda.model.IPDAEventListener#handleEvent(java.lang.String)
- */
- public void handleEvent(PDAEvent event) {
- if (event instanceof PDAStartedEvent) {
- started((PDAStartedEvent)event);
- } else if (event instanceof PDAExitedEvent) {
- exited((PDAExitedEvent)event);
- } else if (event instanceof PDAVMStartedEvent) {
- vmStarted((PDAVMStartedEvent)event);
- } else if (event instanceof PDAVMTerminatedEvent) {
- vmTerminated();
- } else if (event instanceof PDAVMSuspendedEvent) {
- vmSuspended((PDAVMSuspendedEvent)event);
- } else if (event instanceof PDAVMResumedEvent) {
- vmResumed((PDAVMResumedEvent)event);
- }
- }
-
- /**
- * Returns this debug target's single thread, or <code>null</code>
- * if terminated.
- *
- * @param threadId ID of the thread to return, or <code>0</code>
- * to return the first available thread
- * @return this debug target's single thread, or <code>null</code>
- * if terminated
- */
- public PDAThread getThread(int threadId) {
- if (threadId > 0) {
- return (PDAThread)fThreads.get(new Integer(threadId));
- } else {
- synchronized(fThreads) {
- if (fThreads.size() > 0) {
- return (PDAThread)fThreads.values().iterator().next();
- }
- }
- }
- return null;
- }
-
- /**
- * Restarts the current debug session
- *
- * @throws DebugException
- */
- public void restart() throws DebugException {
- sendCommand(new PDARestartCommand());
- }
-
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackFrame.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackFrame.java
deleted file mode 100644
index b235690..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackFrame.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.model;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IRegisterGroup;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.debug.examples.core.pda.protocol.PDAFrameData;
-
-/**
- * PDA stack frame.
- */
-public class PDAStackFrame extends PDADebugElement implements IStackFrame {
-
- private PDAThread fThread;
- private String fName;
- private int fPC;
- private IPath fFilePath;
- private int fId;
-
- /**
- * Constructs a stack frame in the given thread with the given
- * frame data.
- *
- * @param thread
- * @param data frame data
- * @param id stack frame id (0 is the bottom of the stack)
- */
- public PDAStackFrame(PDAThread thread, PDAFrameData data, int id) {
- super(thread.getPDADebugTarget());
- fId = id;
- fThread = thread;
- init(data);
- }
-
- /**
- * Initializes this frame based on its data
- *
- * @param data
- */
- private void init(PDAFrameData data) {
- fFilePath = data.fFilePath;
- fPC = data.fPC + 1;
- fName = data.fFunction;
- IVariable[] vars = new IVariable[data.fVariables.length];
- for (int i = 0; i < data.fVariables.length; i++) {
- vars[i] = new PDAVariable(this, data.fVariables[i]);
- }
- fThread.setVariables(this, vars);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#getThread()
- */
- public IThread getThread() {
- return fThread;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#getVariables()
- */
- public IVariable[] getVariables() throws DebugException {
- return fThread.getVariables(this);
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#hasVariables()
- */
- public boolean hasVariables() throws DebugException {
- return getVariables().length > 0;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#getLineNumber()
- */
- public int getLineNumber() throws DebugException {
- return fPC;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#getCharStart()
- */
- public int getCharStart() throws DebugException {
- return -1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#getCharEnd()
- */
- public int getCharEnd() throws DebugException {
- return -1;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#getName()
- */
- public String getName() throws DebugException {
- return fName;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#getRegisterGroups()
- */
- public IRegisterGroup[] getRegisterGroups() throws DebugException {
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStackFrame#hasRegisterGroups()
- */
- public boolean hasRegisterGroups() throws DebugException {
- return false;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#canStepInto()
- */
- public boolean canStepInto() {
- return getThread().canStepInto();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#canStepOver()
- */
- public boolean canStepOver() {
- return getThread().canStepOver();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#canStepReturn()
- */
- public boolean canStepReturn() {
- return getThread().canStepReturn();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#isStepping()
- */
- public boolean isStepping() {
- return getThread().isStepping();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#stepInto()
- */
- public void stepInto() throws DebugException {
- getThread().stepInto();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#stepOver()
- */
- public void stepOver() throws DebugException {
- getThread().stepOver();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#stepReturn()
- */
- public void stepReturn() throws DebugException {
- getThread().stepReturn();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
- */
- public boolean canResume() {
- return getThread().canResume();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend()
- */
- public boolean canSuspend() {
- return getThread().canSuspend();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
- */
- public boolean isSuspended() {
- return getThread().isSuspended();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#resume()
- */
- public void resume() throws DebugException {
- getThread().resume();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#suspend()
- */
- public void suspend() throws DebugException {
- getThread().suspend();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
- */
- public boolean canTerminate() {
- return getThread().canTerminate();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
- */
- public boolean isTerminated() {
- return getThread().isTerminated();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#terminate()
- */
- public void terminate() throws DebugException {
- getThread().terminate();
- }
-
- /**
- * Returns the name of the source file this stack frame is associated
- * with.
- *
- * @return the name of the source file this stack frame is associated
- * with
- */
- public String getSourceName() {
- return fFilePath.lastSegment();
- }
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj instanceof PDAStackFrame) {
- PDAStackFrame sf = (PDAStackFrame)obj;
- return sf.getThread().equals(getThread()) &&
- sf.getSourceName().equals(getSourceName()) &&
- sf.fId == fId;
- }
- return false;
- }
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getSourceName().hashCode() + fId;
- }
-
- /**
- * Returns this stack frame's unique identifier within its thread
- *
- * @return this stack frame's unique identifier within its thread
- */
- protected int getIdentifier() {
- return fId;
- }
-
- /**
- * Returns the stack frame's thread's unique identifier
- *
- * @return this stack frame's thread's unique identifier
- *
- * @since 3.5
- */
- protected int getThreadIdentifier() {
- return fThread.getIdentifier();
- }
-
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackValue.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackValue.java
deleted file mode 100644
index a7909d4..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackValue.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.model;
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.core.model.IVariable;
-
-/**
- * A value on the data stack
- */
-public class PDAStackValue extends PDADebugElement implements IValue {
-
- final private PDAThread fThread;
- final private String fValue;
- final private int fIndex;
-
- /**
- * Constructs a value that appears on the data stack
- *
- * @param target debug target
- * @param value value on the stack
- * @param index index on the stack
- */
- public PDAStackValue(PDAThread thread, String value, int index) {
- super(thread.getDebugTarget());
- fThread = thread;
- fValue = value;
- fIndex = index;
- }
-
- public PDAThread getThread() {
- return fThread;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#getValueString()
- */
- public String getValueString() throws DebugException {
- return fValue;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#isAllocated()
- */
- public boolean isAllocated() throws DebugException {
- return true;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#getVariables()
- */
- public IVariable[] getVariables() throws DebugException {
- return new IVariable[0];
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#hasVariables()
- */
- public boolean hasVariables() throws DebugException {
- return false;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#getReferenceTypeName()
- */
- public String getReferenceTypeName() throws DebugException {
- return null;
- }
- /*
- * (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- return obj instanceof PDAStackValue &&
- ((PDAStackValue)obj).fValue.equals(fValue) &&
- ((PDAStackValue)obj).fIndex == fIndex;
- }
- /*
- * (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return super.hashCode() + fIndex;
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAThread.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAThread.java
deleted file mode 100644
index 8d92f12..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAThread.java
+++ /dev/null
@@ -1,563 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.model;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.debug.examples.core.pda.protocol.PDADataCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDADropFrameCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDAEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDAListResult;
-import org.eclipse.debug.examples.core.pda.protocol.PDANoSuchLabelEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDAPopDataCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDAPushDataCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDAResumeCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDAResumedEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDARunControlEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDAStackCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDAStackCommandResult;
-import org.eclipse.debug.examples.core.pda.protocol.PDAStepCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDASuspendCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDASuspendedEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDAUnimplementedInstructionEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDAVMResumedEvent;
-import org.eclipse.debug.examples.core.pda.protocol.PDAVMSuspendedEvent;
-
-/**
- * A PDA thread. A PDA VM is single threaded.
- */
-public class PDAThread extends PDADebugElement implements IThread, IPDAEventListener {
-
- /**
- * ID of this thread as reported by PDA.
- */
- private final int fThreadId;
-
- /**
- * Breakpoint this thread is suspended at or <code>null</code>
- * if none.
- */
- private IBreakpoint fBreakpoint;
-
- /**
- * Whether this thread is stepping
- */
- private boolean fStepping = false;
-
- /**
- * Whether this thread is suspended
- */
- private boolean fSuspended = false;
-
- /**
- * Most recent error event or <code>null</code>
- */
- private String fErrorEvent;
-
- /**
- * Table mapping stack frames to current variables
- */
- private Map fVariables = Collections.synchronizedMap(new HashMap());
-
- /**
- * Constructs a new thread for the given target
- *
- * @param target VM
- */
- public PDAThread(PDADebugTarget target, int threadId) {
- super(target);
- fThreadId = threadId;
- }
-
- /**
- * Called by the debug target after the thread is created.
- *
- * @since 3.5
- */
- void start() {
- fireCreationEvent();
- getPDADebugTarget().addEventListener(this);
- }
-
- /**
- * Called by the debug target before the thread is removed.
- *
- * @since 3.5
- */
- void exit() {
- getPDADebugTarget().removeEventListener(this);
- fireTerminateEvent();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IThread#getStackFrames()
- */
- public IStackFrame[] getStackFrames() throws DebugException {
- if (isSuspended()) {
- PDAStackCommandResult result = (PDAStackCommandResult)sendCommand(new PDAStackCommand(fThreadId));
- IStackFrame[] frames = new IStackFrame[result.fFrames.length];
- for (int i = 0; i < result.fFrames.length; i++) {
- frames[frames.length - i - 1] = new PDAStackFrame(this, result.fFrames[i], i);
- }
- return frames;
- }
- return new IStackFrame[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IThread#hasStackFrames()
- */
- public boolean hasStackFrames() throws DebugException {
- return isSuspended();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IThread#getPriority()
- */
- public int getPriority() throws DebugException {
- return 0;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IThread#getTopStackFrame()
- */
- public IStackFrame getTopStackFrame() throws DebugException {
- IStackFrame[] frames = getStackFrames();
- if (frames.length > 0) {
- return frames[0];
- }
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IThread#getName()
- */
- public String getName() {
- return "Main thread";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IThread#getBreakpoints()
- */
- public synchronized IBreakpoint[] getBreakpoints() {
- if (fBreakpoint == null) {
- return new IBreakpoint[0];
- }
- return new IBreakpoint[]{fBreakpoint};
- }
-
- /**
- * Notifies this thread it has been suspended by the given breakpoint.
- *
- * @param breakpoint breakpoint
- */
- public synchronized void suspendedBy(IBreakpoint breakpoint) {
- fBreakpoint = breakpoint;
- suspended(DebugEvent.BREAKPOINT);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
- */
- public boolean canResume() {
- return isSuspended() && !getDebugTarget().isSuspended();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend()
- */
- public boolean canSuspend() {
- return !isSuspended();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
- */
- public boolean isSuspended() {
- if (getDebugTarget().isTerminated()) {
- return false;
- }
- if (getDebugTarget().isSuspended()) {
- return true;
- }
- synchronized (this) {
- return fSuspended;
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#resume()
- */
- public void resume() throws DebugException {
- //#ifdef ex2
-//# // TODO: Exercise 2 - send resume request to interpreter
- //#else
- sendCommand(new PDAResumeCommand(fThreadId));
- //#endif
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ISuspendResume#suspend()
- */
- public void suspend() throws DebugException {
- //#ifdef ex2
-//# // TODO: Exercise 2 - send suspend request to interpreter
- //#else
- sendCommand(new PDASuspendCommand(fThreadId));
- //#endif
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#canStepInto()
- */
- public boolean canStepInto() {
- return false;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#canStepOver()
- */
- public boolean canStepOver() {
- return isSuspended();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#canStepReturn()
- */
- public boolean canStepReturn() {
- return false;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#isStepping()
- */
- public boolean isStepping() {
- return fStepping;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#stepInto()
- */
- public void stepInto() throws DebugException {
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#stepOver()
- */
- public void stepOver() throws DebugException {
- sendCommand(new PDAStepCommand(fThreadId));
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IStep#stepReturn()
- */
- public void stepReturn() throws DebugException {
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
- */
- public boolean canTerminate() {
- return !isTerminated();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
- */
- public boolean isTerminated() {
- return getDebugTarget().isTerminated();
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ITerminate#terminate()
- */
- public void terminate() throws DebugException {
- getDebugTarget().terminate();
- }
-
- /**
- * Sets whether this thread is stepping
- *
- * @param stepping whether stepping
- */
- private synchronized void setStepping(boolean stepping) {
- fStepping = stepping;
- }
-
- /**
- * Sets whether this thread is suspended
- *
- * @param suspended whether suspended
- */
- private synchronized void setSuspended(boolean suspended) {
- fSuspended = suspended;
- }
-
- /**
- * Sets the most recent error event encountered, or <code>null</code>
- * to clear the most recent error
- *
- * @param event one of 'unimpinstr' or 'nosuchlabel' or <code>null</code>
- */
- private synchronized void setError(String event) {
- fErrorEvent = event;
- }
-
- /**
- * Returns the most recent error event encountered since the last
- * suspend, or <code>null</code> if none.
- *
- * @return the most recent error event encountered since the last
- * suspend, or <code>null</code> if none
- */
- public Object getError() {
- return fErrorEvent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.examples.core.pda.model.IPDAEventListener#handleEvent(java.lang.String)
- */
- public void handleEvent(PDAEvent _event) {
- if (_event instanceof PDARunControlEvent && fThreadId == ((PDARunControlEvent)_event).fThreadId) {
- PDARunControlEvent event = (PDARunControlEvent)_event;
- // clear previous state
- fBreakpoint = null;
- setStepping(false);
-
- // handle events
- if (event instanceof PDAResumedEvent || event instanceof PDAVMResumedEvent) {
- setSuspended(false);
- if ("step".equals(event.fReason)) {
- setStepping(true);
- resumed(DebugEvent.STEP_OVER);
- //#ifdef ex2
- //# }
- //# // TODO: Exercise 2 - handle/fire "client" resume event
- //#else
- } else if ("client".equals(event.fReason)) {
- resumed(DebugEvent.CLIENT_REQUEST);
- }
- //#endif
- //#ifdef ex5
- //# // TODO: Exercise 5 - handle start of drop event
- //#else
- else if ("drop".equals(event.fReason)) {
- resumed(DebugEvent.STEP_RETURN);
- }
- //#endif
- } else if (event instanceof PDASuspendedEvent || event instanceof PDAVMSuspendedEvent) {
- setSuspended(true);
- //#ifdef ex2
- //# // TODO: Exercise 2 - handle/fire "client" suspend event
- //# if (event.endsWith("step")) {
- //# suspended(DebugEvent.STEP_END);
- //# } else if (event.startsWith("suspended event") && getError() != null) {
- //# exceptionHit();
- //# }
- //#else
- if ("client".equals(event.fReason)) {
- suspended(DebugEvent.CLIENT_REQUEST);
- } else if ("step".equals(event.fReason)) {
- suspended(DebugEvent.STEP_END);
- } else if ("event".equals(event.fReason) && getError() != null) {
- exceptionHit();
- }
- //#endif
- //#ifdef ex5
- //# // TODO: Exercise 5 - handle end of drop event
- //#else
- else if ("drop".equals(event.fReason)) {
- suspended(DebugEvent.STEP_END);
- }
- //#endif
- } else if (_event instanceof PDANoSuchLabelEvent ||
- _event instanceof PDAUnimplementedInstructionEvent)
- {
- setError(event.fMessage);
- }
- }
- }
-
- /**
- * Notification the target has resumed for the given reason.
- * Clears any error condition that was last encountered and
- * fires a resume event, and clears all cached variables
- * for stack frames.
- *
- * @param detail reason for the resume
- */
- private void resumed(int detail) {
- setError(null);
- fVariables.clear();
- fireResumeEvent(detail);
- }
-
- /**
- * Notification the target has suspended for the given reason
- *
- * @param detail reason for the suspend
- */
- private void suspended(int detail) {
- fireSuspendEvent(detail);
- }
-
- /**
- * Notification an error was encountered. Fires a breakpoint
- * suspend event.
- */
- private void exceptionHit() {
- suspended(DebugEvent.BREAKPOINT);
- }
-
- /**
- * Sets the current variables for the given stack frame. Called
- * by PDA stack frame when it is created.
- *
- * @param frame
- * @param variables
- */
- protected void setVariables(IStackFrame frame, IVariable[] variables) {
- synchronized (fVariables) {
- fVariables.put(frame, variables);
- }
- }
-
- /**
- * Returns the current variables for the given stack frame, or
- * <code>null</code> if none.
- *
- * @param frame stack frame
- * @return variables or <code>null</code>
- */
- protected IVariable[] getVariables(IStackFrame frame) {
- synchronized (fVariables) {
- IVariable[] variables = (IVariable[]) fVariables.get(frame);
- if (variables == null) {
- return new IVariable[0];
- }
- return variables;
- }
- }
-
- /**
- * Pops the top frame off the callstack.
- *
- * @throws DebugException
- *
- * @since 3.5
- */
- public void popFrame() throws DebugException {
- //#ifdef ex5
-//# // TODO: Exercise 5 - send drop request
- //#else
- sendCommand(new PDADropFrameCommand(fThreadId));
- //#endif
- }
-
- /**
- * Returns whether this thread can pop the top stack frame.
- *
- * @return whether this thread can pop the top stack frame
- *
- * @since 3.5
- */
- public boolean canPopFrame() {
- //#ifdef ex5
-//# // TODO: Exercise 5 - allow pop if there is more than 1 frame on the stack
- //#else
- try {
- return getStackFrames().length > 1;
- } catch (DebugException e) {
- }
- //#endif
- return false;
- }
-
- /**
- * Returns the values on the data stack (top down)
- *
- * @return the values on the data stack (top down)
- *
- * @since 3.5
- */
- public IValue[] getDataStack() throws DebugException {
- PDAListResult result = (PDAListResult)sendCommand(new PDADataCommand(fThreadId));
- if (result.fValues.length > 0) {
- IValue[] values = new IValue[result.fValues.length];
- for (int i = 0; i < result.fValues.length; i++) {
- values[values.length - i - 1] = new PDAStackValue(this, result.fValues[i], i);
- }
- return values;
- }
- return new IValue[0];
- }
-
- /**
- * Returns whether popping the data stack is currently permitted
- *
- * @return whether popping the data stack is currently permitted
- *
- * @since 3.5
- */
- public boolean canPopData() {
- try {
- return !isTerminated() && isSuspended() && getDataStack().length > 0;
- } catch (DebugException e) {
- }
- return false;
- }
-
- /**
- * Pops and returns the top of the data stack
- *
- * @return the top value on the stack
- * @throws DebugException if the stack is empty or the request fails
- *
- * @since 3.5
- */
- public IValue popData() throws DebugException {
- IValue[] dataStack = getDataStack();
- if (dataStack.length > 0) {
- sendCommand(new PDAPopDataCommand(fThreadId));
- return dataStack[0];
- }
- requestFailed("Empty stack", null);
- return null;
- }
-
- /**
- * Returns whether pushing a value is currently supported.
- *
- * @return whether pushing a value is currently supported
- *
- * @since 3.5
- */
- public boolean canPushData() {
- return !isTerminated() && isSuspended();
- }
-
- /**
- * Pushes a value onto the stack.
- *
- * @param value value to push
- * @throws DebugException on failure
- *
- * @since 3.5
- */
- public void pushData(String value) throws DebugException {
- sendCommand(new PDAPushDataCommand(fThreadId, value));
- }
-
- /**
- * Returns this thread's unique identifier
- *
- * @return this thread's unique identifier
- *
- * @since 3.5
- */
- public int getIdentifier() {
- return fThreadId;
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAValue.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAValue.java
deleted file mode 100644
index a4c6cc7..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAValue.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.model;
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.debug.examples.core.pda.protocol.PDAChildrenCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDAListResult;
-
-/**
- * Value of a PDA variable.
- */
-public class PDAValue extends PDADebugElement implements IValue {
-
- final private PDAVariable fVariable;
- final private String fValue;
-
- public PDAValue(PDAVariable variable, String value) {
- super(variable.getStackFrame().getPDADebugTarget());
- fVariable = variable;
- fValue = value;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#getReferenceTypeName()
- */
- public String getReferenceTypeName() throws DebugException {
- try {
- Integer.parseInt(fValue);
- } catch (NumberFormatException e) {
- return "text";
- }
- return "integer";
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#getValueString()
- */
- public String getValueString() throws DebugException {
- return fValue;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#isAllocated()
- */
- public boolean isAllocated() throws DebugException {
- return true;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#getVariables()
- */
- public IVariable[] getVariables() throws DebugException {
- PDAStackFrame frame = fVariable.getStackFrame();
- PDAListResult result = (PDAListResult) sendCommand(
- new PDAChildrenCommand(frame.getThreadIdentifier(), frame.getIdentifier(), fVariable.getName()) );
-
- IVariable[] children = new IVariable[result.fValues.length];
- for(int i = 0; i < result.fValues.length; i++) {
- children[i] = new PDAVariable(frame, result.fValues[i]);
- }
- return children;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValue#hasVariables()
- */
- public boolean hasVariables() throws DebugException {
- if (getVariables().length != 0) {
- return true;
- }
- // Value with multiple words can be show as an array using logical
- // structures. If the value has multiple words, it needs to indicate
- // that it has children even if logical structures are not turned on.
- return fValue.split("\\W+").length > 1;
- }
- /*
- * (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- return obj instanceof PDAValue && ((PDAValue)obj).fValue.equals(fValue);
- }
- /*
- * (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return fValue.hashCode();
- }
-
- /**
- * Returns the variable that this value was created for.
- *
- * @return The variable that this value was created for.
- *
- * @since 3.5
- */
- public PDAVariable getVariable() {
- return fVariable;
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAVariable.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAVariable.java
deleted file mode 100644
index 2329b58..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAVariable.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- * Wind River Systems - added support for IToggleBreakpointsTargetFactory
- * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.model;
-
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.debug.examples.core.pda.protocol.PDACommandResult;
-import org.eclipse.debug.examples.core.pda.protocol.PDASetVarCommand;
-import org.eclipse.debug.examples.core.pda.protocol.PDAVarCommand;
-
-/**
- * A variable in a PDA stack frame
- */
-public class PDAVariable extends PDADebugElement implements IVariable {
-
- // name & stack frmae
- private String fName;
- private PDAStackFrame fFrame;
-
- /**
- * Constructs a variable contained in the given stack frame
- * with the given name.
- *
- * @param frame owning stack frame
- * @param name variable name
- */
- public PDAVariable(PDAStackFrame frame, String name) {
- super(frame.getPDADebugTarget());
- fFrame = frame;
- fName = name;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IVariable#getValue()
- */
- public IValue getValue() throws DebugException {
- PDACommandResult result = sendCommand(new PDAVarCommand(
- fFrame.getThreadIdentifier(), getStackFrame().getIdentifier(), getName()));
- return new PDAValue(this, result.fResponseText);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IVariable#getName()
- */
- public String getName() throws DebugException {
- return fName;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IVariable#getReferenceTypeName()
- */
- public String getReferenceTypeName() throws DebugException {
- return "Thing";
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IVariable#hasValueChanged()
- */
- public boolean hasValueChanged() throws DebugException {
- return false;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValueModification#setValue(java.lang.String)
- */
- public void setValue(String expression) throws DebugException {
- sendCommand(new PDASetVarCommand(
- fFrame.getThreadIdentifier(), getStackFrame().getIdentifier(), getName(), expression));
- fireChangeEvent(DebugEvent.CONTENT);
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValueModification#setValue(org.eclipse.debug.core.model.IValue)
- */
- public void setValue(IValue value) throws DebugException {
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValueModification#supportsValueModification()
- */
- public boolean supportsValueModification() {
- return true;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValueModification#verifyValue(java.lang.String)
- */
- public boolean verifyValue(String expression) throws DebugException {
- return true;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.IValueModification#verifyValue(org.eclipse.debug.core.model.IValue)
- */
- public boolean verifyValue(IValue value) throws DebugException {
- return false;
- }
-
- /**
- * Returns the stack frame owning this variable.
- *
- * @return the stack frame owning this variable
- */
- public PDAStackFrame getStackFrame() {
- return fFrame;
- }
-
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/WordStructureDelegate.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/WordStructureDelegate.java
deleted file mode 100644
index dbb06cb..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/WordStructureDelegate.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.model;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.ILogicalStructureTypeDelegate;
-import org.eclipse.debug.core.model.IValue;
-
-/**
- * Logical stucture to translate a string into its words.
- */
-public class WordStructureDelegate implements ILogicalStructureTypeDelegate {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ILogicalStructureTypeDelegate#providesLogicalStructure(org.eclipse.debug.core.model.IValue)
- */
- public boolean providesLogicalStructure(IValue value) {
- //#ifdef ex6
-//# // TODO: Exercise 6 - provide logical structures if the value has multiple words
- //#else
- try {
- String string = value.getValueString();
- String[] words = string.split("\\W+");
- return words.length > 1;
- } catch (DebugException e) {
- }
- //#endif
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ILogicalStructureTypeDelegate#getLogicalStructure(org.eclipse.debug.core.model.IValue)
- */
- public IValue getLogicalStructure(IValue value) throws CoreException {
- //#ifdef ex6
-//# // TODO: Exercise 6 - create an array from the given value
-//# return null;
- //#else
- return new PDAArray((PDAValue)value);
- //#endif
- }
-
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDABitFieldData.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDABitFieldData.java
deleted file mode 100644
index a1cf5e3..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDABitFieldData.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-/**
- * Object representing a bit field in the stack command results.
- *
- * @see PDARegistersCommand
- */
-public class PDABitFieldData {
-
- final public String fName;
- final public int fOffset;
- final public int fCount;
- final public Map fMnemonics;
-
- PDABitFieldData(String bitFieldString) {
- StringTokenizer st = new StringTokenizer(bitFieldString, " ");
-
- fName = st.nextToken();
- fOffset = Integer.parseInt(st.nextToken());
- fCount = Integer.parseInt(st.nextToken());
-
- fMnemonics = new LinkedHashMap(0);
- while (st.hasMoreTokens()) {
- fMnemonics.put(st.nextToken(), st.nextToken());
- }
- }
-}
\ No newline at end of file
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAChildrenCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAChildrenCommand.java
deleted file mode 100644
index f9a3f00..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAChildrenCommand.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Retrieves data stack information
- *
- * <pre>
- * C: children {thread_id} {frame_id} {variable_name}
- * R: {child variable 1}|{child variable 2}|{child variable 3}|...|
- *
- * Errors:
- * error: invalid thread
- * </pre>
- */
-public class PDAChildrenCommand extends PDACommand {
-
- public PDAChildrenCommand(int threadId, int frameId, String name ) {
- super("children " + threadId + " " + frameId + " " + name);
- }
-
- public PDACommandResult createResult(String resultText) {
- return new PDAListResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAClearBreakpointCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAClearBreakpointCommand.java
deleted file mode 100644
index 07dba5b..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAClearBreakpointCommand.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Clears any breakpoint set on given line
- *
- * <pre>
- * C: clear {line}
- * R: ok
- * </pre>
- */
-public class PDAClearBreakpointCommand extends PDACommand {
-
- public PDAClearBreakpointCommand(int line) {
- super("clear " + line);
- }
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommand.java
deleted file mode 100644
index 9aa2bfb..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommand.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Base class for PDA commands. Sub-classes should format the request string
- * and implement the method to create the proper result object.
- */
-abstract public class PDACommand {
-
- final private String fRequest;
-
- public PDACommand(String request) {
- fRequest = request;
- }
-
- /**
- * Returns the request to be sent to PDA.
- */
- public String getRequest() {
- return fRequest;
- }
-
- /**
- * Returns the command result based on the given PDA response. This command
- * uses the class type parameter as the return type to allow the compiler to
- * enforce the correct command result. This class must be implemented by
- * each command to create the concrete result type.
- */
- abstract public PDACommandResult createResult(String resultText);
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommandResult.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommandResult.java
deleted file mode 100644
index 9991b01..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommandResult.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-
-/**
- * Basic command result object. This command result simply allows access to the
- * PDA response. Sub-classes may override to optionally parse the response text
- * and return higher-level objects.
- */
-public class PDACommandResult {
-
- final public String fResponseText;
-
- public PDACommandResult(String response) {
- fResponseText = response;
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADataCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADataCommand.java
deleted file mode 100644
index 66ba35a..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADataCommand.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Return the contents of the data stack; reply is the data from oldest to newest
- * as a single string
- *
- * <pre>
- * C: data {thread_id}
- * R: {value 1}|{value 2}|{value 3}|...|
- *
- * Errors:
- * error: invalid thread
- * </pre>
- */
-public class PDADataCommand extends PDACommand {
-
- public PDADataCommand(int threadId) {
- super("data " + threadId);
- }
-
- public PDACommandResult createResult(String resultText) {
- return new PDAListResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADropFrameCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADropFrameCommand.java
deleted file mode 100644
index 2204fa1..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADropFrameCommand.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Pops the top stack frame off the call stack setting the instruction pointer to
- * the calling statement in the calling frame
- *
- * <pre>
- * If VM running:
- * C: drop {thread_id}
- * R: ok
- * E: resumed {thread_id} drop
- * E: suspended {thread_id} drop
- *
- * If VM suspended:
- * C: drop {thread_id}
- * R: ok
- * E: vmresumed drop
- * E: vmsuspended {thread_id} drop
- *
- * Errors:
- * error: invalid thread
- * </pre>
- */
-public class PDADropFrameCommand extends PDACommand {
-
- public PDADropFrameCommand(int threadId) {
- super("drop " + threadId);
- }
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalCommand.java
deleted file mode 100644
index bb0bdc6..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalCommand.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Causes the interperter to execute the given set of instructions. At the end
- * of the evaluation the top value is poped off the stack and returned in the
- * evaluation result.
- *
- * <pre>
- * C: eval {thread_id} {instruction}%20{parameter}|{instruction}%20{parameter}|...
- * R: ok
- * E: resumed {thread_id} client
- * E: evalresult result
- * E: suspended {thread_id} eval
- *
- * Errors:
- * error: invalid thread
- * error: cannot evaluate while vm is suspended
- * error: thread running
- * </pre>
- *
- * Where event_name could be <code>unimpinstr</code> or <code>nosuchlabel</code>.
- */
-public class PDAEvalCommand extends PDACommand {
-
- public PDAEvalCommand(int threadId, String operation) {
- super("eval " + threadId + " " + operation);
- }
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalResultEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalResultEvent.java
deleted file mode 100644
index 7201476..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalResultEvent.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-/**
- * Eval result event generated when an evaluation has completed.
- *
- * <pre>
- * E: evalresult {result}
- * </pre>
- */
-public class PDAEvalResultEvent extends PDAEvent {
-
- public final String fResult;
-
- public PDAEvalResultEvent(String message) {
- super(message);
- fResult = message.substring(getName(message).length() + 1);
- }
-
- public static boolean isEventMessage(String message) {
- return message.startsWith("evalresult");
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvent.java
deleted file mode 100644
index ab841bf..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvent.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-/**
- * Base class for PDA events.
- */
-public class PDAEvent {
- public final String fMessage;
- public final String fName;
-
- public PDAEvent(String message) {
- fMessage = message;
- fName = getName(message);
- }
-
- protected String getName(String message) {
- int nameEnd = message.indexOf(' ');
- nameEnd = nameEnd == -1 ? message.length() : nameEnd;
- return message.substring(0, nameEnd);
- }
-
- public static PDAEvent parseEvent(String message) {
- if (PDAEvalResultEvent.isEventMessage(message)) {
- return new PDAEvalResultEvent(message);
- }
- else if (PDAExitedEvent.isEventMessage(message)) {
- return new PDAExitedEvent(message);
- }
- else if (PDANoSuchLabelEvent.isEventMessage(message)) {
- return new PDANoSuchLabelEvent(message);
- }
- else if (PDARegistersEvent.isEventMessage(message)) {
- return new PDARegistersEvent(message);
- }
- else if (PDAResumedEvent.isEventMessage(message)) {
- return new PDAResumedEvent(message);
- }
- else if (PDAStartedEvent.isEventMessage(message)) {
- return new PDAStartedEvent(message);
- }
- else if (PDASuspendedEvent.isEventMessage(message)) {
- return new PDASuspendedEvent(message);
- }
- else if (PDATerminatedEvent.isEventMessage(message)) {
- return new PDATerminatedEvent(message);
- }
- else if (PDAUnimplementedInstructionEvent.isEventMessage(message)) {
- return new PDAUnimplementedInstructionEvent(message);
- }
- else if (PDAVMResumedEvent.isEventMessage(message)) {
- return new PDAVMResumedEvent(message);
- }
- else if (PDAVMStartedEvent.isEventMessage(message)) {
- return new PDAVMStartedEvent(message);
- }
- else if (PDAVMSuspendedEvent.isEventMessage(message)) {
- return new PDAVMSuspendedEvent(message);
- }
- else if (PDAExitedEvent.isEventMessage(message)) {
- return new PDAExitedEvent(message);
- }
- else {
- return new PDAEvent(message);
- }
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEventStopCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEventStopCommand.java
deleted file mode 100644
index f538c0d..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEventStopCommand.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Optionally stop the interpreter when an error event <code>event_name</code>
- * is encountered; <code>{0|1}</code> specifies stop (<code>1</code>) or
- * continue (<code>0</code>). The possible events are <code>unimpinstr</code> and
- * <code>nosuchlabel</code>. Reply is <code>ok</code>. When an event is encountered,
- * the interpreter sends the error event (for example <code>unimlpemented instruction
- * foo</code>) and corresponding suspend event (for example <code>suspended event
- * unimpinstr</code>).
- *
- * <pre>
- * C: eventstop {event_name} {0|1}
- * R: ok
- * ...
- * E: suspended event {event_name}
- * </pre>
- *
- * Where event_name could be <code>unimpinstr</code> or <code>nosuchlabel</code>.
- */
-
-public class PDAEventStopCommand extends PDACommand {
-
- public static final int UNIMPINSTR = 0;
- public static final int NOSUCHLABEL = 1;
-
- public PDAEventStopCommand(int event, boolean enable) {
- super("eventstop " +
- (event == UNIMPINSTR ? "unimpinstr " : "nosuchlabel ") +
- (enable ? "1" : "0"));
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAExitedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAExitedEvent.java
deleted file mode 100644
index f452e81..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAExitedEvent.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-/**
- * Exited event generated when a thread has exited.
- *
- * <pre>
- * E: started {thread_id}
- * </pre>
- */
-public class PDAExitedEvent extends PDARunControlEvent {
-
- public PDAExitedEvent(String message) {
- super(message);
- }
-
- public static boolean isEventMessage(String message) {
- return message.startsWith("exited");
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommand.java
deleted file mode 100644
index c2a83af..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommand.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Retrieves command stack frame information for frame <code>frame_number</code>
- * (stack frames are indexed from 0, 0 being the oldest).
- *
- * <pre>
- * C: stack {thread_id} {frame_number}
- * R: {file}|{line}|{function}|{var_1}|{var_2}|...
- *
- * Errors:
- * error: invalid thread
- * </pre>
- */
-public class PDAFrameCommand extends PDACommand {
-
- public PDAFrameCommand(int threadId, int frameNum) {
- super("frame " + threadId + " " + frameNum);
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDAFrameCommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommandResult.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommandResult.java
deleted file mode 100644
index f52af48..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommandResult.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-
-/**
- * @see PDAFrameCommand
- */
-
-public class PDAFrameCommandResult extends PDACommandResult {
-
- /**
- * Frame data return by the frame command.
- */
- final public PDAFrameData fFrame;
-
- PDAFrameCommandResult(String response) {
- super(response);
- fFrame = new PDAFrameData(response);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameData.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameData.java
deleted file mode 100644
index d3f9bbc..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameData.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-/**
- * Object representing a frame in the stack command results.
- *
- * @see PDAStackCommand
- */
-
-public class PDAFrameData {
-
- final public IPath fFilePath;
- final public int fPC;
- final public String fFunction;
- final public String[] fVariables;
-
- PDAFrameData(String frameString) {
- StringTokenizer st = new StringTokenizer(frameString, "|");
-
- fFilePath = new Path(st.nextToken());
- fPC = Integer.parseInt(st.nextToken());
- fFunction = st.nextToken();
-
- List variablesList = new ArrayList();
- while (st.hasMoreTokens()) {
- variablesList.add(st.nextToken());
- }
- fVariables = (String[])variablesList.toArray(new String[variablesList.size()]);
- }
-}
\ No newline at end of file
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAGroupsCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAGroupsCommand.java
deleted file mode 100644
index 4e6f1eb..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAGroupsCommand.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Retrieves register groups information
- *
- * <pre>
- * C: groups
- * R: {group 1}|{group 2}|{group 3}|...|
- * </pre>
- */
-
-public class PDAGroupsCommand extends PDACommand {
-
- public PDAGroupsCommand() {
- super("groups");
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDAListResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAListResult.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAListResult.java
deleted file mode 100644
index 4abab97..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAListResult.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-
-/**
- * @see PDADataCommand
- */
-
-public class PDAListResult extends PDACommandResult {
-
- final public String[] fValues;
-
- PDAListResult(String response) {
- super(response);
- StringTokenizer st = new StringTokenizer(response, "|");
- List valuesList = new ArrayList();
-
- while (st.hasMoreTokens()) {
- String token = st.nextToken();
- if (token.length() != 0) {
- valuesList.add(token);
- }
- }
-
- fValues = new String[valuesList.size()];
- for (int i = 0; i < valuesList.size(); i++) {
- fValues[i] = (String)valuesList.get(i);
- }
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDANoSuchLabelEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDANoSuchLabelEvent.java
deleted file mode 100644
index b85ca86..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDANoSuchLabelEvent.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-/**
- * No Such Label event generated when the PDA program encounters an call to a
- * non-existant label in a PDA program.
- *
- * <pre>
- * E: no such label {label}
- * </pre>
- */
-public class PDANoSuchLabelEvent extends PDAEvent {
-
- public final String fLabel;
-
- public PDANoSuchLabelEvent(String message) {
- super(message);
- fLabel = message.substring(getName(message).length() + 1);
- }
-
- public static boolean isEventMessage(String message) {
- return message.startsWith("no such label");
- }
-
- protected String getName(String message) {
- if (isEventMessage(message)) {
- return "no such label";
- }
- throw new IllegalArgumentException("Invalid event: " + message);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPopDataCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPopDataCommand.java
deleted file mode 100644
index be04801..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPopDataCommand.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Pops the top value from the data stack
- *
- * <pre>
- * C: popdata {thread_id}
- * R: ok
- *
- * Errors:
- * error: invalid thread
- * </pre>
- */
-public class PDAPopDataCommand extends PDACommand {
-
- public PDAPopDataCommand(int threadId) {
- super("popdata " + threadId);
- }
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPushDataCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPushDataCommand.java
deleted file mode 100644
index 10837ea..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPushDataCommand.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Pushes the given value on top of the data stack.
- *
- * <pre>
- * C: pushdata {thread_id} {value}
- * R: ok
- *
- * Errors:
- * error: invalid thread
- * </pre>
- */
-
-public class PDAPushDataCommand extends PDACommand {
-
- public PDAPushDataCommand(int threadId, String value) {
- super("pushdata " + threadId + " " + value);
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegisterData.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegisterData.java
deleted file mode 100644
index 81be710..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegisterData.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-/**
- * Object representing a register in the registers command results.
- *
- * @see PDARCommand
- */
-
-public class PDARegisterData {
-
- final public String fName;
- final public boolean fWritable;
- final public PDABitFieldData[] fBitFields;
-
- PDARegisterData(String regString) {
- StringTokenizer st = new StringTokenizer(regString, "|");
-
- String regInfo = st.nextToken();
- StringTokenizer regSt = new StringTokenizer(regInfo, " ");
- fName = regSt.nextToken();
- fWritable = Boolean.getBoolean(regSt.nextToken());
-
- List bitFieldsList = new ArrayList();
- while (st.hasMoreTokens()) {
- bitFieldsList.add(new PDABitFieldData(st.nextToken()));
- }
- fBitFields = (PDABitFieldData[])bitFieldsList.toArray(new PDABitFieldData[bitFieldsList.size()]);
- }
-}
\ No newline at end of file
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommand.java
deleted file mode 100644
index 2e766ca..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommand.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Retrieves registers definition information
- *
- * <pre>
- * C: registers {group name}
- * R: {register name} {true|false}|{bit field name} {start bit} {bit count} {mnemonic 1} {mnemonic 2} ...#{register name} ...
- * </pre>
- */
-
-public class PDARegistersCommand extends PDACommand {
-
- public PDARegistersCommand(String group) {
- super("registers " + group);
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDARegistersCommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommandResult.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommandResult.java
deleted file mode 100644
index f5d4cd9..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommandResult.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-
-/**
- * @see PDARegistersCommand
- */
-
-public class PDARegistersCommandResult extends PDACommandResult {
-
- /**
- * Array of registers returned by the registers commands.
- */
- final public PDARegisterData[] fRegisters;
-
- PDARegistersCommandResult(String response) {
- super(response);
- StringTokenizer st = new StringTokenizer(response, "#");
- List regList = new ArrayList();
-
- while (st.hasMoreTokens()) {
- regList.add(new PDARegisterData(st.nextToken()));
- }
- fRegisters = (PDARegisterData[])regList.toArray(new PDARegisterData[regList.size()]);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersEvent.java
deleted file mode 100644
index 9212273..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersEvent.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-/**
- * Registers event generated when the registers' definitions are changed in a
- * program.
- *
- * <pre>
- * E: registers
- * </pre>
- */
-public class PDARegistersEvent extends PDAEvent {
-
- public PDARegistersEvent(String message) {
- super(message);
- }
-
- public static boolean isEventMessage(String message) {
- return message.startsWith("registers");
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARestartCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARestartCommand.java
deleted file mode 100644
index 21e58c4..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARestartCommand.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Restarts the debug session. All threads exit and the main threads starts
- *
- * <pre>
- * C: restart
- * E: exited 0
- * E: started 1
- * R: ok
- * </pre>
- */
-
-public class PDARestartCommand extends PDACommand {
-
- public PDARestartCommand() {
- super("restart");
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumeCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumeCommand.java
deleted file mode 100644
index bf65d40..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumeCommand.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Resumes the execution of a single thread. Can be issued only if the virtual
- * machine is running.
- *
- * <pre>
- * C: resume {thread_id}
- * R: ok
- * E: resumed {thread_id} client
- *
- * Errors:
- * error: invalid thread
- * error: cannot resume thread when vm is suspended
- * error: thread already running
- * </pre>
- */
-
-public class PDAResumeCommand extends PDACommand {
-
- public PDAResumeCommand(int threadId) {
- super("resume " + threadId);
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumedEvent.java
deleted file mode 100644
index 36f89ed..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumedEvent.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-/**
- * Resumed event generated when a thread is resumed.
- *
- * <pre>
- * E: resumed {thread_id} [reason]
- * </pre>
- */
-public class PDAResumedEvent extends PDARunControlEvent {
-
- public PDAResumedEvent(String message) {
- super(message);
- }
-
- public static boolean isEventMessage(String message) {
- return message.startsWith("resumed");
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARunControlEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARunControlEvent.java
deleted file mode 100644
index e3af4eb..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARunControlEvent.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Base class for run-control events.
- */
-public class PDARunControlEvent extends PDAEvent {
-
- public final int fThreadId;
- public final String fReason;
-
- public PDARunControlEvent(String message) {
- super(message);
- fThreadId = getThreadId(message);
- fReason = getStateChangeReason(message);
- }
-
- protected int getThreadId(String message) {
- int nameEnd = getName(message).length();
- if ( Character.isDigit(message.charAt(nameEnd + 1)) ) {
- int threadIdEnd = message.indexOf(' ', nameEnd + 1);
- threadIdEnd = threadIdEnd == -1 ? message.length() : threadIdEnd;
- try {
- return Integer.parseInt(message.substring(nameEnd + 1, threadIdEnd));
- } catch (NumberFormatException e) {
- throw new IllegalArgumentException("Invalid event: " + message);
- }
- } else {
- return -1;
- }
- }
-
- protected String getStateChangeReason(String message) {
- int idx = getName(message).length();
- if ( Character.isDigit(message.charAt(idx + 1)) ) {
- idx = message.indexOf(' ', idx + 1);
- idx = idx == -1 ? message.length() : idx + 1;
- } else {
- idx++;
- }
- if (idx >= message.length()) {
- return "";
- }
-
- int endIdx = message.indexOf(' ', idx);
- endIdx = endIdx == -1 ? message.length() : endIdx;
- return message.substring(idx, endIdx);
- }
-
- protected String getName(String message) {
- int nameEnd = message.indexOf(' ');
- nameEnd = nameEnd == -1 ? message.length() : nameEnd;
- return message.substring(0, nameEnd);
- }
-
- public static boolean isEventMessage(String message) {
- return message.startsWith("started");
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetBreakpointCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetBreakpointCommand.java
deleted file mode 100644
index 1abb7fa..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetBreakpointCommand.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Sets a breakpoint at given line
- *
- * <pre>
- * Suspend a single thread:
- * C: set {line_number} 0
- * R: ok
- * C: resume {thread_id}
- * E: resumed {thread_id} client
- * E: suspended {thread_id} breakpoint line_number
- *
- * Suspend the VM:
- * C: set {line_number} 1
- * R: ok
- * C: vmresume
- * E: vmresumed client
- * E: vmsuspended {thread_id} breakpoint line_number
- * </pre>
- */
-
-public class PDASetBreakpointCommand extends PDACommand {
-
- public PDASetBreakpointCommand(int line, boolean stopVM) {
- super("set " +
- line + " " +
- (stopVM ? "1" : "0"));
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetDataCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetDataCommand.java
deleted file mode 100644
index e0c22db..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetDataCommand.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Sets a data value in the data stack at the given location (the data stack is
- * indexed from 0, 0 being the oldest).
- *
- * <pre>
- * C: setdata {thread_id} {index} {value}
- * R: ok
- *
- * Errors:
- * error: invalid thread
- * </pre>
- */
-public class PDASetDataCommand extends PDACommand {
-
- public PDASetDataCommand(int threadId, int index, String value) {
- super("setdata " + threadId + " " + index + " " + value);
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetVarCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetVarCommand.java
deleted file mode 100644
index c5f6b09..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetVarCommand.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Set the contents of variable <code>variable</code> from the control stack
- * <code>frame_number</code> to value <code>value</code> (the control stack is
- * indexed from 0, 0 being the oldest).
- *
- * <pre>
- * C: setvar {thread_id} {frame_number} {variable} {value}
- * R: ok
- *
- * Errors:
- * error: invalid thread
- * </pre>
- */
-
-public class PDASetVarCommand extends PDACommand {
-
- public PDASetVarCommand(int threadId, int frame, String variable, String value) {
- super("setvar " + threadId + " " + frame + " " + variable + " " + value);
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommand.java
deleted file mode 100644
index 84545fe..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommand.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Return the contents of the control stack (program counters, function and
- * variable names). The reply is control stack from oldest to newest as a single string
- * <code>frame#frame#frame...#frame</code>, where each frame is a string
- * <code>"filename|pc|function name|variable name|variable name|...|variable name"</code></li>.
- *
- * <pre>
- * C: stack {thread_id}
- * R: {file}|{line}|{function}|{var_1}|{var_2}|...#{file}|{line}|{function}|{var_1}|{var_2}|...#...
- *
- * Errors:
- * error: invalid thread
- * </pre>
- */
-
-public class PDAStackCommand extends PDACommand {
-
- public PDAStackCommand(int threadId) {
- super("stack " + threadId);
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDAStackCommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommandResult.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommandResult.java
deleted file mode 100644
index e22aa12..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommandResult.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
-
-
-/**
- * @see PDAStackCommand
- */
-
-public class PDAStackCommandResult extends PDACommandResult {
-
- /**
- * Array of frames return by the stack commands. The frames are ordered
- * with the highest-level frame first.
- */
- final public PDAFrameData[] fFrames;
-
- PDAStackCommandResult(String response) {
- super(response);
- StringTokenizer st = new StringTokenizer(response, "#");
- List framesList = new ArrayList();
-
- while (st.hasMoreTokens()) {
- framesList.add(new PDAFrameData(st.nextToken()));
- }
- fFrames = (PDAFrameData[])framesList.toArray(new PDAFrameData[framesList.size()]);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommand.java
deleted file mode 100644
index 6c04530..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommand.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Retrieves command stack depth
- *
- * <pre>
- * C: stackdepth {thread_id}
- * R: {depth}
- *
- * Errors:
- * error: invalid thread
- * </pre>
- */
-
-public class PDAStackDepthCommand extends PDACommand {
-
- public PDAStackDepthCommand(int threadId) {
- super("stackdepth " + threadId);
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDAStackDepthCommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommandResult.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommandResult.java
deleted file mode 100644
index e5ca2b9..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommandResult.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-
-/**
- * @see PDADataCommand
- */
-
-public class PDAStackDepthCommandResult extends PDACommandResult {
-
- final public int fDepth;
-
- PDAStackDepthCommandResult(String response) {
- super(response);
- int depth = 1; // default to something that won't cause NPEs
- try {
- depth = Integer.parseInt(response);
- } catch (NumberFormatException e) {}
- fDepth = depth;
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStartedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStartedEvent.java
deleted file mode 100644
index 6b980e1..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStartedEvent.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-/**
- * Started event generated when a new thread is started. A started event
- * is always sent for the first thread when a PDA program is started.
- *
- * <pre>
- * E: started {thread_id}
- * </pre>
- */
-public class PDAStartedEvent extends PDARunControlEvent {
-
- public PDAStartedEvent(String message) {
- super(message);
- }
-
- public static boolean isEventMessage(String message) {
- return message.startsWith("started");
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepCommand.java
deleted file mode 100644
index 3a21492..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepCommand.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Executes next instruction
- *
- * <pre>
- * If VM running:
- * C: step {thread_id}
- * R: ok
- * E: resumed {thread_id} step
- * E: suspended {thread_id} step
- *
- * If VM suspended:
- * C: step {thread_id}
- * R: ok
- * E: vmresumed step
- * E: vmsuspended {thread_id} step
- *
- * Errors:
- * error: invalid thread
- * </pre>
- */
-
-public class PDAStepCommand extends PDACommand {
-
- public PDAStepCommand(int threadId) {
- super("step " + threadId);
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepReturnCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepReturnCommand.java
deleted file mode 100644
index 2a7fd95..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepReturnCommand.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Single step forward until the next <code>return</code> op code. Stop before
- * executing the <code>return</code> .
- *
- * <pre>
- * If VM running:
- * C: stepreturn {thread_id}
- * R: ok
- * E: resumed {thread_id} client
- * E: suspended {thread_id} step
- *
- * If VM suspended:
- * C: stepreturn {thread_id}
- * R: ok
- * E: vmresumed client
- * E: vmsuspended {thread_id} step
- *
- * Errors:
- * error: invalid thread
- * </pre>
- */
-
-public class PDAStepReturnCommand extends PDACommand {
-
- public PDAStepReturnCommand(int threadId) {
- super("stepreturn " + threadId);
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendCommand.java
deleted file mode 100644
index fb124d3..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendCommand.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Suspends execution of a single thread. Can be issued only if the virtual
- * machine is running.
- *
- * <pre>
- * C: suspend {thread_id}
- * R: ok
- * E: suspended {thread_id} client
- *
- * Errors:
- * error: invalid thread
- error: vm already suspended
- * error: thread already suspended
- * </pre>
- */
-
-public class PDASuspendCommand extends PDACommand {
-
- public PDASuspendCommand(int threadId) {
- super("suspend " + threadId);
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendedEvent.java
deleted file mode 100644
index b226347..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendedEvent.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-/**
- * Suspended event generated when a thread is suspended.
- *
- * <pre>
- * E: suspended {thread_id} [reason]
- * </pre>
- *
- * <code>[reason]</code> is the cause of the suspension and it's optional:
- * <ul>
- * <li><code>breakpoint N</code> - a breakpoint at line <code>N</code> was hit</li>
- * <li><code>client</code> - a client request to suspend has completed</li>
- * <li><code>drop</code> - a client request to drop a frame has completed</li>
- * <li><code>event E</code> - an error was encountered, where <code>E</code> is one
- * of <code>unimpinstr</code> or <code>nosuchlabel</code></li>
- * <li><code>step</code> - a step request has completed</li>
- * <li><code>watch A F::V</code> - a watchpoint was hit for reason <code>A</code>
- * (<code>read</code> or <code>write</code>), on variable <code>V</code> in
- * function <code>F</code></li>
- * </ul>
-
- */
-public class PDASuspendedEvent extends PDARunControlEvent {
-
- public PDASuspendedEvent(String message) {
- super(message);
- }
-
- public static boolean isEventMessage(String message) {
- return message.startsWith("suspended");
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminateCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminateCommand.java
deleted file mode 100644
index 3e91596..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminateCommand.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Instructs the debugger to terminate.
- *
- * <pre>
- * C: terminate
- * R: ok
- * E: vmterminated
- * </pre>
- */
-
-public class PDATerminateCommand extends PDACommand {
-
- public PDATerminateCommand() {
- super("terminate");
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminatedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminatedEvent.java
deleted file mode 100644
index 648e838..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminatedEvent.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-/**
- * Terminated event generated when the PDA program has ended execution.
- *
- * <pre>
- * E: termianted
- * </pre>
- */
-public class PDATerminatedEvent extends PDAEvent {
-
- public PDATerminatedEvent(String message) {
- super(message);
- }
-
- public static boolean isEventMessage(String message) {
- return message.startsWith("terminated");
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAUnimplementedInstructionEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAUnimplementedInstructionEvent.java
deleted file mode 100644
index 7a0ce54..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAUnimplementedInstructionEvent.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-/**
- * Unimplemented Instruction event generated when the PDA program encounters
- * an instruction that it does not recognize. This event is usually followed
- * by a VM Suspended event.
- *
- * <pre>
- * E: unimplemented instruction {label}
- * </pre>
- */
-public class PDAUnimplementedInstructionEvent extends PDAEvent {
-
- public final String fOperation;
-
- public PDAUnimplementedInstructionEvent(String message) {
- super(message);
- fOperation = message.substring(getName(message).length() + 1);
- }
-
- public static boolean isEventMessage(String message) {
- return message.startsWith("unimplemented instruction");
- }
-
- protected String getName(String message) {
- if (isEventMessage(message)) {
- return "unimplemented instruction";
- }
- throw new IllegalArgumentException("Invalid event: " + message);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumeCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumeCommand.java
deleted file mode 100644
index 85ca473..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumeCommand.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Resumes the execution of the whole virtual machine
- *
- * <pre>
- * C: vmresume
- * R: ok
- * E: vmresumed client
- *
- * Errors:
- * error: vm already running
- * </pre>
- */
-
-public class PDAVMResumeCommand extends PDACommand {
-
- public PDAVMResumeCommand() {
- super("vmresume");
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumedEvent.java
deleted file mode 100644
index 74801c6..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumedEvent.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-/**
- * VM Resumed event generated when the whole virtual machine is resumed. When
- * the VM is resumed all previously suspended threads are resumed as well.
- *
- * <pre>
- * E: vmresumed [reason]
- * </pre>
- *
- * <code>[reason]</code> is the cause of the resume: and it's optional:
- * <ul>
- * <li><code>step</code> - a step request has been initiated</li>
- * <li><code>client</code> - a client request to resume has been initiated</li>
- * </ul>
- */
-public class PDAVMResumedEvent extends PDARunControlEvent {
-
- public PDAVMResumedEvent(String message) {
- super(message);
- }
-
- public static boolean isEventMessage(String message) {
- return message.startsWith("vmresumed");
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMStartedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMStartedEvent.java
deleted file mode 100644
index ff5f1dc..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMStartedEvent.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-/**
- * VM started event generated when the the interpreter has started (guaranteed
- * to be the first event sent)
- *
- * <pre>
- * E: vmstarted
- * </pre>
- */
-public class PDAVMStartedEvent extends PDAEvent {
-
- public PDAVMStartedEvent(String message) {
- super(message);
- }
-
- public static boolean isEventMessage(String message) {
- return message.startsWith("vmstarted");
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendCommand.java
deleted file mode 100644
index ad62d33..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendCommand.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Suspends the execution of the whole virtual machine
- *
- * <pre>
- * C: vmsuspend
- * R: ok
- * E: vmsuspended client
- *
- * Errors:
- * error: thread already suspended
- * </pre>
- */
-
-public class PDAVMSuspendCommand extends PDACommand {
-
- public PDAVMSuspendCommand() {
- super("vmsuspend");
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendedEvent.java
deleted file mode 100644
index 0e36297..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendedEvent.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-/**
- * VM Suspended event generated when the virtual machine is suspended. If the VM
- * is suspended as a result of a thread event (e.g. thread hitting a breakpoint),
- * then the thread_id is included in the event.
- *
- * <pre>
- * E: vmsuspended [thread_id] {reason}
- * </pre>
- *
- * <code>{reason}</code> is the cause of the suspension:
- * <ul>
- * <li><code>breakpoint N</code> - a breakpoint at line <code>N</code> was hit</li>
- * <li><code>client</code> - a client request to suspend has completed</li>
- * <li><code>drop</code> - a client request to drop a frame has completed</li>
- * <li><code>event E</code> - an error was encountered, where <code>E</code> is one
- * of <code>unimpinstr</code> or <code>nosuchlabel</code></li>
- * <li><code>step</code> - a step request has completed</li>
- * <li><code>watch A F::V</code> - a watchpoint was hit for reason <code>A</code>
- * (<code>read</code> or <code>write</code>), on variable <code>V</code> in
- * function <code>F</code></li>
- * </ul>
- */
-public class PDAVMSuspendedEvent extends PDARunControlEvent {
-
- public PDAVMSuspendedEvent(String message) {
- super(message);
- }
-
- public static boolean isEventMessage(String message) {
- return message.startsWith("vmsuspended");
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMTerminatedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMTerminatedEvent.java
deleted file mode 100644
index 3487786..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMTerminatedEvent.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-/**
- * Terminated event generated when the PDA program has ended execution.
- *
- * <pre>
- * E: termianted
- * </pre>
- */
-public class PDAVMTerminatedEvent extends PDAEvent {
-
- public PDAVMTerminatedEvent(String message) {
- super(message);
- }
-
- public static boolean isEventMessage(String message) {
- return message.startsWith("vmterminated");
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVarCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVarCommand.java
deleted file mode 100644
index 5e2f34c..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVarCommand.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Return the contents of variable <code>variable_name</code> in the control
- * stack frame <code>frame_number</code> (stack frames are indexed from 0, 0
- * being the oldest).
- *
- * <pre>
- * C: var {thread_id} {frame_number} {variable_name}
- * R: {variable_value}
- *
- * Errors:
- * error: invalid thread
- * error: variable undefined
- * </pre>
- */
-
-public class PDAVarCommand extends PDACommand {
-
- public PDAVarCommand(int threadId, int frameId, String name) {
- super("var " + threadId + " " + frameId + " " + name);
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAWatchCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAWatchCommand.java
deleted file mode 100644
index 4bd8af7..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAWatchCommand.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.protocol;
-
-
-/**
- * Set a watchpoint on variable <code>variable_name</code> in function
- * <code>function</code> to magic value <code>watch_operation</code>. The magic
- * value is a bit flag corresponding to read access (1), write access (2), or
- * both (3); the magic value 0 clears the watchpoint.
- *
- * <pre>
- * C: watch {function}::{variable_name} {watch_operation}
- * R: ok
- * C: vmresume
- * R: vmresumed client
- * E: vmsuspended {thread_id} watch {watch_operation} {function}::{variable_name}
- * </pre>
- */
-public class PDAWatchCommand extends PDACommand {
-
- public static final int READ = 1;
- public static final int WRITE = 2;
- public static final int BOTH = READ | WRITE;
- public static final int NONE = 0;
-
- public PDAWatchCommand(String function, String variable, int operation) {
- super("watch " + function+ "::" + variable + " " + operation);
- }
-
-
- public PDACommandResult createResult(String resultText) {
- return new PDACommandResult(resultText);
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/package.html b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/package.html
deleted file mode 100644
index 90bdaae..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/package.html
+++ /dev/null
@@ -1,99 +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>PDA Interpreter Debug Protocol</title>
-</head>
-
-<body bgcolor="#FFFFFF">
-
-<p>Provides classes representing PDA protocol commands, command results and events</p>
-
-<h2>Package Specification</h2>
-
-<h3>Virtual Machine execution control</h3>
-<h4>Commands</h4>
-<ul>
-<li>{@link PDATerminateCommand}</li>
-<li>{@link PDAVMSuspendCommand}</li>
-<li>{@link PDAVMResumeCommand}</li>
-<li>{@link PDAEventStopCommand}</li>
-</ul>
-<h4>Events</h4>
-<ul>
-<li>{@link PDAVMStarted}</li>
-<li>{@link PDAVMTerminated}</li>
-<li>{@link PDAVMSuspneded}</li>
-<li>{@link PDAVMResumed}</li>
-<li>{@link PDAUnimplementedInstructionEvent}</li>
-<li>{@link PDANoSuchLabelEvent}</li>
-</ul>
-
-<h3>Thread execution control</h3>
-<h4>Commands</h4>
-<ul>
-<li>{@link PDASuspendCommand}</li>
-<li>{@link PDAResumeCommand}</li>
-<li>{@link PDAStepCommand}</li>
-<li>{@link PDADropFrameCommand}</li>
-</ul>
-<h4>Events</h4>
-<ul>
-<li>{@link PDAStarted}</li>
-<li>{@link PDAExited}</li>
-<li>{@link PDASuspended}</li>
-<li>{@link PDAResumed}</li>
-</ul>
-
-<h3>Breakpoints</h3>
-<h4>Commands</h4>
-<ul>
-<li>{@link PDASetBreakpointCommand}</li>
-<li>{@link PDAClearBreakpointCommand}</li>
-<li>{@link PDAWatchCommand}</li>
-</ul>
-
-<h3>Data stack</h3>
-<h4>Commands</h4>
-<ul>
-<li>{@link PDADataCommand}</li>
-<li>{@link PDASetDataCommand}</li>
-<li>{@link PDAPopDataCommand}</li>
-<li>{@link PDAPushDataCommand}</li>
-</ul>
-
-<h3>Expression evaluation</h3>
-<h4>Commands</h4>
-<ul>
-<li>{@link PDAEvalCommand}</li>
-</ul>
-<h4>Events</h4>
-<ul>
-<li>{@link PDAEvalResultEvent}</li>
-</ul>
-
-<h3>Execution control stack</h3>
-<h4>Commands</h4>
-<ul>
-<li>{@link PDAStackCommand}</li>
-<li>{@link PDAStackDepthCommand}</li>
-<li>{@link PDAFrameCommand}</li>
-<li>{@link PDAVarCommand}</li>
-<li>{@link PDASetVarCommand}</li>
-<li>{@link PDAChildrenCommand}</li>
-</ul>
-
-<h3>Registers</h3>
-<h4>Commands</h4>
-<ul>
-<li>{@link PDAGroupsCommand}</li>
-<li>{@link PDARegistersCommand}</li>
-</ul>
-<h4>Events</h4>
-<ul>
-<li>{@link PDARegistersEvent}</li>
-</ul>
-
-</body>
-</html>
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupDirector.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupDirector.java
deleted file mode 100644
index f975cf7..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupDirector.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.sourcelookup;
-
-import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector;
-import org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant;
-
-/**
- * PDA source lookup director. For PDA source lookup there is one source
- * lookup participant.
- */
-public class PDASourceLookupDirector extends AbstractSourceLookupDirector {
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.sourcelookup.ISourceLookupDirector#initializeParticipants()
- */
- public void initializeParticipants() {
- //#ifdef ex4
-//# // TODO: Exercise 4 - add our participant to this director
- //#else
- addParticipants(new ISourceLookupParticipant[]{new PDASourceLookupParticipant()});
- //#endif
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupParticipant.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupParticipant.java
deleted file mode 100644
index 0d07ce7..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupParticipant.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.sourcelookup;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupParticipant;
-import org.eclipse.debug.examples.core.pda.model.PDAStackFrame;
-
-
-/**
- * The PDA source lookup participant knows how to translate a
- * PDA stack frame into a source file name
- */
-public class PDASourceLookupParticipant extends AbstractSourceLookupParticipant {
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.sourcelookup.ISourceLookupParticipant#getSourceName(java.lang.Object)
- */
- public String getSourceName(Object object) throws CoreException {
- //#ifdef ex4
-//# // TODO: Exercise 4 - return the name of the source file for the given stack frame
-//# return null;
- //#else
- if (object instanceof PDAStackFrame) {
- return ((PDAStackFrame)object).getSourceName();
- }
- return null;
- //#endif
- }
-}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourcePathComputerDelegate.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourcePathComputerDelegate.java
deleted file mode 100644
index d91b3f2..0000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourcePathComputerDelegate.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.core.pda.sourcelookup;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.sourcelookup.ISourceContainer;
-import org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate;
-import org.eclipse.debug.core.sourcelookup.containers.FolderSourceContainer;
-import org.eclipse.debug.core.sourcelookup.containers.ProjectSourceContainer;
-import org.eclipse.debug.core.sourcelookup.containers.WorkspaceSourceContainer;
-import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
-
-
-/**
- * Computes the default source lookup path for a PDA launch configuration.
- * The default source lookup path is the folder or project containing
- * the PDA program being launched. If the program is not specified, the workspace
- * is searched by default.
- */
-public class PDASourcePathComputerDelegate implements ISourcePathComputerDelegate {
-
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.sourcelookup.ISourcePathComputerDelegate#computeSourceContainers(org.eclipse.debug.core.ILaunchConfiguration, org.eclipse.core.runtime.IProgressMonitor)
- */
- public ISourceContainer[] computeSourceContainers(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
- String path = configuration.getAttribute(DebugCorePlugin.ATTR_PDA_PROGRAM, (String)null);
- ISourceContainer sourceContainer = null;
- if (path != null) {
- IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(path));
- if (resource != null) {
- //#ifdef ex4
-//# // TODO: Exercise 4 - seed the source lookup path
- //#else
- IContainer container = resource.getParent();
- if (container.getType() == IResource.PROJECT) {
- sourceContainer = new ProjectSourceContainer((IProject)container, false);
- } else if (container.getType() == IResource.FOLDER) {
- sourceContainer = new FolderSourceContainer(container, false);
- }
- //#endif
- }
- }
- if (sourceContainer == null) {
- sourceContainer = new WorkspaceSourceContainer();
- }
- return new ISourceContainer[]{sourceContainer};
- }
-}
diff --git a/org.eclipse.debug.examples.core/src_ant/org/eclipse/debug/examples/ant/tasks/PreProcessor.java b/org.eclipse.debug.examples.core/src_ant/org/eclipse/debug/examples/ant/tasks/PreProcessor.java
deleted file mode 100644
index 59baccb..0000000
--- a/org.eclipse.debug.examples.core/src_ant/org/eclipse/debug/examples/ant/tasks/PreProcessor.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ant.tasks;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.Vector;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.FileSet;
-import org.apache.tools.ant.util.FileUtils;
-
-/**
- * Java preprocessor for code examples. Used to export source code for
- * example plug-ins with parts of code missing/inserted etc., for
- * various exercises.
- * <p>
- * The preprocessor looks for #ifdef statements in java comments, and is
- * run with a set of symbols. For example:
- * <pre>
- * //#ifdef ex1
- * ... code to insert when 'ex1' symbol is on
- * //#else
- * ... code to insert when not 'ex1'
- * //#endif
- * </pre>
- * </p>
- */
-public class PreProcessor extends Task {
-
- private Vector fFileSets = new Vector();
- private File fDestDir = null;
- private Set fSymbols = new HashSet();
- private FileUtils fUtils = FileUtils.getFileUtils();
-
- // possible states
- private static final int STATE_OUTSIDE_CONDITION = 0;
- private static final int STATE_TRUE_CONDITION = 1;
- private static final int STATE_FALSE_CONDITION = 2;
- private static final int STATE_POST_TRUE_CONDITION = 3;
-
- // matchers
- private Matcher IF_DEF_MATCHER = Pattern.compile("#ifdef\\s+\\w+").matcher("");
- private Matcher ELSE_IF_MATCHER = Pattern.compile("#elseif\\s+\\w+").matcher("");
- private Matcher ELSE_MATCHER = Pattern.compile("#else$|#else\\W+").matcher("");
- private Matcher END_MATCHER = Pattern.compile("#endif").matcher("");
-
-
- /**
- * Constructs a new preprocessor task
- */
- public PreProcessor() {
- }
-
- /**
- * Adds a set of files to process.
- *
- * @param set a set of files to process
- */
- public void addFileset(FileSet set) {
- fFileSets.addElement(set);
- }
-
- /**
- * Sets the destination directory for processed files.
- *
- * @param destDir destination directory for processed files
- */
- public void setDestdir(File destDir) {
- fDestDir = destDir;
- }
-
- /**
- * Sets the symbols that are "on" for the preprocessing.
- *
- * @param symbols symbols that are "on" for the preprocessing
- */
- public void setSymbols(String symbols) {
- String[] strings = symbols.split(",");
- for (int i = 0; i < strings.length; i++) {
- String string = strings[i].trim();
- if (string.length() > 0) {
- fSymbols.add(string);
- }
- }
- }
-
- public void execute() throws BuildException {
- if (fSymbols.size() == 0) {
- throw new BuildException("No symbols specified for preprocessor");
- }
- if (fFileSets.isEmpty()) {
- throw new BuildException("No filesets specified for processing");
- }
- if (!fDestDir.exists()) {
- throw new BuildException("destdir does not exist: " + fDestDir.getAbsolutePath());
- }
- StringBuffer buf = new StringBuffer("Symbols: ");
- String[] symbols = (String[]) fSymbols.toArray(new String[fSymbols.size()]);
- for (int i = 0; i < symbols.length; i++) {
- String symbol = symbols[i];
- buf.append(symbol);
- if(i < (symbols.length -1)) {
- buf.append(", ");
- }
- }
- log(buf.toString());
-
- Iterator fileSets = fFileSets.iterator();
- while (fileSets.hasNext()) {
- FileSet fileSet = (FileSet) fileSets.next();
- DirectoryScanner scanner = fileSet.getDirectoryScanner(getProject());
- String[] includedFiles = scanner.getIncludedFiles();
- File baseDir = fileSet.getDir(getProject());
- for (int i = 0; i < includedFiles.length; i++) {
- String fileName = includedFiles[i];
- processFile(baseDir, fileName, fDestDir);
- }
- }
-
- }
-
- /**
- * Process the file
- * @param baseDir base directory source file is relative to
- * @param fileName source file name
- * @param destDir root destination directory
- */
- private void processFile(File baseDir, String fileName, File destDir) throws BuildException {
- File destFile = new File(destDir, fileName);
- File srcFile = new File(baseDir, fileName);
- File dir = destFile.getParentFile();
- if (!dir.exists()) {
- dir.mkdirs();
- }
- String contents = null;
- if (fileName.endsWith(".java")) {
- contents = preProcessFile(srcFile, "//#");
- } else if (fileName.equals("plugin.xml")) {
- contents = preProcessFile(srcFile, null);
- }
- if (contents == null) {
- // no change, just copy file
- try {
- fUtils.copyFile(srcFile, destFile);
- } catch (IOException e) {
- throw new BuildException(e);
- }
- } else {
- // write new file
- FileWriter writer;
- try {
- writer = new FileWriter(destFile);
- writer.write(contents);
- writer.close();
- } catch (IOException e) {
- throw new BuildException(e);
- }
-
- }
- }
-
- /**
- * Preprocesses a file
- *
- * @param srcFile the file to process
- * @param strip chars to stip off lines in a true condition, or <code>null</code>
- * @return
- */
- public String preProcessFile(File srcFile, String strip) {
- try {
- FileReader fileReader = new FileReader(srcFile);
- BufferedReader reader = new BufferedReader(fileReader);
- StringBuffer buffer = new StringBuffer();
- String line = reader.readLine();
- String activeSymbol = null;
- int state = STATE_OUTSIDE_CONDITION;
- boolean changed = false;
- while (line != null) {
- boolean ifdef = IF_DEF_MATCHER.reset(line).find();
- boolean elseif = ELSE_IF_MATCHER.reset(line).find();
- boolean elze = ELSE_MATCHER.reset(line).find();
- boolean endif = END_MATCHER.reset(line).find();
- boolean commandLine = ifdef || elseif || elze || endif;
- boolean written = false;
- switch (state) {
- case STATE_OUTSIDE_CONDITION:
- if (ifdef) {
- String condition = line.substring(IF_DEF_MATCHER.start(), IF_DEF_MATCHER.end());
- String[] strings = condition.split("\\s+");
- activeSymbol = strings[1].trim();
- if (fSymbols.contains(activeSymbol)) {
- state = STATE_TRUE_CONDITION;
- } else {
- state = STATE_FALSE_CONDITION;
- }
- } else if (elseif) {
- throw new BuildException("#elseif encountered without corresponding #ifdef");
- } else if (elze) {
- throw new BuildException("#else encountered without corresponding #ifdef (" + srcFile.getPath() + ")");
- } else if (endif) {
- throw new BuildException("#endif encountered without corresponding #ifdef");
- }
- break;
- case STATE_TRUE_CONDITION:
- if (elze || elseif) {
- state = STATE_POST_TRUE_CONDITION;
- break;
- } else if (endif) {
- state = STATE_OUTSIDE_CONDITION;
- break;
- } else if (ifdef) {
- throw new BuildException("illegal nested #ifdef");
- }
- break;
- case STATE_FALSE_CONDITION:
- if (elseif) {
- String condition = line.substring(ELSE_IF_MATCHER.start(), ELSE_IF_MATCHER.end());
- String[] strings = condition.split("\\s+");
- activeSymbol = strings[1].trim();
- if (fSymbols.contains(activeSymbol)) {
- state = STATE_TRUE_CONDITION;
- } else {
- state = STATE_FALSE_CONDITION;
- }
- } else if (elze) {
- state = STATE_TRUE_CONDITION;
- break;
- } else if (endif) {
- state = STATE_OUTSIDE_CONDITION;
- break;
- } else if (ifdef) {
- throw new BuildException("illegal nested #ifdef");
- }
- break;
- case STATE_POST_TRUE_CONDITION:
- if (endif) {
- state = STATE_OUTSIDE_CONDITION;
- break;
- } else if (ifdef) {
- throw new BuildException("illegal nested #ifdef");
- }
- break;
- }
- if (!commandLine) {
- if (state == STATE_OUTSIDE_CONDITION || state == STATE_TRUE_CONDITION) {
- if (state == STATE_TRUE_CONDITION && strip != null) {
- if (line.startsWith(strip)) {
- line = line.substring(strip.length());
- }
- }
- buffer.append(line);
- buffer.append("\n");
- written = true;
- }
- }
- changed = changed || !written;
- line = reader.readLine();
- }
- if (!changed) {
- return null;
- }
- return buffer.toString();
- } catch (IOException e) {
- throw new BuildException(e);
- }
- }
-
- public static void main(String[] args) {
- PreProcessor processor = new PreProcessor();
- processor.setSymbols("ex2");
- String string = processor.preProcessFile(new File("c:\\eclipse3.1\\dev\\example.debug.core\\src\\example\\debug\\core\\launcher\\PDALaunchDelegate.java"), "//#");
- //String string = processor.preProcessFile(new File("c:\\eclipse3.1\\dev\\example.debug.core\\plugin.xml"), null);
- System.out.println(string);
- }
-}
diff --git a/org.eclipse.debug.examples.ui/.classpath b/org.eclipse.debug.examples.ui/.classpath
deleted file mode 100644
index b7464f3..0000000
--- a/org.eclipse.debug.examples.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.debug.examples.ui/.cvsignore b/org.eclipse.debug.examples.ui/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/org.eclipse.debug.examples.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/org.eclipse.debug.examples.ui/.project b/org.eclipse.debug.examples.ui/.project
deleted file mode 100644
index 4b906e6..0000000
--- a/org.eclipse.debug.examples.ui/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.debug.examples.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.debug.examples.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.debug.examples.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 438fd6e..0000000
--- a/org.eclipse.debug.examples.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,47 +0,0 @@
-#Tue May 19 11:43:28 CDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF b/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 25f04b1..0000000
--- a/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Example Debug UI Plug-in
-Bundle-SymbolicName: org.eclipse.debug.examples.ui;singleton:=true
-Bundle-Version: 1.2.0
-Bundle-Activator: org.eclipse.debug.examples.ui.pda.DebugUIPlugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.debug.core,
- org.eclipse.ui,
- org.eclipse.debug.ui,
- org.eclipse.jface.text,
- org.eclipse.ui.editors,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.ui.ide,
- org.eclipse.debug.examples.core,
- org.eclipse.core.expressions
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.debug.examples.ui.midi.adapters,
- org.eclipse.debug.examples.ui.midi.detailpanes,
- org.eclipse.debug.examples.ui.midi.launcher,
- org.eclipse.debug.examples.ui.pda,
- org.eclipse.debug.examples.ui.pda.adapters,
- org.eclipse.debug.examples.ui.pda.breakpoints,
- org.eclipse.debug.examples.ui.pda.editor,
- org.eclipse.debug.examples.ui.pda.launcher,
- org.eclipse.debug.examples.ui.pda.presentation,
- org.eclipse.debug.examples.ui.pda.views
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.debug.examples.ui/about.html b/org.eclipse.debug.examples.ui/about.html
deleted file mode 100644
index 4602330..0000000
--- a/org.eclipse.debug.examples.ui/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.debug.examples.ui/build.properties b/org.eclipse.debug.examples.ui/build.properties
deleted file mode 100644
index bac5695..0000000
--- a/org.eclipse.debug.examples.ui/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- bin/,\
- about.html,\
- META-INF/,\
- .,\
- icons/
-src.includes = src/,\
- about.html,\
- icons/,\
- plugin.xml
diff --git a/org.eclipse.debug.examples.ui/icons/full/dlcl16/pop.gif b/org.eclipse.debug.examples.ui/icons/full/dlcl16/pop.gif
deleted file mode 100644
index 559e462..0000000
--- a/org.eclipse.debug.examples.ui/icons/full/dlcl16/pop.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.examples.ui/icons/full/dlcl16/push.gif b/org.eclipse.debug.examples.ui/icons/full/dlcl16/push.gif
deleted file mode 100644
index f7e6cc0..0000000
--- a/org.eclipse.debug.examples.ui/icons/full/dlcl16/push.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.examples.ui/icons/full/elcl16/pop.gif b/org.eclipse.debug.examples.ui/icons/full/elcl16/pop.gif
deleted file mode 100644
index 2cd9c54..0000000
--- a/org.eclipse.debug.examples.ui/icons/full/elcl16/pop.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.examples.ui/icons/full/elcl16/push.gif b/org.eclipse.debug.examples.ui/icons/full/elcl16/push.gif
deleted file mode 100644
index a5ac28d..0000000
--- a/org.eclipse.debug.examples.ui/icons/full/elcl16/push.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.examples.ui/icons/full/obj16/clef.png b/org.eclipse.debug.examples.ui/icons/full/obj16/clef.png
deleted file mode 100644
index 5036eb5..0000000
--- a/org.eclipse.debug.examples.ui/icons/full/obj16/clef.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.examples.ui/icons/full/obj16/note.gif b/org.eclipse.debug.examples.ui/icons/full/obj16/note.gif
deleted file mode 100644
index 7bc1e08..0000000
--- a/org.eclipse.debug.examples.ui/icons/full/obj16/note.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.examples.ui/icons/full/obj16/pda.gif b/org.eclipse.debug.examples.ui/icons/full/obj16/pda.gif
deleted file mode 100644
index 04c5052..0000000
--- a/org.eclipse.debug.examples.ui/icons/full/obj16/pda.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.examples.ui/plugin.xml b/org.eclipse.debug.examples.ui/plugin.xml
deleted file mode 100644
index 8129e21..0000000
--- a/org.eclipse.debug.examples.ui/plugin.xml
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/CheckboxModelProxyFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/CheckboxModelProxyFactory.java
deleted file mode 100644
index 31d375a..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/CheckboxModelProxyFactory.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*****************************************************************
- * Copyright (c) 2009 Texas Instruments and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 286310)
- *****************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import javax.sound.midi.MidiEvent;
-import javax.sound.midi.Track;
-
-import org.eclipse.debug.examples.ui.pda.views.CheckboxView;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-
-public class CheckboxModelProxyFactory implements IModelProxyFactory {
- private MidiEventModelProxy fMidiEventProxy = new MidiEventModelProxy();
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory#createModelProxy(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
- */
- public IModelProxy createModelProxy(Object element, IPresentationContext context) {
- if (CheckboxView.ID.equals(context.getId())) {
- if (element instanceof Track) {
- return new TrackModelProxy((Track) element);
- } else if (element instanceof MidiEvent) {
- return fMidiEventProxy;
- }
- }
-
- return null;
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlCellModifier.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlCellModifier.java
deleted file mode 100644
index 100f20e..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlCellModifier.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import org.eclipse.debug.examples.core.midi.launcher.SequencerControl;
-import org.eclipse.jface.viewers.ICellModifier;
-
-/**
- * A cell modifier for a sequencer control. Provides current
- * values of controls and updates control values in the sequencer
- * as they are changed in the UI.
- *
- * @since 1.0
- */
-public class ControlCellModifier implements ICellModifier {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ICellModifier#canModify(java.lang.Object, java.lang.String)
- */
- public boolean canModify(Object element, String property) {
- if (SequencerColumnPresentation.COL_VALUE.equals(property)) {
- if (element instanceof SequencerControl) {
- return ((SequencerControl) element).isEditable();
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ICellModifier#getValue(java.lang.Object, java.lang.String)
- */
- public Object getValue(Object element, String property) {
- if (SequencerColumnPresentation.COL_VALUE.equals(property)) {
- if (element instanceof SequencerControl) {
- SequencerControl control = (SequencerControl) element;
- return control.getValue();
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ICellModifier#modify(java.lang.Object, java.lang.String, java.lang.Object)
- */
- public void modify(Object element, String property, Object value) {
- Object oldValue = getValue(element, property);
- if (!value.equals(oldValue)) {
- if (SequencerColumnPresentation.COL_VALUE.equals(property)) {
- if (element instanceof SequencerControl) {
- if (value instanceof String) {
- SequencerControl control = (SequencerControl) element;
- control.setValue((String) value);
- }
- }
- }
- }
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEditor.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEditor.java
deleted file mode 100644
index ecb05ae..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEditor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ICellModifier;
-import org.eclipse.jface.viewers.TextCellEditor;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * Provides cell editors and modifiers for sequencer controls.
- *
- * @since 1.0
- */
-public class ControlEditor implements IElementEditor {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor#getCellEditor(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String, java.lang.Object, org.eclipse.swt.widgets.Composite)
- */
- public CellEditor getCellEditor(IPresentationContext context, String columnId, Object element, Composite parent) {
- return new TextCellEditor(parent);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor#getCellModifier(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
- */
- public ICellModifier getCellModifier(IPresentationContext context, Object element) {
- return new ControlCellModifier();
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java
deleted file mode 100644
index a09df84..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import java.util.Timer;
-import java.util.TimerTask;
-
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.examples.core.midi.launcher.ClockControl;
-import org.eclipse.debug.examples.core.midi.launcher.MidiLaunch;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
-import org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler;
-
-/**
- * Listens to events from sequencer controls and fires corresponding
- * deltas to update the viewer.
- *
- * @since 1.0
- */
-public class ControlEventHandler extends DebugEventHandler {
-
- /**
- * Associated launch
- */
- private MidiLaunch fLaunch;
-
- /**
- * Timer used to update clock
- */
- private Timer fTimer;
-
- /**
- * @param proxy
- */
- public ControlEventHandler(SequencerControlsModelProxy proxy) {
- super(proxy);
- fLaunch = proxy.getMidiLaunch();
- }
-
- protected void init() {
- if (!fLaunch.isSuspended() && !fLaunch.isTerminated() && !fLaunch.isDisconnected()) {
- startTimer();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler#handlesEvent(org.eclipse.debug.core.DebugEvent)
- */
- protected boolean handlesEvent(DebugEvent event) {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler#dispose()
- */
- public synchronized void dispose() {
- super.dispose();
- if (fTimer != null) {
- fTimer.cancel();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler#refreshRoot(org.eclipse.debug.core.DebugEvent)
- */
- protected void refreshRoot(DebugEvent event) {
- ModelDelta delta = new ModelDelta(fLaunch, IModelDelta.CONTENT);
- fireDelta(delta);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler#handleResume(org.eclipse.debug.core.DebugEvent)
- */
- protected void handleResume(DebugEvent event) {
- super.handleResume(event);
- startTimer();
- }
-
- /**
- * Starts a timer to update the clock
- */
- private void startTimer() {
- fTimer = new Timer(true);
- fTimer.schedule(new TimerTask() {
- public void run() {
- ModelDelta delta = new ModelDelta(fLaunch, IModelDelta.NO_CHANGE);
- delta = delta.addNode(new ClockControl(fLaunch), IModelDelta.STATE | IModelDelta.CONTENT);
- fireDelta(delta);
- }
- }, 0, 100);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler#handleSuspend(org.eclipse.debug.core.DebugEvent)
- */
- protected void handleSuspend(DebugEvent event) {
- super.handleSuspend(event);
- if (fTimer != null) {
- fTimer.cancel();
- fTimer = null;
- }
- }
-
-
-
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlLabelProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlLabelProvider.java
deleted file mode 100644
index f54234b..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlLabelProvider.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.examples.core.midi.launcher.SequencerControl;
-import org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.jface.viewers.TreePath;
-
-/**
- * Label provider for a sequencer control.
- *
- * @since 1.0
- */
-public class ControlLabelProvider extends ElementLabelProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getLabel(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
- */
- protected String getLabel(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
- SequencerControl control = (SequencerControl) elementPath.getLastSegment();
- if (SequencerColumnPresentation.COL_NAME.equals(columnId)) {
- return control.getName();
- }
- if (SequencerColumnPresentation.COL_VALUE.equals(columnId)) {
- return control.getValue();
- }
- return "";
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java
deleted file mode 100644
index 6df637f..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.examples.core.midi.launcher.MidiLaunch;
-import org.eclipse.debug.examples.core.midi.launcher.TempoControl;
-import org.eclipse.debug.internal.ui.model.elements.DebugElementMementoProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-
-/**
- * Provides mementos for sequencer elements.
- *
- * @since 1.0
- */
-public class ControlsMementoProvider extends DebugElementMementoProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.DebugElementMementoProvider#getElementName(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
- */
- protected String getElementName(Object element, IPresentationContext context) throws CoreException {
- if (element instanceof MidiLaunch) {
- return "SEQUENCER";
- }
- if (element instanceof TempoControl) {
- return "TEMPO_CONTROL";
- }
- return null;
- }
-
-
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiAdapterFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiAdapterFactory.java
deleted file mode 100644
index 9ddbf24..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiAdapterFactory.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Patrick Chuong (Texas Instruments) - Checkbox support for Flexible Hierachy view (Bug 286310)
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import javax.sound.midi.MidiEvent;
-import javax.sound.midi.Track;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.debug.core.commands.IStepOverHandler;
-import org.eclipse.debug.examples.core.midi.launcher.MidiLaunch;
-import org.eclipse.debug.examples.core.midi.launcher.SequencerControl;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
-
-/**
- * Adapter factory for MIDI elements.
- *
- * @since 1.0
- */
-public class MidiAdapterFactory implements IAdapterFactory {
-
- private static IElementContentProvider fgSequencerContentProvider = new SequencerContentProvider();
- private static IElementContentProvider fgTackContentProvider = new TrackContentProvider();
-
- private static IElementLabelProvider fgTrackLabelProvider = new TrackLabelProvider();
- private static IElementLabelProvider fgControlLabelProvider = new ControlLabelProvider();
- private static IElementLabelProvider fgMidiEventLabelProvdier = new MidiEventLabelProvider();
-
- private static IColumnPresentationFactory fgSequencerColumnFactory = new SequencerColumnFactory();
- private static IColumnPresentationFactory fgTrackColumnFactory = new TrackColumnFactory();
-
- private static IModelProxyFactory fgSequencerModelProxyFactory = new SequencerModelProxyFactory();
-
- private static IElementMementoProvider fgMementoProvider = new ControlsMementoProvider();
-
- private static IStepOverHandler fgStepOverHandler = new MidiStepOverHandler();
-
- private static IModelProxyFactory fgCheckboxModelProxyFactory = new CheckboxModelProxyFactory();
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (IElementContentProvider.class.equals(adapterType)) {
- if (adaptableObject instanceof MidiLaunch) {
- return fgSequencerContentProvider;
- }
- if (adaptableObject instanceof Track) {
- return fgTackContentProvider;
- }
- }
- if (IElementLabelProvider.class.equals(adapterType)) {
- if (adaptableObject instanceof Track) {
- return fgTrackLabelProvider;
- }
- if (adaptableObject instanceof SequencerControl) {
- return fgControlLabelProvider;
- }
- if (adaptableObject instanceof MidiEvent) {
- return fgMidiEventLabelProvdier;
- }
- }
-
- if (IColumnPresentationFactory.class.equals(adapterType)) {
- if (adaptableObject instanceof MidiLaunch) {
- return fgSequencerColumnFactory;
- }
- if (adaptableObject instanceof Track) {
- return fgTrackColumnFactory;
- }
- }
- if (IElementEditor.class.equals(adapterType)) {
- if (adaptableObject instanceof SequencerControl) {
- return new ControlEditor();
- }
- }
-
- if (IModelProxyFactory.class.equals(adapterType)) {
- if (adaptableObject instanceof MidiLaunch) {
- return fgSequencerModelProxyFactory;
- } else if (adaptableObject instanceof Track) {
- return fgCheckboxModelProxyFactory;
- } else if (adaptableObject instanceof MidiEvent) {
- return fgCheckboxModelProxyFactory;
- }
- }
- if (IElementMementoProvider.class.equals(adapterType)) {
- return fgMementoProvider;
- }
- if (IStepOverHandler.class.equals(adapterType)) {
- return fgStepOverHandler;
- }
-
- return null;
- }
-
- public Class[] getAdapterList() {
- return new Class[]{IElementContentProvider.class, IElementLabelProvider.class, IStepOverHandler.class,};
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java
deleted file mode 100644
index 6ea60ef..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Patrick Chuong (Texas Instruments) - Checkbox support for Flexible Hierachy view (Bug 286310)
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import javax.sound.midi.MidiEvent;
-import javax.sound.midi.MidiMessage;
-import javax.sound.midi.ShortMessage;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.jface.viewers.TreePath;
-
-/**
- * Provides labels for MIDI tracks.
- *
- * @since 1.0
- */
-public class MidiEventLabelProvider extends ElementLabelProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getLabel(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
- */
- protected String getLabel(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
- MidiEvent event = (MidiEvent) elementPath.getLastSegment();
- MidiMessage message = event.getMessage();
- if (TrackColumnPresentation.COL_TICK.equals(columnId)) {
- return Long.toString(event.getTick());
- } else if (TrackColumnPresentation.COL_BYTES.equals(columnId)) {
- byte[] bytes = message.getMessage();
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < message.getLength(); i++) {
- buffer.append(' ');
- appendByte(buffer, bytes[i]);
- }
- return buffer.toString();
- } else if (TrackColumnPresentation.COL_COMMAND.equals(columnId)) {
- if (message instanceof ShortMessage) {
- ShortMessage sm = (ShortMessage) message;
- StringBuffer buf = new StringBuffer();
- appendByte(buf, (byte)sm.getCommand());
- return buf.toString();
- }
- } else if (TrackColumnPresentation.COL_CHANNEL.equals(columnId)) {
- if (message instanceof ShortMessage) {
- return Integer.toString(((ShortMessage)message).getChannel());
- }
- }
- return "";
- }
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getChecked(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
- */
- public boolean getChecked(TreePath path, IPresentationContext presentationContext) throws CoreException {
- Boolean result = (Boolean) MidiEventModelProxy.gChecked.get(path);
- return result == null ? false : result.booleanValue();
- }
-
- /**
- * Appends a byte to the buffer with 2 hex characters.
- *
- * @param buffer
- * @param b
- */
- private void appendByte(StringBuffer buffer, byte b) {
- String hex = Integer.toHexString(b & 0xFF).toUpperCase();
- for (int i = hex.length(); i < 2; i++) {
- buffer.append('0');
- }
- buffer.append(hex);
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventModelProxy.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventModelProxy.java
deleted file mode 100644
index b535c3d..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventModelProxy.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*****************************************************************
- * Copyright (c) 2009 Texas Instruments and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 286310)
- *****************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckboxModelProxy;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy;
-import org.eclipse.jface.viewers.TreePath;
-
-public class MidiEventModelProxy extends AbstractModelProxy implements ICheckboxModelProxy {
- static Map gChecked = new HashMap();
-
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckboxModelProxy#setChecked(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object, org.eclipse.jface.viewers.TreePath, boolean)
- */
- public boolean setChecked(IPresentationContext context, Object viewerInput, TreePath path, boolean checked) {
- System.out.println("TrackCheckListener.setChecked() element = " + path.getLastSegment() + " checked = " + checked);
- gChecked.put(path, Boolean.valueOf(checked));
- return true;
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiStepOverHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiStepOverHandler.java
deleted file mode 100644
index fb2bdaa..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiStepOverHandler.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.commands.IDebugCommandRequest;
-import org.eclipse.debug.core.commands.IEnabledStateRequest;
-import org.eclipse.debug.core.commands.IStepOverHandler;
-
-/**
- * Provides an example command handler for the step over action.
- * On execute, it simply returns a status that is opened in an
- * error dialog.
- */
-public class MidiStepOverHandler implements IStepOverHandler {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.commands.IDebugCommandHandler#canExecute(org.eclipse.debug.core.commands.IEnabledStateRequest)
- */
- public void canExecute(IEnabledStateRequest request) {
- // We could create a job here, schedule it, then return to be asynchronous
- request.setEnabled(request.getElements().length > 0);
- request.done();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.commands.IDebugCommandHandler#execute(org.eclipse.debug.core.commands.IDebugCommandRequest)
- */
- public boolean execute(IDebugCommandRequest request) {
- // We could create a job to do this work, schedule it, then return to be asynchronous
- // If running asynchronously, remember to return the enablement you want the action to have while this action is run
- request.setStatus(new Status(IStatus.WARNING,"org.eclipse.debug.examples.ui","This is an example command handler overriding the default using an adapter on " + request.getElements()[0].getClass().getName()));
- request.done();
- return true;
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnFactory.java
deleted file mode 100644
index 5a9fc55..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnFactory.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Patrick Chuong (Texas Instruments) - Checkbox support for Flexible Hierachy view (Bug 286310)
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import org.eclipse.debug.examples.ui.pda.views.CheckboxView;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-/**
- * Column presentation factory for a sequencer.
- *
- * @since 1.0
- */
-public class SequencerColumnFactory implements IColumnPresentationFactory {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory#createColumnPresentation(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
- */
- public IColumnPresentation createColumnPresentation(IPresentationContext context, Object element) {
- if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) || CheckboxView.ID.equals(context.getId())) {
- return new SequencerColumnPresentation();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory#getColumnPresentationId(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
- */
- public String getColumnPresentationId(IPresentationContext context, Object element) {
- if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) || CheckboxView.ID.equals(context.getId())) {
- return SequencerColumnPresentation.ID;
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnPresentation.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnPresentation.java
deleted file mode 100644
index 4542f84..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnPresentation.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import org.eclipse.debug.internal.ui.viewers.provisional.AbstractColumnPresentation;
-
-/**
- * Columns for sequencer in the variables view.
- *
- * @since 1.0
- */
-public class SequencerColumnPresentation extends AbstractColumnPresentation {
-
- /**
- * Column identifiers
- */
- public static final String COL_NAME = "NAME";
- public static final String COL_VALUE = "VALUE";
-
- /**
- * All columns
- */
- public static final String[] COLUMN_IDS = new String[]{COL_NAME, COL_VALUE};
-
- /**
- * Column presentation ID.
- */
- public static final String ID = "org.eclipse.debug.examples.ui.midi.columnPresentation";
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getAvailableColumns()
- */
- public String[] getAvailableColumns() {
- return COLUMN_IDS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getHeader(java.lang.String)
- */
- public String getHeader(String id) {
- if (COL_NAME.equals(id)) {
- return "Control";
- }
- if (COL_VALUE.equals(id)) {
- return "Value";
- }
- return "";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getId()
- */
- public String getId() {
- return ID;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getInitialColumns()
- */
- public String[] getInitialColumns() {
- return COLUMN_IDS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#isOptional()
- */
- public boolean isOptional() {
- return false;
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java
deleted file mode 100644
index 348e854..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import javax.sound.midi.Sequencer;
-import javax.sound.midi.Track;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.examples.core.midi.launcher.ClockControl;
-import org.eclipse.debug.examples.core.midi.launcher.LengthControl;
-import org.eclipse.debug.examples.core.midi.launcher.MidiLaunch;
-import org.eclipse.debug.examples.core.midi.launcher.SequencerControl;
-import org.eclipse.debug.examples.core.midi.launcher.TempoControl;
-import org.eclipse.debug.internal.ui.model.elements.ElementContentProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-/**
- * Provides content for a MIDI sequencer element (MIDI launch).
- *
- * @since 1.0
- */
-public class SequencerContentProvider extends ElementContentProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
- */
- protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
- if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
- return getTracks((MidiLaunch) element).length;
- } else if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId())) {
- if (((MidiLaunch)element).isTerminated()) {
- return 0;
- }
- return 3;
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
- */
- protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
- if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
- return getElements(getTracks((MidiLaunch) parent), index, length);
- } else if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId())) {
- return getElements(getControls((MidiLaunch) parent), index, length);
- }
- return EMPTY;
- }
-
- /**
- * Returns the controls for this sequencer.
- *
- * @param launch midi launch
- * @return controls
- */
- public SequencerControl[] getControls(MidiLaunch launch) {
- return new SequencerControl[]{
- new TempoControl(launch),
- new ClockControl(launch),
- new LengthControl(launch)
- };
- }
-
- /**
- * Returns all tracks in the sequence.
- *
- * @param launch MIDI launch
- *@return tracks
- */
- public Track[] getTracks(MidiLaunch launch) {
- Sequencer sequencer = launch.getSequencer();
- if (sequencer != null && sequencer.isOpen()) {
- return sequencer.getSequence().getTracks();
- }
- return new Track[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#supportsContextId(java.lang.String)
- */
- protected boolean supportsContextId(String id) {
- return IDebugUIConstants.ID_DEBUG_VIEW.equals(id)
- || IDebugUIConstants.ID_VARIABLE_VIEW.equals(id);
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java
deleted file mode 100644
index 3faf1c4..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import javax.sound.midi.Sequencer;
-
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.examples.core.midi.launcher.MidiLaunch;
-import org.eclipse.debug.examples.core.midi.launcher.SequencerControl;
-import org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler;
-import org.eclipse.debug.internal.ui.viewers.update.EventHandlerModelProxy;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * Model proxy for a sequencer in the variables view. Listens
- * to events from controls to update the viewer when the user
- * changes a control's value.
- *
- * @since 1.0
- */
-public class SequencerControlsModelProxy extends EventHandlerModelProxy {
-
- /**
- * Associated launch
- */
- private MidiLaunch fLaunch;
-
- /**
- * Event handler
- */
- private ControlEventHandler fHandler;
-
- /**
- * Constructs a model proxy to update based on changes in controls
- * for the associated sequencer.
- *
- * @param launch MIDI launch
- */
- public SequencerControlsModelProxy(MidiLaunch launch) {
- fLaunch = launch;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy#installed(org.eclipse.jface.viewers.Viewer)
- */
- public void installed(Viewer viewer) {
- super.installed(viewer);
- fHandler.init();
- }
-
- /**
- * Returns the launch assocaited with this proxy.
- *
- * @return MIDI launch
- */
- protected MidiLaunch getMidiLaunch() {
- return fLaunch;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.update.EventHandlerModelProxy#createEventHandlers()
- */
- protected DebugEventHandler[] createEventHandlers() {
- fHandler = new ControlEventHandler(this);
- return new DebugEventHandler[]{fHandler};
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.update.EventHandlerModelProxy#containsEvent(org.eclipse.debug.core.DebugEvent)
- */
- protected boolean containsEvent(DebugEvent event) {
- if (event.getSource() instanceof SequencerControl) {
- return ((SequencerControl)event.getSource()).getLaunch().equals(fLaunch);
- }
- if (event.getSource() instanceof Sequencer) {
- return fLaunch.getSequencer().equals(event.getSource());
- }
- if (event.getSource().equals(fLaunch)) {
- return true;
- }
- return false;
- }
-
-
-
-
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerModelProxyFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerModelProxyFactory.java
deleted file mode 100644
index 52e48c1..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerModelProxyFactory.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.examples.core.midi.launcher.MidiLaunch;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.update.LaunchProxy;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-/**
- * Factory to create a model proxy for sequencer controls in
- * the variables view.
- *
- * @since 1.0
- */
-public class SequencerModelProxyFactory implements IModelProxyFactory {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory#createModelProxy(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
- */
- public IModelProxy createModelProxy(Object element, IPresentationContext context) {
- if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId())) {
- if (element instanceof MidiLaunch) {
- return new SequencerControlsModelProxy((MidiLaunch)element);
- }
- }
- if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
- if (element instanceof MidiLaunch) {
- return new LaunchProxy((ILaunch)element);
- }
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnFactory.java
deleted file mode 100644
index 66b9063..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnFactory.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Patrick Chuong (Texas Instruments) - Checkbox support for Flexible Hierachy view (Bug 286310)
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import org.eclipse.debug.examples.ui.pda.views.CheckboxView;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-/**
- * Column presentation factory for a track.
- *
- * @since 1.0
- */
-public class TrackColumnFactory implements IColumnPresentationFactory {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory#createColumnPresentation(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
- */
- public IColumnPresentation createColumnPresentation(IPresentationContext context, Object element) {
- if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) || CheckboxView.ID.equals(context.getId())) {
- return new TrackColumnPresentation();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory#getColumnPresentationId(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
- */
- public String getColumnPresentationId(IPresentationContext context, Object element) {
- if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) || CheckboxView.ID.equals(context.getId())) {
- return TrackColumnPresentation.ID;
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnPresentation.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnPresentation.java
deleted file mode 100644
index 05713db..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnPresentation.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import org.eclipse.debug.internal.ui.viewers.provisional.AbstractColumnPresentation;
-
-/**
- * Columns for sequencer in the variables view.
- *
- * @since 1.0
- */
-public class TrackColumnPresentation extends AbstractColumnPresentation {
-
- /**
- * Column identifiers
- */
- public static final String COL_TICK = "TICK";
- public static final String COL_BYTES = "BYTES";
- public static final String COL_COMMAND = "COMMAND";
- public static final String COL_CHANNEL = "CHANNEL";
-
- /**
- * All columns
- */
- public static final String[] COLUMN_IDS = new String[]{COL_TICK, COL_BYTES, COL_COMMAND, COL_CHANNEL};
-
- /**
- * Initial columns
- */
- public static final String[] COLUMN_INITIAL = new String[]{COL_TICK, COL_BYTES};
-
- /**
- * Column presentation ID.
- */
- public static final String ID = "org.eclipse.debug.examples.ui.midi.trackColumns";
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getAvailableColumns()
- */
- public String[] getAvailableColumns() {
- return COLUMN_IDS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getHeader(java.lang.String)
- */
- public String getHeader(String id) {
- if (COL_TICK.equals(id)) {
- return "Tick";
- }
- if (COL_BYTES.equals(id)) {
- return "Bytes";
- }
- if (COL_CHANNEL.equals(id)) {
- return "Channel";
- }
- if (COL_COMMAND.equals(id)) {
- return "Command";
- }
- return "";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getId()
- */
- public String getId() {
- return ID;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getInitialColumns()
- */
- public String[] getInitialColumns() {
- return COLUMN_INITIAL;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#isOptional()
- */
- public boolean isOptional() {
- return false;
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackContentProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackContentProvider.java
deleted file mode 100644
index 1606038..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackContentProvider.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Patrick Chuong (Texas Instruments) - Checkbox support for Flexible Hierachy view (Bug 286310)
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import javax.sound.midi.MidiEvent;
-import javax.sound.midi.Track;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.examples.ui.pda.views.CheckboxView;
-import org.eclipse.debug.internal.ui.model.elements.ElementContentProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-/**
- * Content provider for track in the variables view. Returns MIDI events
- * in the track.
- *
- * @since 1.0
- */
-public class TrackContentProvider extends ElementContentProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
- */
- protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
- Track track = (Track) element;
- if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) || CheckboxView.ID.equals(context.getId()) ) {
- return track.size();
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
- */
- protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
- if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) || CheckboxView.ID.equals(context.getId())) {
- Track track = (Track) parent;
- MidiEvent[] events= new MidiEvent[length];
- for (int i = 0; i < length; i++) {
- events[i] = track.get(i+index);
- }
- return events;
- }
- return EMPTY;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#supportsContextId(java.lang.String)
- */
- protected boolean supportsContextId(String id) {
- return IDebugUIConstants.ID_VARIABLE_VIEW.equals(id) || CheckboxView.ID.equals(id);
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java
deleted file mode 100644
index fa8f891..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import javax.sound.midi.Track;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.examples.core.midi.launcher.MidiLaunch;
-import org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.jface.viewers.TreePath;
-
-/**
- * Provides labels for MIDI tracks.
- *
- * @since 1.0
- */
-public class TrackLabelProvider extends ElementLabelProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getLabel(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
- */
- protected String getLabel(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
- Track track = (Track) elementPath.getLastSegment();
- MidiLaunch launch = (MidiLaunch) elementPath.getSegment(0);
- Track[] tracks = launch.getSequencer().getSequence().getTracks();
- int i = 0;
- for (i = 0; i < tracks.length; i++) {
- if (track.equals(tracks[i])) {
- break;
- }
- }
- StringBuffer buf = new StringBuffer();
- buf.append("Track ");
- buf.append(i);
- buf.append(" [");
- buf.append(track.size());
- buf.append(" events]");
- return buf.toString();
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackModelProxy.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackModelProxy.java
deleted file mode 100644
index 4fe083c..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackModelProxy.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*****************************************************************
- * Copyright (c) 2009 Texas Instruments and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 286310)
- * IBM Corporation - ongoing maintenance and enhancements
- *****************************************************************/
-package org.eclipse.debug.examples.ui.midi.adapters;
-
-import javax.sound.midi.Track;
-
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
-import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy;
-import org.eclipse.jface.viewers.Viewer;
-
-public class TrackModelProxy extends AbstractModelProxy {
- protected Track fTrack;
-
- public TrackModelProxy(Track track) {
- fTrack = track;
- }
-
- public void installed(Viewer viewer) {
- super.installed(viewer);
-
- ModelDelta delta = new ModelDelta(fTrack, IModelDelta.NO_CHANGE);
- for (int i = 0; i < fTrack.size(); ++i) {
- delta.addNode(fTrack.get(i), IModelDelta.INSTALL);
- }
-
- fireModelChanged(delta);
- }
-
- public synchronized void dispose() {
- super.dispose();
- MidiEventModelProxy.gChecked.clear();
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java
deleted file mode 100644
index 234618f..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.detailpanes;
-
-import org.eclipse.debug.examples.core.midi.launcher.ClockControl;
-import org.eclipse.debug.ui.IDetailPane;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Slider;
-import org.eclipse.ui.IWorkbenchPartSite;
-
-/**
- * A slider to control the clock position.
- *
- * @since 1.0
- */
-public class ClockSliderDetailPane implements IDetailPane {
-
- private Slider fSlider;
- private ClockControl fControl;
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPane#createControl(org.eclipse.swt.widgets.Composite)
- */
- public Control createControl(Composite parent) {
- fSlider = new Slider(parent, SWT.HORIZONTAL);
- fSlider.setMinimum(0);
- fSlider.setMaximum(1000);
- fSlider.addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e) {
- int selection = fSlider.getSelection();
- if (fControl != null) {
- fControl.setValue(Integer.toString(selection));
- }
- }
- });
- return fSlider;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPane#display(org.eclipse.jface.viewers.IStructuredSelection)
- */
- public void display(IStructuredSelection selection) {
- fControl = null;
- if (selection == null || selection.isEmpty()) {
- fSlider.setEnabled(false);
- } else {
- fSlider.setEnabled(true);
- fControl = (ClockControl) selection.getFirstElement();
- int max = (int)fControl.getSequencer().getMicrosecondLength() / 1000000;
- long micro = fControl.getSequencer().getMicrosecondPosition();
- int seconds = (int) micro / 1000000;
- fSlider.setMaximum(max);
- fSlider.setSelection(seconds);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPane#dispose()
- */
- public void dispose() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPane#getDescription()
- */
- public String getDescription() {
- return "Location (seconds)";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPane#getID()
- */
- public String getID() {
- return ControlDetailPaneFactory.ID_CLOCK_SLIDER;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPane#getName()
- */
- public String getName() {
- return "Clock Slider (seconds)";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPane#init(org.eclipse.ui.IWorkbenchPartSite)
- */
- public void init(IWorkbenchPartSite partSite) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPane#setFocus()
- */
- public boolean setFocus() {
- fSlider.setFocus();
- return true;
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ControlDetailPaneFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ControlDetailPaneFactory.java
deleted file mode 100644
index 10353fd..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ControlDetailPaneFactory.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.detailpanes;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.debug.examples.core.midi.launcher.ClockControl;
-import org.eclipse.debug.examples.core.midi.launcher.TempoControl;
-import org.eclipse.debug.ui.IDetailPane;
-import org.eclipse.debug.ui.IDetailPaneFactory;
-import org.eclipse.jface.viewers.IStructuredSelection;
-
-/**
- * Creates detail panes for sequencer controls.
- *
- * @since 1.0
- */
-public class ControlDetailPaneFactory implements IDetailPaneFactory {
-
- /**
- * Identifier for the tempo slider detail pane
- */
- public static final String ID_TEMPO_SLIDER = "TEMPO_SLIDER";
-
- /**
- * Identifier for the clock slider detail pane
- */
- public static final String ID_CLOCK_SLIDER = "CLOCK_SLIDER";
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPaneFactory#createDetailPane(java.lang.String)
- */
- public IDetailPane createDetailPane(String paneID) {
- if (ID_TEMPO_SLIDER.equals(paneID)) {
- return new TempoSliderDetailPane();
- }
- if (ID_CLOCK_SLIDER.equals(paneID)) {
- return new ClockSliderDetailPane();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPaneFactory#getDefaultDetailPane(org.eclipse.jface.viewers.IStructuredSelection)
- */
- public String getDefaultDetailPane(IStructuredSelection selection) {
- if (selection.size() == 1) {
- Object element = selection.getFirstElement();
- if (element instanceof TempoControl) {
- return ID_TEMPO_SLIDER;
- }
- if (element instanceof ClockControl) {
- return ID_CLOCK_SLIDER;
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPaneFactory#getDetailPaneDescription(java.lang.String)
- */
- public String getDetailPaneDescription(String paneID) {
- if (ID_TEMPO_SLIDER.equals(paneID)) {
- return "Tempo Slider";
- }
- if (ID_CLOCK_SLIDER.equals(paneID)) {
- return "Clock Slider";
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPaneFactory#getDetailPaneName(java.lang.String)
- */
- public String getDetailPaneName(String paneID) {
- if (ID_TEMPO_SLIDER.equals(paneID)) {
- return "Tempo Slider";
- }
- if (ID_CLOCK_SLIDER.equals(paneID)) {
- return "Clock Slider";
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPaneFactory#getDetailPaneTypes(org.eclipse.jface.viewers.IStructuredSelection)
- */
- public Set getDetailPaneTypes(IStructuredSelection selection) {
- Set set = new HashSet();
- if (selection.size() == 1) {
- Object element = selection.getFirstElement();
- if (element instanceof TempoControl) {
- set.add(ID_TEMPO_SLIDER);
- }
- if (element instanceof ClockControl) {
- set.add(ID_CLOCK_SLIDER);
- }
- }
- return set;
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/TempoSliderDetailPane.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/TempoSliderDetailPane.java
deleted file mode 100644
index d5e1c7b..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/TempoSliderDetailPane.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.detailpanes;
-
-import org.eclipse.debug.examples.core.midi.launcher.TempoControl;
-import org.eclipse.debug.ui.IDetailPane;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Slider;
-import org.eclipse.ui.IWorkbenchPartSite;
-
-/**
- * A slider to control tempo.
- *
- * @since 1.0
- */
-public class TempoSliderDetailPane implements IDetailPane {
-
- private Slider fSlider;
- private TempoControl fControl;
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPane#createControl(org.eclipse.swt.widgets.Composite)
- */
- public Control createControl(Composite parent) {
- fSlider = new Slider(parent, SWT.HORIZONTAL);
- fSlider.setMinimum(20);
- fSlider.setMaximum(500);
- fSlider.addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e) {
- int selection = fSlider.getSelection();
- if (fControl != null) {
- fControl.setValue(Integer.toString(selection));
- }
- }
- });
- return fSlider;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPane#display(org.eclipse.jface.viewers.IStructuredSelection)
- */
- public void display(IStructuredSelection selection) {
- fControl = null;
- if (selection == null || selection.isEmpty()) {
- fSlider.setEnabled(false);
- } else {
- fSlider.setEnabled(true);
- fControl = (TempoControl) selection.getFirstElement();
- int bpm = (int)fControl.getSequencer().getTempoInBPM();
- fSlider.setSelection(bpm);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPane#dispose()
- */
- public void dispose() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPane#getDescription()
- */
- public String getDescription() {
- return "Tempo (beats per minute)";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPane#getID()
- */
- public String getID() {
- return ControlDetailPaneFactory.ID_TEMPO_SLIDER;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPane#getName()
- */
- public String getName() {
- return "Tempo Slider (BPM)";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPane#init(org.eclipse.ui.IWorkbenchPartSite)
- */
- public void init(IWorkbenchPartSite partSite) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDetailPane#setFocus()
- */
- public boolean setFocus() {
- fSlider.setFocus();
- return true;
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiLaunchShortcut.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiLaunchShortcut.java
deleted file mode 100644
index f20448b..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiLaunchShortcut.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.launcher;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.examples.core.midi.launcher.MidiLaunchDelegate;
-import org.eclipse.debug.examples.ui.pda.DebugUIPlugin;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.ILaunchShortcut;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-
-/**
- * Launch shortcut for a MIDI file.
- *
- * @since 1.0
- */
-public class MidiLaunchShortcut implements ILaunchShortcut {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers.ISelection, java.lang.String)
- */
- public void launch(ISelection selection, String mode) {
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) selection;
- if (ss.size() == 1) {
- Object element = ss.getFirstElement();
- if (element instanceof IFile) {
- IFile file = (IFile) element;
- ILaunchConfiguration configuration = getConfiguration(file);
- if (configuration != null) {
- DebugUITools.launch(configuration, mode);
- }
- }
- }
- }
- }
-
- /**
- * Returns a MIDI configuration to use for the given file or
- * <code>null</code> to cancel. Creates a new configuration
- * if required.
- *
- * @param file file
- * @return associated launch configuration or <code>null</code>
- */
- private ILaunchConfiguration getConfiguration(IFile file) {
- List candiates = new ArrayList();
- try {
- ILaunchConfiguration[] configurations = getLaunchManager().getLaunchConfigurations(getLaunchType());
- for (int i = 0; i < configurations.length; i++) {
- ILaunchConfiguration configuration = configurations[i];
- IResource[] resources = configuration.getMappedResources();
- if (resources != null && resources.length == 1 &&
- resources[0].equals(file)) {
- candiates.add(configuration);
- }
- }
- } catch (CoreException e) {
- }
- if (!candiates.isEmpty()) {
- return chooseConfiguration(candiates);
- }
- return newConfiguration(file);
- }
-
- /**
- * Returns the MIDI launch configuration type.
- *
- * @return the MIDI launch configuration type
- */
- private ILaunchConfigurationType getLaunchType() {
- ILaunchManager manager = getLaunchManager();
- ILaunchConfigurationType type = manager.getLaunchConfigurationType(MidiLaunchDelegate.ID_MIDI_LAUNCH_CONFIGURATION_TYPE);
- return type;
- }
-
- /**
- * Returns the launch manager.
- *
- * @return launch manager
- */
- private ILaunchManager getLaunchManager() {
- ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
- return manager;
- }
-
- /**
- * Returns a configuration from the given collection of configurations that should be launched,
- * or <code>null</code> to cancel.
- *
- * @param configList list of configurations to choose from
- * @return configuration to launch or <code>null</code> to cancel
- */
- private ILaunchConfiguration chooseConfiguration(List configList) {
- if (configList.size() == 1) {
- return (ILaunchConfiguration) configList.get(0);
- }
- IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
- ElementListSelectionDialog dialog= new ElementListSelectionDialog(DebugUIPlugin.getActiveWorkbenchShell(), labelProvider);
- dialog.setElements(configList.toArray());
- dialog.setTitle("Select Configuraiton");
- dialog.setMessage("&Select an existing configuration:");
- dialog.setMultipleSelection(false);
- int result = dialog.open();
- labelProvider.dispose();
- if (result == Window.OK) {
- return (ILaunchConfiguration) dialog.getFirstResult();
- }
- return null;
- }
-
- /**
- * Creates and returns a new MIDI launch configuration for the
- * given file.
- *
- * @param file MIDI file
- * @return new launch configuration
- */
- private ILaunchConfiguration newConfiguration(IFile file) {
- ILaunchConfigurationType type = getLaunchType();
- try {
- ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, getLaunchManager().
- generateUniqueLaunchConfigurationNameFrom(
- "[" + file.getProject().getName() + "] " + file.getName()));
- workingCopy.setAttribute(MidiLaunchDelegate.ATTR_MIDI_FILE, file.getFullPath().toString());
- workingCopy.setMappedResources(new IResource[]{file});
- return workingCopy.doSave();
- } catch (CoreException e) {
- e.printStackTrace();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, java.lang.String)
- */
- public void launch(IEditorPart editor, String mode) {
- // nothing - currently no editor
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java
deleted file mode 100644
index fca24e5..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.launcher;
-
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.examples.core.midi.launcher.MidiLaunchDelegate;
-import org.eclipse.debug.examples.ui.pda.DebugUIPlugin;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.ResourceListSelectionDialog;
-
-
-/**
- * Tab to specify the MIDI file to play.
- *
- * @since 1.0
- */
-public class MidiMainTab extends AbstractLaunchConfigurationTab {
-
- private Text fFileText;
- private Button fFileButton;
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- Font font = parent.getFont();
-
- Composite comp = new Composite(parent, SWT.NONE);
- setControl(comp);
- GridLayout topLayout = new GridLayout();
- topLayout.verticalSpacing = 0;
- topLayout.numColumns = 3;
- comp.setLayout(topLayout);
- comp.setFont(font);
-
- createVerticalSpacer(comp, 3);
-
- Label programLabel = new Label(comp, SWT.NONE);
- programLabel.setText("&Midi File:");
- GridData gd = new GridData(GridData.BEGINNING);
- programLabel.setLayoutData(gd);
- programLabel.setFont(font);
-
- fFileText = new Text(comp, SWT.SINGLE | SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- fFileText.setLayoutData(gd);
- fFileText.setFont(font);
- fFileText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateLaunchConfigurationDialog();
- }
- });
-
- fFileButton = createPushButton(comp, "&Browse...", null); //$NON-NLS-1$
- fFileButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- browseMidiFiles();
- }
- });
- }
-
- /**
- * Open a resource chooser to select a MIDI file
- */
- protected void browseMidiFiles() {
- ResourceListSelectionDialog dialog = new ResourceListSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), IResource.FILE);
- dialog.setTitle("MIDI File");
- dialog.setMessage("Select MIDI File");
- if (dialog.open() == Window.OK) {
- Object[] files = dialog.getResult();
- IFile file = (IFile) files[0];
- fFileText.setText(file.getFullPath().toString());
- }
-
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
- public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public void initializeFrom(ILaunchConfiguration configuration) {
- try {
- String file = null;
- file = configuration.getAttribute(MidiLaunchDelegate.ATTR_MIDI_FILE, (String)null);
- if (file != null) {
- fFileText.setText(file);
- }
- } catch (CoreException e) {
- setErrorMessage(e.getMessage());
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
- public void performApply(ILaunchConfigurationWorkingCopy configuration) {
- String file = fFileText.getText().trim();
- if (file.length() == 0) {
- file = null;
- }
- IResource[] resources = null;
- if (file!= null) {
- IPath path = new Path(file);
- IResource res = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
- if (res != null) {
- resources = new IResource[]{res};
- }
- }
- configuration.setAttribute(MidiLaunchDelegate.ATTR_MIDI_FILE, file);
- configuration.setMappedResources(resources);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
- */
- public String getName() {
- return "Main";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public boolean isValid(ILaunchConfiguration launchConfig) {
- setErrorMessage(null);
- setMessage(null);
- String text = fFileText.getText();
- if (text.length() > 0) {
- IPath path = new Path(text);
- if (ResourcesPlugin.getWorkspace().getRoot().findMember(path) == null) {
- setErrorMessage("File does not exist");
- return false;
- }
- } else {
- setMessage("Select a MIDI file");
- }
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()
- */
- public Image getImage() {
- return DebugUIPlugin.getDefault().getImageRegistry().get(DebugUIPlugin.IMG_OBJ_MIDI);
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiTabGroup.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiTabGroup.java
deleted file mode 100644
index 52e8b9d..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiTabGroup.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.midi.launcher;
-
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
-import org.eclipse.debug.ui.CommonTab;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-
-/**
- * Tab group for a MIDI file.
- *
- * @since 1.0
- */
-public class MidiTabGroup extends AbstractLaunchConfigurationTabGroup {
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String)
- */
- public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
- setTabs(new ILaunchConfigurationTab[] {
- new MidiMainTab(),
- new CommonTab()
- });
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java
deleted file mode 100644
index f462343..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda;
-
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-import java.util.Map.Entry;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.internal.util.BundleUtility;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class DebugUIPlugin extends AbstractUIPlugin {
- //The shared instance.
- private static DebugUIPlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
- private final static String ICONS_PATH = "icons/full/";//$NON-NLS-1$
- private final static String PATH_OBJECT = ICONS_PATH + "obj16/"; //Model object icons //$NON-NLS-1$
- private final static String PATH_ELOCALTOOL = ICONS_PATH + "elcl16/"; //Enabled local toolbar icons //$NON-NLS-1$
- private final static String PATH_DLOCALTOOL = ICONS_PATH + "dlcl16/"; //Disabled local toolbar icons //$NON-NLS-1$
-
- /**
- * Toolbar action to pop data stack
- */
- public final static String IMG_ELCL_POP = "IMG_ELCL_POP";
- public final static String IMG_DLCL_POP = "IMG_DLCL_POP";
-
- /**
- * Toolbar action to push onto data stack
- */
- public final static String IMG_ELCL_PUSH = "IMG_ELCL_PUSH";
- public final static String IMG_DLCL_PUSH = "IMG_DLCL_PUSH";
-
- /**
- * PDA program image
- */
- public final static String IMG_OBJ_PDA = "IMB_OBJ_PDA";
-
- /**
- * MIDI file image
- */
- public final static String IMG_OBJ_MIDI = "IMB_OBJ_MIDI";
-
- /**
- * Keyword color
- */
- public final static RGB KEYWORD = new RGB(0,0,255);
- public final static RGB LABEL = new RGB(128, 128, 0);
-
- /**
- * Managed colors
- */
- private Map fColors = new HashMap();
-
- /**
- * The constructor.
- */
- public DebugUIPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
-// Toggles single threaded adapter example
-// IAdapterManager adapterManager = Platform.getAdapterManager();
-// IAdapterFactory factory = new AdapterFactory();
-// adapterManager.registerAdapters(factory, PDADebugTarget.class);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- resourceBundle = null;
- Iterator colors = fColors.entrySet().iterator();
- while (colors.hasNext()) {
- Map.Entry entry = (Entry) colors.next();
- ((Color)entry.getValue()).dispose();
- }
- }
-
- /**
- * Returns the shared instance.
- */
- public static DebugUIPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = DebugUIPlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle.getBundle("org.eclipse.debug.examples.ui.pda.DebugUIPluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
- */
- protected void initializeImageRegistry(ImageRegistry reg) {
- declareImage(IMG_OBJ_PDA, PATH_OBJECT + "pda.gif");
- declareImage(IMG_OBJ_MIDI, PATH_OBJECT + "note.gif");
- declareImage(IMG_ELCL_POP, PATH_ELOCALTOOL + "pop.gif");
- declareImage(IMG_DLCL_POP, PATH_DLOCALTOOL + "pop.gif");
- declareImage(IMG_ELCL_PUSH, PATH_ELOCALTOOL + "push.gif");
- declareImage(IMG_DLCL_PUSH, PATH_DLOCALTOOL + "push.gif");
- }
-
- /**
- * Declares a workbench image given the path of the image file (relative to
- * the workbench plug-in). This is a helper method that creates the image
- * descriptor and passes it to the main <code>declareImage</code> method.
- *
- * @param symbolicName the symbolic name of the image
- * @param path the path of the image file relative to the base of the workbench
- * plug-ins install directory
- * <code>false</code> if this is not a shared image
- */
- private void declareImage(String key, String path) {
- URL url = BundleUtility.find("org.eclipse.debug.examples.ui", path);
- ImageDescriptor desc = ImageDescriptor.createFromURL(url);
- getImageRegistry().put(key, desc);
- }
-
- /**
- * Returns the color described by the given RGB.
- *
- * @param rgb
- * @return color
- */
- public Color getColor(RGB rgb) {
- Color color = (Color) fColors.get(rgb);
- if (color == null) {
- color= new Color(Display.getCurrent(), rgb);
- fColors.put(rgb, color);
- }
- return color;
- }
-
- /**
- * Returns the active workbench window
- *
- * @return the active workbench window
- */
- public static IWorkbenchWindow getActiveWorkbenchWindow() {
- return getDefault().getWorkbench().getActiveWorkbenchWindow();
- }
-
- /**
- * Returns the active workbench shell or <code>null</code> if none
- *
- * @return the active workbench shell or <code>null</code> if none
- */
- public static Shell getActiveWorkbenchShell() {
- IWorkbenchWindow window = getActiveWorkbenchWindow();
- if (window != null) {
- return window.getShell();
- }
- return null;
- }
-
- }
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/AdapterFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/AdapterFactory.java
deleted file mode 100644
index 3e4153f..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/AdapterFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.adapters;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.debug.examples.core.pda.model.PDADebugTarget;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
-
-
-/**
- *
- * @since 3.2
- *
- */
-public class AdapterFactory implements IAdapterFactory {
-
- private static IElementContentProvider fgTargetAdapter = new PDADebugTargetContentProvider();
- private static IModelProxyFactory fgFactory = new ModelProxyFactory();
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (IElementContentProvider.class.equals(adapterType)) {
- if (adaptableObject instanceof PDADebugTarget) {
- return fgTargetAdapter;
- }
- }
- if (IModelProxyFactory.class.equals(adapterType)) {
- if (adaptableObject instanceof PDADebugTarget) {
- return fgFactory;
- }
- }
- return null;
- }
-
- public Class[] getAdapterList() {
- return new Class[]{IElementContentProvider.class, IModelProxyFactory.class};
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/CommandAdapterFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/CommandAdapterFactory.java
deleted file mode 100644
index 3375fb0..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/CommandAdapterFactory.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.adapters;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.debug.core.commands.IRestartHandler;
-import org.eclipse.debug.examples.core.pda.model.PDADebugTarget;
-
-/**
- * Adapter factory that provides debug command handler adapters for the
- * PDA debugger.
- *
- * @since 3.6
- */
-public class CommandAdapterFactory implements IAdapterFactory {
-
- private static IRestartHandler fgRestartHandler = new PDARestartDebugCommand();
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (IRestartHandler.class.equals(adapterType)) {
- if (adaptableObject instanceof PDADebugTarget) {
- return fgRestartHandler;
- }
- }
- return null;
- }
-
- public Class[] getAdapterList() {
- return new Class[]{IRestartHandler.class};
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/ModelProxyFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/ModelProxyFactory.java
deleted file mode 100644
index a8e5959..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/ModelProxyFactory.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.adapters;
-
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.examples.core.pda.model.PDADebugTarget;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-
-public class ModelProxyFactory implements IModelProxyFactory {
-
- public IModelProxy createModelProxy(Object element, IPresentationContext context) {
- if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
- if (element instanceof PDADebugTarget){
- return new PDADebugTargetProxy((IDebugTarget) element);
- }
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetContentProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetContentProvider.java
deleted file mode 100644
index ed0c069..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetContentProvider.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
- *******************************************************************************/
-
-package org.eclipse.debug.examples.ui.pda.adapters;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.examples.core.pda.model.PDADebugTarget;
-import org.eclipse.debug.examples.core.pda.model.PDAThread;
-import org.eclipse.debug.internal.ui.model.elements.ElementContentProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-
-public class PDADebugTargetContentProvider extends ElementContentProvider {
-
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
- */
- protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
- PDAThread thread = ((PDADebugTarget) element).getThread(0);
- if (thread != null) {
- if (thread.hasStackFrames()) {
- return thread.getStackFrames().length;
- }
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#hasChildren(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
- */
- protected boolean hasChildren(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
- PDAThread thread = ((PDADebugTarget) element).getThread(0);
- if (thread != null) {
- return thread.hasStackFrames();
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
- */
- protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
- if (context.getId().equals(IDebugUIConstants.ID_DEBUG_VIEW)) {
- PDAThread thread = ((PDADebugTarget) parent).getThread(0);
- if (thread != null) {
- return getElements(thread.getStackFrames(), index, length);
- }
- }
- return EMPTY;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#supportsContextId(java.lang.String)
- */
- protected boolean supportsContextId(String id) {
- return IDebugUIConstants.ID_DEBUG_VIEW.equals(id);
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetProxy.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetProxy.java
deleted file mode 100644
index e905e12..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetProxy.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.adapters;
-
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler;
-import org.eclipse.debug.internal.ui.viewers.update.DebugTargetEventHandler;
-import org.eclipse.debug.internal.ui.viewers.update.DebugTargetProxy;
-
-/**
- * @since 3.2
- *
- */
-public class PDADebugTargetProxy extends DebugTargetProxy {
-
- /**
- * @param target
- */
- public PDADebugTargetProxy(IDebugTarget target) {
- super(target);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.update.DebugTargetProxy#createEventHandlers()
- */
- protected DebugEventHandler[] createEventHandlers() {
- return new DebugEventHandler[] { new DebugTargetEventHandler(this), new PDAThreadEventHandler(this) };
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDARestartDebugCommand.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDARestartDebugCommand.java
deleted file mode 100644
index 7bb788b..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDARestartDebugCommand.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.adapters;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.IRequest;
-import org.eclipse.debug.core.commands.AbstractDebugCommand;
-import org.eclipse.debug.core.commands.IEnabledStateRequest;
-import org.eclipse.debug.core.commands.IRestartHandler;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.examples.core.pda.model.PDADebugTarget;
-
-/**
- * Restart debug command handler. It restarts the current debug session.
- */
-public class PDARestartDebugCommand extends AbstractDebugCommand implements IRestartHandler {
-
- protected void doExecute(Object[] targets, IProgressMonitor monitor, IRequest request) throws CoreException {
- for (int i = 0; i < targets.length; i++) {
- ((PDADebugTarget)targets[i]).restart();
- monitor.worked(1);
- }
- }
-
- protected Object getTarget(Object element) {
- IDebugTarget target = (IDebugTarget)getAdapter(element, IDebugTarget.class);
- if (target instanceof PDADebugTarget) {
- return target;
- }
- return null;
- }
-
- protected boolean isExecutable(Object[] targets, IProgressMonitor monitor, IEnabledStateRequest request)
- throws CoreException
- {
- for (int i = 0; i < targets.length; i++) {
- if (((PDADebugTarget)targets[i]).isTerminated()) {
- return false;
- }
- monitor.worked(1);
- }
- return true;
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAThreadEventHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAThreadEventHandler.java
deleted file mode 100644
index f7bc123..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAThreadEventHandler.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.adapters;
-
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.examples.core.pda.model.PDAThread;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
-import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy;
-import org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler;
-
-
-/**
- * @since 3.2
- */
-public class PDAThreadEventHandler extends DebugEventHandler {
-
- private IStackFrame fPrev = null;
-
- /**
- * Constructs and event handler for a threads in the given viewer.
- *
- * @param viewer
- */
- public PDAThreadEventHandler(AbstractModelProxy proxy) {
- super(proxy);
- }
-
- protected void handleSuspend(DebugEvent event) {
- IThread thread = (IThread) event.getSource();
- int extras = IModelDelta.STATE;
- if (event.getDetail() == DebugEvent.BREAKPOINT | event.getDetail() == DebugEvent.CLIENT_REQUEST) {
- extras = IModelDelta.EXPAND;
- }
- fireDeltaUpdatingTopFrame(thread, IModelDelta.NO_CHANGE | extras);
- }
-
- private boolean isEqual(Object o1, Object o2) {
- if (o1 == o2) {
- return true;
- }
- if (o1 == null) {
- return false;
- }
- return o1.equals(o2);
- }
-
- protected void handleResume(DebugEvent event) {
- IThread thread = (IThread) event.getSource();
- fireDeltaAndClearTopFrame(thread, IModelDelta.STATE | IModelDelta.CONTENT);
- }
-
- protected void handleCreate(DebugEvent event) {
- fireDeltaAndClearTopFrame((IThread) event.getSource(), IModelDelta.ADDED);
- }
-
- protected void handleTerminate(DebugEvent event) {
- fireDeltaAndClearTopFrame((IThread) event.getSource(), IModelDelta.REMOVED);
- }
-
- protected void handleChange(DebugEvent event) {
- fireDeltaUpdatingTopFrame((IThread) event.getSource(), IModelDelta.STATE);
- }
-
- protected void handleLateSuspend(DebugEvent suspend, DebugEvent resume) {
- IThread thread = (IThread) suspend.getSource();
- fireDeltaUpdatingTopFrame(thread, IModelDelta.CONTENT | IModelDelta.EXPAND);
- }
-
- protected void handleSuspendTimeout(DebugEvent event) {
- IThread thread = (IThread) event.getSource();
- fireDeltaAndClearTopFrame(thread, IModelDelta.CONTENT);
- }
-
- private ModelDelta buildRootDelta() {
- return new ModelDelta(getLaunchManager(), IModelDelta.NO_CHANGE);
- }
-
- private ILaunchManager getLaunchManager() {
- return DebugPlugin.getDefault().getLaunchManager();
- }
-
- protected ModelDelta addTarget(ModelDelta delta, IThread thread) {
- ILaunch launch = thread.getLaunch();
- Object[] children = launch.getChildren();
- delta = delta.addNode(launch, indexOf(getLaunchManager().getLaunches(), launch), IModelDelta.NO_CHANGE, children.length);
- IDebugTarget debugTarget = thread.getDebugTarget();
- int numFrames = -1;
- try {
- numFrames = thread.getStackFrames().length;
- } catch (DebugException e) {
- }
- return delta.addNode(debugTarget, indexOf(children, debugTarget), IModelDelta.NO_CHANGE, numFrames);
- }
-
- private void fireDeltaAndClearTopFrame(IThread thread, int flags) {
- ModelDelta delta = buildRootDelta();
- addTarget(delta, thread);
- synchronized (this) {
- fPrev = null;
- }
- fireDelta(delta);
- }
-
- private void fireDeltaUpdatingTopFrame(IThread thread, int flags) {
- ModelDelta delta = buildRootDelta();
- ModelDelta node = addTarget(delta, thread);
- synchronized (this) {
- IStackFrame prev = fPrev;
- IStackFrame frame = null;
- try {
- frame = thread.getTopStackFrame();
- } catch (DebugException e) {
- }
- if (isEqual(frame, prev)) {
- node.setFlags(flags);
- } else {
- node.setFlags(flags | IModelDelta.CONTENT);
- }
- if (frame != null) {
- node.addNode(frame, 0, IModelDelta.STATE | IModelDelta.SELECT, 0);
- }
- fPrev = frame;
- }
- fireDelta(delta);
- }
-
- protected boolean handlesEvent(DebugEvent event) {
- return event.getSource() instanceof PDAThread;
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java
deleted file mode 100644
index 0f2639f..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- * Wind River Systems - added support for IToggleBreakpointsTargetFactory
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.breakpoints;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.ILineBreakpoint;
-import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
-import org.eclipse.debug.examples.core.pda.breakpoints.PDALineBreakpoint;
-import org.eclipse.debug.examples.core.pda.breakpoints.PDAWatchpoint;
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-
-/**
- * Adapter to create breakpoints in PDA files.
- */
-public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleLineBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- public void toggleLineBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
- ITextEditor textEditor = getEditor(part);
- if (textEditor != null) {
- IResource resource = (IResource) textEditor.getEditorInput().getAdapter(IResource.class);
- ITextSelection textSelection = (ITextSelection) selection;
- int lineNumber = textSelection.getStartLine();
- IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(DebugCorePlugin.ID_PDA_DEBUG_MODEL);
- for (int i = 0; i < breakpoints.length; i++) {
- IBreakpoint breakpoint = breakpoints[i];
- if (breakpoint instanceof ILineBreakpoint && resource.equals(breakpoint.getMarker().getResource())) {
- if (((ILineBreakpoint)breakpoint).getLineNumber() == (lineNumber + 1)) {
- // remove
- breakpoint.delete();
- return;
- }
- }
- }
- // create line breakpoint (doc line numbers start at 0)
- PDALineBreakpoint lineBreakpoint = new PDALineBreakpoint(resource, lineNumber + 1);
- DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(lineBreakpoint);
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleLineBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- public boolean canToggleLineBreakpoints(IWorkbenchPart part, ISelection selection) {
- return getEditor(part) != null;
- }
-
- /**
- * Returns the editor being used to edit a PDA file, associated with the
- * given part, or <code>null</code> if none.
- *
- * @param part workbench part
- * @return the editor being used to edit a PDA file, associated with the
- * given part, or <code>null</code> if none
- */
- private ITextEditor getEditor(IWorkbenchPart part) {
- if (part instanceof ITextEditor) {
- ITextEditor editorPart = (ITextEditor) part;
- IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class);
- if (resource != null) {
- String extension = resource.getFileExtension();
- if (extension != null && extension.equals("pda")) {
- return editorPart;
- }
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleMethodBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- public void toggleMethodBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleMethodBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- public boolean canToggleMethodBreakpoints(IWorkbenchPart part, ISelection selection) {
- return false;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleWatchpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- public void toggleWatchpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
- String[] variableAndFunctionName = getVariableAndFunctionName(part, selection);
- if (variableAndFunctionName != null && part instanceof ITextEditor && selection instanceof ITextSelection) {
- ITextEditor editorPart = (ITextEditor)part;
- int lineNumber = ((ITextSelection)selection).getStartLine();
- IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class);
- String var = variableAndFunctionName[0];
- String fcn = variableAndFunctionName[1];
- toggleWatchpoint(resource, lineNumber, fcn, var, true, true);
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleWatchpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- public boolean canToggleWatchpoints(IWorkbenchPart part, ISelection selection) {
- return getVariableAndFunctionName(part, selection) != null;
- }
-
- protected void toggleWatchpoint(IResource resource, int lineNumber, String fcn, String var, boolean access,
- boolean modification) throws CoreException
- {
- // look for existing watchpoint to delete
- IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(DebugCorePlugin.ID_PDA_DEBUG_MODEL);
- for (int i = 0; i < breakpoints.length; i++) {
- IBreakpoint breakpoint = breakpoints[i];
- if (breakpoint instanceof PDAWatchpoint && resource.equals(breakpoint.getMarker().getResource())) {
- PDAWatchpoint watchpoint = (PDAWatchpoint)breakpoint;
- String otherVar = watchpoint.getVariableName();
- String otherFcn = watchpoint.getFunctionName();
- if (otherVar.equals(var) && otherFcn.equals(fcn)) {
- breakpoint.delete();
- return;
- }
- }
- }
- // create watchpoint
- PDAWatchpoint watchpoint = new PDAWatchpoint(resource, lineNumber + 1, fcn, var, access, modification);
- DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(watchpoint);
- }
-
- /**
- * Returns the variable and function names at the current line, or <code>null</code> if none.
- *
- * @param part text editor
- * @param selection text selection
- * @return the variable and function names at the current line, or <code>null</code> if none.
- * The array has two elements, the first is the variable name, the second is the function name.
- */
- protected String[] getVariableAndFunctionName(IWorkbenchPart part, ISelection selection) {
- ITextEditor editor = getEditor(part);
- if (editor != null && selection instanceof ITextSelection) {
- ITextSelection textSelection = (ITextSelection) selection;
- IDocumentProvider documentProvider = editor.getDocumentProvider();
- try {
- documentProvider.connect(this);
- IDocument document = documentProvider.getDocument(editor.getEditorInput());
- IRegion region = document.getLineInformationOfOffset(textSelection.getOffset());
- String string = document.get(region.getOffset(), region.getLength()).trim();
- if (string.startsWith("var ")) {
- String varName = string.substring(4).trim();
- String fcnName = getFunctionName(document, varName, document.getLineOfOffset(textSelection.getOffset()));
- return new String[] {varName, fcnName};
- }
- } catch (CoreException e) {
- } catch (BadLocationException e) {
- } finally {
- documentProvider.disconnect(this);
- }
- }
- return null;
- }
-
- /**
- * Returns the name of the function containing the given variable defined at the given
- * line number in the specified document.
- *
- * @param document PDA source file
- * @param varName variable name
- * @param line line numbner at which the variable is defined
- * @return name of function defining the variable
- */
- private String getFunctionName(IDocument document, String varName, int line) {
- // This is a simple guess at the function name - look for the labels preceeding
- // the variable definition, and then see if there are any 'calls' to that
- // label. If none, assumet the variable is in the "_main_" function
- String source = document.get();
- int lineIndex = line - 1;
- while (lineIndex >= 0) {
- try {
- IRegion information = document.getLineInformation(lineIndex);
- String lineText = document.get(information.getOffset(), information.getLength());
- if (lineText.startsWith(":")) {
- String label = lineText.substring(1);
- if (source.indexOf("call " + label) >= 0) {
- return label;
- }
- }
- lineIndex--;
- } catch (BadLocationException e) {
- }
- }
- return "_main_";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#toggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- public void toggleBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
- if (canToggleWatchpoints(part, selection)) {
- toggleWatchpoints(part, selection);
- } else {
- toggleLineBreakpoints(part, selection);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#canToggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- public boolean canToggleBreakpoints(IWorkbenchPart part, ISelection selection) {
- return canToggleLineBreakpoints(part, selection) || canToggleWatchpoints(part, selection);
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java
deleted file mode 100644
index c67200a..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.breakpoints;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.debug.examples.ui.pda.editor.PDAEditor;
-import org.eclipse.debug.ui.actions.IRunToLineTarget;
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-
-/**
- * Creates a toggle breakpoint adapter
- */
-public class PDAEditorAdapterFactory implements IAdapterFactory {
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (adaptableObject instanceof PDAEditor) {
- ITextEditor editorPart = (ITextEditor) adaptableObject;
- IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class);
- if (resource != null) {
- String extension = resource.getFileExtension();
- if (extension != null && extension.equals("pda")) {
- if (adapterType.equals(IToggleBreakpointsTarget.class)) {
- return new PDABreakpointAdapter();
- }
- //#ifdef ex7
-//# // TODO: Exercise 7 - create run to line adapter
- //#else
- if (adapterType.equals(IRunToLineTarget.class)) {
- return new PDARunToLineAdapter();
- }
- //#endif
- }
- }
- }
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList() {
- return new Class[]{IToggleBreakpointsTarget.class};
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDARunToLineAdapter.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDARunToLineAdapter.java
deleted file mode 100644
index 3d5fa42..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDARunToLineAdapter.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.breakpoints;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.ISuspendResume;
-import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
-import org.eclipse.debug.examples.core.pda.breakpoints.PDARunToLineBreakpoint;
-import org.eclipse.debug.ui.actions.IRunToLineTarget;
-import org.eclipse.debug.ui.actions.RunToLineHandler;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-
-/**
- * Run to line target for the Java debugger
- */
-public class PDARunToLineAdapter implements IRunToLineTarget {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.actions.IRunToLineTarget#runToLine(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection, org.eclipse.debug.core.model.ISuspendResume)
- */
- public void runToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) throws CoreException {
- IEditorPart editorPart = (IEditorPart)part;
- ITextEditor textEditor = (ITextEditor)editorPart;
- ITextSelection textSelection = (ITextSelection) selection;
- int lineNumber = textSelection.getStartLine() + 1;
- if (lineNumber > 0) {
- if (target instanceof IAdaptable) {
- IDebugTarget debugTarget = (IDebugTarget) ((IAdaptable)target).getAdapter(IDebugTarget.class);
- if (debugTarget != null) {
- //#ifdef ex7
-//# // TODO: Exercise 7 - perform the run-to-line with a run-to-line breakpoint and handler
- //#else
- IFile resource = (IFile) textEditor.getEditorInput().getAdapter(IResource.class);
- IBreakpoint breakpoint= new PDARunToLineBreakpoint(resource, lineNumber);
- RunToLineHandler handler = new RunToLineHandler(debugTarget, target, breakpoint);
- handler.run(new NullProgressMonitor());
- //#endif
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.actions.IRunToLineTarget#canRunToLine(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection, org.eclipse.debug.core.model.ISuspendResume)
- */
- public boolean canRunToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) {
- //#ifdef ex7
-//# // TODO: Exercise 7 - ensure the target is a PDA target
-//# return false;
- //#else
- return target instanceof IDebugElement &&
- ((IDebugElement)target).getModelIdentifier().equals(DebugCorePlugin.ID_PDA_DEBUG_MODEL);
- //#endif
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTarget.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTarget.java
deleted file mode 100644
index 4c51afe..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTarget.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.breakpoints;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.model.ISourceLocator;
-import org.eclipse.debug.examples.core.pda.model.PDAStackFrame;
-import org.eclipse.debug.examples.core.pda.model.PDAVariable;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.progress.WorkbenchJob;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-
-/**
- * Adapter to create specialized watchpoints in PDA files and the variables views.
- */
-public class PDAToggleWatchpointsTarget extends PDABreakpointAdapter {
-
- final private boolean fAccessModeEnabled;
- final private boolean fModificationModeEnabled;
-
- PDAToggleWatchpointsTarget(boolean access, boolean modification) {
- fAccessModeEnabled = access;
- fModificationModeEnabled = modification;
- }
-
- public boolean canToggleWatchpoints(IWorkbenchPart part, ISelection selection) {
- if (super.canToggleWatchpoints(part, selection)) {
- return true;
- } else {
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection)selection;
- return ss.getFirstElement() instanceof PDAVariable;
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleWatchpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- public void toggleWatchpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
- String[] variableAndFunctionName = getVariableAndFunctionName(part, selection);
-
- if (variableAndFunctionName != null && part instanceof ITextEditor && selection instanceof ITextSelection) {
- // Selection inside text editor. Create a watchpoint based on
- // current source line.
- ITextEditor editorPart = (ITextEditor)part;
- int lineNumber = ((ITextSelection)selection).getStartLine();
- IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class);
- String var = variableAndFunctionName[0];
- String fcn = variableAndFunctionName[1];
- toggleWatchpoint(resource, lineNumber, fcn, var, fAccessModeEnabled, fModificationModeEnabled);
- } else if (selection instanceof IStructuredSelection &&
- ((IStructuredSelection)selection).getFirstElement() instanceof PDAVariable )
- {
- // Selection is inside a variables view. Create a watchpoint
- // using information from the variable. Retrieving information
- // from the model requires performing source lookup which should be
- // done on a background thread.
- final PDAVariable var = (PDAVariable)((IStructuredSelection)selection).getFirstElement();
- final PDAStackFrame frame = var.getStackFrame();
- final Shell shell = part.getSite().getShell();
-
- new Job("Toggle PDA Watchpoint") {
- { setSystem(true); }
-
- protected IStatus run(IProgressMonitor monitor) {
- try {
- IFile file = getResource(var.getStackFrame());
- String varName = var.getName();
- int line = findLine(file, varName);
- toggleWatchpoint(file, line, frame.getName(), varName,
- fAccessModeEnabled, fModificationModeEnabled);
- } catch (final CoreException e) {
- // Need to switch back to the UI thread to show the error
- // dialog.
- new WorkbenchJob(shell.getDisplay(), "Toggle PDA Watchpoint") {
- { setSystem(true); }
-
- public IStatus runInUIThread(IProgressMonitor monitor) {
- ErrorDialog.openError(shell, "Failed to create PDA watchpoint", "Failed to create PDA watchpoint.\n", e.getStatus());
- return Status.OK_STATUS;
- }
- }.schedule();
- }
- return Status.OK_STATUS;
- }
- }.schedule();
- }
- }
-
- private IFile getResource(PDAStackFrame frame) {
- ISourceLocator locator = frame.getLaunch().getSourceLocator();
- Object sourceElement = locator.getSourceElement(frame);
- if (sourceElement instanceof IFile) {
- return (IFile)sourceElement;
- }
- return null;
- }
-
- private int findLine(IFile file, String var) throws CoreException {
- BufferedReader reader = new BufferedReader(new InputStreamReader(file.getContents()));
-
- int lineNum = 0;
- try {
- while(true) {
- String line = reader.readLine().trim();
- if (line.startsWith("var")) {
- String varName = line.substring("var".length()).trim();
- if (varName.equals(var)) {
- break;
- }
- }
- lineNum++;
- }
- } catch (IOException e) {
- // end of file reached and line wasn't found
- return -1;
- } finally {
- try {
- reader.close();
- } catch (IOException e) {}
- }
- return lineNum;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#toggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- public void toggleBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
- if (canToggleWatchpoints(part, selection)) {
- toggleWatchpoints(part, selection);
- } else {
- toggleLineBreakpoints(part, selection);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#canToggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- public boolean canToggleBreakpoints(IWorkbenchPart part, ISelection selection) {
- return canToggleLineBreakpoints(part, selection) || canToggleWatchpoints(part, selection);
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTargetFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTargetFactory.java
deleted file mode 100644
index 9c9ebd9..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTargetFactory.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.breakpoints;
-
-import java.util.HashMap;
-import java.util.LinkedHashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTargetFactory;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Toggle breakpoints target factory for creating PDA watchpoints. It allows the
- * user the select the type of watchpoint that will be created when the watchpoint
- * is toggles inside the editor or variables view.
- */
-public class PDAToggleWatchpointsTargetFactory implements IToggleBreakpointsTargetFactory {
-
- private static final String TOGGLE_WATCHPOINT_TARGET_ACCESS = "org.eclipse.debug.examples.ui.pda.watchpoint_access";
- private static final String TOGGLE_WATCHPOINT_TARGET_MODIFICATION = "org.eclipse.debug.examples.ui.pda.watchpoint_modification";
- private static final String TOGGLE_WATCHPOINT_TARGET_BOTH = "org.eclipse.debug.examples.ui.pda.watchpoint_both";
-
- private static Set TOGGLE_WATCHPOINTS_TARGETS = new LinkedHashSet();
-
- private Map fToggleWatchpointTargets = new HashMap(3);
-
- static {
- TOGGLE_WATCHPOINTS_TARGETS.add(TOGGLE_WATCHPOINT_TARGET_BOTH);
- TOGGLE_WATCHPOINTS_TARGETS.add(TOGGLE_WATCHPOINT_TARGET_ACCESS);
- TOGGLE_WATCHPOINTS_TARGETS.add(TOGGLE_WATCHPOINT_TARGET_MODIFICATION);
- }
-
- public IToggleBreakpointsTarget createToggleTarget(String targetID) {
- IToggleBreakpointsTarget target = (IToggleBreakpointsTarget)fToggleWatchpointTargets.get(targetID);
- if (target == null) {
- if (TOGGLE_WATCHPOINT_TARGET_BOTH.equals(targetID)) {
- target = new PDAToggleWatchpointsTarget(true, true);
- } else if (TOGGLE_WATCHPOINT_TARGET_ACCESS.equals(targetID)) {
- target = new PDAToggleWatchpointsTarget(true, false);
- } else if (TOGGLE_WATCHPOINT_TARGET_MODIFICATION.equals(targetID)) {
- target = new PDAToggleWatchpointsTarget(false, true);
- } else {
- return null;
- }
- fToggleWatchpointTargets.put(targetID, target);
- }
- return target;
- }
-
- public String getDefaultToggleTarget(IWorkbenchPart part, ISelection selection) {
- return TOGGLE_WATCHPOINT_TARGET_BOTH;
- }
-
- public Set getToggleTargets(IWorkbenchPart part, ISelection selection) {
- return TOGGLE_WATCHPOINTS_TARGETS;
- }
-
- public String getToggleTargetName(String targetID) {
- if (TOGGLE_WATCHPOINT_TARGET_BOTH.equals(targetID)) {
- return "Watchpoints (Read/Write)";
- } else if (TOGGLE_WATCHPOINT_TARGET_ACCESS.equals(targetID)) {
- return "Watchpoints (Read)";
- } else if (TOGGLE_WATCHPOINT_TARGET_MODIFICATION.equals(targetID)) {
- return "Watchpoints (Write)";
- } else {
- return null;
- }
- }
-
- public String getToggleTargetDescription(String targetID) {
- return getToggleTargetName(targetID);
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/AnnotationHover.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/AnnotationHover.java
deleted file mode 100644
index 6b79056..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/AnnotationHover.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.editor;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.jface.text.source.IAnnotationHover;
-import org.eclipse.jface.text.source.IAnnotationModel;
-import org.eclipse.jface.text.source.ISourceViewer;
-
-/**
- * Returns hover for breakpoints.
- */
-public class AnnotationHover implements IAnnotationHover {
-
- public String getHoverInfo(ISourceViewer sourceViewer, int lineNumber) {
- IAnnotationModel annotationModel = sourceViewer.getAnnotationModel();
- Iterator iterator = annotationModel.getAnnotationIterator();
- while (iterator.hasNext()) {
- Annotation annotation = (Annotation) iterator.next();
- Position position = annotationModel.getPosition(annotation);
- try {
- int lineOfAnnotation = sourceViewer.getDocument().getLineOfOffset(position.getOffset());
- if (lineNumber == lineOfAnnotation) {
- return annotation.getText();
- }
- } catch (BadLocationException e) {
- }
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java
deleted file mode 100644
index 5d70894..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.editor;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-
-public class PDAContentAssistProcessor implements IContentAssistProcessor {
-
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
- int index = offset - 1;
- StringBuffer prefix = new StringBuffer();
- IDocument document = viewer.getDocument();
- while (index > 0) {
- try {
- char prev = document.getChar(index);
- if (Character.isWhitespace(prev)) {
- break;
- }
- prefix.insert(0, prev);
- index--;
- } catch (BadLocationException e) {
- }
- }
-
- List proposals = new ArrayList();
- String[] keywords = PDAScanner.fgKeywords;
- if (prefix.length() > 0) {
- String word = prefix.toString();
- for (int i = 0; i < keywords.length; i++) {
- String keyword = keywords[i];
- if (keyword.startsWith(word) && word.length() < keyword.length()) {
- proposals.add(new CompletionProposal(keyword + " ", index + 1, offset - (index + 1), keyword.length() + 1));
- }
- }
- } else {
- // propose all keywords
- for (int i = 0; i < keywords.length; i++) {
- String keyword = keywords[i];
- proposals.add(new CompletionProposal(keyword + " ", offset, 0, keyword.length() + 1));
- }
- }
- if (!proposals.isEmpty()) {
- return (ICompletionProposal[]) proposals.toArray(new ICompletionProposal[proposals.size()]);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer, int)
- */
- public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
- */
- public char[] getCompletionProposalAutoActivationCharacters() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
- */
- public char[] getContextInformationAutoActivationCharacters() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
- */
- public String getErrorMessage() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
- */
- public IContextInformationValidator getContextInformationValidator() {
- return null;
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistant.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistant.java
deleted file mode 100644
index 01f7192..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistant.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.editor;
-
-import org.eclipse.jface.text.DefaultInformationControl;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IInformationControl;
-import org.eclipse.jface.text.IInformationControlCreator;
-import org.eclipse.jface.text.contentassist.ContentAssistant;
-import org.eclipse.swt.widgets.Shell;
-
-public class PDAContentAssistant extends ContentAssistant {
-
- public PDAContentAssistant() {
- super();
-
- PDAContentAssistProcessor processor= new PDAContentAssistProcessor();
- setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
-
- enableAutoActivation(false);
- enableAutoInsert(false);
-
- setInformationControlCreator(getInformationControlCreator());
- }
-
- private IInformationControlCreator getInformationControlCreator() {
- return new IInformationControlCreator() {
- public IInformationControl createInformationControl(Shell parent) {
- return new DefaultInformationControl(parent);
- }
- };
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java
deleted file mode 100644
index 3617cb1..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.editor;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.ui.texteditor.AbstractDecoratedTextEditor;
-import org.eclipse.ui.texteditor.ContentAssistAction;
-import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
-
-/**
- * PDA editor
- */
-public class PDAEditor extends AbstractDecoratedTextEditor {
-
- /**
- * Creates a PDE editor
- */
- public PDAEditor() {
- super();
- setSourceViewerConfiguration(new PDASourceViewerConfiguration());
- setRulerContextMenuId("pda.editor.rulerMenu");
- setEditorContextMenuId("pda.editor.editorMenu");
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.AbstractTextEditor#createActions()
- */
- protected void createActions() {
- super.createActions();
- ResourceBundle bundle = ResourceBundle.getBundle("org.eclipse.debug.examples.ui.pda.editor.PDAEditorMessages"); //$NON-NLS-1$
- IAction action = new ContentAssistAction(bundle, "ContentAssistProposal.", this); //$NON-NLS-1$
- action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
- setAction("ContentAssistProposal", action); //$NON-NLS-1$
- }
-
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditorMessages.properties b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditorMessages.properties
deleted file mode 100644
index 3215e88..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditorMessages.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-ContentAssistProposal.label=Content &Assist
-ContentAssistProposal.tooltip=Content Assist
-ContentAssistProposal.image=
-ContentAssistProposal.description=Content Assist
\ No newline at end of file
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAScanner.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAScanner.java
deleted file mode 100644
index b62d0ba..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAScanner.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.editor;
-
-import org.eclipse.debug.examples.ui.pda.DebugUIPlugin;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.rules.BufferedRuleBasedScanner;
-import org.eclipse.jface.text.rules.IRule;
-import org.eclipse.jface.text.rules.IWordDetector;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.rules.WordRule;
-
-
-/**
- * PDA editor keyword scanner.
- */
-public class PDAScanner extends BufferedRuleBasedScanner {
-
- /**
- * PDA keywods
- */
- public static final String[] fgKeywords = new String[] {
- "add", "branch_not_zero", "call", "dec", "dup",
- "halt", "output", "pop", "push", "return", "var"
- };
-
- /**
- * Detects potential keywords
- */
- class PDAWordDetector implements IWordDetector {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordStart(char)
- */
- public boolean isWordStart(char c) {
- return Character.isLetter(c);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordPart(char)
- */
- public boolean isWordPart(char c) {
- return Character.isLetter(c) || c == '_';
- }
- }
-
- /**
- * Detects PDA branch labels
- */
- class PDALabelDetector extends PDAWordDetector {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordStart(char)
- */
- public boolean isWordStart(char c) {
- return c == ':';
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordPart(char)
- */
- public boolean isWordPart(char c) {
- return super.isWordPart(c) || Character.isDigit(c);
- }
- }
-
- /**
- * Constructs a scanner that identifies PDA keywords.
- */
- public PDAScanner() {
- // keywords
- Token token = new Token(new TextAttribute(DebugUIPlugin.getDefault().getColor(DebugUIPlugin.KEYWORD)));
- WordRule keywords = new WordRule(new PDAWordDetector());
- for (int i = 0; i < fgKeywords.length; i++) {
- String keyword = fgKeywords[i];
- keywords.addWord(keyword, token);
- }
- // labels
- token = new Token(new TextAttribute(DebugUIPlugin.getDefault().getColor(DebugUIPlugin.LABEL)));
- WordRule labels = new WordRule(new PDALabelDetector(), token);
- setRules(new IRule[]{keywords, labels});
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDASourceViewerConfiguration.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDASourceViewerConfiguration.java
deleted file mode 100644
index 6c24c36..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDASourceViewerConfiguration.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.editor;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextHover;
-import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.presentation.IPresentationReconciler;
-import org.eclipse.jface.text.presentation.PresentationReconciler;
-import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
-import org.eclipse.jface.text.source.IAnnotationHover;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
-
-/**
- * Source view configuration for the PDA editor
- */
-public class PDASourceViewerConfiguration extends TextSourceViewerConfiguration {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getTextHover(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
- */
- public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {
- return new TextHover();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getAnnotationHover(org.eclipse.jface.text.source.ISourceViewer)
- */
- public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
- return new AnnotationHover();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer)
- */
- public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
- PresentationReconciler reconciler = new PresentationReconciler();
- reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
- DefaultDamagerRepairer dr = new DefaultDamagerRepairer(new PDAScanner());
- reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
- reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
- return reconciler;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentAssistant(org.eclipse.jface.text.source.ISourceViewer)
- */
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
- return new PDAContentAssistant();
- }
-
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PopFrameActionDelegate.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PopFrameActionDelegate.java
deleted file mode 100644
index 43e35dc..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PopFrameActionDelegate.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.editor;
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.examples.core.pda.model.PDAStackFrame;
-import org.eclipse.debug.examples.core.pda.model.PDAThread;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-
-public class PopFrameActionDelegate implements IObjectActionDelegate, IActionDelegate2 {
-
- private PDAThread fThread = null;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- //#ifdef ex5
-//# // TODO: Exercise 5 - pop the top frame
- //#else
- try {
- fThread.popFrame();
- } catch (DebugException e) {
- }
- //#endif
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) selection;
- Object element = ss.getFirstElement();
- if (element instanceof PDAStackFrame) {
- PDAStackFrame frame = (PDAStackFrame) element;
- //#ifdef ex5
-//# // TODO: Exercise 5 - enable the action if the frame's thread supports it
- //#else
- fThread = (PDAThread) frame.getThread();
- try {
- action.setEnabled(fThread.canPopFrame() && fThread.getTopStackFrame().equals(frame));
- } catch (DebugException e) {
- }
- return;
- //#endif
- }
-
- }
- action.setEnabled(false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#dispose()
- */
- public void dispose() {
- fThread = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java
deleted file mode 100644
index 6b14e4c..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.editor;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.debug.examples.core.pda.model.PDADebugTarget;
-import org.eclipse.debug.examples.core.pda.model.PDAStackFrame;
-import org.eclipse.debug.examples.core.pda.model.PDAThread;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextHover;
-import org.eclipse.jface.text.ITextViewer;
-
-
-/**
- * Produces debug hover for the PDA debugger.
- */
-public class TextHover implements ITextHover {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.ITextHover#getHoverInfo(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
- */
- public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
- String varName = null;
- try {
- varName = textViewer.getDocument().get(hoverRegion.getOffset(), hoverRegion.getLength());
- } catch (BadLocationException e) {
- return null;
- }
- if (varName.startsWith("$") && varName.length() > 1) {
- varName = varName.substring(1);
- }
-
- PDAStackFrame frame = null;
- IAdaptable debugContext = DebugUITools.getDebugContext();
- if (debugContext instanceof PDAStackFrame) {
- frame = (PDAStackFrame) debugContext;
- } else if (debugContext instanceof PDAThread) {
- PDAThread thread = (PDAThread) debugContext;
- try {
- frame = (PDAStackFrame) thread.getTopStackFrame();
- } catch (DebugException e) {
- return null;
- }
- } else if (debugContext instanceof PDADebugTarget) {
- PDADebugTarget target = (PDADebugTarget) debugContext;
- try {
- IThread[] threads = target.getThreads();
- if (threads.length > 0) {
- frame = (PDAStackFrame) threads[0].getTopStackFrame();
- }
- } catch (DebugException e) {
- return null;
- }
- }
- if (frame != null) {
- try {
- IVariable[] variables = frame.getVariables();
- for (int i = 0; i < variables.length; i++) {
- IVariable variable = variables[i];
- if (variable.getName().equals(varName)) {
- return varName + " = " + variable.getValue().getValueString();
- }
- }
- } catch (DebugException e) {
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.ITextHover#getHoverRegion(org.eclipse.jface.text.ITextViewer, int)
- */
- public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
- return WordFinder.findWord(textViewer.getDocument(), offset);
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/WordFinder.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/WordFinder.java
deleted file mode 100644
index e60d982..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/WordFinder.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.editor;
-
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Region;
-
-/**
- * Looks for an identifier in a source file
- */
-public class WordFinder {
-
- /**
- * Returns the region in the given document that contains an identifier, or
- * <code>null</code> if none.
- *
- * @param document document to search
- * @param offset offset at which to look for an identifier
- * @return region containing an identifier, or <code>null</code>
- */
- public static IRegion findWord(IDocument document, int offset) {
-
- int start= -1;
- int end= -1;
-
-
- try {
-
- int pos= offset;
- char c;
-
- while (pos >= 0) {
- c= document.getChar(pos);
- if (!Character.isJavaIdentifierPart(c))
- break;
- --pos;
- }
-
- start= pos;
-
- pos= offset;
- int length= document.getLength();
-
- while (pos < length) {
- c= document.getChar(pos);
- if (!Character.isJavaIdentifierPart(c))
- break;
- ++pos;
- }
-
- end= pos;
-
- } catch (BadLocationException x) {
- }
-
- if (start > -1 && end > -1) {
- if (start == offset && end == offset)
- return new Region(offset, 0);
- else if (start == offset)
- return new Region(start, end - start);
- else
- return new Region(start + 1, end - start - 1);
- }
-
- return null;
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDALaunchShortcut.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDALaunchShortcut.java
deleted file mode 100644
index 78fc73d..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDALaunchShortcut.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.launcher;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.ILaunchShortcut;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IEditorPart;
-
-
-/**
- * Launches a PDA file
- */
-public class PDALaunchShortcut implements ILaunchShortcut {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers.ISelection, java.lang.String)
- */
- public void launch(ISelection selection, String mode) {
- // must be a structured selection with one file selected
- IFile file = (IFile) ((IStructuredSelection)selection).getFirstElement();
-
- // check for an existing launch config for the pda file
- String path = file.getFullPath().toString();
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType type = launchManager.getLaunchConfigurationType(DebugCorePlugin.ID_PDA_LAUNCH_CONFIGURATION_TYPE);
- try {
- ILaunchConfiguration[] configurations = launchManager.getLaunchConfigurations(type);
- for (int i = 0; i < configurations.length; i++) {
- ILaunchConfiguration configuration = configurations[i];
- String attribute = configuration.getAttribute(DebugCorePlugin.ATTR_PDA_PROGRAM, (String)null);
- if (path.equals(attribute)) {
- DebugUITools.launch(configuration, mode);
- return;
- }
- }
- } catch (CoreException e) {
- return;
- }
-
- try {
- // create a new configuration for the pda file
- ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, file.getName());
- workingCopy.setAttribute(DebugCorePlugin.ATTR_PDA_PROGRAM, path);
- workingCopy.setMappedResources(new IResource[]{file});
- ILaunchConfiguration configuration = workingCopy.doSave();
- DebugUITools.launch(configuration, mode);
- } catch (CoreException e1) {
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, java.lang.String)
- */
- public void launch(IEditorPart editor, String mode) {
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java
deleted file mode 100644
index 27b3a2f..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.launcher;
-
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
-import org.eclipse.debug.examples.ui.pda.DebugUIPlugin;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.ResourceListSelectionDialog;
-
-
-/**
- * Tab to specify the PDA program to run/debug.
- */
-public class PDAMainTab extends AbstractLaunchConfigurationTab {
-
- private Text fProgramText;
- private Button fProgramButton;
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- Font font = parent.getFont();
-
- Composite comp = new Composite(parent, SWT.NONE);
- setControl(comp);
- GridLayout topLayout = new GridLayout();
- topLayout.verticalSpacing = 0;
- topLayout.numColumns = 3;
- comp.setLayout(topLayout);
- comp.setFont(font);
-
- createVerticalSpacer(comp, 3);
-
- Label programLabel = new Label(comp, SWT.NONE);
- programLabel.setText("&Program:");
- GridData gd = new GridData(GridData.BEGINNING);
- programLabel.setLayoutData(gd);
- programLabel.setFont(font);
-
- fProgramText = new Text(comp, SWT.SINGLE | SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- fProgramText.setLayoutData(gd);
- fProgramText.setFont(font);
- fProgramText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateLaunchConfigurationDialog();
- }
- });
-
- fProgramButton = createPushButton(comp, "&Browse...", null); //$NON-NLS-1$
- fProgramButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- browsePDAFiles();
- }
- });
- }
-
- /**
- * Open a resource chooser to select a PDA program
- */
- protected void browsePDAFiles() {
- ResourceListSelectionDialog dialog = new ResourceListSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), IResource.FILE);
- dialog.setTitle("PDA Program");
- dialog.setMessage("Select PDA Program");
- if (dialog.open() == Window.OK) {
- Object[] files = dialog.getResult();
- IFile file = (IFile) files[0];
- fProgramText.setText(file.getFullPath().toString());
- }
-
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
- public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public void initializeFrom(ILaunchConfiguration configuration) {
- //#ifdef ex1
-//# // TODO: Exercise 1 - retrieve the program path attribute from the launch configuration
-//# String program = null;
-//# if (program != null) {
-//# fProgramText.setText(program);
-//# }
- //#else
- try {
- String program = null;
- program = configuration.getAttribute(DebugCorePlugin.ATTR_PDA_PROGRAM, (String)null);
- if (program != null) {
- fProgramText.setText(program);
- }
- } catch (CoreException e) {
- setErrorMessage(e.getMessage());
- }
- //#endif
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
- public void performApply(ILaunchConfigurationWorkingCopy configuration) {
- String program = fProgramText.getText().trim();
- if (program.length() == 0) {
- program = null;
- }
- //#ifdef ex1
-//# // TODO: Exercise 1 - update the launch configuration with the path to
-//# // currently specified program
- //#else
- configuration.setAttribute(DebugCorePlugin.ATTR_PDA_PROGRAM, program);
- //#endif
-
- // perform resource mapping for contextual launch
- IResource[] resources = null;
- if (program!= null) {
- IPath path = new Path(program);
- IResource res = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
- if (res != null) {
- resources = new IResource[]{res};
- }
- }
- configuration.setMappedResources(resources);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
- */
- public String getName() {
- return "Main";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public boolean isValid(ILaunchConfiguration launchConfig) {
- setErrorMessage(null);
- setMessage(null);
- String text = fProgramText.getText();
- //#ifdef ex1
-//# // TODO: Exercise 1 - validate the currently specified program exists and is not
-//# // empty, providing the user with feedback.
- //#else
- if (text.length() > 0) {
- IPath path = new Path(text);
- if (ResourcesPlugin.getWorkspace().getRoot().findMember(path) == null) {
- setErrorMessage("Specified program does not exist");
- return false;
- }
- } else {
- setMessage("Specify a program");
- }
- //#endif
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()
- */
- public Image getImage() {
- return DebugUIPlugin.getDefault().getImageRegistry().get(DebugUIPlugin.IMG_OBJ_PDA);
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDATabGroup.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDATabGroup.java
deleted file mode 100644
index 6f1753c..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDATabGroup.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.launcher;
-
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
-import org.eclipse.debug.ui.CommonTab;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
-
-/**
- * Tab group for a PDA application
- */
-public class PDATabGroup extends AbstractLaunchConfigurationTabGroup {
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String)
- */
- public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
- //#ifdef ex1
-//# // TODO: Exercise 1 - add the PDA main tab, source lookup tab and common
-//# // tab to the tab group
- //#else
- setTabs(new ILaunchConfigurationTab[] {
- new PDAMainTab(),
- new SourceLookupTab(),
- new CommonTab()
- });
- //#endif
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/presentation/PDAModelPresentation.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/presentation/PDAModelPresentation.java
deleted file mode 100644
index 7d5d3ba..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/presentation/PDAModelPresentation.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.presentation;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.ILineBreakpoint;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
-import org.eclipse.debug.examples.core.pda.breakpoints.PDALineBreakpoint;
-import org.eclipse.debug.examples.core.pda.breakpoints.PDAWatchpoint;
-import org.eclipse.debug.examples.core.pda.model.PDADebugTarget;
-import org.eclipse.debug.examples.core.pda.model.PDAStackFrame;
-import org.eclipse.debug.examples.core.pda.model.PDAThread;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IValueDetailListener;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.part.FileEditorInput;
-
-
-/**
- * Renders PDA debug elements
- */
-public class PDAModelPresentation extends LabelProvider implements IDebugModelPresentation {
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDebugModelPresentation#setAttribute(java.lang.String, java.lang.Object)
- */
- public void setAttribute(String attribute, Object value) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
- */
- public String getText(Object element) {
- if (element instanceof PDADebugTarget) {
- return getTargetText((PDADebugTarget)element);
- } else if (element instanceof PDAThread) {
- return getThreadText((PDAThread)element);
- } else if (element instanceof PDAStackFrame) {
- return getStackFrameText((PDAStackFrame)element);
- } else if (element instanceof PDAWatchpoint) {
- return getWatchpointText((PDAWatchpoint)element);
- }
- return null;
- }
-
- /**
- * Returns a label for the given watchpoint.
- *
- * @param watchpoint
- * @return a label for the given watchpoint
- */
- private String getWatchpointText(PDAWatchpoint watchpoint) {
- try {
- String label = watchpoint.getVariableName() + " (" + watchpoint.getFunctionName() + ")";
- if (watchpoint.isAccess()) {
- label += " [read]";
- }
- if (watchpoint.isModification()) {
- label += " [write]";
- }
- return label;
- } catch (CoreException e) {
- return null;
- }
- }
- /**
- * Returns a label for the given debug target
- *
- * @param target debug target
- * @return a label for the given debug target
- */
- private String getTargetText(PDADebugTarget target) {
- try {
- String pgmPath = target.getLaunch().getLaunchConfiguration().getAttribute(DebugCorePlugin.ATTR_PDA_PROGRAM, (String)null);
- if (pgmPath != null) {
- IPath path = new Path(pgmPath);
- String label = "";
- if (target.isTerminated()) {
- label = "<terminated>";
- }
- return label + "PDA [" + path.lastSegment() + "]";
- }
- } catch (CoreException e) {
- }
- return "PDA";
-
- }
-
- /**
- * Returns a label for the given stack frame
- *
- * @param frame a stack frame
- * @return a label for the given stack frame
- */
- private String getStackFrameText(PDAStackFrame frame) {
- try {
- return frame.getName() + " (line: " + frame.getLineNumber() + ")";
- } catch (DebugException e) {
- }
- return null;
-
- }
-
- /**
- * Returns a label for the given thread
- *
- * @param thread a thread
- * @return a label for the given thread
- */
- private String getThreadText(PDAThread thread) {
- String label = thread.getName();
- if (thread.isStepping()) {
- label += " (stepping)";
- } else if (thread.isSuspended()) {
- IBreakpoint[] breakpoints = thread.getBreakpoints();
- if (breakpoints.length == 0) {
- if (thread.getError() == null) {
- label += " (suspended)";
- } else {
- label += " (" + thread.getError() + ")";
- }
- } else {
- IBreakpoint breakpoint = breakpoints[0]; // there can only be one in PDA
- if (breakpoint instanceof PDALineBreakpoint) {
- PDALineBreakpoint pdaBreakpoint = (PDALineBreakpoint) breakpoint;
- if (pdaBreakpoint instanceof PDAWatchpoint) {
- try {
- PDAWatchpoint watchpoint = (PDAWatchpoint)pdaBreakpoint;
- label += " (watchpoint: " + watchpoint.getSuspendType() + " " + watchpoint.getVariableName() + ")";
- } catch (CoreException e) {
- }
- } else if (pdaBreakpoint.isRunToLineBreakpoint()) {
- label += " (run to line)";
- } else {
- label += " (suspended at line breakpoint)";
- }
- }
- }
- } else if (thread.isTerminated()) {
- label = "<terminated> " + label;
- }
- return label;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDebugModelPresentation#computeDetail(org.eclipse.debug.core.model.IValue, org.eclipse.debug.ui.IValueDetailListener)
- */
- public void computeDetail(IValue value, IValueDetailListener listener) {
- String detail = "";
- try {
- detail = value.getValueString();
- } catch (DebugException e) {
- }
- listener.detailComputed(value, detail);
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ISourcePresentation#getEditorInput(java.lang.Object)
- */
- public IEditorInput getEditorInput(Object element) {
- if (element instanceof IFile) {
- return new FileEditorInput((IFile)element);
- }
- if (element instanceof ILineBreakpoint) {
- return new FileEditorInput((IFile)((ILineBreakpoint)element).getMarker().getResource());
- }
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ISourcePresentation#getEditorId(org.eclipse.ui.IEditorInput, java.lang.Object)
- */
- public String getEditorId(IEditorInput input, Object element) {
- if (element instanceof IFile || element instanceof ILineBreakpoint) {
- return "pda.editor";
- }
- return null;
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/AbstractDataStackViewHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/AbstractDataStackViewHandler.java
deleted file mode 100644
index d9a279f..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/AbstractDataStackViewHandler.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.views;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.debug.examples.core.pda.model.PDAStackFrame;
-import org.eclipse.debug.examples.core.pda.model.PDAThread;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * Base class for command handlers for data stack view.
- */
-abstract public class AbstractDataStackViewHandler extends AbstractHandler {
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IWorkbenchPart part = HandlerUtil.getActivePartChecked(event);
- if (part instanceof DataStackView) {
- DataStackView view = (DataStackView)part;
-
- ISelection selection = DebugUITools.getDebugContextForEventChecked(event);
- if (selection instanceof IStructuredSelection) {
- Object element = ((IStructuredSelection)selection).getFirstElement();
-
- PDAThread thread = null;
- if (element instanceof PDAThread) {
- thread = (PDAThread)element;
- } else if (element instanceof PDAStackFrame) {
- thread = (PDAThread)((PDAStackFrame)element).getThread();
- }
-
- if (element != null) {
- doExecute(
- view,
- thread,
- HandlerUtil.getCurrentSelectionChecked(event));
- }
- }
- } else {
- throw new ExecutionException("Handler must be with DataStackView only");
- }
- return null;
- }
-
- /**
- * Performs the actual handler operation.
- *
- * @param view The view that the handler was invoked in.
- * @param target The current active debug target.
- * @param selection The current selection in view.
- */
- abstract protected void doExecute(DataStackView view, PDAThread target, ISelection selection) throws ExecutionException;
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CanPushTester.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CanPushTester.java
deleted file mode 100644
index 10b5acd..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CanPushTester.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.views;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.examples.core.pda.model.PDADebugElement;
-import org.eclipse.debug.examples.core.pda.model.PDAStackFrame;
-import org.eclipse.debug.examples.core.pda.model.PDAThread;
-
-/**
- * Property tester for use with standard expressions to determine whether
- * the given debug target can perform a push operation.
- */
-public class CanPushTester extends PropertyTester {
-
- private static final String CAN_PUSH_PROPERTY = "canPush";
-
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- if (CAN_PUSH_PROPERTY.equals(property)) {
- if (receiver instanceof IAdaptable) {
- PDADebugElement element = (PDADebugElement)
- ((IAdaptable)receiver).getAdapter(PDADebugElement.class);
- PDAThread thread = null;
- if (element instanceof PDAThread) {
- thread = (PDAThread)element;
- } else if (element instanceof PDAStackFrame) {
- thread = (PDAThread)((PDAStackFrame)element).getThread();
- }
-
- if (thread != null) {
- return thread.canPushData();
- }
- }
- }
- return false;
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CheckboxView.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CheckboxView.java
deleted file mode 100644
index 13c5cb8..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CheckboxView.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*****************************************************************
- * Copyright (c) 2009 Texas Instruments and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 286310)
- * IBM Corporation - ongoing maintenance and enhancements
- *****************************************************************/
-package org.eclipse.debug.examples.ui.pda.views;
-
-import org.eclipse.debug.internal.ui.views.variables.VariablesView;
-import org.eclipse.swt.SWT;
-
-public class CheckboxView extends VariablesView {
- public static String ID = "CHECKBOX_VIEW_ID";
-
- protected int getViewerStyle() {
- return SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.VIRTUAL | SWT.FULL_SELECTION | SWT.CHECK;
- }
-
- protected String getHelpContextId() {
- return ID;
- }
-
- protected String getPresentationContextId() {
- return ID;
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java
deleted file mode 100644
index 5e20475..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Bjorn Freeman-Benson - initial API and implementation
- * Wind River - Pawel Piech - replaced actions with handlers (bug 229219)
- * Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
-******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.views;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.examples.core.pda.model.PDAStackFrame;
-import org.eclipse.debug.examples.core.pda.model.PDAThread;
-import org.eclipse.debug.ui.AbstractDebugView;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.contexts.DebugContextEvent;
-import org.eclipse.debug.ui.contexts.IDebugContextListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.progress.UIJob;
-
-
-/**
- * View of the PDA VM data stack
- */
-public class DataStackView extends AbstractDebugView implements IDebugContextListener {
-
- private PDAThread fThread;
-
- class StackViewContentProvider implements ITreeContentProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof PDAThread) {
- try {
- return ((PDAThread)parentElement).getDataStack();
- } catch (DebugException e) {
- }
- }
- return new Object[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object element) {
- if (element instanceof PDAThread) {
- return null;
- } else {
- return fThread;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object element) {
- return element instanceof PDAThread;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- public void dispose() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractDebugView#createViewer(org.eclipse.swt.widgets.Composite)
- */
- protected Viewer createViewer(Composite parent) {
- TreeViewer viewer = new TreeViewer(parent);
- viewer.setLabelProvider(DebugUITools.newDebugModelPresentation());
- viewer.setContentProvider(new StackViewContentProvider());
- DebugUITools.getDebugContextManager().getContextService(getSite().getWorkbenchWindow()).addDebugContextListener(this);
- getSite().setSelectionProvider(viewer);
- return viewer;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractDebugView#createActions()
- */
- protected void createActions() {
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractDebugView#getHelpContextId()
- */
- protected String getHelpContextId() {
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractDebugView#fillContextMenu(org.eclipse.jface.action.IMenuManager)
- */
- protected void fillContextMenu(IMenuManager menu) {
- menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractDebugView#configureToolBar(org.eclipse.jface.action.IToolBarManager)
- */
- protected void configureToolBar(IToolBarManager tbm) {
- }
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#dispose()
- */
- public void dispose() {
- DebugUITools.getDebugContextManager().getContextService(getSite().getWorkbenchWindow()).removeDebugContextListener(this);
- super.dispose();
- }
-
- public void debugContextChanged(final DebugContextEvent event) {
- new UIJob(getSite().getShell().getDisplay(), "DataStackView update") {
- {
- setSystem(true);
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor) {
- update(event.getContext());
- return Status.OK_STATUS;
- }
- }.schedule();
- }
-
- /**
- * Updates the view for the selected thread (if suspended)
- */
- private void update(ISelection context) {
- fThread = null;
-
- if (context instanceof IStructuredSelection) {
- Object element = ((IStructuredSelection)context).getFirstElement();
- if (element instanceof PDAThread) {
- fThread = (PDAThread)element;
- } else if (element instanceof PDAStackFrame) {
- fThread = (PDAThread)((PDAStackFrame)element).getThread();
- }
- }
- Object input = null;
- if (fThread != null && fThread.isSuspended()) {
- input = fThread;
- }
- getViewer().setInput(input);
- getViewer().refresh();
- }
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopHandler.java
deleted file mode 100644
index 1c0c5bc..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopHandler.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.views;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.examples.core.pda.model.PDAThread;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-
-/**
- * Pops a selected value off the data stack. The selection does <b>not</b> have to be
- * the top element on the stack.
- */
-public class PopHandler extends AbstractDataStackViewHandler {
-
- protected void doExecute(DataStackView view, PDAThread thread, ISelection selection) throws ExecutionException {
- TreeViewer viewer = (TreeViewer)view.getViewer();
- Object popee = selection instanceof IStructuredSelection
- ? ((IStructuredSelection)selection).getFirstElement() : null;
- if (popee != null) {
- try {
- IValue[] stack = thread.getDataStack();
- List restore = new ArrayList();
- for (int i = 0; i < stack.length; i++) {
- Object value = stack[i];
- if (popee.equals(value)) {
- // pop & stop
- thread.popData();
- break;
- } else {
- // remember value to push back on
- restore.add(thread.popData());
- }
- }
- while (!restore.isEmpty()) {
- IValue value = (IValue) restore.remove(restore.size() - 1);
- thread.pushData(value.getValueString());
- }
- } catch (DebugException e) {
- throw new ExecutionException("Failed to execute push command", e);
- }
- viewer.refresh();
- }
- }
-
-}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushHandler.java
deleted file mode 100644
index 58fbc7c..0000000
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushHandler.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.examples.ui.pda.views;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.examples.core.pda.model.PDAThread;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-
-/**
- * Pushes a value onto the data stack.
- */
-public class PushHandler extends AbstractDataStackViewHandler {
-
- protected void doExecute(DataStackView view, PDAThread thread, ISelection selection) throws ExecutionException {
- InputDialog dialog = new InputDialog(view.getSite().getShell(), "Specify Value", "Enter value to push", null, null);
- if (dialog.open() == Window.OK) {
- try {
- thread.pushData(dialog.getValue());
- } catch (DebugException e) {
- throw new ExecutionException("Failed to execute push command", e);
- }
- }
- view.getViewer().refresh();
- }
-
-}
diff --git a/org.eclipse.debug.tests/.classpath b/org.eclipse.debug.tests/.classpath
deleted file mode 100644
index 2fbb7a2..0000000
--- a/org.eclipse.debug.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.debug.tests/.cvsignore b/org.eclipse.debug.tests/.cvsignore
deleted file mode 100644
index c5e82d7..0000000
--- a/org.eclipse.debug.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
\ No newline at end of file
diff --git a/org.eclipse.debug.tests/.project b/org.eclipse.debug.tests/.project
deleted file mode 100644
index a6fb25e..0000000
--- a/org.eclipse.debug.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.debug.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.debug.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.debug.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f0000fb..0000000
--- a/org.eclipse.debug.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,98 +0,0 @@
-#Thu Sep 24 11:03:22 CDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=disabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,HIGH
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,EXPERIMENTAL,CONTEXTLAUNCHING
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.debug.tests/META-INF/MANIFEST.MF b/org.eclipse.debug.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 052406d..0000000
--- a/org.eclipse.debug.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.debug.tests;singleton:=true
-Bundle-Version: 3.6.0.qualifier
-Bundle-Activator: org.eclipse.debug.tests.TestsPlugin
-Require-Bundle: org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.debug.ui;bundle-version="[3.6.0,4.0.0)",
- org.junit;bundle-version="3.8.2",
- org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)",
- org.eclipse.test.performance;bundle-version="3.6.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-Vendor: %providerName
diff --git a/org.eclipse.debug.tests/about.html b/org.eclipse.debug.tests/about.html
deleted file mode 100644
index 81aacb1..0000000
--- a/org.eclipse.debug.tests/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>September 11, 2009</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.debug.tests/build.properties b/org.eclipse.debug.tests/build.properties
deleted file mode 100644
index 9e54bd1..0000000
--- a/org.eclipse.debug.tests/build.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- test.xml,\
- about.html,\
- plugin.properties,\
- plugin.xml,\
- test-import/
diff --git a/org.eclipse.debug.tests/plugin.properties b/org.eclipse.debug.tests/plugin.properties
deleted file mode 100755
index 7db3e66..0000000
--- a/org.eclipse.debug.tests/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - Initial implementation
-###############################################################################
-
-pluginName=Debug Test Plugin
-providerName=Eclipse.org
diff --git a/org.eclipse.debug.tests/plugin.xml b/org.eclipse.debug.tests/plugin.xml
deleted file mode 100644
index 75673ba..0000000
--- a/org.eclipse.debug.tests/plugin.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<!--
- Copyright (c) 2009 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
- Contributors:
- IBM Corporation - initial API and implementation
- -->
-
-<plugin>
-
- <extension point="org.eclipse.debug.ui.memoryRenderings">
- <renderingType
- id="rendering_type_1"
- name="Rendering One"
- class="org.eclipe.debug.tests.view.memory.RenderingTypeDelegate">
- </renderingType>
- <renderingType
- id="rendering_type_2"
- name="Rendering Two"
- class="org.eclipe.debug.tests.view.memory.RenderingTypeDelegate">
- </renderingType>
- <renderingType
- id="rendering_type_3"
- name="Rendering Default"
- class="org.eclipe.debug.tests.view.memory.RenderingTypeDelegate">
- </renderingType>
- <renderingBindings
- primaryId="rendering_type_1">
- <enablement>
- <instanceof value="org.eclipe.debug.tests.view.memory.MemoryBlockOne"/>
- </enablement>
- </renderingBindings>
- <renderingBindings
- renderingIds="rendering_type_1, rendering_type_2">
- <enablement>
- <instanceof value="org.eclipe.debug.tests.view.memory.MemoryBlockTwo"/>
- </enablement>
- </renderingBindings>
- <renderingBindings
- defaultIds="rendering_type_3">
- <enablement>
- <instanceof value="org.eclipe.debug.tests.view.memory.MemoryBlockThree"/>
- </enablement>
- </renderingBindings>
- <renderingBindings
- class="org.eclipe.debug.tests.view.memory.DynamicRenderingBindings">
- <enablement>
- <instanceof value="org.eclipe.debug.tests.view.memory.MemoryBlockDynamic"/>
- </enablement>
- </renderingBindings>
- </extension>
- <extension
- point="org.eclipse.debug.core.launchConfigurationTypes">
- <launchConfigurationType
- delegate="org.eclipe.debug.tests.launching.TestLaunchDelegate"
- id="org.eclipse.debug.tests.launch.type"
- modes="run, debug"
- name="Test Launch Type">
- </launchConfigurationType>
- </extension>
- <extension
- id="debugFS"
- name="Debug File System"
- point="org.eclipse.core.filesystem.filesystems">
- <filesystem
- scheme="debug">
- <run
- class="org.eclipe.debug.tests.launching.DebugFileSystem">
- </run>
- </filesystem>
- </extension>
- <extension
- point="org.eclipse.debug.core.statusHandlers">
- <statusHandler
- class="org.eclipse.debug.tests.statushandlers.StatusHandler"
- code="333"
- id="org.eclipse.debug.tests.statusHandler"
- plugin="org.eclipse.debug.tests">
- </statusHandler>
- </extension>
-</plugin>
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/AbstractLaunchTest.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/AbstractLaunchTest.java
deleted file mode 100644
index d3b6493..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/AbstractLaunchTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.launching;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
-
-import junit.framework.TestCase;
-
-/**
- * Common function for launch related tests.
- */
-public abstract class AbstractLaunchTest extends TestCase {
-
- /**
- * Constructs a test with the given name.
- *
- * @param name
- */
- public AbstractLaunchTest(String name) {
- super(name);
- }
-
- /**
- * Returns the launch manager.
- *
- * @return launch manager
- */
- protected ILaunchManager getLaunchManager() {
- return DebugPlugin.getDefault().getLaunchManager();
- }
-
- /**
- * Returns the singleton instance of the <code>LaunchConfigurationManager</code>
- *
- * @return the singleton instance of the <code>LaunchConfigurationManager</code>
- */
- protected LaunchConfigurationManager getLaunchConfigurationManager() {
- return DebugUIPlugin.getDefault().getLaunchConfigurationManager();
- }
-
- /**
- * Returns a launch configuration with the given name, creating one if required.
- *
- * @param name configuration name
- * @return launch configuration
- * @throws CoreException
- */
- protected ILaunchConfiguration getLaunchConfiguration(String name) throws CoreException {
- ILaunchManager manager = getLaunchManager();
- ILaunchConfiguration[] configurations = manager.getLaunchConfigurations();
- for (int i = 0; i < configurations.length; i++) {
- ILaunchConfiguration config = configurations[i];
- if (config.getName().equals(name)) {
- return config;
- }
- }
- ILaunchConfigurationType type = getLaunchManager().getLaunchConfigurationType(LaunchConfigurationTests.ID_TEST_LAUNCH_TYPE);
- ILaunchConfigurationWorkingCopy wc = type.newInstance(null, name);
- ILaunchConfiguration saved = wc.doSave();
- return saved;
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/AcceleratorSubstitutionTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/AcceleratorSubstitutionTests.java
deleted file mode 100644
index ddf7621..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/AcceleratorSubstitutionTests.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.launching;
-
-import junit.framework.TestCase;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-
-/**
- * Tests accelerator adjustments for DBCS languages.
- * See bug 186921.
- *
- * @since 3.3
- */
-public class AcceleratorSubstitutionTests extends TestCase {
-
- /**
- * Constructor
- * @param name the name of the test
- */
- public AcceleratorSubstitutionTests(String name) {
- super(name);
- }
-
- /**
- * tests a string with "..."
- */
- public void testWithEllipses() {
- assertEquals("incorrect DBCS accelerator substitution",
- "Open Run Dialog(&R)...",
- DebugUIPlugin.adjustDBCSAccelerator("Open Run(&R) Dialog..."));
- }
-
- /**
- * tests a string without "..."
- */
- public void testWithoutEllipses() {
- assertEquals("incorrect DBCS accelerator substitution",
- "Open Run Dialog(&R)",
- DebugUIPlugin.adjustDBCSAccelerator("Open Run(&R) Dialog"));
- }
-
- /**
- * tests a string that should not change (no DBCS style accelerator).
- */
- public void testWithoutDBCSAcclerator() {
- assertEquals("incorrect DBCS accelerator substitution",
- "Open &Run Dialog...",
- DebugUIPlugin.adjustDBCSAccelerator("Open &Run Dialog..."));
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/DebugFileStore.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/DebugFileStore.java
deleted file mode 100644
index dfcab8f..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/DebugFileStore.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.launching;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileInfo;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.filesystem.provider.FileInfo;
-import org.eclipse.core.filesystem.provider.FileStore;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-
-/**
- * Implementation of an in memory file store to test launch configurations on EFS
- */
-public class DebugFileStore extends FileStore {
-
- /**
- * Output steam for writing a file
- */
- class DebugOutputStream extends ByteArrayOutputStream {
-
- /* (non-Javadoc)
- * @see java.io.ByteArrayOutputStream#close()
- */
- public void close() throws IOException {
- super.close();
- DebugFileSystem.getDefault().setContents(toURI(), toByteArray());
- }
-
- }
-
- private URI uri;
-
- public DebugFileStore(URI id) {
- uri = id;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#childNames(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public String[] childNames(int options, IProgressMonitor monitor) throws CoreException {
- URI[] uris = DebugFileSystem.getDefault().getFileURIs();
- List children = new ArrayList();
- IPath me = getPath();
- for (int i = 0; i < uris.length; i++) {
- URI id = uris[i];
- Path path = new Path(id.getPath());
- if (path.segmentCount() > 0) {
- if (path.removeLastSegments(1).equals(me)) {
- children.add(path.lastSegment());
- }
- }
- }
- return (String[]) children.toArray(new String[children.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#fetchInfo(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IFileInfo fetchInfo(int options, IProgressMonitor monitor) throws CoreException {
- byte[] contents = DebugFileSystem.getDefault().getContents(toURI());
- FileInfo info = new FileInfo();
- info.setName(getName());
- info.setAttribute(EFS.ATTRIBUTE_READ_ONLY, false);
- if (contents == null) {
- info.setExists(false);
- info.setLength(0L);
- } else {
- info.setExists(true);
- info.setLength(contents.length);
- info.setDirectory(contents == DebugFileSystem.DIRECTORY_BYTES);
- if (info.isDirectory()) {
- info.setAttribute(EFS.ATTRIBUTE_EXECUTABLE, true);
- }
- }
- return info;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#getChild(java.lang.String)
- */
- public IFileStore getChild(String name) {
- try {
- return new DebugFileStore(new URI(getFileSystem().getScheme(), getPath().append(name).toString(), null));
- } catch (URISyntaxException e) {
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#getName()
- */
- public String getName() {
- IPath path = getPath();
- if (path.segmentCount() > 0) {
- return path.lastSegment();
- }
- return "";
- }
-
- /**
- * @return
- */
- private IPath getPath() {
- URI me = toURI();
- IPath path = new Path(me.getPath());
- return path;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#getParent()
- */
- public IFileStore getParent() {
- IPath path = getPath();
- if (path.segmentCount() > 0) {
- try {
- return new DebugFileStore(new URI(getFileSystem().getScheme(), path.removeLastSegments(1).toString(), null));
- } catch (URISyntaxException e) {
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#openInputStream(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public InputStream openInputStream(int options, IProgressMonitor monitor) throws CoreException {
- byte[] contents = DebugFileSystem.getDefault().getContents(toURI());
- if (contents != null) {
- return new ByteArrayInputStream(contents);
- }
- throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.jdt.debug.tests",
- "File does not exist: " + toURI()));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#openOutputStream(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public OutputStream openOutputStream(int options, IProgressMonitor monitor) throws CoreException {
- return new DebugOutputStream();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#mkdir(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException {
- IFileInfo info = fetchInfo();
- if (info.exists()) {
- if (!info.isDirectory()) {
- throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.jdt.debug.tests",
- "mkdir failed - file already exists with name: " + toURI()));
- }
- } else {
- IFileStore parent = getParent();
- if (parent.fetchInfo().exists()) {
- DebugFileSystem.getDefault().setContents(toURI(), DebugFileSystem.DIRECTORY_BYTES);
- } else {
- if ((options & EFS.SHALLOW) > 0) {
- throw new CoreException(new Status(IStatus.ERROR, "org.eclipse.jdt.debug.tests",
- "mkdir failed - parent does not exist: " + toURI()));
- } else {
- parent.mkdir(EFS.NONE, null);
- }
- }
- }
- return this;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#toURI()
- */
- public URI toURI() {
- return uri;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileStore#delete(int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void delete(int options, IProgressMonitor monitor) throws CoreException {
- DebugFileSystem.getDefault().delete(toURI());
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/DebugFileSystem.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/DebugFileSystem.java
deleted file mode 100644
index d0a7183..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/DebugFileSystem.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.launching;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.filesystem.provider.FileSystem;
-import org.eclipse.core.runtime.Path;
-
-/**
- * A simple in memory file system to test launch configurations in EFS
- */
-public class DebugFileSystem extends FileSystem {
-
- /**
- * represents a directory
- */
- public static final byte[] DIRECTORY_BYTES = new byte[] {1, 2, 3, 4};
-
- private static DebugFileSystem system;
-
- /**
- * Keys URIs to file stores for existing files
- */
- private Map files = new HashMap();
-
- /**
- * Constructs the singleton
- */
- public DebugFileSystem() {
- system = this;
- // create root of the file system
- try {
- setContents(new URI("debug", Path.ROOT.toString(), null), DIRECTORY_BYTES);
- } catch (URISyntaxException e) {}
- }
-
- /**
- * Returns the Debug files system.
- *
- * @return file system
- */
- static DebugFileSystem getDefault() {
- return system;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileSystem#getStore(java.net.URI)
- */
- public IFileStore getStore(URI uri) {
- return new DebugFileStore(uri);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileSystem#canDelete()
- */
- public boolean canDelete() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.filesystem.provider.FileSystem#canWrite()
- */
- public boolean canWrite() {
- return true;
- }
-
- /**
- * Returns whether contents of the file or <code>null</code> if none.
- *
- * @param uri
- * @return bytes or <code>null</code>
- */
- public byte[] getContents(URI uri) {
- return (byte[]) files.get(uri);
- }
-
- /**
- * Deletes the file.
- *
- * @param uri
- */
- public void delete(URI uri) {
- files.remove(uri);
- }
-
- /**
- * Sets the content of the given file.
- *
- * @param uri
- * @param bytes
- */
- public void setContents(URI uri, byte[] bytes) {
- files.put(uri, bytes);
- }
-
- /**
- * Returns URIs of all existing files.
- *
- * @return
- */
- public URI[] getFileURIs() {
- return (URI[])files.keySet().toArray(new URI[files.size()]);
- }
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchConfigurationTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchConfigurationTests.java
deleted file mode 100644
index 71d9ad5..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchConfigurationTests.java
+++ /dev/null
@@ -1,1051 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.launching;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileSystem;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationListener;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.core.LaunchManager;
-import org.eclipse.debug.tests.TestsPlugin;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Tests for launch configurations
- */
-public class LaunchConfigurationTests extends AbstractLaunchTest implements ILaunchConfigurationListener {
-
- /**
- * Identifier of test launch configuration type extension
- */
- public static final String ID_TEST_LAUNCH_TYPE = "org.eclipse.debug.tests.launch.type";
-
- /**
- * The from/to handles during rename operations
- */
- protected ILaunchConfiguration fFrom;
- protected ILaunchConfiguration fTo;
-
- protected Object fLock = new Object();
- protected ILaunchConfiguration fAdded;
- protected ILaunchConfiguration fRemoved;
-
- class Listener implements ILaunchConfigurationListener {
-
- private List addedList = new ArrayList();
- private List removedList = new ArrayList();
- private List changedList = new ArrayList();
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public void launchConfigurationAdded(ILaunchConfiguration configuration) {
- addedList.add(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public void launchConfigurationChanged(ILaunchConfiguration configuration) {
- changedList.add(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public void launchConfigurationRemoved(ILaunchConfiguration configuration) {
- removedList.add(configuration);
- }
-
- public List getAdded() {
- return addedList;
- }
- public List getChanged() {
- return changedList;
- }
- public List getRemoved() {
- return removedList;
- }
-
- }
-
- /**
- * Constructor
- * @param name
- */
- public LaunchConfigurationTests(String name) {
- super(name);
- }
-
- /**
- * Returns a scratch project for launch configurations
- *
- * @return
- */
- protected IProject getProject() throws CoreException {
- return TestsPlugin.createProject("LaunchConfigurationTests");
- }
-
- /**
- * Creates and returns a new launch config the given name, local
- * or shared, with 4 attributes:
- * - String1 = "String1"
- * - Int1 = 1
- * - Boolean1 = true
- * - Boolean2 = false
- */
- protected ILaunchConfigurationWorkingCopy newConfiguration(IContainer container, String name) throws CoreException {
- ILaunchConfigurationType type = getLaunchManager().getLaunchConfigurationType(ID_TEST_LAUNCH_TYPE);
- assertTrue("Should support debug mode", type.supportsMode(ILaunchManager.DEBUG_MODE)); //$NON-NLS-1$
- assertTrue("Should support run mode", type.supportsMode(ILaunchManager.RUN_MODE)); //$NON-NLS-1$
- ILaunchConfigurationWorkingCopy wc = type.newInstance(container, name);
- wc.setAttribute("String1", "String1"); //$NON-NLS-1$ //$NON-NLS-2$
- wc.setAttribute("Int1", 1); //$NON-NLS-1$
- wc.setAttribute("Boolean1", true); //$NON-NLS-1$
- wc.setAttribute("Boolean2", false); //$NON-NLS-1$
- assertTrue("Should need saving", wc.isDirty()); //$NON-NLS-1$
- return wc;
- }
-
- /**
- * Creates and returns a new launch configuration with the given name, local
- * or shared, with no attributes
- */
- protected ILaunchConfigurationWorkingCopy newEmptyConfiguration(IContainer container, String name) throws CoreException {
- ILaunchConfigurationType type = getLaunchManager().getLaunchConfigurationType(ID_TEST_LAUNCH_TYPE);
- ILaunchConfigurationWorkingCopy wc = type.newInstance(container, name);
- assertEquals("Should have no attributes", 0, wc.getAttributes().size());
- return wc;
- }
-
- /**
- * Returns whether the given handle is contained in the specified
- * array of handles.
- */
- protected boolean existsIn(ILaunchConfiguration[] configs, ILaunchConfiguration config) {
- for (int i = 0; i < configs.length; i++) {
- if (configs[i].equals(config)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Creates a local working copy configuration, sets some attributes,
- * and saves the working copy, and retrieves the attributes.
- *
- * @throws CoreException
- */
- public void testCreateLocalConfiguration() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(null, "config1"); //$NON-NLS-1$
- IPath location = wc.getLocation();
- ILaunchConfiguration handle = wc.doSave();
- File file = location.toFile();
- assertTrue("Configuration file should exist", file.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertEquals("String1 should be String1", handle.getAttribute("String1", "Missing"), "String1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertEquals("Int1 should be 1", handle.getAttribute("Int1", 0), 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", handle.getAttribute("Boolean1", false)); //$NON-NLS-1$//$NON-NLS-2$
- assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$//$NON-NLS-2$
-
- // ensure new handle is the index
- ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations();
- assertTrue("Configuration should exist in project index", existsIn(configs, handle)); //$NON-NLS-1$
-
- // cleanup
- handle.delete();
- assertTrue("Config should not exist after deletion", !handle.exists()); //$NON-NLS-1$
- }
-
- /**
- * Creates a local working copy configuration and tests its name.
- *
- * @throws CoreException
- */
- public void testLocalName() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(null, "localName"); //$NON-NLS-1$
- ILaunchConfiguration handle = wc.doSave();
- assertTrue("Configuration should exist", handle.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertEquals("Wrong name", handle.getName(), "localName"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- // cleanup
- handle.delete();
- assertTrue("Config should not exist after deletion", !handle.exists()); //$NON-NLS-1$
- }
-
- /**
- * Creates a shared working copy configuration and tests is name.
- */
- public void testSharedName() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(getProject(), "sharedName"); //$NON-NLS-1$
- ILaunchConfiguration handle = wc.doSave();
- assertTrue("Configuration should exist", handle.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertEquals("Wrong name", handle.getName(), "sharedName"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- // cleanup
- handle.delete();
- assertTrue("Config should not exist after deletion", !handle.exists()); //$NON-NLS-1$
- }
-
- /**
- * Ensures that a launch configuration returns a complete attribute map
- * @throws CoreException
- */
- public void testGetAttributes() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(null, "config1"); //$NON-NLS-1$
- IPath location = wc.getLocation();
- ILaunchConfiguration handle = wc.doSave();
- File file = location.toFile();
- assertTrue("Configuration file should exist", file.exists()); //$NON-NLS-1$
-
- Map attributes = handle.getAttributes();
- // retrieve attributes
- assertEquals("String1 should be String1", "String1", attributes.get("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- assertEquals("Int1 should be 1", new Integer(1), attributes.get("Int1")); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Boolean1 should be true", Boolean.valueOf(true), attributes.get("Boolean1")); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Boolean2 should be false", Boolean.valueOf(false), attributes.get("Boolean2")); //$NON-NLS-1$ //$NON-NLS-2$
-
- // cleanup
- handle.delete();
- assertTrue("Config should not exist after deletion", !handle.exists()); //$NON-NLS-1$
- }
-
- /**
- * Ensures that set attributes works
- * @throws CoreException
- */
- public void testSetAttributes() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(null, "config1"); //$NON-NLS-1$
- Map map = new HashMap();
- map.put("ATTR1", "ONE"); //$NON-NLS-1$ //$NON-NLS-2$
- map.put("ATTR2", "TWO"); //$NON-NLS-1$ //$NON-NLS-2$
- wc.setAttributes(map);
- IPath location = wc.getLocation();
- ILaunchConfiguration handle = wc.doSave();
- File file = location.toFile();
- assertTrue("Configuration file should exist", file.exists()); //$NON-NLS-1$
-
- Map attributes = handle.getAttributes();
- assertEquals("should have two attributes", 2, attributes.size()); //$NON-NLS-1$
- // retrieve attributes
- assertEquals("ATTR1 should be ONE", "ONE", attributes.get("ATTR1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- assertEquals("ATTR2 should be TWO", "TWO", attributes.get("ATTR2")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- // cleanup
- handle.delete();
- assertTrue("Config should not exist after deletion", !handle.exists()); //$NON-NLS-1$
- }
-
- /**
- * Ensures that set attributes to <code>null</code> works
- * @throws CoreException
- */
- public void testSetNullAttributes() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(null, "config1"); //$NON-NLS-1$
- wc.setAttributes(null);
- IPath location = wc.getLocation();
- ILaunchConfiguration handle = wc.doSave();
- File file = location.toFile();
- assertTrue("Configuration file should exist", file.exists()); //$NON-NLS-1$
-
- Map attributes = handle.getAttributes();
- assertEquals("should have no attributes", 0, attributes.size()); //$NON-NLS-1$
- // cleanup
- handle.delete();
- assertTrue("Config should not exist after deletion", !handle.exists()); //$NON-NLS-1$
- }
-
- /**
- * Creates a local working copy configuration, sets some attributes,
- * and saves the working copy, and retrieves the attributes.
- * Copy the configuration and ensure the original still exists.
- * @throws CoreException
- */
- public void testLocalCopy() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(null, "configToCopy"); //$NON-NLS-1$
- IPath location = wc.getLocation();
- ILaunchConfiguration handle = wc.doSave();
- File file = location.toFile();
- assertTrue("Configuration file should exist", file.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertTrue("String1 should be String1", handle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", handle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", handle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // ensure new handle is the index
- ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations();
- assertTrue("Configuration should exist in project index", existsIn(configs, handle)); //$NON-NLS-1$
-
- ILaunchConfigurationWorkingCopy softCopy = handle.copy("CopyOf" + handle.getName()); //$NON-NLS-1$
- assertNull("Original in copy should be null", softCopy.getOriginal()); //$NON-NLS-1$
- ILaunchConfiguration hardCopy = softCopy.doSave();
-
- // retrieve attributes
- assertTrue("String1 should be String1", hardCopy.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", hardCopy.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", hardCopy.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !hardCopy.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- assertTrue("Original should still exist", handle.exists()); //$NON-NLS-1$
-
- // cleanup
- handle.delete();
- assertTrue("Config should not exist after deletion", !handle.exists()); //$NON-NLS-1$
- hardCopy.delete();
- assertTrue("Config should not exist after deletion", !hardCopy.exists()); //$NON-NLS-1$
- }
-
- /**
- * Create a config and save it twice, ensuring it only
- * ends up in the index once.
- * @throws CoreException
- */
- public void testDoubleSave() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(null, "configDoubleSave"); //$NON-NLS-1$
- IPath location = wc.getLocation();
- ILaunchConfiguration handle = wc.doSave();
- File file = location.toFile();
- assertTrue("Configuration file should exist", file.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertTrue("String1 should be String1", handle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", handle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", handle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // ensure new handle is the index
- ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations();
- assertTrue("Configuration should exist in project index", existsIn(configs, handle)); //$NON-NLS-1$
-
- String name = wc.getName();
- wc.rename("newName"); //$NON-NLS-1$
- wc.rename(name);
- assertTrue("Should be dirty", wc.isDirty()); //$NON-NLS-1$
- wc.doSave();
-
- ILaunchConfiguration[] newConfigs = getLaunchManager().getLaunchConfigurations();
- assertTrue("Should be the same number of configs", newConfigs.length == configs.length); //$NON-NLS-1$
-
- // cleanup
- handle.delete();
- assertTrue("Config should not exist after deletion", !handle.exists()); //$NON-NLS-1$
-
- }
-
- /**
- * Creates a local working copy configuration, sets some attributes,
- * and saves the working copy, and retrieves the attributes. Deletes
- * the configuration and ensures it no longer exists.
- * @throws CoreException
- */
- public void testDeleteLocalConfiguration() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(null, "config2delete"); //$NON-NLS-1$
- ILaunchConfiguration handle = wc.doSave();
- File file = wc.getLocation().toFile();
- assertTrue("Configuration file should exist", file.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertTrue("String1 should be String1", handle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", handle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", handle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // delete
- handle.delete();
- assertTrue("Config should no longer exist", !handle.exists()); //$NON-NLS-1$
-
- // ensure handle is not in the index
- ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations();
- assertTrue("Configuration should not exist in project index", !existsIn(configs, handle)); //$NON-NLS-1$
- }
-
- /**
- * Creates a local working copy configuration, sets some attributes,
- * and saves the working copy, and retrieves the attributes. Renames
- * the configuration and ensures it's old config no longer exists,
- * and that attributes are retrievable from the new (renamed) config.
- * @throws CoreException
- */
- public void testRenameLocalConfiguration() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(null, "config2rename"); //$NON-NLS-1$
- IPath location = wc.getLocation();
- ILaunchConfiguration handle = wc.doSave();
- File file = location.toFile();
- assertTrue("Configuration file should exist", file.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertTrue("String1 should be String1", handle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", handle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", handle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // rename
- wc = handle.getWorkingCopy();
- wc.rename("config-2-rename"); //$NON-NLS-1$
- addConfigListener();
- ILaunchConfiguration newHandle = wc.doSave();
- removeConfigListener();
- assertTrue("Config should no longer exist", !handle.exists()); //$NON-NLS-1$
- assertEquals("From should be original", handle, fFrom); //$NON-NLS-1$
- assertEquals("To should be new handle", newHandle, fTo); //$NON-NLS-1$
-
- // retrieve new attributes
- assertTrue("String1 should be String1", newHandle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", newHandle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", newHandle.getAttribute("Boolean1", false)); //$NON-NLS-1$//$NON-NLS-2$
- assertTrue("Boolean2 should be false", !newHandle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // ensure new handle is in the index
- ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations();
- assertTrue("Renamed configuration should exist in project index", existsIn(configs, newHandle)); //$NON-NLS-1$
- assertTrue("Original configuration should NOT exist in project index", !existsIn(configs, handle)); //$NON-NLS-1$
-
- // cleanup
- newHandle.delete();
- assertTrue("Config should not exist after deletion", !newHandle.exists()); //$NON-NLS-1$
- }
-
- /**
- * Moves a local configuration to a shared location
- * @throws CoreException
- */
- public void testMoveLocalToSharedConfiguration() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(null, "config2share"); //$NON-NLS-1$
- IPath location = wc.getLocation();
- ILaunchConfiguration handle = wc.doSave();
- File file = location.toFile();
- assertTrue("Configuration file should exist", file.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertTrue("String1 should be String1", handle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", handle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", handle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // move
- wc = handle.getWorkingCopy();
- wc.setContainer(getProject());
- addConfigListener();
- ILaunchConfiguration newHandle = wc.doSave();
- removeConfigListener();
- assertTrue("Config should no longer exist", !handle.exists()); //$NON-NLS-1$
- assertEquals("From should be original", handle, fFrom); //$NON-NLS-1$
- assertEquals("To should be new handle", newHandle, fTo); //$NON-NLS-1$
-
- // retrieve new attributes
- assertTrue("String1 should be String1", newHandle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", newHandle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", newHandle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !newHandle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // ensure new handle is in the index
- ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations();
- assertTrue("Renamed configuration should exist in project index", existsIn(configs, newHandle)); //$NON-NLS-1$
- assertTrue("Original configuration should NOT exist in project index", !existsIn(configs, handle)); //$NON-NLS-1$
-
- // cleanup
- newHandle.delete();
- assertTrue("Config should not exist after deletion", !newHandle.exists()); //$NON-NLS-1$
- }
-
- /**
- * Moves a local configuration to a shared location
- * @throws CoreException
- */
- public void testMoveSharedToLocalConfiguration() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(getProject(), "config2local"); //$NON-NLS-1$
- IPath location = wc.getLocation();
- ILaunchConfiguration handle = wc.doSave();
- File file = location.toFile();
- assertTrue("Configuration file should exist", file.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertTrue("String1 should be String1", handle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", handle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", handle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // move
- wc = handle.getWorkingCopy();
- wc.setContainer(null);
- addConfigListener();
- ILaunchConfiguration newHandle = wc.doSave();
- removeConfigListener();
- assertTrue("Config should no longer exist", !handle.exists()); //$NON-NLS-1$
- assertEquals("From should be original", handle, fFrom); //$NON-NLS-1$
- assertEquals("To should be new handle", newHandle, fTo); //$NON-NLS-1$
-
- // retrieve new attributes
- assertTrue("String1 should be String1", newHandle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", newHandle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", newHandle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !newHandle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // ensure new handle is in the index
- ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations();
- assertTrue("Renamed configuration should exist in project index", existsIn(configs, newHandle)); //$NON-NLS-1$
- assertTrue("Original configuration should NOT exist in project index", !existsIn(configs, handle)); //$NON-NLS-1$
-
- // cleanup
- newHandle.delete();
- assertTrue("Config should not exist after deletion", !newHandle.exists()); //$NON-NLS-1$
- }
-
- /**
- * Creates a shared working copy configuration, sets some attributes,
- * and saves the working copy, and retrieves the attributes.
- * @throws CoreException
- */
- public void testCreateSharedConfiguration() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(getProject(), "config2"); //$NON-NLS-1$
- ILaunchConfiguration handle = wc.doSave();
- assertTrue("Configuration should exist", handle.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertTrue("String1 should be String1", handle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", handle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", handle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // ensure new handle is in the index
- ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations();
- assertTrue("Configuration should exist in project index", existsIn(configs, handle)); //$NON-NLS-1$
-
- // cleanup
- handle.delete();
- assertTrue("Config should not exist after deletion", !handle.exists()); //$NON-NLS-1$
- }
-
- /**
- * Creates a shared working copy configuration, sets some attributes,
- * and saves the working copy, and retrieves the attributes.
- * Copies the configuration and ensures the original still exists.
- * @throws CoreException
- */
- public void testSharedCopy() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(getProject(), "config2Copy"); //$NON-NLS-1$
- ILaunchConfiguration handle = wc.doSave();
- assertTrue("Configuration should exist", handle.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertTrue("String1 should be String1", handle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", handle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", handle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // ensure new handle is in the index
- ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations();
- assertTrue("Configuration should exist in project index", existsIn(configs, handle)); //$NON-NLS-1$
-
- // copy
- ILaunchConfigurationWorkingCopy softCopy = handle.copy("CopyOf" + handle.getName()); //$NON-NLS-1$
- ILaunchConfiguration hardCopy = softCopy.doSave();
-
- // retrieve attributes
- assertTrue("String1 should be String1", hardCopy.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", hardCopy.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", hardCopy.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !hardCopy.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- assertTrue("Original should still exist", handle.exists()); //$NON-NLS-1$
-
- // cleanup
- handle.delete();
- assertTrue("Config should not exist after deletion", !handle.exists()); //$NON-NLS-1$
- hardCopy.delete();
- assertTrue("Config should not exist after deletion", !hardCopy.exists()); //$NON-NLS-1$
- }
-
-
- /**
- * Creates a shared working copy configuration, sets some attributes,
- * and saves the working copy, and retrieves the attributes. Deletes
- * the configuration and ensures it no longer exists.
- * @throws CoreException
- */
- public void testDeleteSharedConfiguration() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(getProject(), "shared2delete"); //$NON-NLS-1$
- ILaunchConfiguration handle = wc.doSave();
- assertTrue("Configuration should exist", handle.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertTrue("String1 should be String1", handle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", handle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", handle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // delete
- handle.delete();
- assertTrue("Config should no longer exist", !handle.exists()); //$NON-NLS-1$
-
- // ensure handle is not in the index
- ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations();
- assertTrue("Configuration should not exist in project index", !existsIn(configs, handle)); //$NON-NLS-1$
- }
-
- /**
- * Creates a shared working copy configuration, sets some attributes,
- * and saves the working copy, and retrieves the attributes. Renames
- * the configuration and ensures it's old config no longer exists,
- * and that attributes are retrievable from the new (renamed) config.
- * @throws CoreException
- */
- public void testRenameSharedConfiguration() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(getProject(), "shared2rename"); //$NON-NLS-1$
- ILaunchConfiguration handle = wc.doSave();
- assertTrue("Configuration should exist", handle.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertTrue("String1 should be String1", handle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", handle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", handle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // rename
- wc = handle.getWorkingCopy();
- wc.rename("shared-2-rename"); //$NON-NLS-1$
- addConfigListener();
- ILaunchConfiguration newHandle = wc.doSave();
- removeConfigListener();
- assertTrue("Config should no longer exist", !handle.exists()); //$NON-NLS-1$
- assertEquals("From should be original", handle, fFrom); //$NON-NLS-1$
- assertEquals("To should be new handle", newHandle, fTo); //$NON-NLS-1$
-
- // retrieve new attributes
- assertTrue("String1 should be String1", newHandle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", newHandle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", newHandle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !newHandle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // ensure new handle is in the index
- ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations();
- assertTrue("Renamed configuration should exist in project index", existsIn(configs, newHandle)); //$NON-NLS-1$
- assertTrue("Original configuration should NOT exist in project index", !existsIn(configs, handle)); //$NON-NLS-1$
-
- // cleanup
- newHandle.delete();
- assertTrue("Config should not exist after deletion", !newHandle.exists()); //$NON-NLS-1$
- }
-
- /**
- * Closes all editors in the active workbench page.
- */
- protected void closeAllEditors() {
- IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- activeWorkbenchWindow.getActivePage().closeAllEditors(false);
- }
-
- /**
- * Creates a few configs, closes the project and re-opens the
- * project to ensure the config index is persisted properly
- * @throws CoreException
- */
- public void testPersistIndex() throws CoreException {
- // close all editors before closing project: @see bug 204023
- closeAllEditors();
-
- ILaunchConfigurationWorkingCopy wc1 = newConfiguration(null, "persist1local"); //$NON-NLS-1$
- ILaunchConfigurationWorkingCopy wc2 = newConfiguration(getProject(), "persist2shared"); //$NON-NLS-1$
- ILaunchConfiguration lc1 = wc1.doSave();
- ILaunchConfiguration lc2 = wc2.doSave();
-
- IProject project = getProject();
- ILaunchConfiguration[] before = getLaunchManager().getLaunchConfigurations();
- assertTrue("config should be in index", existsIn(before, lc1)); //$NON-NLS-1$
- assertTrue("config should be in index", existsIn(before, lc2)); //$NON-NLS-1$
-
- project.close(null);
- ILaunchConfiguration[] during = getLaunchManager().getLaunchConfigurations();
- boolean local = true;
- for (int i = 0; i < during.length; i++) {
- // must be local, or not from the closed project
- local = local && (during[i].isLocal() || !during[i].getFile().getProject().equals(project));
- }
- project.open(null);
- assertTrue("Should only be local configs when closed", local); //$NON-NLS-1$
- ILaunchConfiguration[] after = getLaunchManager().getLaunchConfigurations();
- assertTrue("Should be same number of configs after openning", after.length == before.length); //$NON-NLS-1$
- for (int i = 0; i < before.length; i++) {
- assertTrue("Config should exist after openning", existsIn(after, before[i])); //$NON-NLS-1$
- }
-
- // cleanup
- lc1.delete();
- assertTrue("Config should not exist after deletion", !lc1.exists()); //$NON-NLS-1$
- lc2.delete();
- assertTrue("Config should not exist after deletion", !lc2.exists()); //$NON-NLS-1$
-
-
- }
-
-
- /**
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public void launchConfigurationAdded(ILaunchConfiguration configuration) {
- fFrom = getLaunchManager().getMovedFrom(configuration);
- synchronized (fLock) {
- fAdded = configuration;
- fLock.notifyAll();
- }
- }
-
- /**
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public void launchConfigurationChanged(ILaunchConfiguration configuration) {
- }
-
- /**
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public void launchConfigurationRemoved(ILaunchConfiguration configuration) {
- fTo = getLaunchManager().getMovedTo(configuration);
- synchronized (fLock) {
- fRemoved = configuration;
- fLock.notifyAll();
- }
- }
-
- protected void addConfigListener() {
- getLaunchManager().addLaunchConfigurationListener(this);
- }
-
- protected void removeConfigListener() {
- getLaunchManager().removeLaunchConfigurationListener(this);
- }
-
- /**
- * Ensures that a removal notification is sent for a shared config in a project
- * that is deleted.
- *
- * @throws Exception
- */
- public void testDeleteProjectWithSharedConfig() throws Exception {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("DeleteSharedConfig"); //$NON-NLS-1$
- try {
- assertFalse("project should not exist yet", project.exists()); //$NON-NLS-1$
- project.create(null);
- assertTrue("project should now exist", project.exists()); //$NON-NLS-1$
- project.open(null);
- assertTrue("project should be open", project.isOpen()); //$NON-NLS-1$
- ILaunchConfigurationWorkingCopy wc = newConfiguration(project, "ToBeDeleted"); //$NON-NLS-1$
-
- addConfigListener();
- ILaunchConfiguration configuration = wc.doSave();
- assertEquals(configuration, fAdded);
-
- synchronized (fLock) {
- fRemoved = null;
- project.delete(true, false, null);
- if (fRemoved == null) {
- fLock.wait(10000);
- }
- }
- assertEquals(configuration, fRemoved);
- } finally {
- if (project.exists()) {
- project.delete(true, false, null);
- }
- removeConfigListener();
- }
- }
-
- /**
- * Tests a nested working copy.
- *
- * @throws CoreException
- */
- public void testNestedWorkingCopyLocalConfiguration() throws CoreException {
- ILaunchConfigurationWorkingCopy wc = newConfiguration(null, "config123"); //$NON-NLS-1$
- IPath location = wc.getLocation();
- ILaunchConfiguration handle = wc.doSave();
- File file = location.toFile();
- assertTrue("Configuration file should exist", file.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertEquals("String1 should be String1", handle.getAttribute("String1", "Missing"), "String1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertEquals("Int1 should be 1", handle.getAttribute("Int1", 0), 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", handle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // ensure new handle is the index
- ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations();
- assertTrue("Configuration should exist in project index", existsIn(configs, handle)); //$NON-NLS-1$
-
- // get a working copy
- wc = handle.getWorkingCopy();
- ILaunchConfigurationWorkingCopy nested = wc.getWorkingCopy();
-
- // verify nested is same as original
- assertEquals("String1 should be String1", nested.getAttribute("String1", "Missing"), "String1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertEquals("Int1 should be 1", nested.getAttribute("Int1", 0), 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", nested.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !nested.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // change an attribute in the nested working copy
- nested.setAttribute("String1", "StringOne"); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Wrong attribute value", nested.getAttribute("String1", "Missing"), "StringOne"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertEquals("Wrong attribute value", wc.getAttribute("String1", "Missing"), "String1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertEquals("Wrong attribute value", handle.getAttribute("String1", "Missing"), "String1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- // save back to parent
- ILaunchConfigurationWorkingCopy parent = nested.getParent();
- assertEquals("Wrong parent", wc, parent); //$NON-NLS-1$
- assertNull("Should have no parent", wc.getParent()); //$NON-NLS-1$
- nested.doSave();
- assertEquals("Wrong attribute value", wc.getAttribute("String1", "Missing"), "StringOne"); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$
- assertEquals("Wrong attribute value", handle.getAttribute("String1", "Missing"), "String1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- // check originals
- assertEquals("Wrong original config" , handle, wc.getOriginal()); //$NON-NLS-1$
- assertEquals("Wrong original config" , handle, nested.getOriginal()); //$NON-NLS-1$
-
- // cleanup
- handle.delete();
- assertTrue("Config should not exist after deletion", !handle.exists()); //$NON-NLS-1$
- }
-
- /**
- * Creates a configuration in an EFS linked folder. Deletes configuration directly.
- *
- * @throws CoreException
- * @throws URISyntaxException
- */
- public void testCreateDeleteEFS() throws CoreException, URISyntaxException {
- IFileSystem fileSystem = EFS.getFileSystem("debug");
- assertNotNull("Missing debug EFS", fileSystem);
-
- // create folder in EFS
- IFolder folder = getProject().getFolder("efs");
- folder.createLink(new URI("debug", Path.ROOT.toString(), null), 0, null);
-
- // create configuration
- ILaunchConfigurationWorkingCopy wc = newConfiguration(folder, "efsConfig"); //$NON-NLS-1$
- ILaunchConfiguration handle = wc.doSave();
- assertTrue("Configuration should exist", handle.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertTrue("String1 should be String1", handle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", handle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", handle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // delete configuration
- handle.delete();
- assertTrue("Configuration should not exist", !handle.exists()); //$NON-NLS-1$
-
- // cleanup
- folder.delete(IResource.NONE, null);
- }
-
- /**
- * Creates a configuration in an EFS linked folder. Deletes the folder to ensure the
- * configuration is also deleted.
- *
- * @throws CoreException
- * @throws URISyntaxException
- */
- public void testCreateDeleteEFSLink() throws CoreException, URISyntaxException {
- IFileSystem fileSystem = EFS.getFileSystem("debug");
- assertNotNull("Missing debug EFS", fileSystem);
-
- // create folder in EFS
- IFolder folder = getProject().getFolder("efs2");
- folder.createLink(new URI("debug", Path.ROOT.toString(), null), 0, null);
-
- // create configuration
- ILaunchConfigurationWorkingCopy wc = newConfiguration(folder, "efsConfig"); //$NON-NLS-1$
- ILaunchConfiguration handle = wc.doSave();
- assertTrue("Configuration should exist", handle.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertTrue("String1 should be String1", handle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", handle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", handle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // cleanup
- folder.delete(IResource.NONE, null);
- assertTrue("Configuration should not exist", !handle.exists()); //$NON-NLS-1$
- }
-
- /**
- * Test that renaming a project with a linked EFS folder containing a shared
- * launch configuration is properly updated.
- *
- * @throws Exception
- */
- public void testEFSProjectRename() throws Exception {
- // create test project
- IProject pro = ResourcesPlugin.getWorkspace().getRoot().getProject("RenameEFS");
- if (pro.exists()) {
- pro.delete(true, true, null);
- }
- // create project
- IProject project = TestsPlugin.createProject("RenameEFS");
-
- IFileSystem fileSystem = EFS.getFileSystem("debug");
- assertNotNull("Missing debug EFS", fileSystem);
-
- // create folder in EFS
- IFolder folder = project.getFolder("efs2");
- folder.createLink(new URI("debug", Path.ROOT.toString(), null), 0, null);
-
- // create configuration
- ILaunchConfigurationWorkingCopy wc = newConfiguration(folder, "efsConfig"); //$NON-NLS-1$
- ILaunchConfiguration handle = wc.doSave();
- assertTrue("Configuration should exist", handle.exists()); //$NON-NLS-1$
-
- // retrieve attributes
- assertTrue("String1 should be String1", handle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", handle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", handle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // rename project
- IProjectDescription description = project.getDescription();
- description.setName("SFEemaneR"); // reverse name
- project.move(description, false, null);
-
- // original configuration should no longer exist - handle out of date
- assertTrue("Configuration should not exist", !handle.exists()); //$NON-NLS-1$
-
- // get the new handle
- project = ResourcesPlugin.getWorkspace().getRoot().getProject("SFEemaneR");
- assertTrue("Project should exist", project.exists());
- IFile file = project.getFile(new Path("efs2/efsConfig.launch"));
- assertTrue("launch config file should exist", file.exists());
- handle = getLaunchManager().getLaunchConfiguration(file);
- assertTrue("launch config should exist", handle.exists());
-
- // retrieve attributes
- assertTrue("String1 should be String1", handle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- assertTrue("Int1 should be 1", handle.getAttribute("Int1", 0) == 1); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean1 should be true", handle.getAttribute("Boolean1", false)); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
-
- // validate shared location
- assertEquals("Shared location should be updated", file, handle.getFile());
-
- // cleanup
- project.delete(IResource.NONE, null);
- assertTrue("Configuration should not exist", !handle.exists()); //$NON-NLS-1$
-
- }
-
- /**
- * Tests launch configuration import.
- *
- * @throws Exception
- */
- public void testImport() throws Exception {
- // create a shared configuration "Import4" in the workspace to be overwritten on import
- ILaunchConfigurationWorkingCopy wc = newConfiguration(getProject(), "Import4"); //$NON-NLS-1$
- ILaunchConfiguration handle = wc.doSave();
- assertTrue("Configuration should exist", handle.exists()); //$NON-NLS-1$
-
- File dir = TestsPlugin.getDefault().getFileInPlugin(new Path("test-import"));
- assertTrue("Import directory does not exist", dir.exists());
- LaunchManager manager = (LaunchManager) getLaunchManager();
-
- Listener listener = new Listener();
- try {
- getLaunchManager().addLaunchConfigurationListener(listener);
- // import
- manager.importConfigurations(dir.listFiles(
- new FileFilter() {
- public boolean accept(File file) {
- return file.isFile() &&
- file.getName().endsWith(
- ILaunchConfiguration.LAUNCH_CONFIGURATION_FILE_EXTENSION);
- }
- }),
- null);
-
- // should be one removed
- List removed = listener.getRemoved();
- assertEquals("Should be one removed config", 1, removed.size());
- assertTrue("Import4 should be removed", removed.contains(handle));
-
- // should be 5 added
- List added = listener.getAdded();
- assertEquals("Should be 5 added configs", 5, added.size());
- Set names = new HashSet();
- Iterator iterator = added.iterator();
- while (iterator.hasNext()) {
- ILaunchConfiguration lc = (ILaunchConfiguration) iterator.next();
- names.add(lc.getName());
- }
- assertTrue("Missing Name", names.contains("Import1"));
- assertTrue("Missing Name", names.contains("Import2"));
- assertTrue("Missing Name", names.contains("Import3"));
- assertTrue("Missing Name", names.contains("Import4"));
- assertTrue("Missing Name", names.contains("Import5"));
-
- // should be one changed
- List changed = listener.getChanged();
- assertEquals("Should be 1 changed config", 1, changed.size());
- assertEquals("Wrong changed config", "Import4", ((ILaunchConfiguration)changed.get(0)).getName());
- } finally {
- manager.removeLaunchConfigurationListener(listener);
- }
-
- }
-
- /**
- * Tests the location of a local working copy.
- *
- * @throws CoreException
- */
- public void testWorkingCopyGetLocation() throws CoreException {
- ILaunchConfigurationWorkingCopy workingCopy = newConfiguration(null, "test-get-location");
- IPath location = workingCopy.getLocation();
- assertEquals("Wrong path for local working copy", LaunchManager.LOCAL_LAUNCH_CONFIGURATION_CONTAINER_PATH.append("test-get-location.launch"), location);
- }
-
-}
-
-
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchHistoryTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchHistoryTests.java
deleted file mode 100644
index d7b1ed7..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchHistoryTests.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.launching;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-/**
- * Test the utilization of launch histories: sizing, ordering, completeness and correctness
- *
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager
- * @see org.eclipse.debug.internal.ui.ILaunchHistoryChangedListener
- * @see org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction
- *
- * @since 3.3
- */
-public class LaunchHistoryTests extends AbstractLaunchTest {
-
- /**
- * Constructor
- * @param name
- */
- public LaunchHistoryTests(String name) {
- super(name);
- }
-
- /**
- * Returns the run launch history
- * @return
- */
- private LaunchHistory getRunLaunchHistory() {
- return getLaunchConfigurationManager().getLaunchHistory(IDebugUIConstants.ID_RUN_LAUNCH_GROUP);
- }
-
- /**
- * Returns the maximum allowed size of the launch histories
- * @return the maximum size of the launch histories
- */
- private int getMaxHistorySize() {
- return DebugUIPlugin.getDefault().getPreferenceStore().getInt(IDebugUIConstants.PREF_MAX_HISTORY_SIZE);
- }
-
- /**
- * Sets the maximum size of the launch history to the specified value
- * @param value the new maximum size for launch histories
- */
- private void setMaxHistorySize(int value) {
- DebugUIPlugin.getDefault().getPreferenceStore().setValue(IDebugUIConstants.PREF_MAX_HISTORY_SIZE, value);
- }
-
- /**
- * Returns the debug launch history
- * @return
- */
- private LaunchHistory getDebugLaunchHistory() {
- return getLaunchConfigurationManager().getLaunchHistory(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP);
- }
-
- /**
- * This method tests that an item added to the history is added to the head of
- * history.
- */
- public void testHistoryAddition() throws CoreException {
- LaunchHistory runhistory = getRunLaunchHistory();
- assertNotNull("The run launch history should not be null", runhistory); //$NON-NLS-1$
- ILaunchConfiguration config = getLaunchConfiguration("LaunchHistoryTest"); //$NON-NLS-1$
- assertNotNull("LaunchHistoryTest launch config should not be null", config); //$NON-NLS-1$
- config.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
- assertTrue("The run history should contain the LaunchHistoryTest config", runhistory.contains(config)); //$NON-NLS-1$
- assertEquals("The most recent launch should be LaunchHistoryTest", runhistory.getRecentLaunch(), config); //$NON-NLS-1$
- }
-
- /**
- * As both the run and the debug launch histories will accept a java application
- * launch config, both launch histories should contain the test launch configuration
- * and it should be the recent launch for both of them
- */
- public void testHistoriesInSync() throws CoreException {
- LaunchHistory runhistory = getRunLaunchHistory();
- assertNotNull("The run launch history should not be null", runhistory); //$NON-NLS-1$
- LaunchHistory debughistory = getDebugLaunchHistory();
- assertNotNull("the debug launch history should not be null", debughistory); //$NON-NLS-1$
- ILaunchConfiguration config = getLaunchConfiguration("LaunchHistoryTest"); //$NON-NLS-1$
- assertNotNull("LaunchHistoryTest launch config should not be null", config); //$NON-NLS-1$
- config.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
- assertTrue("the run history should contain LaunchHistoryTest", runhistory.contains(config)); //$NON-NLS-1$
- assertEquals("the run recent launch should be LaunchHistoryTest", runhistory.getRecentLaunch(), config); //$NON-NLS-1$
- assertTrue("the debug history should contain LaunchHistoryTest", debughistory.contains(config)); //$NON-NLS-1$
- assertEquals("the debug recent launch should be LaunchHistoryTest", debughistory.getRecentLaunch(), config); //$NON-NLS-1$
- }
-
- /**
- * If we launch config A, then config B, and then config A again, A should be the most recent launch
- */
- public void testHistoryReodering() throws CoreException {
- LaunchHistory runhistory = getRunLaunchHistory();
- assertNotNull("The run launch history should not be null", runhistory); //$NON-NLS-1$
- ILaunchConfiguration config = getLaunchConfiguration("LaunchHistoryTest"); //$NON-NLS-1$
- assertNotNull("LaunchHistoryTest launch config should not be null", config); //$NON-NLS-1$
- config.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
- assertTrue("The run history should contain the LaunchHistoryTest config", runhistory.contains(config)); //$NON-NLS-1$
- assertEquals("The most recent launch should be LaunchHistoryTest", runhistory.getRecentLaunch(), config); //$NON-NLS-1$
- config = getLaunchConfiguration("LaunchHistoryTest2"); //$NON-NLS-1$
- assertNotNull("LaunchHistoryTest2 launch config should not be null", config); //$NON-NLS-1$
- config.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
- assertTrue("The run history should contain the LaunchHistoryTest2 config", runhistory.contains(config)); //$NON-NLS-1$
- assertEquals("The most recent launch should be LaunchHistoryTest2", runhistory.getRecentLaunch(), config); //$NON-NLS-1$
- config = getLaunchConfiguration("LaunchHistoryTest"); //$NON-NLS-1$
- assertNotNull("LaunchHistoryTest launch config should not be null", config); //$NON-NLS-1$
- config.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
- assertTrue("The run history should contain the LaunchHistoryTest config", runhistory.contains(config)); //$NON-NLS-1$
- assertEquals("The most recent launch should be LaunchHistoryTest", runhistory.getRecentLaunch(), config); //$NON-NLS-1$
- }
-
- /**
- * If we rename a launch configuration it should not effect the launch history if the renamed configuration
- * is present in the history.
- */
- public void testRenameConfigHistoryUpdate() throws CoreException {
- LaunchHistory runhistory = getRunLaunchHistory();
- assertNotNull("The run launch history should not be null", runhistory); //$NON-NLS-1$
- ILaunchConfiguration config = getLaunchConfiguration("LaunchHistoryTest"); //$NON-NLS-1$
- assertNotNull("LaunchHistoryTest launch config should not be null", config); //$NON-NLS-1$
- config.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
- assertTrue("The run history should contain the LaunchHistoryTest config", runhistory.contains(config)); //$NON-NLS-1$
- assertEquals("The most recent launch should be LaunchHistoryTest", runhistory.getRecentLaunch(), config); //$NON-NLS-1$
- ILaunchConfigurationWorkingCopy copy = config.getWorkingCopy();
- copy.rename("RenamedLaunchHistoryItem"); //$NON-NLS-1$
- config = copy.doSave();
- assertEquals("the renamed config should still be the first on in the history", runhistory.getRecentLaunch(), config); //$NON-NLS-1$
-
- //rename the configuration back to what it was
- copy = config.getWorkingCopy();
- copy.rename("LaunchHistoryTest"); //$NON-NLS-1$
- config = copy.doSave();
- }
-
- /**
- * If we delete a launch configuration and the configuration is present in the launch history, it should be removed
- * from the history and the history should be shifted up one place.
- */
- public void testDeleteLaunchConfigurationHistoryUpdate() throws CoreException {
- LaunchHistory runhistory = getRunLaunchHistory();
- assertNotNull("The run launch history should not be null", runhistory); //$NON-NLS-1$
- ILaunchConfiguration config = getLaunchConfiguration("LaunchHistoryTest"); //$NON-NLS-1$
- assertNotNull("LaunchHistoryTest launch config should not be null", config); //$NON-NLS-1$
- config.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
- assertTrue("The run history should contain the LaunchHistoryTest config", runhistory.contains(config)); //$NON-NLS-1$
- assertEquals("The most recent launch should be LaunchHistoryTest", runhistory.getRecentLaunch(), config); //$NON-NLS-1$
- config = getLaunchConfiguration("LaunchHistoryTest2"); //$NON-NLS-1$
- assertNotNull("LaunchHistoryTest2 launch config should not be null", config); //$NON-NLS-1$
- config.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
- assertTrue("The run history should contain the LaunchHistoryTest2 config", runhistory.contains(config)); //$NON-NLS-1$
- assertEquals("The most recent launch should be LaunchHistoryTest2", runhistory.getRecentLaunch(), config); //$NON-NLS-1$
- config.delete();
- config = getLaunchConfiguration("LaunchHistoryTest"); //$NON-NLS-1$
- assertEquals("the run history should have LaunchHistoryTest as the recent launch after delete", runhistory.getRecentLaunch(), config); //$NON-NLS-1$
- }
-
- /**
- * Tests that setting the size of the launch history appropriately changes what will be returned
- * when the history is queried for it contents
- */
- public void testLaunchHistorySize() throws CoreException {
- LaunchHistory runhistory = getRunLaunchHistory();
- assertNotNull("The run launch history should not be null", runhistory); //$NON-NLS-1$
- int oldsize = getMaxHistorySize();
- setMaxHistorySize(2);
- assertTrue("the maximum history size should be 2", getMaxHistorySize() == 2); //$NON-NLS-1$
- ILaunchConfiguration config = getLaunchConfiguration("LaunchHistoryTest"); //$NON-NLS-1$
- assertNotNull("LaunchHistoryTest launch config should not be null", config); //$NON-NLS-1$
- config.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
- config = getLaunchConfiguration("LaunchHistoryTest2"); //$NON-NLS-1$
- assertNotNull("LaunchHistoryTest2 launch config should not be null", config); //$NON-NLS-1$
- config.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
- assertTrue("there should only be two items in the history", runhistory.getHistory().length == getMaxHistorySize()); //$NON-NLS-1$
- assertTrue("the complete launch history should be greater than or equal to the history size", runhistory.getCompleteLaunchHistory().length >= runhistory.getHistory().length); //$NON-NLS-1$
-
- //reset the history size
- setMaxHistorySize(oldsize);
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchManagerTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchManagerTests.java
deleted file mode 100644
index 842092b..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchManagerTests.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.launching;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.internal.core.LaunchManager;
-
-/**
- *
- * Variety of tests for the {@link org.eclipse.debug.internal.core.LaunchManager}
- *
- * @since 3.6
- */
-public class LaunchManagerTests extends AbstractLaunchTest {
-
- /**
- * Constructor
- * @param name
- */
- public LaunchManagerTests(String name) {
- super(name);
- }
-
- /**
- * Tests generating a valid launch configuration name
- */
- public void testGenereateConfigName() {
- String configname = "launch_configuration";
- String name = getLaunchManager().generateUniqueLaunchConfigurationNameFrom(configname);
- assertTrue("the name nust be '"+configname+"'", name.equals(configname));
- }
-
- /**
- * Tests generating a launch configuration name with an unsupported char using
- * the deprecated method
- */
- public void testGenereateConfigNameBadChar() {
- String configname = "config:name";
- String name = getLaunchManager().generateUniqueLaunchConfigurationNameFrom(configname);
- assertEquals("config name should be '"+configname+"'", configname, name);
- }
-
- /**
- * Tests generating a launch configuration name using a name that is an OS reserved
- * name. Win 32 test only.
- */
- public void testGenerateConfigNameReservedName() {
- if(Platform.OS_WIN32.equals(Platform.getOS())) {
- String configname = "aux";
- String name = getLaunchManager().generateUniqueLaunchConfigurationNameFrom(configname);
- assertEquals("config name should be '"+configname+"'", configname, name);
- }
- }
-
- /**
- * Tests generating a configuration name that contains an invalid character
- */
- public void testGenerateBadConfigName() {
- String configname = "config:name";
- String name = getLaunchManager().generateLaunchConfigurationName(configname);
- assertEquals("config name should be 'config_name'", "config_name", name);
- }
-
- /**
- * Tests generating a name that conflicts with an OS reserved name. This test is for windows only as there
- * are no reserved names on other OS's.
- */
- public void testGenerateConflictingName() {
- if(Platform.OS_WIN32.equals(Platform.getOS())) {
- String configname = "aux";
- String name = getLaunchManager().generateLaunchConfigurationName(configname);
- assertEquals("config name should be 'launch_configuration'", "launch_configuration", name);
- }
- }
-
- /**
- * Tests generating a configuration name that contains an invalid character and where there
- * is another config with the replaced name already
- */
- public void testGenerateBadCharConflict() throws Exception {
- String configname = "config:name";
- String name = getLaunchManager().generateLaunchConfigurationName(configname);
- assertEquals("config name should be 'config_name'", "config_name", name);
- getLaunchConfiguration(name);
- name = getLaunchManager().generateLaunchConfigurationName(configname);
- assertEquals("config name should be 'config_name (1)'", "config_name (1)", name);
- ILaunchConfiguration config = getLaunchConfiguration("config_name");
- config.delete();
- }
-
- /**
- * Tests generating a name that conflicts with an OS reserved name and that
- * there is a config with the replaced name already. This test is for windows only as there
- * are no reserved names on other OS's.
- */
- public void testGenerateBadNameConflict() throws Exception {
- if(Platform.OS_WIN32.equals(Platform.getOS())) {
- String configname = "com2";
- String name = getLaunchManager().generateLaunchConfigurationName(configname);
- assertEquals("config name should be 'launch_configuration'", "launch_configuration", name);
- getLaunchConfiguration(name);
- name = getLaunchManager().generateLaunchConfigurationName(configname);
- assertEquals("config name should be 'launch_configuration (1)'", "launch_configuration (1)", name);
- ILaunchConfiguration config = getLaunchConfiguration("launch_configuration");
- config.delete();
- }
- }
-
- /**
- * Tests the {@link org.eclipse.debug.core.ILaunchManager#isValidLaunchConfigurationName(String)} method for correctness
- */
- public void testValidateConfigGoodName() {
- String configname = "configname";
- try {
- getLaunchManager().isValidLaunchConfigurationName(configname);
- }
- catch(IllegalArgumentException iae) {
- fail("the config name should not have thrown an exception during validation");
- }
- }
-
- /**
- * Tests the {@link org.eclipse.debug.core.ILaunchManager#isValidLaunchConfigurationName(String)} method for correctness
- */
- public void testValidateConfigBadCharName() {
- String configname = "config:name";
- try {
- getLaunchManager().isValidLaunchConfigurationName(configname);
- }
- catch(IllegalArgumentException iae) {
- return;
- }
- fail("the config name should have thrown an exception during validation");
- }
-
- /**
- * Tests the {@link org.eclipse.debug.core.ILaunchManager#isValidLaunchConfigurationName(String)} method for correctness
- */
- public void testValidateConfigBadName() {
- if(Platform.OS_WIN32.equals(Platform.getOS())) {
- String configname = "com1";
- try {
- getLaunchManager().isValidLaunchConfigurationName(configname);
- }
- catch(IllegalArgumentException iae) {
- return;
- }
- fail("the config name should have thrown an exception during validation");
- }
- }
-
- /**
- * Tests that generating a configuration name when there exists a configuration with that name
- * already properly updates a '(N)' counter at the end
- */
- public void testGenerateNameExistingConfig() throws Exception {
- String configname = "x.y.z.configname";
- getLaunchConfiguration(configname);
- String name = getLaunchManager().generateUniqueLaunchConfigurationNameFrom(configname);
- assertEquals("the configuration name should have been "+configname+" (1)", configname+" (1)", name);
- getLaunchConfiguration(name);
- name = getLaunchManager().generateUniqueLaunchConfigurationNameFrom(name);
- assertEquals("the configuration name should have been "+configname+" (2)", configname+" (2)", name);
- ILaunchConfiguration config = getLaunchConfiguration(configname);
- if(config != null) {
- config.delete();
- }
- config = getLaunchConfiguration(configname +" (1)");
- if(config != null) {
- config.delete();
- }
- }
-
- /**
- * Tests that removing an accelerator properly removes it without affecting the base string (readable) value
- */
- public void testRemoveAcc() {
- String text = "&Remove";
- String label = LaunchManager.removeAccelerators(text);
- assertEquals("the label should be 'Remove'", "Remove", label);
- text = "Remo&ve";
- label = LaunchManager.removeAccelerators(text);
- assertEquals("the label should be 'Remove'", "Remove", label);
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/RefreshTabTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/RefreshTabTests.java
deleted file mode 100644
index 900e4d0..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/RefreshTabTests.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.launching;
-
-import java.io.ByteArrayInputStream;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.RefreshUtil;
-import org.eclipse.debug.internal.core.RefreshScopeComparator;
-import org.eclipse.debug.tests.TestsPlugin;
-import org.eclipse.debug.ui.RefreshTab;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Tests the refresh tab.
- */
-public class RefreshTabTests extends AbstractLaunchTest {
-
- /**
- * Constructor
- * @param name
- */
- public RefreshTabTests(String name) {
- super(name);
- }
-
- /**
- * Sets the selected resource in the navigator view.
- *
- * @param resource resource to select
- */
- protected void setSelection(IResource resource) {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- assertNotNull("The active workbench page should not be null", page);
- IViewPart part;
- try {
- part = page.showView("org.eclipse.ui.views.ResourceNavigator");
- IWorkbenchPartSite site = part.getSite();
- assertNotNull("The part site for org.eclipse.ui.views.ResourceNavigator should not be null ", site);
- ISelectionProvider provider = site.getSelectionProvider();
- assertNotNull("the selection provider should not be null for org.eclipse.ui.views.ResourceNavigator", provider);
- provider.setSelection(new StructuredSelection(resource));
- } catch (PartInitException e) {
- assertNotNull("Failed to open navigator view", null);
- }
- }
-
- /**
- * Tests a refresh scope of the selected resource
- * @throws CoreException
- */
- public void testSelectedResource() throws CoreException {
- String scope = "${resource}";
- IResource resource = getProject().getFolder("src");
- setSelection(resource);
- IResource[] result = RefreshTab.getRefreshResources(scope);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals(resource, result[0]);
- }
-
- /**
- * Tests a refresh scope of the selected resource's container
- * @throws CoreException
- */
- public void testSelectionsFolder() throws CoreException {
- String scope = "${container}";
- IResource resource = getProject().getFolder("src");
- setSelection(resource);
- IResource[] result = RefreshTab.getRefreshResources(scope);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals(resource.getParent(), result[0]);
- }
-
- /**
- * Tests a refresh scope of the selected resource's project
- * @throws CoreException
- */
- public void testSelectionsProject() throws CoreException {
- String scope = "${project}";
- IResource resource = getProject().getFolder("src");
- setSelection(resource);
- IResource[] result = RefreshTab.getRefreshResources(scope);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals(resource.getProject(), result[0]);
- }
-
- /**
- * Tests a refresh scope of the selected resource's project
- * @throws CoreException
- */
- public void testWorkspaceScope() throws CoreException {
- String scope = "${workspace}";
- IResource[] result = RefreshTab.getRefreshResources(scope);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals(ResourcesPlugin.getWorkspace().getRoot(), result[0]);
- }
-
- /**
- * Tests a refresh scope for a specific resource (old format)
- * @throws CoreException
- */
- public void testSpecificResource() throws CoreException {
- String scope = "${resource:/RefreshTabTests/some.file}";
- IResource resource = getProject().getFile("some.file");
- IResource[] result = RefreshTab.getRefreshResources(scope);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals(resource, result[0]);
- }
-
- /**
- * Tests a refresh scope for a working set
- * @throws CoreException
- */
- public void testWorkingSet() throws CoreException {
- String scope= "${working_set:<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<launchConfigurationWorkingSet factoryID=\"org.eclipse.ui.internal.WorkingSetFactory\" name=\"workingSet\" editPageId=\"org.eclipse.ui.resourceWorkingSetPage\">\n<item factoryID=\"org.eclipse.ui.internal.model.ResourceFactory\" path=\"/RefreshTabTests/some.file\" type=\"1\"/>\n</launchConfigurationWorkingSet>}"; //$NON-NLS-1$
- IResource resource = getProject().getFile("some.file");
- IResource[] result = RefreshTab.getRefreshResources(scope);
- assertNotNull(result);
- assertEquals(1, result.length);
- assertEquals(resource, result[0]);
- }
-
- /**
- * Returns a scratch project for launch configurations
- *
- * @return
- */
- protected IProject getProject() throws CoreException {
- IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
- IProject project= root.getProject("RefreshTabTests");
- if (!project.exists()) {
- project = TestsPlugin.createProject("RefreshTabTests");
- IFolder folder = project.getFolder("src");
- folder.create(false, true, null);
- IFile file = project.getFile("some.file");
- file.create(new ByteArrayInputStream("test file".getBytes()), false, null);
- }
- return project;
- }
-
- /**
- * Tests the launch configuration attribute comparator extension for comparing
- * old/new attribute styles.
- *
- * @throws CoreException
- */
- public void testRefreshScopeComparator() throws CoreException {
- String oldStyle = "${working_set:<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<launchConfigurationWorkingSet factoryID=\"org.eclipse.ui.internal.WorkingSetFactory\" name=\"workingSet\" editPageId=\"org.eclipse.ui.resourceWorkingSetPage\">\n<item factoryID=\"org.eclipse.ui.internal.model.ResourceFactory\" path=\"/RefreshTabTests/some.file\" type=\"1\"/>\n</launchConfigurationWorkingSet>}"; //$NON-NLS-1$
- String newStyle = "${working_set:<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<resources>\n<item path=\"/RefreshTabTests/some.file\" type=\"1\"/>\n</resources>}";
- assertEquals("Comparator should return 0", 0, new RefreshScopeComparator().compare(oldStyle, newStyle));
- }
-
- /**
- * Tests persist restore of some resources.
- *
- * @throws CoreException
- */
- public void testResourceMemento() throws CoreException {
- IResource[] resources = new IResource[]{getProject(), getProject().getFile("not.exist"), getProject().getFile("some.file")};
- String memento = RefreshUtil.toMemento(resources);
- IResource[] restore = RefreshUtil.toResources(memento);
- assertEquals(resources.length, restore.length);
- assertEquals(resources[0], restore[0]);
- assertEquals(resources[1], restore[1]);
- assertEquals(resources[2], restore[2]);
- }
-
- /**
- * Tests persist/restore of empty resource collection.
- *
- * @throws CoreException
- */
- public void testEmptyResourceSet() throws CoreException {
- String memento = RefreshUtil.toMemento(new IResource[]{});
- IResource[] resources = RefreshUtil.toResources(memento);
- assertNotNull(resources);
- assertEquals("Should be empty", 0, resources.length);
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/TestLaunchDelegate.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/TestLaunchDelegate.java
deleted file mode 100644
index 54994d3..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/TestLaunchDelegate.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.launching;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
-
-/**
- * An empty lauch delegate
- */
-public class TestLaunchDelegate extends LaunchConfigurationDelegate {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
- // do nothing
- }
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/DynamicRenderingBindings.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/DynamicRenderingBindings.java
deleted file mode 100644
index 0bf6f5c..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/DynamicRenderingBindings.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.view.memory;
-
-import org.eclipse.debug.core.model.IMemoryBlock;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.memory.AbstractMemoryRenderingBindingsProvider;
-import org.eclipse.debug.ui.memory.IMemoryRenderingType;
-
-/**
- * Contributed dynamic rendernig bindings.
- * @since 3.1
- */
-public class DynamicRenderingBindings extends AbstractMemoryRenderingBindingsProvider {
-
- //
- private static DynamicRenderingBindings fgSingleton = null;
-
- // id of rendering type bound by this provider
- private String fId = "rendering_type_1";
-
- /**
- * Constructor
- */
- public DynamicRenderingBindings() {
- fgSingleton = this;
- }
-
- /**
- * @see org.eclipse.debug.ui.memory.IMemoryRenderingBindingsProvider#getRenderingTypes(org.eclipse.debug.core.model.IMemoryBlock)
- */
- public IMemoryRenderingType[] getRenderingTypes(IMemoryBlock block) {
- return new IMemoryRenderingType[]{getPrimaryRenderingType(block)};
- }
-
- /**
- * @see org.eclipse.debug.ui.memory.IMemoryRenderingBindingsProvider#getDefaultRenderingTypes(org.eclipse.debug.core.model.IMemoryBlock)
- */
- public IMemoryRenderingType[] getDefaultRenderingTypes(IMemoryBlock block) {
- return new IMemoryRenderingType[]{getPrimaryRenderingType(block)};
- }
-
- /**
- * @see org.eclipse.debug.ui.memory.IMemoryRenderingBindingsProvider#getPrimaryRenderingType(org.eclipse.debug.core.model.IMemoryBlock)
- */
- public IMemoryRenderingType getPrimaryRenderingType(IMemoryBlock block) {
- return DebugUITools.getMemoryRenderingManager().getRenderingType(fId);
- }
-
- /**
- * Sets the current rendering bound to this provider, and notifies
- * listeners of the change.
- *
- * @param id rendering id
- */
- public static void setBinding(String id) {
- fgSingleton.fId = id;
- fgSingleton.fireBindingsChanged();
- }
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlock.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlock.java
deleted file mode 100644
index d970541..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlock.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.view.memory;
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IMemoryBlock;
-
-/**
- * Dummy memory block implementation.
- *
- * @since 3.1
- */
-public class MemoryBlock implements IMemoryBlock {
-
- /**
- * @see org.eclipse.debug.core.model.IMemoryBlock#getStartAddress()
- */
- public long getStartAddress() {
- return 0;
- }
-
- /**
- * @see org.eclipse.debug.core.model.IMemoryBlock#getLength()
- */
- public long getLength() {
- return 100;
- }
-
- /**
- * @see org.eclipse.debug.core.model.IMemoryBlock#getBytes()
- */
- public byte[] getBytes() throws DebugException {
- byte[] bytes = new byte[(int)getLength()];
- for (int i = 0; i < bytes.length; i++) {
- bytes[i] = (byte)i;
- }
- return bytes;
- }
-
- /**
- * @see org.eclipse.debug.core.model.IMemoryBlock#supportsValueModification()
- */
- public boolean supportsValueModification() {
- return false;
- }
-
- /**
- * @see org.eclipse.debug.core.model.IMemoryBlock#setValue(long, byte[])
- */
- public void setValue(long offset, byte[] bytes) throws DebugException {
-
- }
-
- /**
- * @see org.eclipse.debug.core.model.IDebugElement#getModelIdentifier()
- */
- public String getModelIdentifier() {
- return "no.debugger";
- }
-
- /**
- * @see org.eclipse.debug.core.model.IDebugElement#getDebugTarget()
- */
- public IDebugTarget getDebugTarget() {
- return null;
- }
-
- /**
- * @see org.eclipse.debug.core.model.IDebugElement#getLaunch()
- */
- public ILaunch getLaunch() {
- return null;
- }
-
- /**
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- return null;
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlockDynamic.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlockDynamic.java
deleted file mode 100644
index 53ffe59..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlockDynamic.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.view.memory;
-
-
-/**
- * Dummy memory block
- *
- * @since 3.1
- */
-public class MemoryBlockDynamic extends MemoryBlock {
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlockOne.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlockOne.java
deleted file mode 100644
index 06a07fa..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlockOne.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.view.memory;
-
-
-/**
- * Dummy memory block
- *
- * @since 3.1
- */
-public class MemoryBlockOne extends MemoryBlock {
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlockThree.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlockThree.java
deleted file mode 100644
index 81ac323..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlockThree.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.view.memory;
-
-
-/**
- * Dummy memory block
- *
- * @since 3.1
- */
-public class MemoryBlockThree extends MemoryBlock {
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlockTwo.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlockTwo.java
deleted file mode 100644
index 63c22c7..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryBlockTwo.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.view.memory;
-
-
-/**
- * Dummy memory block
- *
- * @since 3.1
- */
-public class MemoryBlockTwo extends MemoryBlock {
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryRenderingTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryRenderingTests.java
deleted file mode 100644
index 448c7ef..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/MemoryRenderingTests.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.view.memory;
-
-import junit.framework.TestCase;
-
-import org.eclipse.debug.core.model.IMemoryBlock;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.memory.IMemoryRenderingBindingsListener;
-import org.eclipse.debug.ui.memory.IMemoryRenderingManager;
-import org.eclipse.debug.ui.memory.IMemoryRenderingType;
-
-/**
- * Tests memory rendering manager
- */
-public class MemoryRenderingTests extends TestCase {
-
- public MemoryRenderingTests(String name) {
- super(name);
- }
-
- public void testRenderingTypes() {
- IMemoryRenderingManager manager = DebugUITools.getMemoryRenderingManager();
- IMemoryRenderingType[] types = manager.getRenderingTypes();
- assertTrue("Wrong number of rendering types contributed", types.length > 6);
- assertTrue("Missing type 1", indexOf(manager.getRenderingType("rendering_type_1"), types) >= 0);
- assertTrue("Missing type 2", indexOf(manager.getRenderingType("rendering_type_2"), types) >= 0);
- assertTrue("Missing type 3", indexOf(manager.getRenderingType("rendering_type_3"), types) >= 0);
- assertTrue("Missing type", indexOf(manager.getRenderingType("org.eclipse.debug.ui.rendering.raw_memory"), types) >= 0);
- assertTrue("Missing type", indexOf(manager.getRenderingType("org.eclipse.debug.ui.rendering.ascii"), types) >= 0);
- assertTrue("Missing type", indexOf(manager.getRenderingType("org.eclipse.debug.ui.rendering.signedint"), types) >= 0);
- assertTrue("Missing type", indexOf(manager.getRenderingType("org.eclipse.debug.ui.rendering.unsignedint"), types) >= 0);
- }
-
- public void testRenderingTypeNames() {
- IMemoryRenderingManager manager = DebugUITools.getMemoryRenderingManager();
- IMemoryRenderingType type = manager.getRenderingType("rendering_type_1");
- assertEquals("Wrong name", "Rendering One", type.getLabel());
- type = manager.getRenderingType("rendering_type_2");
- assertEquals("Wrong name", "Rendering Two", type.getLabel());
- }
-
- public void testSingleBinding() {
- IMemoryRenderingManager manager = DebugUITools.getMemoryRenderingManager();
- IMemoryBlock block = new MemoryBlockOne();
- IMemoryRenderingType[] types = manager.getRenderingTypes(block);
- assertEquals("Wrong number of bindings", 1, types.length);
- assertEquals("Wrong binding", "rendering_type_1", types[0].getId());
- }
-
- public void testDoubleBinding() {
- IMemoryRenderingManager manager = DebugUITools.getMemoryRenderingManager();
- IMemoryBlock block = new MemoryBlockTwo();
- IMemoryRenderingType[] types = manager.getRenderingTypes(block);
- assertEquals("Wrong number of bindings", 2, types.length);
- assertTrue("Missing binding", indexOf(manager.getRenderingType("rendering_type_1"), types) >= 0);
- assertTrue("Missing binding", indexOf(manager.getRenderingType("rendering_type_2"), types) >= 0);
- }
-
- public void testDefaultBinding() {
- IMemoryRenderingManager manager = DebugUITools.getMemoryRenderingManager();
- IMemoryBlock block = new MemoryBlockOne();
- IMemoryRenderingType[] types = manager.getDefaultRenderingTypes(block);
- assertEquals("Wrong number of bindings", 1, types.length);
- assertEquals("Wrong binding", "rendering_type_1", types[0].getId());
- }
-
- public void testNoDefaultBinding() {
- IMemoryRenderingManager manager = DebugUITools.getMemoryRenderingManager();
- IMemoryBlock block = new MemoryBlockTwo();
- IMemoryRenderingType[] types = manager.getDefaultRenderingTypes(block);
- assertEquals("Wrong number of bindings", 0, types.length);
- }
-
- public void testPrimaryBinding() {
- IMemoryRenderingManager manager = DebugUITools.getMemoryRenderingManager();
- IMemoryBlock block = new MemoryBlockOne();
- IMemoryRenderingType type = manager.getPrimaryRenderingType(block);
- assertEquals("Wrong binding", "rendering_type_1", type.getId());
- }
-
- public void testNoPrimaryBinding() {
- IMemoryRenderingManager manager = DebugUITools.getMemoryRenderingManager();
- IMemoryBlock block = new MemoryBlockTwo();
- IMemoryRenderingType type = manager.getPrimaryRenderingType(block);
- assertNull("Wrong binding", type);
- }
-
- public void testDefaultWithoutPrimaryBinding() {
- IMemoryRenderingManager manager = DebugUITools.getMemoryRenderingManager();
- IMemoryBlock block = new MemoryBlockThree();
- IMemoryRenderingType[] types = manager.getDefaultRenderingTypes(block);
- assertEquals("Wrong number of bindings", 1, types.length);
- assertEquals("Wrong binding", "rendering_type_3", types[0].getId());
- }
-
- public void testDynamicBinding() {
- IMemoryRenderingManager manager = DebugUITools.getMemoryRenderingManager();
- IMemoryBlock block = new MemoryBlockDynamic();
- IMemoryRenderingType[] types = manager.getRenderingTypes(block);
- assertEquals("Wrong number of bindings", 1, types.length);
- assertEquals("Wrong binding", "rendering_type_1", types[0].getId());
- types = manager.getDefaultRenderingTypes(block);
- assertEquals("Wrong number of bindings", 1, types.length);
- assertEquals("Wrong binding", "rendering_type_1", types[0].getId());
- IMemoryRenderingType type = manager.getPrimaryRenderingType(block);
- assertEquals("Wrong bindings", manager.getRenderingType("rendering_type_1"), type);
- }
-
- public void testBindingChangeNotification() {
- final boolean[] changed = new boolean[1];
- IMemoryRenderingBindingsListener listener = new IMemoryRenderingBindingsListener() {
- public void memoryRenderingBindingsChanged() {
- changed[0] = true;
- }
- };
- IMemoryRenderingManager manager = DebugUITools.getMemoryRenderingManager();
- try {
- manager.addListener(listener);
- assertFalse("Renderings should not have changed yet", changed[0]);
- DynamicRenderingBindings.setBinding("rendering_type_2");
- assertTrue("Renderings should have changed", changed[0]);
- IMemoryBlock block = new MemoryBlockDynamic();
- IMemoryRenderingType[] types = manager.getRenderingTypes(block);
- assertEquals("Wrong number of bindings", 1, types.length);
- assertEquals("Wrong binding", "rendering_type_2", types[0].getId());
- } finally {
- // restore original bindings
- DynamicRenderingBindings.setBinding("rendering_type_1");
- manager.removeListener(listener);
- }
- }
-
- protected int indexOf(Object thing, Object[] list) {
- for (int i = 0; i < list.length; i++) {
- Object object2 = list[i];
- if (object2.equals(thing)) {
- return i;
- }
- }
- return -1;
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/RenderingTypeDelegate.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/RenderingTypeDelegate.java
deleted file mode 100644
index b4f9a70..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/view/memory/RenderingTypeDelegate.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.view.memory;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.ui.memory.IMemoryRendering;
-import org.eclipse.debug.ui.memory.IMemoryRenderingTypeDelegate;
-
-/**
- * Test memory rendering type delegate.
- *
- * @since 3.1
- */
-public class RenderingTypeDelegate implements IMemoryRenderingTypeDelegate {
-
- /**
- * @see org.eclipse.debug.ui.memory.IMemoryRenderingTypeDelegate#createRendering(java.lang.String)
- */
- public IMemoryRendering createRendering(String id) throws CoreException {
- return null;
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/CheckTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/CheckTests.java
deleted file mode 100644
index 1d0816d..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/CheckTests.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import junit.framework.TestCase;
-
-import org.eclipe.debug.tests.viewer.model.TestModel.TestElement;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Tests which verify the check box support. This test is very similar to the
- * content test except that the extending class should create a viewer with
- * the SWT.CHECK style enabled. <br>
- * Most of the check box verification is performed in the test model.
- *
- * @since 3.6
- */
-abstract public class CheckTests extends TestCase {
- Display fDisplay;
- Shell fShell;
- ITreeModelViewer fViewer;
- TestModelUpdatesListener fListener;
-
- public CheckTests(String name) {
- super(name);
- }
-
- /**
- * @throws java.lang.Exception
- */
- protected void setUp() throws Exception {
- fDisplay = PlatformUI.getWorkbench().getDisplay();
- fShell = new Shell(fDisplay/*, SWT.ON_TOP | SWT.SHELL_TRIM*/);
- fShell.setMaximized(true);
- fShell.setLayout(new FillLayout());
-
- fViewer = createViewer(fDisplay, fShell);
-
- fListener = new TestModelUpdatesListener(false, false);
- fViewer.addViewerUpdateListener(fListener);
- fViewer.addLabelUpdateListener(fListener);
- fViewer.addModelChangedListener(fListener);
-
- fShell.open ();
- }
-
- abstract protected ITreeModelContentProviderTarget createViewer(Display display, Shell shell);
-
- /**
- * @throws java.lang.Exception
- */
- protected void tearDown() throws Exception {
- fViewer.removeLabelUpdateListener(fListener);
- fViewer.removeViewerUpdateListener(fListener);
- fViewer.removeModelChangedListener(fListener);
-
- // Close the shell and exit.
- fShell.close();
- while (!fShell.isDisposed()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- }
-
- public void testSimpleSingleLevel() {
- // Create the model with test data
- TestModel model = TestModel.simpleSingleLevel();
-
- // Make sure that all elements are expanded
- fViewer.setAutoExpandLevel(-1);
-
- // Create the agent which forces the tree to populate
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- // Create the listener which determines when the view is finished updating.
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- // Set the viewer input (and trigger updates).
- fViewer.setInput(model.getRootElement());
-
- // Wait for the updates to complete.
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
- public void testSimpleMultiLevel() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- TestModel model = TestModel.simpleMultiLevel();
- fViewer.setAutoExpandLevel(-1);
-
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- fViewer.setInput(model.getRootElement());
-
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
- // TODO: no idea how to trigger a toggle event on an item
-// public void testCheckReceiver() {
-// // Initial setup
-// TestModel model = TestModel.simpleSingleLevel();
-// fViewer.setAutoExpandLevel(-1);
-// //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-// fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-// fViewer.setInput(model.getRootElement());
-//
-// // Wait for the updates to complete and validate.
-// while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-// model.validateData(fViewer, TreePath.EMPTY);
-//
-// InternalTreeModelViewer treeViewer = ((InternalTreeModelViewer)fViewer);
-// TreePath elementPath = model.findElement("1");
-// TestElement element = model.getElement(elementPath);
-// boolean initialCheckState = element.getChecked();
-// Event event = new Event();
-// event.item = treeViewer.findItem(elementPath);
-// event.detail = SWT.CHECK;
-// event.display = fDisplay;
-// event.type = SWT.Selection;
-// event.widget = treeViewer.getControl();
-// fDisplay.post(event);
-//
-// while (fDisplay.readAndDispatch ());
-//
-// Assert.assertTrue(element.getChecked() != initialCheckState);
-// }
-
- public void testUpdateCheck() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- TestModel model = TestModel.simpleSingleLevel();
- fViewer.setAutoExpandLevel(-1);
-
- // Create the listener
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
-
- // Update the model
- TestElement element = model.getRootElement().getChildren()[0];
-
- TreePath elementPath = new TreePath(new Object[] { element });
- ModelDelta delta = model.setElementChecked(elementPath, false, false);
-
- fListener.reset(elementPath, element, -1, true, false);
- model.postDelta(delta);
- while (!fListener.isFinished(TestModelUpdatesListener.LABEL_COMPLETE | TestModelUpdatesListener.MODEL_CHANGED_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ChildrenUpdateTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ChildrenUpdateTests.java
deleted file mode 100644
index c64c9d1..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ChildrenUpdateTests.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import junit.framework.TestCase;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.viewers.model.ChildrenUpdate;
-import org.eclipse.debug.internal.ui.viewers.model.ILabelUpdateListener;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.TreeModelContentProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelChangedListener;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IStateUpdateListener;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.viewers.ViewerLabel;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Tests coalescing of children update requests.
- *
- * @since 3.3
- */
-public class ChildrenUpdateTests extends TestCase {
-
- class BogusModelContentProvider extends TreeModelContentProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.ModelContentProvider#getViewer()
- */
- protected ITreeModelContentProviderTarget getViewer() {
- return new ITreeModelContentProviderTarget(){
-
- public void setSelection(ISelection selection) {}
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {}
- public void addSelectionChangedListener(ISelectionChangedListener listener) {}
- public void updateViewer(IModelDelta delta) {}
- public void setSelection(ISelection selection, boolean reveal, boolean force) {}
- public void setInput(Object object) {}
- public void setAutoExpandLevel(int level) {}
- public void saveElementState(TreePath path, ModelDelta delta, int flags) {}
- public void removeStateUpdateListener(IStateUpdateListener listener) {}
- public void removeViewerUpdateListener(IViewerUpdateListener listener) {}
- public void removeModelChangedListener(IModelChangedListener listener) {}
- public void removeLabelUpdateListener(ILabelUpdateListener listener) {}
- public void addViewerUpdateListener(IViewerUpdateListener listener) {}
- public void addStateUpdateListener(IStateUpdateListener listener) {}
- public void addModelChangedListener(IModelChangedListener listener) {}
- public void addLabelUpdateListener(ILabelUpdateListener listener) {}
- public void update(Object element) {}
- public void setHasChildren(Object elementOrTreePath, boolean hasChildren) {}
- public void setExpandedState(Object elementOrTreePath, boolean expanded) {}
- public void setChildCount(Object elementOrTreePath, int count) {}
- public void reveal(TreePath path, int index) {}
- public void replace(Object parentOrTreePath, int index, Object element) {}
- public void remove(Object parentOrTreePath, int index) {}
- public void remove(Object elementOrTreePath) {}
- public void refresh() {}
- public void refresh(Object element) {}
-
- public ISelection getSelection() {
- return null;
- }
-
- public IPresentationContext getPresentationContext() {
- return null;
- }
-
- public Object getInput() {
- return null;
- }
-
- public ViewerLabel getElementLabel(TreePath path, String columnId) {
- return null;
- }
-
- public Display getDisplay() {
- return DebugUIPlugin.getStandardDisplay();
- }
-
- public int getAutoExpandLevel() {
- return 0;
- }
-
-
- public boolean overrideSelection(ISelection current, ISelection candidate) {
- return false;
- }
-
- public void insert(Object parentOrTreePath, Object element, int position) {
- }
-
- public TreePath getTopElementPath() {
- return null;
- }
-
- public ViewerFilter[] getFilters() {
- return null;
- }
-
- public boolean getExpandedState(Object elementOrTreePath) {
- return false;
- }
-
- public Object getChildElement(TreePath path, int index) {
- return null;
- }
-
- public boolean getHasChildren(Object elementOrTreePath) {
- return false;
- }
-
- public int getChildCount(TreePath path) {
- return 0;
- }
-
- public int findElementIndex(TreePath parentPath, Object element) {
- return 0;
- }
-
- public void expandToLevel(Object elementOrTreePath, int level) {
- }
-
- public void autoExpand(TreePath elementPath) {
- }
-
- public boolean getElementChildrenRealized(TreePath parentPath) {
- return false;
- }
- };
- }
- }
-
- /**
- * @param name
- */
- public ChildrenUpdateTests(String name) {
- super(name);
- }
-
- protected TreeModelContentProvider getContentProvider() {
- return new BogusModelContentProvider();
- }
-
- /**
- * Tests coalescing of requests
- */
- public void testCoalesce () {
- Object element = new Object();
- TreeModelContentProvider cp = getContentProvider();
- ChildrenUpdate update1 = new ChildrenUpdate(cp, element, TreePath.EMPTY, element, 1, null, null);
- ChildrenUpdate update2 = new ChildrenUpdate(cp, element, TreePath.EMPTY, element, 2, null, null);
- assertTrue("Should coalesce", update1.coalesce(update2));
- assertEquals("Wrong offset", 1, update1.getOffset());
- assertEquals("Wrong length", 2, update1.getLength());
-
- update2 = new ChildrenUpdate(cp, element, TreePath.EMPTY, element, 3, null, null);
- assertTrue("Should coalesce", update1.coalesce(update2));
- assertEquals("Wrong offset", 1, update1.getOffset());
- assertEquals("Wrong length", 3, update1.getLength());
-
- update2 = new ChildrenUpdate(cp, element, TreePath.EMPTY, element, 2, null, null);
- assertTrue("Should coalesce", update1.coalesce(update2));
- assertEquals("Wrong offset", 1, update1.getOffset());
- assertEquals("Wrong length", 3, update1.getLength());
-
- update2 = new ChildrenUpdate(cp, element, TreePath.EMPTY, element, 5, null, null);
- assertFalse("Should not coalesce", update1.coalesce(update2));
- assertEquals("Wrong offset", 1, update1.getOffset());
- assertEquals("Wrong length", 3, update1.getLength());
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ContentTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ContentTests.java
deleted file mode 100644
index 559940e..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ContentTests.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import junit.framework.TestCase;
-
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Tests that verify that the viewer property retrieves all the content
- * from the model.
- *
- * @since 3.6
- */
-abstract public class ContentTests extends TestCase {
-
- Display fDisplay;
- Shell fShell;
- ITreeModelViewer fViewer;
- TestModelUpdatesListener fListener;
-
- public ContentTests(String name) {
- super(name);
- }
-
- /**
- * @throws java.lang.Exception
- */
- protected void setUp() throws Exception {
- fDisplay = PlatformUI.getWorkbench().getDisplay();
- fShell = new Shell(fDisplay/*, SWT.ON_TOP | SWT.SHELL_TRIM*/);
- fShell.setMaximized(true);
- fShell.setLayout(new FillLayout());
-
- fViewer = createViewer(fDisplay, fShell);
-
- fListener = new TestModelUpdatesListener(false, false);
- fViewer.addViewerUpdateListener(fListener);
- fViewer.addLabelUpdateListener(fListener);
- fViewer.addModelChangedListener(fListener);
-
- fShell.open ();
- }
-
- abstract protected ITreeModelContentProviderTarget createViewer(Display display, Shell shell);
-
- /**
- * @throws java.lang.Exception
- */
- protected void tearDown() throws Exception {
- fViewer.removeLabelUpdateListener(fListener);
- fViewer.removeViewerUpdateListener(fListener);
- fViewer.removeModelChangedListener(fListener);
-
- // Close the shell and exit.
- fShell.close();
- while (!fShell.isDisposed()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- }
-
- public void testSimpleSingleLevel() {
- // Create the model with test data
- TestModel model = TestModel.simpleSingleLevel();
-
- // Make sure that all elements are expanded
- fViewer.setAutoExpandLevel(-1);
-
- // Create the agent which forces the tree to populate
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- // Create the listener which determines when the view is finished updating.
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- // Set the viewer input (and trigger updates).
- fViewer.setInput(model.getRootElement());
-
- // Wait for the updates to complete.
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
- public void testSimpleMultiLevel() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- TestModel model = TestModel.simpleMultiLevel();
- fViewer.setAutoExpandLevel(-1);
-
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- fViewer.setInput(model.getRootElement());
-
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/DeltaTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/DeltaTests.java
deleted file mode 100644
index 5f68862..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/DeltaTests.java
+++ /dev/null
@@ -1,572 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import java.util.Arrays;
-import java.util.List;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipe.debug.tests.viewer.model.TestModel.TestElement;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ITreeSelection;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Tests to verify that the viewer property retrieves and processes the
- * model deltas generated by the test model.
- */
-abstract public class DeltaTests extends TestCase {
- Display fDisplay;
- Shell fShell;
- ITreeModelViewer fViewer;
- TestModelUpdatesListener fListener;
-
- public DeltaTests(String name) {
- super(name);
- }
-
- /**
- * @throws java.lang.Exception
- */
- protected void setUp() throws Exception {
- fDisplay = PlatformUI.getWorkbench().getDisplay();
- fShell = new Shell(fDisplay/*, SWT.ON_TOP | SWT.SHELL_TRIM*/);
- fShell.setMaximized(true);
- fShell.setLayout(new FillLayout());
-
- fViewer = createViewer(fDisplay, fShell);
-
- fListener = new TestModelUpdatesListener(false, false);
- fViewer.addViewerUpdateListener(fListener);
- fViewer.addLabelUpdateListener(fListener);
- fViewer.addModelChangedListener(fListener);
-
- fShell.open ();
- }
-
- abstract protected ITreeModelContentProviderTarget createViewer(Display display, Shell shell);
-
- /**
- * @throws java.lang.Exception
- */
- protected void tearDown() throws Exception {
- fViewer.removeLabelUpdateListener(fListener);
- fViewer.removeViewerUpdateListener(fListener);
- fViewer.removeModelChangedListener(fListener);
-
- // Close the shell and exit.
- fShell.close();
- while (!fShell.isDisposed()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- }
-
- public void testUpdateLabel() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- TestModel model = TestModel.simpleSingleLevel();
- fViewer.setAutoExpandLevel(-1);
-
- // Create the listener
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
-
- // Update the model
- TestElement element = model.getRootElement().getChildren()[0];
- TreePath elementPath = new TreePath(new Object[] { element });
- ModelDelta delta = model.appendElementLabel(elementPath, "-modified");
-
- fListener.reset(elementPath, element, -1, true, false);
- model.postDelta(delta);
- while (!fListener.isFinished(TestModelUpdatesListener.LABEL_COMPLETE | TestModelUpdatesListener.MODEL_CHANGED_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
- public void testRefreshStruct() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- TestModel model = TestModel.simpleSingleLevel();
- fViewer.setAutoExpandLevel(-1);
-
- // Create the listener
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
-
- // Update the model
- TestElement element = model.getRootElement().getChildren()[0];
- TreePath elementPath = new TreePath(new Object[] { element });
- TestElement[] newChildren = new TestElement[] {
- new TestElement(model, "1.1 - new", new TestElement[0]),
- new TestElement(model, "1.2 - new", new TestElement[0]),
- new TestElement(model, "1.3 - new", new TestElement[0]),
- };
- ModelDelta delta = model.setElementChildren(elementPath, newChildren);
-
- fListener.reset(elementPath, element, -1, true, false);
- model.postDelta(delta);
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
- public void testRefreshStruct2() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- TestModel model = TestModel.simpleMultiLevel();
- fViewer.setAutoExpandLevel(-1);
-
- // Create the listener
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
-
- String prefix = "new - ";
- model.setElementChildren(TreePath.EMPTY, new TestElement[] {
- new TestElement(model, prefix + "1", new TestElement[0]),
- new TestElement(model, prefix + "2", true, false, new TestElement[] {
- new TestElement(model, prefix + "2.1", true, true, new TestElement[0]),
- new TestElement(model, prefix + "2.2", false, true, new TestElement[0]),
- new TestElement(model, prefix + "2.3", true, false, new TestElement[0]),
- }),
- new TestElement(model, prefix + "3", new TestElement[] {
- new TestElement(model, prefix + "3.1", new TestElement[] {
- new TestElement(model, prefix + "3.1.1", new TestElement[0]),
- new TestElement(model, prefix + "3.1.2", new TestElement[0]),
- new TestElement(model, prefix + "3.1.3", new TestElement[0]),
- }),
- new TestElement(model, prefix + "3.2", new TestElement[] {
- new TestElement(model, prefix + "3.2.1", new TestElement[0]),
- new TestElement(model, prefix + "3.2.2", new TestElement[0]),
- new TestElement(model, prefix + "3.2.3", new TestElement[0]),
- }),
- new TestElement(model, prefix + "3.3", new TestElement[] {
- new TestElement(model, prefix + "3.3.1", new TestElement[0]),
- new TestElement(model, prefix + "3.3.2", new TestElement[0]),
- new TestElement(model, prefix + "3.3.3", new TestElement[0]),
- }),
- })
- });
-
- TestElement element = model.getRootElement();
- fListener.reset(TreePath.EMPTY, element, -1, false, false);
-
- model.postDelta(new ModelDelta(element, IModelDelta.CONTENT));
- while (!fListener.isFinished(TestModelUpdatesListener.ALL_UPDATES_COMPLETE | TestModelUpdatesListener.MODEL_CHANGED_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
- public void testInsert() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- TestModel model = TestModel.simpleSingleLevel();
- fViewer.setAutoExpandLevel(-1);
-
- // Create the listener
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
-
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
-
- // Update the model
- TestElement element = new TestElement(model, "7", new TestElement[0]);
- TreePath elementPath = new TreePath(new Object[] { element });
- ModelDelta delta = model.insertElementChild(TreePath.EMPTY, 6, element);
-
- // Insert causes the update of element's data, label and children.
- // TODO: update of element's data after insert seems redundant
- // but it's probably not a big inefficiency
- fListener.reset();
- fListener.addChildreUpdate(TreePath.EMPTY, 6);
- fListener.addHasChildrenUpdate(elementPath);
- fListener.addLabelUpdate(elementPath);
- // TODO: redundant label updates on insert!
- fListener.setFailOnRedundantUpdates(false);
- model.postDelta(delta);
- while (!fListener.isFinished(TestModelUpdatesListener.ALL_UPDATES_COMPLETE | TestModelUpdatesListener.MODEL_CHANGED_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
- /**
- * This test checks that insert and select delta flags are processed in correct order:
- * insert then select.
- */
- public void testInsertAndSelect() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- TestModel model = TestModel.simpleSingleLevel();
- fViewer.setAutoExpandLevel(-1);
-
- // Create the listener
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
-
- while (!fListener.isFinished())
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep();
-
- model.validateData(fViewer, TreePath.EMPTY);
-
- // Update the model
- // Insert two new elements at once
- TestElement element0 = new TestElement(model, "00", new TestElement[] {});
- TestElement element1 = new TestElement(model, "01", new TestElement[] {});
- TreePath elementPath0 = new TreePath(new Object[] { element0 });
- TreePath elementPath1 = new TreePath(new Object[] { element1 });
- ModelDelta rootDelta = model.insertElementChild(TreePath.EMPTY, 0, element0);
- rootDelta = model.insertElementChild(rootDelta, TreePath.EMPTY, 1, element1);
-
- // Set the select flag on the first added node.
- ModelDelta delta0 = rootDelta.getChildDelta(element0);
- delta0.setFlags(delta0.getFlags() | IModelDelta.SELECT);
-
- fListener.reset();
- fListener.addHasChildrenUpdate(elementPath0);
- fListener.addHasChildrenUpdate(elementPath1);
- fListener.addLabelUpdate(elementPath0);
- fListener.addLabelUpdate(elementPath1);
-
- // TODO: list full set of expected updates.
- fListener.setFailOnRedundantUpdates(false);
-
- model.postDelta(rootDelta);
- while (!fListener.isFinished())
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
- /**
- * This test checks that insert and remove deltas are processed in correct order:
- * remove deltas are processed first then insert deltas.
- */
- public void testInsertAndRemove() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- TestModel model = TestModel.simpleSingleLevel();
- fViewer.setAutoExpandLevel(-1);
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
- fViewer.setInput(model.getRootElement());
-
- while (!fListener.isFinished())
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep();
-
- model.validateData(fViewer, TreePath.EMPTY);
-
- // Update the model
- // Remove one element then insert a new one
- IModelDelta removeDelta = model.removeElementChild(TreePath.EMPTY, 3).getChildDeltas()[0];
-
- // Insert new elements at once
- TestElement element = new TestElement(model, "00", new TestElement[] {});
- TreePath elementPath = new TreePath(new Object[] { element });
- IModelDelta insertDelta = model.insertElementChild(TreePath.EMPTY, 1, element).getChildDeltas()[0];
-
- // Create a combined delta where the insert child delta is first and the remove child delta is second.
- ModelDelta combinedDelta = new ModelDelta(model.getRootElement(), IModelDelta.NO_CHANGE, 0, model.getRootElement().getChildren().length);
- combinedDelta.addNode(insertDelta.getElement(), insertDelta.getIndex(), insertDelta.getFlags(), insertDelta.getChildCount());
- combinedDelta.addNode(removeDelta.getElement(), removeDelta.getIndex(), removeDelta.getFlags(), removeDelta.getChildCount());
-
- // Set the select flag on the first added node.
- fListener.reset();
- fListener.addHasChildrenUpdate(elementPath);
- fListener.addLabelUpdate(elementPath);
-
- // TODO: list full set of expected updates.
- fListener.setFailOnRedundantUpdates(false);
-
- model.postDelta(combinedDelta);
- while (!fListener.isFinished(TestModelUpdatesListener.ALL_UPDATES_COMPLETE | TestModelUpdatesListener.MODEL_CHANGED_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
-
- public void testAddElement() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- TestModel model = TestModel.simpleSingleLevel();
- fViewer.setAutoExpandLevel(-1);
-
- // Create the listener
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
-
- // Update the model
- TestElement element = new TestElement(model, "7", new TestElement[0]);
- TreePath elementPath = new TreePath(new Object[] { element });
- ModelDelta delta = model.addElementChild(TreePath.EMPTY, 6, element);
-
- // Add causes the update of parent child count and element's children.
- fListener.reset(elementPath, element, -1, true, false);
- fListener.addChildreUpdate(TreePath.EMPTY, 6);
- // TODO: redundant updates on add!
- fListener.setFailOnRedundantUpdates(false);
- model.postDelta(delta);
- while (!fListener.isFinished(TestModelUpdatesListener.ALL_UPDATES_COMPLETE | TestModelUpdatesListener.MODEL_CHANGED_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
-
- public void testRemove() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- TestModel model = TestModel.simpleSingleLevel();
- fViewer.setAutoExpandLevel(-1);
-
- // Create the listener
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
-
- // Update the model
- ModelDelta delta = model.removeElementChild(TreePath.EMPTY, 5);
-
- // Remove delta should generate no new updates, but we still need to wait for the event to
- // be processed.
- fListener.reset();
- model.postDelta(delta);
- while (!fListener.isFinished(TestModelUpdatesListener.MODEL_CHANGED_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
- public void testExpandAndSelect() {
- TestModel model = TestModel.simpleMultiLevel();
-
- // Create the listener
- fListener.reset(TreePath.EMPTY, model.getRootElement(), 1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY, true);
-
- // Create the delta
- fListener.reset();
- // TODO Investigate: there seem to be unnecessary updates being issued
- // by the viewer. These include the updates that are commented out:
- // For now disable checking for extra updates.
- fListener.setFailOnRedundantUpdates(false);
- TestElement element = model.getRootElement();
- TreePath path_root = TreePath.EMPTY;
- ModelDelta delta= new ModelDelta(model.getRootElement(), -1, IModelDelta.EXPAND, element.getChildren().length);
- ModelDelta deltaRoot = delta;
- element = element.getChildren()[2];
- TreePath path_root_3 = path_root.createChildPath(element);
- delta = delta.addNode(element, 2, IModelDelta.EXPAND, element.fChildren.length);
- fListener.addChildreUpdate(path_root_3, 0);
- TreePath path_root_3_1 = path_root_3.createChildPath(element.getChildren()[0]);
- fListener.addHasChildrenUpdate(path_root_3_1);
- fListener.addLabelUpdate(path_root_3_1);
- TreePath path_root_3_3 = path_root_3.createChildPath(element.getChildren()[2]);
- fListener.addHasChildrenUpdate(path_root_3_3);
- fListener.addLabelUpdate(path_root_3_3);
- //TODO unnecessary update: fListener.addChildreUpdate(path1, 1);
- fListener.addChildreUpdate(path_root_3, 2);
- element = element.getChildren()[1];
- TreePath path_root_3_2 = path_root_3.createChildPath(element);
- delta = delta.addNode(element, 1, IModelDelta.EXPAND, element.fChildren.length);
- fListener.addLabelUpdate(path_root_3_2);
- TreePath path_root_3_2_1 = path_root_3_2.createChildPath(element.getChildren()[0]);
- fListener.addHasChildrenUpdate(path_root_3_2_1);
- fListener.addLabelUpdate(path_root_3_2_1);
- TreePath path_root_3_2_3 = path_root_3_2.createChildPath(element.getChildren()[2]);
- fListener.addHasChildrenUpdate(path_root_3_2_3);
- fListener.addLabelUpdate(path_root_3_2_3);
- // TODO unnecessary update: fListener.addChildreCountUpdate(path2);
- fListener.addChildreUpdate(path_root_3_2, 0);
- // TODO unnecessary update: fListener.addChildreUpdate(path2, 1);
- fListener.addChildreUpdate(path_root_3_2, 2);
- element = element.getChildren()[1];
- TreePath path_root_3_2_2 = path_root_3_2.createChildPath(element);
- delta = delta.addNode(element, 1, IModelDelta.SELECT, element.fChildren.length);
- fListener.addLabelUpdate(path_root_3_2_2);
- fListener.addHasChildrenUpdate(path_root_3_2_2);
-
- // Validate the expansion state BEFORE posting the delta.
-
- ITreeModelContentProviderTarget contentProviderViewer = (ITreeModelContentProviderTarget)fViewer;
- Assert.assertFalse(contentProviderViewer.getExpandedState(path_root_3));
- Assert.assertFalse(contentProviderViewer.getExpandedState(path_root_3_2));
- Assert.assertFalse(contentProviderViewer.getExpandedState(path_root_3_2_2));
-
- model.postDelta(deltaRoot);
- while (!fListener.isFinished(TestModelUpdatesListener.ALL_UPDATES_COMPLETE | TestModelUpdatesListener.MODEL_CHANGED_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY, true);
-
- // Validate the expansion state AFTER posting the delta.
- Assert.assertTrue(contentProviderViewer.getExpandedState(path_root_3));
- Assert.assertTrue(contentProviderViewer.getExpandedState(path_root_3_2));
- Assert.assertFalse(contentProviderViewer.getExpandedState(path_root_3_2_2));
-
- // Verify selection
- ISelection selection = fViewer.getSelection();
- if (selection instanceof ITreeSelection) {
- List selectionPathsList = Arrays.asList( ((ITreeSelection)selection).getPaths() );
- Assert.assertTrue(selectionPathsList.contains(path_root_3_2_2));
- } else {
- Assert.fail("Not a tree selection");
- }
- }
-
- public void testCompositeModelRefreshStruct() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- TestModel model = TestModel.compositeMultiLevel();
- fViewer.setAutoExpandLevel(-1);
-
- // Create the listener
- // TODO: redundant updates on install deltas
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, false, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY, true);
-
- // Update the model
- TreePath m4_2_1Path = model.findElement("m4.2.1");
- TestElement m4_2_1 = model.getElement(m4_2_1Path);
- TestModel m4 = m4_2_1.getModel();
- TestElement[] newChildren = new TestElement[] {
- new TestElement(m4, "4.2.1.new-1", new TestElement[0]),
- new TestElement(m4, "4.2.1.new-2", new TestElement[0]),
- new TestElement(m4, "4.2.1.new-3", new TestElement[0]),
- };
-
- ModelDelta delta = m4.setElementChildren(m4_2_1Path, newChildren);
-
- fListener.reset(m4_2_1Path, m4_2_1, -1, true, false);
- model.postDelta(delta);
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
- public void testCompositeModelAddElement() {
- TestModel model = TestModel.compositeMultiLevel();
- fViewer.setAutoExpandLevel(-1);
-
- // Create the listener
- // TODO: redundant updates on install deltas
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, false, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY, true);
-
- TreePath m3_1Path = model.findElement("m3.1");
- TestElement m3_1 = model.getElement(m3_1Path);
- TestModel m3 = m3_1.getModel();
- TestElement m3_1_new = new TestElement(m3, "m3.1-new", new TestElement[0]);
- TreePath m3_1_newPath = m3_1Path.createChildPath(m3_1_new);
- ModelDelta delta = m3.addElementChild(m3_1Path, 0, m3_1_new);
-
- fListener.reset(m3_1_newPath, m3_1_new, -1, true, false);
- fListener.addChildreUpdate(m3_1Path, 0);
- fListener.setFailOnRedundantUpdates(false);
-
- m3.postDelta(delta);
- while (!fListener.isFinished(TestModelUpdatesListener.ALL_UPDATES_COMPLETE | TestModelUpdatesListener.MODEL_CHANGED_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
- public void testBug292322() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
- TestModel model = TestModel.simpleMultiLevel();
- fListener.reset(TreePath.EMPTY, model.getRootElement(), 1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY, true);
-
- // Update the model: remove one child of an un-expanded element, then
- // make sure that the number of children is correct.
- TreePath parentPath = model.findElement("2");
- TestElement parentElement = model.getElement(parentPath);
- ModelDelta delta = model.removeElementChild(parentPath, 0);
-
- // Update the viewer
- fListener.reset(parentPath, parentElement, 0, false, false);
- //fListener.addChildreCountUpdate(parentPath);
- model.postDelta(delta);
- while (!fListener.isFinished(TestModelUpdatesListener.MODEL_CHANGED_COMPLETE | TestModelUpdatesListener.CONTENT_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- // Validate the viewer data.
- model.validateData(fViewer, TreePath.EMPTY, true);
-
- // Update the model: remove the remaining children and make sure that
- // the element children are updated to false.
- model.removeElementChild(parentPath, 0);
-
- // Update the viewer
- fListener.reset(parentPath, parentElement, 0, false, false);
- model.postDelta(delta);
- while (!fListener.isFinished(TestModelUpdatesListener.MODEL_CHANGED_COMPLETE | TestModelUpdatesListener.CONTENT_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- // Validate the viewer data.
- model.validateData(fViewer, TreePath.EMPTY, true);
-
- // Update the model: remove the remaining children and make sure that
- // the element children are updated to false.
- model.removeElementChild(parentPath, 0);
-
- // Update the viewer
- fListener.reset(parentPath, parentElement, 0, false, false);
- model.postDelta(delta);
- while (!fListener.isFinished(TestModelUpdatesListener.MODEL_CHANGED_COMPLETE | TestModelUpdatesListener.CONTENT_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- // Validate the viewer data.
- model.validateData(fViewer, TreePath.EMPTY, true);
- }
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/FilterTransformTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/FilterTransformTests.java
deleted file mode 100644
index 67b65d1..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/FilterTransformTests.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import junit.framework.TestCase;
-
-import org.eclipse.debug.internal.ui.viewers.model.FilterTransform;
-import org.eclipse.jface.viewers.TreePath;
-
-/**
- * Tests the virtual viewer's filter transform
- * @since 3.3
- */
-public class FilterTransformTests extends TestCase {
-
- public Object root;
- public Object element0;
- public Object element1;
- public Object element2;
- public Object element3;
- public Object element4;
- public Object element5;
- public Object element6;
- public Object element7;
-
- public FilterTransform transform;
-
- /**
- * @param name
- */
- public FilterTransformTests(String name) {
- super(name);
- }
-
- /**
- * Builds a filter transform. Model has 8 elements,
- * and elements 0, 2, 3, 6, 7 are filtered. Elements
- * 1, 4, 5 are visible.
- */
- protected void setUp() throws Exception {
- super.setUp();
- transform = new FilterTransform();
- root = new Object();
- element0 = new Object();
- element1 = new Object();
- element2 = new Object();
- element3 = new Object();
- element4 = new Object();
- element5 = new Object();
- element6 = new Object();
- element7 = new Object();
- assertTrue(transform.addFilteredIndex(TreePath.EMPTY, 0, element0));
- assertTrue(transform.addFilteredIndex(TreePath.EMPTY, 2, element2));
- assertTrue(transform.addFilteredIndex(TreePath.EMPTY, 3, element3));
- assertTrue(transform.addFilteredIndex(TreePath.EMPTY, 6, element6));
- assertTrue(transform.addFilteredIndex(TreePath.EMPTY, 7, element7));
- }
-
- protected boolean equals(int[] a, int[] b) {
- if (a.length == b.length) {
- for (int i = 0; i < b.length; i++) {
- if (a[i] != b[i]) {
- return false;
- }
- }
- return true;
- }
- return false;
- }
-
- public void testRemoveMiddleElementFromFilters() {
- assertTrue("Element should be filtered", transform.isFiltered(TreePath.EMPTY, 3));
- transform.removeElementFromFilters(TreePath.EMPTY, element3);
- assertFalse("Element should be unfiltered", transform.isFiltered(TreePath.EMPTY, 3));
- assertTrue("Wrong filter state", equals(transform.getFilteredChildren(TreePath.EMPTY), new int[]{0, 2, 5, 6}));
- }
-
- public void testRemoveFirstElementFromFilters() {
- assertTrue("Element should be filtered", transform.isFiltered(TreePath.EMPTY, 0));
- transform.removeElementFromFilters(TreePath.EMPTY, element0);
- assertFalse("Element should be unfiltered", transform.isFiltered(TreePath.EMPTY, 0));
- assertTrue("Wrong filter state", equals(transform.getFilteredChildren(TreePath.EMPTY), new int[]{1, 2, 5, 6}));
- }
-
- public void testRemoveLastFromFilters() {
- assertTrue("Element should be filtered", transform.isFiltered(TreePath.EMPTY, 7));
- transform.removeElementFromFilters(TreePath.EMPTY, element7);
- assertFalse("Element should be unfiltered", transform.isFiltered(TreePath.EMPTY, 7));
- assertTrue("Wrong filter state", equals(transform.getFilteredChildren(TreePath.EMPTY), new int[]{0, 2, 3, 6}));
- }
-
- public void testClearMiddleElementFromFilters() {
- assertTrue("Element should be filtered", transform.isFiltered(TreePath.EMPTY, 3));
- transform.clear(TreePath.EMPTY, 3);
- assertFalse("Element should be unfiltered", transform.isFiltered(TreePath.EMPTY, 3));
- assertTrue("Wrong filter state", equals(transform.getFilteredChildren(TreePath.EMPTY), new int[]{0, 2, 6, 7}));
- }
-
- public void testClearFirstElementFromFilters() {
- assertTrue("Element should be filtered", transform.isFiltered(TreePath.EMPTY, 0));
- transform.clear(TreePath.EMPTY, 0);
- assertFalse("Element should be unfiltered", transform.isFiltered(TreePath.EMPTY, 0));
- assertTrue("Wrong filter state", equals(transform.getFilteredChildren(TreePath.EMPTY), new int[]{2, 3, 6, 7}));
- }
-
- public void testClearLastFromFilters() {
- assertTrue("Element should be filtered", transform.isFiltered(TreePath.EMPTY, 7));
- transform.clear(TreePath.EMPTY, 7);
- assertFalse("Element should be unfiltered", transform.isFiltered(TreePath.EMPTY, 7));
- assertTrue("Wrong filter state", equals(transform.getFilteredChildren(TreePath.EMPTY), new int[]{0, 2, 3, 6}));
- }
-
- public void testViewToModelCount() {
- assertEquals("Wrong model count", 8, transform.viewToModelCount(TreePath.EMPTY, 3));
- }
-
- public void testViewToModelIndex() {
- assertEquals("Wrong model index", 1, transform.viewToModelIndex(TreePath.EMPTY, 0));
- assertEquals("Wrong model index", 4, transform.viewToModelIndex(TreePath.EMPTY, 1));
- assertEquals("Wrong model index", 5, transform.viewToModelIndex(TreePath.EMPTY, 2));
- }
-
- public void testAddAlreadyFiltered() {
- assertTrue("Element should be filtered", transform.isFiltered(TreePath.EMPTY, 0));
- boolean added = transform.addFilteredIndex(TreePath.EMPTY, 0, element0);
- assertFalse("Filter should not be added - should already have been there", added);
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ITestModelUpdatesListenerConstants.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ITestModelUpdatesListenerConstants.java
deleted file mode 100644
index 10aa25c..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/ITestModelUpdatesListenerConstants.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-/**
- * Convenience interface with constants used by the test model update listener.
- *
- * @since 3.6
- */
-public interface ITestModelUpdatesListenerConstants {
-
- public static final int LABEL_UPDATES_COMPLETE = 0X0001;
- public static final int CONTENT_UPDATES_COMPLETE = 0X0002;
- public static final int LABEL_UPDATES = 0X0004;
- public static final int HAS_CHILDREN_UPDATES = 0X0008;
- public static final int CHILDREN_COUNT_UPDATES = 0X0010;
- public static final int CHILDREN_UPDATES = 0X0020;
- public static final int MODEL_CHANGED_COMPLETE = 0X0040;
- public static final int MODEL_PROXIES_INSTALLED = 0X0080;
- public static final int STATE_SAVE_COMPLETE = 0X0100;
- public static final int STATE_RESTORE_COMPLETE = 0X0200;
- public static final int STATE_UPDATES = 0X0400;
-
- public static final int VIEWER_UPDATES_RUNNING = 0X0800;
- public static final int LABEL_UPDATES_RUNNING = 0X1000;
-
- public static final int LABEL_COMPLETE = LABEL_UPDATES_COMPLETE | LABEL_UPDATES;
- public static final int CONTENT_COMPLETE =
- CONTENT_UPDATES_COMPLETE | HAS_CHILDREN_UPDATES | CHILDREN_COUNT_UPDATES | CHILDREN_UPDATES;
-
- public static final int ALL_UPDATES_COMPLETE = LABEL_COMPLETE | CONTENT_COMPLETE | MODEL_PROXIES_INSTALLED | LABEL_UPDATES_RUNNING | VIEWER_UPDATES_RUNNING;
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerCheckTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerCheckTests.java
deleted file mode 100644
index 7cb15a0..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerCheckTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.6
- */
-public class JFaceViewerCheckTests extends CheckTests {
-
- public JFaceViewerCheckTests(String name) {
- super(name);
- }
-
- protected ITreeModelContentProviderTarget createViewer(Display display, Shell shell) {
- return new TreeModelViewer(fShell, SWT.VIRTUAL | SWT.CHECK, new PresentationContext("TestViewer"));
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerContentTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerContentTests.java
deleted file mode 100644
index 10213a3..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerContentTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.6
- */
-public class JFaceViewerContentTests extends ContentTests {
-
- public JFaceViewerContentTests(String name) {
- super(name);
- }
-
- protected ITreeModelContentProviderTarget createViewer(Display display, Shell shell) {
- return new TreeModelViewer(fShell, SWT.VIRTUAL, new PresentationContext("TestViewer"));
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerDeltaTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerDeltaTests.java
deleted file mode 100644
index ed613bd..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerDeltaTests.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.6
- */
-public class JFaceViewerDeltaTests extends DeltaTests {
-
- public JFaceViewerDeltaTests(String name) {
- super(name);
- }
-
- protected ITreeModelContentProviderTarget createViewer(Display display, Shell shell) {
- return new TreeModelViewer(fShell, SWT.VIRTUAL, new PresentationContext("TestViewer"));
- }
-
- /**
- * TODO: remove this method when bug 292322 gets fixed in TreeViewer
- */
- public void testBug292322() {
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerPerformanceTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerPerformanceTests.java
deleted file mode 100644
index 865db95..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerPerformanceTests.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.6
- */
-public class JFaceViewerPerformanceTests extends PerformanceTests {
-
- public JFaceViewerPerformanceTests(String name) {
- super(name);
- }
-
- protected ITreeModelContentProviderTarget createViewer(Display display, Shell shell) {
- return new TreeModelViewer(fShell, SWT.VIRTUAL, new PresentationContext("TestViewer"));
- }
-
- protected int getTestModelDepth() {
- return 5;
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerSelectionTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerSelectionTests.java
deleted file mode 100644
index 6cde1fb..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerSelectionTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.6
- */
-public class JFaceViewerSelectionTests extends SelectionTests {
-
- public JFaceViewerSelectionTests(String name) {
- super(name);
- }
-
- protected ITreeModelViewer createViewer(Display display, Shell shell) {
- return new TreeModelViewer(fShell, SWT.VIRTUAL, new PresentationContext("TestViewer"));
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerStateTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerStateTests.java
deleted file mode 100644
index a462f01..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerStateTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.6
- */
-public class JFaceViewerStateTests extends StateTests {
-
- public JFaceViewerStateTests(String name) {
- super(name);
- }
-
- protected ITreeModelViewer createViewer(Display display, Shell shell) {
- return new TreeModelViewer(fShell, SWT.VIRTUAL, new PresentationContext("TestViewer"));
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerUpdateTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerUpdateTests.java
deleted file mode 100644
index 983b8d7..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/JFaceViewerUpdateTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.6
- */
-public class JFaceViewerUpdateTests extends UpdateTests {
-
- public JFaceViewerUpdateTests(String name) {
- super(name);
- }
-
- protected ITreeModelViewer createViewer(Display display, Shell shell) {
- return new TreeModelViewer(fShell, SWT.VIRTUAL, new PresentationContext("TestViewer"));
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PerformanceTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PerformanceTests.java
deleted file mode 100644
index f4c0786..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PerformanceTests.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import junit.framework.TestCase;
-
-import org.eclipe.debug.tests.viewer.model.TestModel.TestElement;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.test.performance.Performance;
-import org.eclipse.test.performance.PerformanceMeter;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Tests to measure the performance of the viewer updates.
- */
-abstract public class PerformanceTests extends TestCase implements ITestModelUpdatesListenerConstants {
- Display fDisplay;
- Shell fShell;
- ITreeModelViewer fViewer;
- TestModelUpdatesListener fListener;
-
- public PerformanceTests(String name) {
- super(name);
- }
-
- /**
- * @throws java.lang.Exception
- */
- protected void setUp() throws Exception {
- fDisplay = PlatformUI.getWorkbench().getDisplay();
- fShell = new Shell(fDisplay/*, SWT.ON_TOP | SWT.SHELL_TRIM*/);
- fShell.setMaximized(true);
- fShell.setLayout(new FillLayout());
-
- fViewer = createViewer(fDisplay, fShell);
-
- fListener = new TestModelUpdatesListener(false, false);
- fViewer.addViewerUpdateListener(fListener);
- fViewer.addLabelUpdateListener(fListener);
- fViewer.addModelChangedListener(fListener);
-
- fShell.open ();
- }
-
- abstract protected ITreeModelContentProviderTarget createViewer(Display display, Shell shell);
-
- /**
- * @throws java.lang.Exception
- */
- protected void tearDown() throws Exception {
- fViewer.removeLabelUpdateListener(fListener);
- fViewer.removeViewerUpdateListener(fListener);
- fViewer.removeModelChangedListener(fListener);
-
- // Close the shell and exit.
- fShell.close();
- while (!fShell.isDisposed()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- }
-
- /**
- * Depth (size) of the test model to be used in the tests. This number allows
- * the jface based tests to use a small enough model to fit on the screen, and
- * for the virtual viewer to exercise the content provider to a greater extent.
- */
- abstract protected int getTestModelDepth();
-
- public void testRefreshStruct() {
- TestModel model = new TestModel();
- model.setRoot( new TestElement(model, "root", new TestElement[0] ) );
- model.setElementChildren(TreePath.EMPTY, makeModelElements(model, getTestModelDepth(), "model"));
-
- fViewer.setAutoExpandLevel(-1);
-
- // Create the listener
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
-
- Performance perf = Performance.getDefault();
- PerformanceMeter meter = perf.createPerformanceMeter(perf.getDefaultScenarioId(this));
- try {
- for (int i = 0; i < 100; i++) {
- // Update the model
- model.setAllAppendix(" - pass " + i);
- //model.setElementChildren(TreePath.EMPTY, makeModelElements(model, getTestModelDepth(), "pass " + i));
-
- TestElement element = model.getRootElement();
- fListener.reset(TreePath.EMPTY, element, -1, false, false);
-
- meter.start();
- model.postDelta(new ModelDelta(element, IModelDelta.CONTENT));
- while (!fListener.isFinished(ALL_UPDATES_COMPLETE | MODEL_CHANGED_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
- meter.stop();
- System.gc();
- }
-
- meter.commit();
- perf.assertPerformance(meter);
- } finally {
- meter.dispose();
- }
- }
-
- public void testRefreshStructReplaceElements() {
- TestModel model = new TestModel();
- model.setRoot( new TestElement(model, "root", new TestElement[0] ) );
- model.setElementChildren(TreePath.EMPTY, makeModelElements(model, getTestModelDepth(), "model"));
-
- fViewer.setAutoExpandLevel(-1);
-
- // Create the listener
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
-
- Performance perf = Performance.getDefault();
- PerformanceMeter meter = perf.createPerformanceMeter(perf.getDefaultScenarioId(this));
- try {
- for (int i = 0; i < 2000; i++) {
- // Update the model
- model.setElementChildren(TreePath.EMPTY, makeModelElements(model, getTestModelDepth(), "pass " + i));
-
- TestElement element = model.getRootElement();
- fListener.reset(TreePath.EMPTY, element, -1, false, false);
-
- meter.start();
- model.postDelta(new ModelDelta(element, IModelDelta.CONTENT));
- while (!fListener.isFinished(ALL_UPDATES_COMPLETE | MODEL_CHANGED_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
- meter.stop();
- System.gc();
- }
-
- meter.commit();
- perf.assertPerformance(meter);
- } finally {
- meter.dispose();
- }
- }
-
- private TestElement[] makeModelElements(TestModel model, int depth, String prefix) {
- TestElement[] elements = new TestElement[depth];
- for (int i = 0; i < depth; i++) {
- String name = prefix + "." + i;
- elements[i] = new TestElement(model, name, makeModelElements(model, i, name));
- }
- return elements;
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PresentationContextTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PresentationContextTests.java
deleted file mode 100644
index 8e50289..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/PresentationContextTests.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- * IBM - moved to debug platform tests from JDT
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.XMLMemento;
-
-/**
- * Test the serialization of presentation context properties.
- *
- * @since 3.4
- */
-public class PresentationContextTests extends TestCase {
-
- public PresentationContextTests(String name) {
- super(name);
- }
-
- /**
- * Tests saving and restoring presentation context properties.
- */
- public void testSaveRestore () {
- PresentationContext context = new PresentationContext("test");
- context.setProperty("string", "string");
- context.setProperty("integer", new Integer(1));
- context.setProperty("boolean", new Boolean(true));
- context.setProperty("persistable", ResourcesPlugin.getWorkspace().getRoot().getAdapter(IPersistableElement.class));
-
- final XMLMemento memento = XMLMemento.createWriteRoot("TEST");
- context.saveProperites(memento);
-
- context = new PresentationContext("test");
- context.initProperties(memento);
- assertEquals("Wrong value restored", "string", context.getProperty("string"));
- assertEquals("Wrong value restored", new Integer(1), context.getProperty("integer"));
- assertEquals("Wrong value restored", new Boolean(true), context.getProperty("boolean"));
- assertEquals("Wrong value restored", ResourcesPlugin.getWorkspace().getRoot(), context.getProperty("persistable"));
- }
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/SelectionTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/SelectionTests.java
deleted file mode 100644
index aa11554..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/SelectionTests.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Tests to verify that the viewer properly handles selection changes.
- */
-abstract public class SelectionTests extends TestCase {
- Display fDisplay;
- Shell fShell;
- ITreeModelViewer fViewer;
- TestModelUpdatesListener fListener;
-
- public SelectionTests(String name) {
- super(name);
- }
-
- /**
- * @throws java.lang.Exception
- */
- protected void setUp() throws Exception {
- fDisplay = PlatformUI.getWorkbench().getDisplay();
- fShell = new Shell(fDisplay/*, SWT.ON_TOP | SWT.SHELL_TRIM*/);
- fShell.setMaximized(true);
- fShell.setLayout(new FillLayout());
-
- fViewer = createViewer(fDisplay, fShell);
-
- fListener = new TestModelUpdatesListener(false, false);
- fViewer.addViewerUpdateListener(fListener);
- fViewer.addLabelUpdateListener(fListener);
- fViewer.addModelChangedListener(fListener);
-
- fShell.open ();
- }
-
- abstract protected ITreeModelViewer createViewer(Display display, Shell shell);
-
- /**
- * @throws java.lang.Exception
- */
- protected void tearDown() throws Exception {
- fViewer.removeLabelUpdateListener(fListener);
- fViewer.removeViewerUpdateListener(fListener);
- fViewer.removeModelChangedListener(fListener);
-
- // Close the shell and exit.
- fShell.close();
- while (!fShell.isDisposed()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- }
-
- private static class SelectionListener implements ISelectionChangedListener {
- private List fEvents = new ArrayList(1);
-
- public void selectionChanged(SelectionChangedEvent event) {
- fEvents.add(event);
- }
- }
-
- private TestModel makeMultiLevelModel() {
- TestModel model = TestModel.simpleMultiLevel();
- fViewer.setAutoExpandLevel(-1);
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
- return model;
- }
-
- /**
- * In this test:
- * - set selection to an element deep in the model
- * - verify that selection chagned listener is called
- * - verify that the selection is in the viewer is correct
- */
- public void testSimpleSetSelection() {
- // Create the model and populate the view.
- TestModel model = makeMultiLevelModel();
-
- // Create a selection object to the deepest part of the tree.
- SelectionListener listener = new SelectionListener();
- fViewer.addSelectionChangedListener(listener);
-
- // Set the selection and verify that the listener is called.
- TreeSelection selection = new TreeSelection(model.findElement("3.3.3"));
- fViewer.setSelection(selection, true, false);
- assertTrue(listener.fEvents.size() == 1);
-
- // Check that the new selection is what was requested.
- ISelection viewerSelection = fViewer.getSelection();
- assertEquals(selection, viewerSelection);
- }
-
- /**
- * In this test:
- * - set a seleciton to an element
- * - then remove that element
- * - update the view with remove delta
- * -> The selection should be re-set to empty.
- */
- public void testSelectRemove() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- // Create the model and populate the view.
- TestModel model = makeMultiLevelModel();
-
- // Create a selection object to the deepest part of the tree.
- TreePath elementPath = model.findElement("3.3.3");
- TreeSelection selection = new TreeSelection(elementPath);
-
- // Set the selection.
- fViewer.setSelection(selection, true, false);
-
- // Remove the element
- TreePath removePath = model.findElement("3");
- TreePath parentPath = removePath.getParentPath();
- int removeIndex = model.getElement(parentPath).indexOf( model.getElement(removePath) );
- ModelDelta delta = model.removeElementChild(removePath.getParentPath(), removeIndex);
-
- // Configure a selection listener
- SelectionListener listener = new SelectionListener();
- fViewer.addSelectionChangedListener(listener);
-
- // Reset the listener and update the viewer. With a remove
- // delta only wait for the delta to be processed.
- fListener.reset();
- model.postDelta(delta);
- while (!fListener.isFinished(TestModelUpdatesListener.MODEL_CHANGED_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- // Check to make sure the selection was made
- //assertTrue(listener.fEvents.size() == 1);
-
- // Check that the new selection is empty
- ISelection viewerSelection = fViewer.getSelection();
- assertTrue(viewerSelection.isEmpty());
- }
-
-
- /**
- * In this test:
- * - set a selection to an element
- * - then remove that element
- * - then refresh the view.
- * -> The selection should be re-set to empty.
- */
- public void testSelectRemoveRefreshStruct() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- // Create the model and populate the view.
- TestModel model = makeMultiLevelModel();
-
- // Create a selection object to the deepest part of the tree.
- TreePath elementPath = model.findElement("3.3.3");
- TreeSelection selection = new TreeSelection(elementPath);
-
- // Set the selection.
- fViewer.setSelection(selection, true, false);
-
- // Remove the element
- TreePath removePath = model.findElement("3");
- TreePath parentPath = removePath.getParentPath();
- int removeIndex = model.getElement(parentPath).indexOf( model.getElement(removePath) );
- model.removeElementChild(removePath.getParentPath(), removeIndex);
-
- // Configure a selection listener
- SelectionListener listener = new SelectionListener();
- fViewer.addSelectionChangedListener(listener);
-
- // Reset the listener to ignore redundant updates. When elements are removed
- // the viewer may still request updates for those elements.
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, false, false);
-
- // Refresh the viewer
- model.postDelta( new ModelDelta(model.getRootElement(), IModelDelta.CONTENT) );
- while (!fListener.isFinished(TestModelUpdatesListener.ALL_UPDATES_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- // Check to make sure the selection was made
- // Commented out until JFace bug 219887 is fixed.
- //assertTrue(listener.fEvents.size() == 1);
-
- // Check that the new selection is empty
- ISelection viewerSelection = fViewer.getSelection();
- assertTrue(viewerSelection.isEmpty());
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/StateTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/StateTests.java
deleted file mode 100644
index 04571b6..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/StateTests.java
+++ /dev/null
@@ -1,477 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipe.debug.tests.viewer.model.TestModel.TestElement;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Tests to verify that the viewer can save and restore correctly the expansion
- * state of elements.
- *
- * @since 3.6
- */
-abstract public class StateTests extends TestCase implements ITestModelUpdatesListenerConstants {
- Display fDisplay;
- Shell fShell;
- ITreeModelViewer fViewer;
- TestModelUpdatesListener fListener;
-
- public StateTests(String name) {
- super(name);
- }
-
- /**
- * @throws java.lang.Exception
- */
- protected void setUp() throws Exception {
- fDisplay = PlatformUI.getWorkbench().getDisplay();
- fShell = new Shell(fDisplay/*, SWT.ON_TOP | SWT.SHELL_TRIM*/);
- fShell.setMaximized(true);
- fShell.setLayout(new FillLayout());
-
- fViewer = createViewer(fDisplay, fShell);
-
- fListener = new TestModelUpdatesListener(false, false);
- fViewer.addViewerUpdateListener(fListener);
- fViewer.addLabelUpdateListener(fListener);
- fViewer.addModelChangedListener(fListener);
- fViewer.addStateUpdateListener(fListener);
-
- fShell.open ();
- }
-
- abstract protected ITreeModelViewer createViewer(Display display, Shell shell);
-
- /**
- * @throws java.lang.Exception
- */
- protected void tearDown() throws Exception {
- fViewer.removeLabelUpdateListener(fListener);
- fViewer.removeViewerUpdateListener(fListener);
- fViewer.removeModelChangedListener(fListener);
- fViewer.addStateUpdateListener(fListener);
-
- // Close the shell and exit.
- fShell.close();
- while (!fShell.isDisposed()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- }
-
- protected ITreeModelContentProviderTarget getCTargetViewer() {
- return (ITreeModelContentProviderTarget)fViewer;
- }
-
- public void testUpdateViewer() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- TestModel model = TestModel.simpleMultiLevel();
-
- // Create the listener
- fListener.reset();
- fListener.addChildreUpdate(TreePath.EMPTY, 0);
- fListener.addChildreUpdate(TreePath.EMPTY, 1);
- fListener.addChildreUpdate(TreePath.EMPTY, 2);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY, true);
-
- // Create the update delta
- TestElement element = model.getRootElement();
- TreePath path0 = TreePath.EMPTY;
- ModelDelta delta = new ModelDelta(model.getRootElement(), -1, IModelDelta.EXPAND, element.getChildren().length);
- ModelDelta updateDelta = delta;
- element = element.getChildren()[2];
- TreePath path1 = path0.createChildPath(element);
- delta = delta.addNode(element, 2, IModelDelta.EXPAND, element.fChildren.length);
- element = element.getChildren()[1];
- TreePath path2 = path1.createChildPath(element);
- delta = delta.addNode(element, 1, IModelDelta.EXPAND, element.fChildren.length);
- element = element.getChildren()[1];
- TreePath path3 = path2.createChildPath(element);
- delta = delta.addNode(element, 1, IModelDelta.SELECT);
-
- fListener.reset();
- fViewer.updateViewer(updateDelta);
-
- fListener.reset();
- fListener.setFailOnRedundantUpdates(false);
- fListener.addChildreUpdate(path0, 2);
- fListener.addHasChildrenUpdate(path1);
- fListener.addChildreCountUpdate(path1);
- fListener.addLabelUpdate(path1);
- fListener.addChildreUpdate(path1, 1);
- fListener.addHasChildrenUpdate(path2);
- fListener.addChildreCountUpdate(path2);
- fListener.addLabelUpdate(path2);
- fListener.addHasChildrenUpdate(path2);
- fListener.addChildreCountUpdate(path2);
- fListener.addChildreUpdate(path2, 1);
- fListener.addHasChildrenUpdate(path3);
- fListener.addLabelUpdate(path3);
-
- while (!fListener.isFinished(CONTENT_UPDATES_COMPLETE | LABEL_UPDATES))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- // Extract the new state from viewer
- ModelDelta savedDelta = new ModelDelta(model.getRootElement(), IModelDelta.NO_CHANGE);
- fViewer.saveElementState(path0, savedDelta, IModelDelta.EXPAND | IModelDelta.SELECT);
-
- Assert.assertTrue( deltaMatches(updateDelta, savedDelta) );
- }
-
- boolean deltaMatches(ModelDelta requested, ModelDelta received) {
- if ( requested.getElement().equals(received.getElement()) &&
- requested.getFlags() == received.getFlags() &&
- ( requested.getChildCount() == -1 || requested.getChildCount() == received.getChildCount() )&&
- ( requested.getIndex() == -1 || requested.getIndex() == received.getIndex()) &&
- ((requested.getReplacementElement() != null && requested.getReplacementElement().equals(received.getReplacementElement())) ||
- (requested.getReplacementElement() == null && received.getReplacementElement() == null)) &&
- requested.getChildDeltas().length == received.getChildDeltas().length)
- {
- for (int i = 0; i < requested.getChildDeltas().length; i++) {
- ModelDelta requestedChildDelta = (ModelDelta)requested.getChildDeltas()[i];
- ModelDelta receivedChildDelta = received.getChildDelta(requestedChildDelta.getElement());
- if ( receivedChildDelta == null || !deltaMatches(requestedChildDelta, receivedChildDelta) ) {
- return false;
- }
- }
- return true;
- }
- return false;
- }
-
- private TestModel alternatingSubsreesModel() {
- TestModel model = new TestModel();
- model.setRoot( new TestElement(model, "root", new TestElement[] {
- new TestElement(model, "1", new TestElement[] {
- new TestElement(model, "1.1", new TestElement[] {
- new TestElement(model, "1.1.1", new TestElement[0]),
- }),
- }),
- new TestElement(model, "2", new TestElement[] {
- new TestElement(model, "2.1", new TestElement[] {
- new TestElement(model, "2.1.1", new TestElement[0]),
- }),
- }),
- new TestElement(model, "3", new TestElement[] {
- new TestElement(model, "3.1", new TestElement[] {
- new TestElement(model, "3.1.1", new TestElement[0]),
- }),
- }),
- new TestElement(model, "4", new TestElement[] {
- new TestElement(model, "4.1", new TestElement[] {
- new TestElement(model, "4.1.1", new TestElement[0]),
- }),
- }),
- new TestElement(model, "5", new TestElement[] {
- new TestElement(model, "5.1", new TestElement[] {
- new TestElement(model, "5.1.1", new TestElement[0]),
- }),
- }),
- new TestElement(model, "6", new TestElement[] {
- new TestElement(model, "6.1", new TestElement[] {
- new TestElement(model, "6.1.1", new TestElement[0]),
- }),
- })
- }) );
- return model;
- }
-
- private void expandAlternateElements(TestModel model) {
- // Expand every other child
- fListener.reset();
- fListener.setFailOnRedundantUpdates(false);
- ITreeModelContentProviderTarget viewer = (ITreeModelContentProviderTarget)fViewer;
- TreePath path;
- fListener.addUpdates(path = model.findElement("1"), (TestElement)path.getLastSegment(), 1, CHILDREN_COUNT_UPDATES | CHILDREN_UPDATES);
- viewer.setExpandedState(path, true);
- fListener.addUpdates(path = model.findElement("3"), (TestElement)path.getLastSegment(), 1, CHILDREN_COUNT_UPDATES | CHILDREN_UPDATES);
- viewer.setExpandedState(path, true);
- fListener.addUpdates(path = model.findElement("5"), (TestElement)path.getLastSegment(), 1, CHILDREN_COUNT_UPDATES | CHILDREN_UPDATES);
- viewer.setExpandedState(path, true);
-
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY, true);
-
- // Expand the sub-children as well (so that the expanded nodes go 2 levels down.
- fListener.reset();
- fListener.addUpdates(path = model.findElement("1.1"), (TestElement)path.getLastSegment(), 1, CHILDREN_COUNT_UPDATES | CHILDREN_UPDATES);
- viewer.setExpandedState(path, true);
- fListener.addUpdates(path = model.findElement("3.1"), (TestElement)path.getLastSegment(), 1, CHILDREN_COUNT_UPDATES | CHILDREN_UPDATES);
- viewer.setExpandedState(path, true);
- fListener.addUpdates(path = model.findElement("5.1"), (TestElement)path.getLastSegment(), 1, CHILDREN_COUNT_UPDATES | CHILDREN_UPDATES);
- viewer.setExpandedState(path, true);
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY, true);
- }
-
- public void testPreserveExpandedOnRemove() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
- TestModel model = alternatingSubsreesModel();
-
- // NOTE: WE ARE NOT EXPANDING ANY CHILDREN
-
- // Create the listener, only check the first level
- fListener.reset(TreePath.EMPTY, model.getRootElement(), 1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY, true);
-
- expandAlternateElements(model);
-
- // Set a selection in view
- TreeSelection originalSelection = new TreeSelection(model.findElement("5.1.1"));
- fViewer.setSelection(originalSelection);
-
- // Update the model
- ModelDelta delta = model.removeElementChild(TreePath.EMPTY, 0);
-
- // Remove delta should not generate any new updates
- fListener.reset();
- model.postDelta(delta);
- while (!fListener.isFinished(MODEL_CHANGED_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- // Validate data
- model.validateData(fViewer, TreePath.EMPTY, true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("2")) == false);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("3")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("3.1")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("4")) == false);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("5")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("5.1")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("6")) == false);
- Assert.assertEquals(originalSelection, fViewer.getSelection());
- }
-
- public void testPreserveExpandedOnInsert() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
- TestModel model = alternatingSubsreesModel();
-
- // NOTE: WE ARE NOT EXPANDING ANY CHILDREN
-
- // Create the listener, only check the first level
- fListener.reset(TreePath.EMPTY, model.getRootElement(), 1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY, true);
-
- expandAlternateElements(model);
-
- // Set a selection in view
- TreeSelection originalSelection = new TreeSelection(model.findElement("5.1.1"));
- fViewer.setSelection(originalSelection);
-
- // Update the model
- ModelDelta delta = model.insertElementChild(TreePath.EMPTY, 0, new TestElement(model, "0 - new", new TestElement[0]));
-
- // Insert delta should generate updates only for the new element
- TreePath path = model.findElement("0 - new");
- // Note: redundant label updates on insert.
- fListener.reset(path, (TestElement)path.getLastSegment(), 0, false, false);
- fListener.addChildreUpdate(TreePath.EMPTY, 0);
- model.postDelta(delta);
- while (!fListener.isFinished(MODEL_CHANGED_COMPLETE | ALL_UPDATES_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- // Validate data
- model.validateData(fViewer, TreePath.EMPTY, true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("1")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("1.1")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("2")) == false);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("3")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("3.1")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("4")) == false);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("5")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("5.1")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("6")) == false);
- Assert.assertEquals(originalSelection, fViewer.getSelection());
- }
-
- public void testPreserveExpandedOnContentStress() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
- TestModel model = alternatingSubsreesModel();
-
- // NOTE: WE ARE NOT EXPANDING ANY CHILDREN
-
- // Create the listener, only check the first level
- fListener.reset(TreePath.EMPTY, model.getRootElement(), 1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY, true);
-
- expandAlternateElements(model);
-
- // Set a selection in view
- TreeSelection originalSelection = new TreeSelection(model.findElement("5.1.1"));
- fViewer.setSelection(originalSelection);
- Assert.assertEquals(originalSelection, fViewer.getSelection());
-
- // Run this test ten times as we've seen intermittent failures related
- // to timing in it.
- for (int i = 0; i < 10; i++) {
- // Update the model
- model.removeElementChild(TreePath.EMPTY, 0);
-
- // Note: Re-expanding nodes causes redundant updates.
- fListener.reset(false, false);
- fListener.addUpdates(getCTargetViewer(), TreePath.EMPTY, model.getRootElement(), -1, ALL_UPDATES_COMPLETE);
- model.postDelta(new ModelDelta(model.getRootElement(), IModelDelta.CONTENT));
- while (!fListener.isFinished(ALL_UPDATES_COMPLETE | STATE_RESTORE_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- // Validate data
- model.validateData(fViewer, TreePath.EMPTY, true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("2")) == false);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("3")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("3.1")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("4")) == false);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("5")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("5.1")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("6")) == false);
- Assert.assertEquals(originalSelection, fViewer.getSelection());
-
- // Update the model again
- model.addElementChild(TreePath.EMPTY, 0, new TestElement(model, "1", new TestElement[0]));
-
- // Note: Re-expanding nodes causes redundant updates.
- fListener.reset(false, false);
- fListener.addUpdates(getCTargetViewer(), TreePath.EMPTY, model.getRootElement(), -1, ALL_UPDATES_COMPLETE);
- model.postDelta(new ModelDelta(model.getRootElement(), IModelDelta.CONTENT));
- while (!fListener.isFinished(ALL_UPDATES_COMPLETE | STATE_RESTORE_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- // Validate data
- model.validateData(fViewer, TreePath.EMPTY, true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("2")) == false);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("3")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("3.1")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("4")) == false);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("5")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("5.1")) == true);
- Assert.assertTrue(getCTargetViewer().getExpandedState(model.findElement("6")) == false);
- Assert.assertEquals(originalSelection, fViewer.getSelection());
- }
- }
-
- public void testSaveAndRstore1() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
- TestModel model = alternatingSubsreesModel();
-
- // NOTE: WE ARE NOT EXPANDING ANY CHILDREN
-
- // Create the listener, only check the first level
- fListener.reset(TreePath.EMPTY, model.getRootElement(), 1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY, true);
-
- // Expand some, but not all elements
- expandAlternateElements(model);
-
- // Set a selection in view
- fViewer.setSelection(new TreeSelection(model.findElement("5.1.1")));
-
- // Extract the original state from viewer
- ModelDelta originalState = new ModelDelta(model.getRootElement(), IModelDelta.NO_CHANGE);
- fViewer.saveElementState(TreePath.EMPTY, originalState, IModelDelta.EXPAND | IModelDelta.SELECT);
-
- // Set the viewer input to null. This will trigger the view to save the viewer state.
- fListener.reset(true, false);
- fListener.addStateUpdates(getCTargetViewer(), TreePath.EMPTY, model.getRootElement());
- fViewer.setInput(null);
- while (!fListener.isFinished(STATE_SAVE_COMPLETE)) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- // Set the viewer input back to the model. When view updates are complete
- // the viewer
- // Note: disable redundant updates because the reveal delta triggers one.
- fListener.reset(TreePath.EMPTY, model.getRootElement(), 1, false, false);
- // TODO: add state updates somehow?
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- // Extract the restored state from viewer
- ModelDelta restoredState = new ModelDelta(model.getRootElement(), IModelDelta.NO_CHANGE);
- fViewer.saveElementState(TreePath.EMPTY, restoredState, IModelDelta.EXPAND | IModelDelta.SELECT);
-
- Assert.assertTrue( deltaMatches(originalState, restoredState) );
- }
-
- public void testSaveAndRstore2() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
- TestModel model = TestModel.simpleMultiLevel();
-
- // expand all elements
- fViewer.setAutoExpandLevel(-1);
-
- // Create the listener, only check the first level
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
-
- // Set a selection in view
- fViewer.setSelection(new TreeSelection(model.findElement("3.2.3")));
-
- // Turn off the auto-expand now since we want to text the auto-expand logic
- fViewer.setAutoExpandLevel(-1);
-
- // Extract the original state from viewer
- ModelDelta originalState = new ModelDelta(model.getRootElement(), IModelDelta.NO_CHANGE);
- fViewer.saveElementState(TreePath.EMPTY, originalState, IModelDelta.EXPAND | IModelDelta.SELECT);
-
- // Set the viewer input to null. This will trigger the view to save the viewer state.
- fListener.reset(true, false);
- fListener.addStateUpdates(getCTargetViewer(), TreePath.EMPTY, model.getRootElement());
-
- fViewer.setInput(null);
- while (!fListener.isFinished(STATE_SAVE_COMPLETE)) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- // Set the viewer input back to the model. When view updates are complete
- // the viewer
- // Note: disable redundant updates because the reveal delta triggers one.
- fListener.reset(TreePath.EMPTY, model.getRootElement(), 1, false, false);
- // TODO: add state updates somehow?
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
-
- // Extract the restored state from viewer
- ModelDelta restoredState = new ModelDelta(model.getRootElement(), IModelDelta.NO_CHANGE);
- fViewer.saveElementState(TreePath.EMPTY, restoredState, IModelDelta.EXPAND | IModelDelta.SELECT);
-
- Assert.assertTrue( deltaMatches(originalState, restoredState) );
- }
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/TestModel.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/TestModel.java
deleted file mode 100644
index 363afc3..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/TestModel.java
+++ /dev/null
@@ -1,649 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import java.util.Arrays;
-
-import junit.framework.Assert;
-
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelCheckProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckUpdate;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory2;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
-import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * Test model for the use in unit tests. This test model contains a set of
- * elements in a tree structure. It contains utility methods for modifying the
- * model and for verifying that the viewer content matches the model.
- *
- * @since 3.6
- */
-public class TestModel implements IElementContentProvider, IElementLabelProvider, IModelProxyFactory2 , IElementMementoProvider {
-
- public static class TestElement extends PlatformObject {
- private final TestModel fModel;
- private final String fID;
- TestElement[] fChildren;
- String fLabelAppendix = "";
- boolean fExpanded;
- boolean fChecked;
- boolean fGrayed;
-
- public TestElement(TestModel model, String text, TestElement[] children) {
- this (model, text, false, false, children);
- }
-
- public TestElement(TestModel model, String text, boolean checked, boolean grayed, TestElement[] children) {
- fModel = model;
- fID = text;
- fChildren = children;
- fChecked = checked;
- fGrayed = grayed;
- }
-
- public TestModel getModel() {
- return fModel;
- }
-
- public Object getAdapter(Class adapter) {
- if (adapter.isInstance(fModel)) {
- return fModel;
- }
- return null;
- }
-
- public String getID() {
- return fID;
- }
-
- public void setLabelAppendix(String appendix) {
- fLabelAppendix = appendix;
- }
-
- public String getLabel() {
- return fID + fLabelAppendix;
- }
-
- public TestElement[] getChildren() {
- return fChildren;
- }
-
- public boolean isExpanded() {
- return fExpanded;
- }
-
- public boolean getGrayed() {
- return fGrayed;
- }
-
- public boolean getChecked() {
- return fChecked;
- }
-
- public void setChecked(boolean checked, boolean grayed) {
- fChecked = checked;
- fGrayed = grayed;
- }
-
- public boolean equals(Object obj) {
- return obj instanceof TestElement && fID.equals(((TestElement)obj).fID);
- }
-
- public int hashCode() {
- return fID.hashCode();
- }
-
- public String toString() {
- return getLabel();
- }
-
- public int indexOf(TestElement child) {
- return Arrays.asList(fChildren).indexOf(child);
- }
- }
-
- private class ModelProxy extends AbstractModelProxy {
- public void installed(Viewer viewer) {
- super.installed(viewer);
- ModelDelta rootDelta = TestModel.this.getBaseDelta(new ModelDelta(fInput, IModelDelta.NO_CHANGE));
- installSubModelProxies(fRootPath, rootDelta);
- fireModelChanged(rootDelta);
- }
-
- private void installSubModelProxies(TreePath path, ModelDelta delta) {
- TestElement element = getElement(path);
- if (element.fModel != TestModel.this) {
- // Found an element from a different model. Install its proxy and return.
- delta.setFlags(delta.getFlags() | IModelDelta.INSTALL);
- } else {
- TestElement[] children = element.getChildren();
-
- for (int i = 0; i < children.length; i++) {
- installSubModelProxies(path.createChildPath(children[i]), delta.addNode(children[i], IModelDelta.NO_CHANGE));
- }
- }
- }
- }
-
- private TestElement fRoot;
- private Object fInput = null;
- private TreePath fRootPath = TreePath.EMPTY;
- private ModelProxy fModelProxy;
-
- /**
- * Constructor private. Use static factory methods instead.
- */
- public TestModel() {}
-
- public TestElement getRootElement() {
- return fRoot;
- }
-
- ModelDelta getBaseDelta(ModelDelta rootDelta) {
- ModelDelta delta = rootDelta;
- for (int i = 0; i < fRootPath.getSegmentCount(); i++) {
- ModelDelta subDelta = delta.getChildDelta(fRootPath.getSegment(i));
- if (subDelta == null) {
- subDelta = delta.addNode(fRootPath.getSegment(i), IModelDelta.NO_CHANGE);
- }
- delta = subDelta;
- }
- return delta;
- }
-
- public int getModelDepth() {
- return getDepth(getRootElement(), 0);
- }
-
- private int getDepth(TestElement element, int atDepth) {
- TestElement[] children = element.getChildren();
- if (children.length == 0) {
- return atDepth;
- }
- int depth = atDepth + 1;
- for (int i = 0; i < children.length; i++) {
- depth = Math.max(depth, getDepth(children[i], atDepth + 1));
- }
-
- return depth;
- }
-
- public void update(IHasChildrenUpdate[] updates) {
- for (int i = 0; i < updates.length; i++) {
- TestElement element = (TestElement)updates[i].getElement();
- updates[i].setHasChilren(element.getChildren().length > 0);
- updates[i].done();
- }
- }
-
- public void update(IChildrenCountUpdate[] updates) {
- for (int i = 0; i < updates.length; i++) {
- TestElement element = (TestElement)updates[i].getElement();
- updates[i].setChildCount(element.getChildren().length);
- updates[i].done();
- }
- }
-
- public void update(IChildrenUpdate[] updates) {
- for (int i = 0; i < updates.length; i++) {
- TestElement element = (TestElement)updates[i].getElement();
- int endOffset = updates[i].getOffset() + updates[i].getLength();
- for (int j = updates[i].getOffset(); j < endOffset; j++) {
- if (j < element.getChildren().length) {
- updates[i].setChild(element.getChildren()[j], j);
- }
- }
- updates[i].done();
- }
- }
-
- public void update(ILabelUpdate[] updates) {
- for (int i = 0; i < updates.length; i++) {
- TestElement element = (TestElement)updates[i].getElement();
- updates[i].setLabel(element.fID, 0);
- if (updates[i] instanceof ICheckUpdate &&
- Boolean.TRUE.equals(updates[i].getPresentationContext().getProperty(ICheckUpdate.PROP_CHECK)))
- {
- ((ICheckUpdate)updates[i]).setChecked(element.getChecked(), element.getGrayed());
- }
- updates[i].done();
- }
- }
-
- public final static String ELEMENT_MEMENTO_ID = "id";
-
- public void compareElements(IElementCompareRequest[] updates) {
- for (int i = 0; i < updates.length; i++) {
- String elementID = ((TestElement)updates[i].getElement()).getID();
- String mementoID = updates[i].getMemento().getString(ELEMENT_MEMENTO_ID);
- updates[i].setEqual( elementID.equals(mementoID) );
- updates[i].done();
- }
-
- }
-
- public void encodeElements(IElementMementoRequest[] updates) {
- for (int i = 0; i < updates.length; i++) {
- String elementID = ((TestElement)updates[i].getElement()).getID();
- updates[i].getMemento().putString(ELEMENT_MEMENTO_ID, elementID);
- updates[i].done();
- }
- }
-
-
- public void elementChecked(IPresentationContext context, Object viewerInput, TreePath path, boolean checked) {
- TestElement element = getElement(path);
- Assert.assertFalse(element.getGrayed());
- element.setChecked(checked, false);
- }
-
- public IModelProxy createTreeModelProxy(Object input, TreePath path, IPresentationContext context) {
- fModelProxy = new ModelProxy();
- fInput = input;
- fRootPath = path;
- return fModelProxy;
- }
-
- public IModelProxy getModelProxy() {
- return fModelProxy;
- }
-
- public TestElement getElement(TreePath path) {
- if (path.getSegmentCount() == 0) {
- return getRootElement();
- } else {
- return (TestElement)path.getLastSegment();
- }
- }
-
- public void setAllExpanded() {
- doSetExpanded(fRoot);
- }
-
- private void doSetExpanded(TestElement element) {
- element.fExpanded = true;
- for (int i = 0; i < element.fChildren.length; i++) {
- doSetExpanded(element.fChildren[i]);
- }
- }
-
- public void setAllAppendix(String appendix) {
- doSetAllAppendix(fRoot, appendix);
- }
-
- private void doSetAllAppendix(TestElement element, String appendix) {
- element.setLabelAppendix(appendix);
- for (int i = 0; i < element.fChildren.length; i++) {
- doSetAllAppendix(element.fChildren[i], appendix);
- }
- }
-
- public void validateData(ITreeModelViewer viewer, TreePath path) {
-
- validateData(viewer, path, false);
- }
-
- public void validateData(ITreeModelViewer _viewer, TreePath path, boolean expandedElementsOnly) {
- ITreeModelContentProviderTarget viewer = (ITreeModelContentProviderTarget)_viewer;
- TestElement element = getElement(path);
- if ( Boolean.TRUE.equals(_viewer.getPresentationContext().getProperty(ICheckUpdate.PROP_CHECK)) ) {
- ITreeModelCheckProviderTarget checkTarget = (ITreeModelCheckProviderTarget)_viewer;
- Assert.assertEquals(element.getChecked(), checkTarget.getElementChecked(path));
- Assert.assertEquals(element.getGrayed(), checkTarget.getElementGrayed(path));
- }
-
- if (!expandedElementsOnly || path.getSegmentCount() == 0 || viewer.getExpandedState(path) ) {
- TestElement[] children = element.getChildren();
- Assert.assertEquals(children.length, viewer.getChildCount(path));
-
- for (int i = 0; i < children.length; i++) {
- Assert.assertEquals(children[i], viewer.getChildElement(path, i));
- validateData(viewer, path.createChildPath(children[i]), expandedElementsOnly);
- }
- } else if (!viewer.getExpandedState(path)) {
- // If element not expanded, verify the plus sign.
- Assert.assertEquals(viewer.getHasChildren(path), element.getChildren().length > 0);
- }
- }
-
- public void setRoot(TestElement root) {
- fRoot = root;
- }
-
- public void postDelta(IModelDelta delta) {
- fModelProxy.fireModelChanged(delta);
- }
-
- /** Create or retrieve delta for given path
- * @param combine if then new deltas for the given path are created. If false existing ones are reused.
- */
- private ModelDelta getElementDelta(ModelDelta baseDelta, TreePath path, boolean combine) {
- TestElement element = getRootElement();
- ModelDelta delta = baseDelta;
-
- for (int i = 0; i < path.getSegmentCount(); i++) {
- TestElement[] children = element.getChildren();
- delta.setChildCount(children.length);
- Object segment = path.getSegment(i);
- int j;
- for (j = 0; j < children.length; j++) {
- if (segment.equals(children[j])) {
- element = children[j];
- ModelDelta nextDelta = null;
- if (combine) {
- nextDelta = delta.getChildDelta(element);
- }
- if (nextDelta == null) {
- nextDelta = delta.addNode(element, j, IModelDelta.NO_CHANGE);
- }
- delta = nextDelta;
- break;
- }
- }
- if (j == children.length) {
- throw new IllegalArgumentException("Invalid path");
- }
- }
- return delta;
-
- }
-
- private TreePath getRelativePath(TreePath path) {
- Object[] segments = new Object[path.getSegmentCount() - fRootPath.getSegmentCount()];
- for (int i = fRootPath.getSegmentCount(), _i = 0; i < path.getSegmentCount(); i++, _i++) {
- segments[_i] = path.getSegment(i);
- }
- return new TreePath(segments);
- }
-
- public ModelDelta appendElementLabel(TreePath path, String labelAppendix) {
- Assert.assertTrue(path.startsWith(fRootPath, null));
- ModelDelta rootDelta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
- ModelDelta baseDelta = getBaseDelta(rootDelta);
- TreePath relativePath = getRelativePath(path);
- TestElement element = getElement(relativePath);
- ModelDelta delta = getElementDelta(baseDelta, relativePath, false);
- element.setLabelAppendix(labelAppendix);
- delta.setFlags(delta.getFlags() | IModelDelta.STATE);
-
- return rootDelta;
- }
-
- public ModelDelta setElementChecked(TreePath path, boolean checked, boolean grayed) {
- Assert.assertTrue(path.startsWith(fRootPath, null));
- ModelDelta rootDelta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
- ModelDelta baseDelta = getBaseDelta(rootDelta);
- TreePath relativePath = getRelativePath(path);
- TestElement element = getElement(relativePath);
- ModelDelta delta = getElementDelta(baseDelta, relativePath, false);
- element.setChecked(checked, grayed);
- delta.setFlags(delta.getFlags() | IModelDelta.STATE);
-
- return rootDelta;
- }
-
- public ModelDelta setElementChildren(TreePath path, TestElement[] children) {
- Assert.assertTrue(path.startsWith(fRootPath, null));
- ModelDelta rootDelta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
- ModelDelta baseDelta = getBaseDelta(rootDelta);
- TreePath relativePath = getRelativePath(path);
-
- // Find the parent element and generate the delta node for it.
- TestElement element = getElement(relativePath);
- ModelDelta delta = getElementDelta(baseDelta, relativePath, false);
-
- // Set the new children array
- element.fChildren = children;
-
- // Add the delta flag and update the child count in the parent delta.
- delta.setFlags(delta.getFlags() | IModelDelta.CONTENT);
- delta.setChildCount(children.length);
-
- return rootDelta;
- }
-
- public ModelDelta replaceElementChild(TreePath parentPath, int index, TestElement child) {
- ModelDelta rootDelta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
- ModelDelta baseDelta = getBaseDelta(rootDelta);
- TreePath relativePath = getRelativePath(parentPath);
-
- TestElement element = getElement(relativePath);
- ModelDelta delta= getElementDelta(baseDelta, relativePath, false);
- TestElement oldChild = element.fChildren[index];
- element.fChildren[index] = child;
- delta.addNode(oldChild, child, IModelDelta.REPLACED);
- // TODO: set replacement index!?!
-
- return rootDelta;
- }
-
- public ModelDelta addElementChild(TreePath parentPath, int index, TestElement newChild) {
- ModelDelta rootDelta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
- ModelDelta baseDelta = getBaseDelta(rootDelta);
- TreePath relativePath = getRelativePath(parentPath);
-
- // Find the parent element and generate the delta node for it.
- TestElement element = getElement(relativePath);
- ModelDelta delta= getElementDelta(baseDelta, relativePath, false);
-
- // Add the new element
- element.fChildren = doInsertElementInArray(element.fChildren, index, newChild);
-
- // Add the delta flag and update the child count in the parent delta.
- delta.setChildCount(element.getChildren().length);
- delta.addNode(newChild, IModelDelta.ADDED);
-
- return rootDelta;
- }
-
- public ModelDelta insertElementChild(TreePath parentPath, int index, TestElement newChild) {
- return insertElementChild(null, parentPath, index, newChild);
- }
-
- public ModelDelta insertElementChild(ModelDelta rootDelta, TreePath parentPath, int index, TestElement newChild) {
- if (rootDelta == null) {
- rootDelta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
- }
- ModelDelta baseDelta = getBaseDelta(rootDelta);
- TreePath relativePath = getRelativePath(parentPath);
-
- // Find the parent element and generate the delta node for it.
- TestElement element = getElement(relativePath);
- ModelDelta delta= getElementDelta(baseDelta, relativePath, false);
-
- // Add the new element
- element.fChildren = doInsertElementInArray(element.fChildren, index, newChild);
-
- // Add the delta flag and update the child count in the parent delta.
- delta.setChildCount(element.getChildren().length);
- delta.addNode(newChild, index, IModelDelta.INSERTED);
-
- return rootDelta;
- }
-
- private TestElement[] doInsertElementInArray(TestElement[] children, int index, TestElement newChild) {
- // Create the new children array add the element to it and set it to
- // the parent.
- TestElement[] newChildren = new TestElement[children.length + 1];
- System.arraycopy(children, 0, newChildren, 0, index);
- newChildren[index] = newChild;
- System.arraycopy(children, index, newChildren, index + 1, children.length - index);
- return newChildren;
- }
-
- public ModelDelta removeElementChild(TreePath parentPath, int index) {
- ModelDelta rootDelta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
- ModelDelta baseDelta = getBaseDelta(rootDelta);
-
- // Find the parent element and generate the delta node for it.
- TestElement element = getElement(parentPath);
- ModelDelta delta= getElementDelta(baseDelta, parentPath, false);
-
- // Create a new child array with the element removed
- TestElement[] children = element.getChildren();
- TestElement childToRemove = children[index];
- TestElement[] newChildren = new TestElement[children.length - 1];
- System.arraycopy(children, 0, newChildren, 0, index);
- System.arraycopy(children, index + 1, newChildren, index, children.length - index - 1);
- element.fChildren = newChildren;
-
- // Add the delta flag and update the child count in the parent delta.
- delta.setChildCount(element.getChildren().length);
- delta.addNode(childToRemove, index, IModelDelta.REMOVED);
-
- return rootDelta;
- }
-
- public TreePath findElement(String label) {
- return findElement(TreePath.EMPTY, label);
- }
-
- public TreePath findElement(TreePath startPath, String label) {
- TestElement element = getElement(startPath);
- for (int i = 0; i < element.getChildren().length; i++) {
- TestElement child = element.getChildren()[i];
- TreePath path = startPath.createChildPath(child);
- if ( label.equals(child.getLabel()) ) {
- return path;
- } else {
- TreePath subPath = findElement(path, label);
- if (subPath != null) {
- return subPath;
- }
- }
- }
- return null;
- }
-
- public String toString() {
- return getElementString(fRoot, "");
- }
-
- public String getElementString(TestElement element, String indent) {
- StringBuffer builder = new StringBuffer();
- builder.append(indent);
- builder.append(element.toString());
- builder.append('\n');
- TestElement[] children = element.getChildren();
- for (int i = 0; i < children.length; i++) {
- builder.append(getElementString(children[i], indent + " "));
- }
- return builder.toString();
- }
-
- public static TestModel simpleSingleLevel() {
- TestModel model = new TestModel();
- model.setRoot( new TestElement(model, "root", new TestElement[] {
- new TestElement(model, "1", true, true, new TestElement[0]),
- new TestElement(model, "2", true, false, new TestElement[0]),
- new TestElement(model, "3", false, true, new TestElement[0]),
- new TestElement(model, "4", false, false, new TestElement[0]),
- new TestElement(model, "5", new TestElement[0]),
- new TestElement(model, "6", new TestElement[0])
- }) );
- return model;
- }
-
- public static TestModel simpleMultiLevel() {
- TestModel model = new TestModel();
- model.setRoot( new TestElement(model, "root", new TestElement[] {
- new TestElement(model, "1", new TestElement[0]),
- new TestElement(model, "2", true, false, new TestElement[] {
- new TestElement(model, "2.1", true, true, new TestElement[0]),
- new TestElement(model, "2.2", false, true, new TestElement[0]),
- new TestElement(model, "2.3", true, false, new TestElement[0]),
- }),
- new TestElement(model, "3", new TestElement[] {
- new TestElement(model, "3.1", new TestElement[] {
- new TestElement(model, "3.1.1", new TestElement[0]),
- new TestElement(model, "3.1.2", new TestElement[0]),
- new TestElement(model, "3.1.3", new TestElement[0]),
- }),
- new TestElement(model, "3.2", new TestElement[] {
- new TestElement(model, "3.2.1", new TestElement[0]),
- new TestElement(model, "3.2.2", new TestElement[0]),
- new TestElement(model, "3.2.3", new TestElement[0]),
- }),
- new TestElement(model, "3.3", new TestElement[] {
- new TestElement(model, "3.3.1", new TestElement[0]),
- new TestElement(model, "3.3.2", new TestElement[0]),
- new TestElement(model, "3.3.3", new TestElement[0]),
- }),
- })
- }) );
- return model;
- }
-
- public static TestModel compositeMultiLevel() {
- TestModel m2 = new TestModel();
- m2.setRoot( new TestElement(m2, "m2.root", new TestElement[] {
- new TestElement(m2, "m2.1", new TestElement[0]),
- new TestElement(m2, "m2.2", true, false, new TestElement[] {
- new TestElement(m2, "m2.2.1", true, true, new TestElement[0]),
- new TestElement(m2, "m2.2.2", false, true, new TestElement[0]),
- new TestElement(m2, "m2.2.3", true, false, new TestElement[0]),
- }),
- }) );
-
- TestModel m3 = new TestModel();
- m3.setRoot( new TestElement(m3, "m3.root", new TestElement[] {
- new TestElement(m3, "m3.1", new TestElement[0]),
- new TestElement(m3, "m3.2", true, false, new TestElement[] {
- new TestElement(m3, "m3.2.1", true, true, new TestElement[0]),
- new TestElement(m3, "m3.2.2", false, true, new TestElement[0]),
- new TestElement(m3, "m3.2.3", true, false, new TestElement[0]),
- }),
- }) );
-
- TestModel m4 = new TestModel();
- m4.setRoot( new TestElement(m4, "m4.root", new TestElement[] {
- new TestElement(m4, "m4.1", new TestElement[0]),
- new TestElement(m4, "m4.2", true, false, new TestElement[] {
- new TestElement(m4, "m4.2.1", true, true, new TestElement[0]),
- new TestElement(m4, "m4.2.2", false, true, new TestElement[0]),
- new TestElement(m4, "m4.2.3", true, false, new TestElement[0]),
- }),
- }) );
-
- TestModel m1 = new TestModel();
- m1.setRoot( new TestElement(m1, "m1.root", new TestElement[] {
- new TestElement(m1, "m1.1", new TestElement[0]),
- new TestElement(m1, "m1.2", true, false, new TestElement[] {
- m2.fRoot,
- m3.fRoot,
- m4.fRoot,
- }),
- }) );
-
-
- return m1;
- }
-
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/TestModelUpdatesListener.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/TestModelUpdatesListener.java
deleted file mode 100644
index ea8e094..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/TestModelUpdatesListener.java
+++ /dev/null
@@ -1,374 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import junit.framework.Assert;
-
-import org.eclipe.debug.tests.viewer.model.TestModel.TestElement;
-import org.eclipse.debug.internal.ui.viewers.model.ILabelUpdateListener;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelChangedListener;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IStateUpdateListener;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener;
-import org.eclipse.jface.viewers.TreePath;
-
-public class TestModelUpdatesListener
- implements IViewerUpdateListener, ILabelUpdateListener, IModelChangedListener, ITestModelUpdatesListenerConstants,
- IStateUpdateListener
-{
- private boolean fFailOnRedundantUpdates;
- private boolean fFailOnMultipleUpdateSequences;
-
- private Set fHasChildrenUpdates = new HashSet();
- private Map fChildrenUpdates = new HashMap();
- private Set fChildCountUpdates = new HashSet();
- private Set fLabelUpdates = new HashSet();
- private Set fProxyModels = new HashSet();
- private Set fStateUpdates = new HashSet();
- private boolean fViewerUpdatesComplete;
- private boolean fLabelUpdatesComplete;
- private boolean fModelChangedComplete;
- private boolean fStateSaveComplete;
- private boolean fStateRestoreComplete;
- private int fViewerUpdatesRunning;
- private int fLabelUpdatesRunning;
- private int fTimeoutInterval = 60000;
- private long fTimeoutTime;
-
-
- public TestModelUpdatesListener(boolean failOnRedundantUpdates, boolean failOnMultipleUpdateSequences) {
- setFailOnRedundantUpdates(failOnRedundantUpdates);
- setFailOnMultipleUpdateSequences(failOnMultipleUpdateSequences);
- }
-
- public void setFailOnRedundantUpdates(boolean failOnRedundantUpdates) {
- fFailOnRedundantUpdates = failOnRedundantUpdates;
- }
-
- public void setFailOnMultipleUpdateSequences(boolean failOnMultipleUpdateSequences) {
- fFailOnMultipleUpdateSequences = failOnMultipleUpdateSequences;
- }
-
- /**
- * Sets the the maximum amount of time (in milliseconds) that the update listener
- * is going to wait. If set to -1, the listener will wait indefinitely.
- */
- public void setTimeoutInterval(int milis) {
- fTimeoutInterval = milis;
- }
-
- public void reset(TreePath path, TestElement element, int levels, boolean failOnRedundantUpdates, boolean failOnMultipleUpdateSequences) {
- reset();
- addUpdates(path, element, levels);
- addProxies(element);
- setFailOnRedundantUpdates(failOnRedundantUpdates);
- setFailOnMultipleUpdateSequences(failOnMultipleUpdateSequences);
- }
-
- public void reset(boolean failOnRedundantUpdates, boolean failOnMultipleUpdateSequences) {
- reset();
- setFailOnRedundantUpdates(failOnRedundantUpdates);
- setFailOnMultipleUpdateSequences(failOnMultipleUpdateSequences);
- }
-
- public void reset() {
- fHasChildrenUpdates.clear();
- fChildrenUpdates.clear();
- fChildCountUpdates.clear();
- fLabelUpdates.clear();
- fProxyModels.clear();
- fViewerUpdatesComplete = false;
- fLabelUpdatesComplete = false;
- fModelChangedComplete = false;
- fStateSaveComplete = false;
- fStateRestoreComplete = false;
- fTimeoutTime = System.currentTimeMillis() + fTimeoutInterval;
- }
-
- public void addHasChildrenUpdate(TreePath path) {
- fHasChildrenUpdates.add(path);
- }
-
- public void removeHasChildrenUpdate(TreePath path) {
- fHasChildrenUpdates.remove(path);
- }
-
- public void addChildreCountUpdate(TreePath path) {
- fChildCountUpdates.add(path);
- }
-
- public void removeChildreCountUpdate(TreePath path) {
- fChildCountUpdates.remove(path);
- }
-
- public void addChildreUpdate(TreePath path, int index) {
- Set childrenIndexes = (Set)fChildrenUpdates.get(path);
- if (childrenIndexes == null) {
- childrenIndexes = new HashSet(1);
- fChildrenUpdates.put(path, childrenIndexes);
- }
- childrenIndexes.add(new Integer(index));
- }
-
- public void removeChildrenUpdate(TreePath path, int index) {
- Set childrenIndexes = (Set)fChildrenUpdates.get(path);
- if (childrenIndexes != null) {
- childrenIndexes.remove(new Integer(index));
- if (childrenIndexes.isEmpty()) {
- fChildrenUpdates.remove(path);
- }
- }
- }
-
- public void addLabelUpdate(TreePath path) {
- fLabelUpdates.add(path);
- }
-
- public void removeLabelUpdate(TreePath path) {
- fLabelUpdates.remove(path);
- }
-
- public void addUpdates(TreePath path, TestElement element, int levels) {
- addUpdates(path, element, levels, ALL_UPDATES_COMPLETE);
- }
-
- public void addStateUpdates(ITreeModelContentProviderTarget viewer, TreePath path, TestElement element) {
- addUpdates(viewer, path, element, -1, STATE_UPDATES);
- }
-
- public void addUpdates(TreePath path, TestElement element, int levels, int flags) {
- addUpdates(null, path, element, levels, flags);
- }
-
- public void addUpdates(ITreeModelContentProviderTarget viewer, TreePath path, TestElement element, int levels, int flags) {
- if (!path.equals(TreePath.EMPTY)) {
- if ((flags & LABEL_UPDATES) != 0) {
- fLabelUpdates.add(path);
- }
- if ((flags & HAS_CHILDREN_UPDATES) != 0) {
- fHasChildrenUpdates.add(path);
- }
- }
-
- if (levels-- != 0) {
- TestElement[] children = element.getChildren();
- if (children.length > 0 && (viewer == null || path.getSegmentCount() == 0 || viewer.getExpandedState(path))) {
- if ((flags & CHILDREN_COUNT_UPDATES) != 0) {
- fChildCountUpdates.add(path);
- }
- if ((flags & CHILDREN_UPDATES) != 0) {
- Set childrenIndexes = new HashSet();
- for (int i = 0; i < children.length; i++) {
- childrenIndexes.add(new Integer(i));
- }
- fChildrenUpdates.put(path, childrenIndexes);
- }
-
- if ((flags & STATE_UPDATES) != 0 && viewer != null) {
- fStateUpdates.add(path);
- }
-
- for (int i = 0; i < children.length; i++) {
- addUpdates(viewer, path.createChildPath(children[i]), children[i], levels, flags);
- }
- }
-
- }
- }
-
- private void addProxies(TestElement element) {
- TestModel model = element.getModel();
- if (model.getModelProxy() == null) {
- fProxyModels.add(element.getModel());
- }
- TestElement[] children = element.getChildren();
- for (int i = 0; i < children.length; i++) {
- addProxies(children[i]);
- }
- }
-
- public boolean isFinished() {
- return isFinished(ALL_UPDATES_COMPLETE);
- }
-
- public boolean isFinished(int flags) {
- if (fTimeoutInterval > 0 && fTimeoutTime < System.currentTimeMillis()) {
- throw new RuntimeException("Test timed out");
- }
-
- if ( (flags & LABEL_UPDATES_COMPLETE) != 0) {
- if (!fLabelUpdatesComplete) return false;
- }
- if ( (flags & LABEL_UPDATES) != 0) {
- if (!fLabelUpdates.isEmpty()) return false;
- }
- if ( (flags & CONTENT_UPDATES_COMPLETE) != 0) {
- if (!fViewerUpdatesComplete) return false;
- }
- if ( (flags & HAS_CHILDREN_UPDATES) != 0) {
- if (!fHasChildrenUpdates.isEmpty()) return false;
- }
- if ( (flags & CHILDREN_COUNT_UPDATES) != 0) {
- if (!fChildCountUpdates.isEmpty()) return false;
- }
- if ( (flags & CHILDREN_UPDATES) != 0) {
- if (!fChildrenUpdates.isEmpty()) return false;
- }
- if ( (flags & MODEL_CHANGED_COMPLETE) != 0) {
- if (!fModelChangedComplete) return false;
- }
- if ( (flags & STATE_SAVE_COMPLETE) != 0) {
- if (!fStateSaveComplete) return false;
- }
- if ( (flags & STATE_RESTORE_COMPLETE) != 0) {
- if (!fStateRestoreComplete) return false;
- }
- if ( (flags & MODEL_PROXIES_INSTALLED) != 0) {
- if (fProxyModels.size() != 0) return false;
- }
- if ( (flags & VIEWER_UPDATES_RUNNING) != 0) {
- if (fViewerUpdatesRunning != 0) {
- return false;
- }
- }
- if ( (flags & LABEL_UPDATES_RUNNING) != 0) {
- if (fLabelUpdatesRunning != 0) {
- return false;
- }
- }
- return true;
- }
-
- public void updateStarted(IViewerUpdate update) {
- synchronized (this) {
- fViewerUpdatesRunning++;
- }
- }
-
- public void updateComplete(IViewerUpdate update) {
- synchronized (this) {
- fViewerUpdatesRunning--;
- }
-
- if (!update.isCanceled()) {
- if (update instanceof IHasChildrenUpdate) {
- if (!fHasChildrenUpdates.remove(update.getElementPath()) && fFailOnRedundantUpdates) {
- Assert.fail("Redundant update: " + update);
- }
- } if (update instanceof IChildrenCountUpdate) {
- if (!fChildCountUpdates.remove(update.getElementPath()) && fFailOnRedundantUpdates) {
- Assert.fail("Redundant update: " + update);
- }
- } else if (update instanceof IChildrenUpdate) {
- int start = ((IChildrenUpdate)update).getOffset();
- int end = start + ((IChildrenUpdate)update).getLength();
-
- Set childrenIndexes = (Set)fChildrenUpdates.get(update.getElementPath());
- if (childrenIndexes != null) {
- for (int i = start; i < end; i++) {
- childrenIndexes.remove(new Integer(i));
- }
- if (childrenIndexes.isEmpty()) {
- fChildrenUpdates.remove(update.getElementPath());
- }
- } else if (fFailOnRedundantUpdates) {
- Assert.fail("Redundant update: " + update);
- }
- }
- }
- }
-
- public void viewerUpdatesBegin() {
-
- }
-
- public void viewerUpdatesComplete() {
- if (fFailOnMultipleUpdateSequences && fViewerUpdatesComplete) {
- Assert.fail("Multiple viewer update sequences detected");
- }
- fViewerUpdatesComplete = true;
- }
-
- public void labelUpdateComplete(ILabelUpdate update) {
- synchronized (this) {
- fLabelUpdatesRunning--;
- }
- if (!fLabelUpdates.remove(update.getElementPath()) && fFailOnRedundantUpdates) {
- Assert.fail("Redundant update: " + update);
- }
- }
-
- public void labelUpdateStarted(ILabelUpdate update) {
- synchronized (this) {
- fLabelUpdatesRunning++;
- }
- }
-
- public void labelUpdatesBegin() {
- }
-
- public void labelUpdatesComplete() {
- if (fFailOnMultipleUpdateSequences && fLabelUpdatesComplete) {
- Assert.fail("Multiple label update sequences detected");
- }
- fLabelUpdatesComplete = true;
- }
-
- public void modelChanged(IModelDelta delta, IModelProxy proxy) {
- if (fFailOnMultipleUpdateSequences && fModelChangedComplete) {
- Assert.fail("Multiple model changed sequences detected");
- }
- fModelChangedComplete = true;
-
- for (Iterator itr = fProxyModels.iterator(); itr.hasNext();) {
- TestModel model = (TestModel)itr.next();
- if (model.getModelProxy() == proxy) {
- itr.remove();
- break;
- }
- }
- }
-
- public void stateRestoreUpdatesBegin(Object input) {
- }
-
- public void stateRestoreUpdatesComplete(Object input) {
- fStateRestoreComplete = true;
- }
-
- public void stateSaveUpdatesBegin(Object input) {
- }
-
- public void stateSaveUpdatesComplete(Object input) {
- fStateSaveComplete = true;
- }
-
- public void stateUpdateComplete(Object input, IViewerUpdate update) {
- }
-
- public void stateUpdateStarted(Object input, IViewerUpdate update) {
- }
-}
-
-
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/TreeModelViewerAutopopulateAgent.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/TreeModelViewerAutopopulateAgent.java
deleted file mode 100644
index 2600fbe..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/TreeModelViewerAutopopulateAgent.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import java.util.LinkedList;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
-import org.eclipse.jface.viewers.ILazyTreePathContentProvider;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
-
-/**
- *
- */
-public class TreeModelViewerAutopopulateAgent implements IViewerUpdateListener {
-
- private TreeModelViewer fViewer;
-
-
- public TreeModelViewerAutopopulateAgent(TreeModelViewer viewer) {
- fViewer = viewer;
- fViewer.addViewerUpdateListener(this);
- }
-
- public void updateComplete(IViewerUpdate update) {
- if (update instanceof IChildrenCountUpdate) {
- TreePath path = update.getElementPath();
- ILazyTreePathContentProvider contentProvider = (ILazyTreePathContentProvider) fViewer.getContentProvider();
-
- Widget[] items = fViewer.testFindItems(update.getElement());
- for (int i = 0; i < items.length; i++) {
- if ( path.equals(getTreePath(items[i])) ) {
- int itemCount = getItemChildCount(items[i]);
- for (int j = 0; j < itemCount; j++) {
- contentProvider.updateElement(path, j);
- }
- }
- }
- }
- }
-
- public void updateStarted(IViewerUpdate update) {
- // TODO Auto-generated method stub
-
- }
-
- public void viewerUpdatesBegin() {
- // TODO Auto-generated method stub
-
- }
-
- public void viewerUpdatesComplete() {
- // TODO Auto-generated method stub
-
- }
-
- private TreePath getTreePath(Widget w) {
- if (w instanceof TreeItem) {
- TreeItem item = (TreeItem)w;
- LinkedList segments = new LinkedList();
- while (item != null) {
- Object segment = item.getData();
- Assert.isNotNull(segment);
- segments.addFirst(segment);
- item = item.getParentItem();
- }
- return new TreePath(segments.toArray());
- }
- return TreePath.EMPTY;
- }
-
- private int getItemChildCount(Widget w) {
- if (w instanceof Tree) {
- return ((Tree)w).getItemCount();
- } else if (w instanceof TreeItem) {
- return ((TreeItem)w).getItemCount();
- }
- return 0;
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/UpdateTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/UpdateTests.java
deleted file mode 100644
index eff52f4..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/UpdateTests.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import junit.framework.TestCase;
-
-import org.eclipe.debug.tests.viewer.model.TestModel.TestElement;
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Tests to verify that the viewer property updates following changes in the
- * model, following simple content update deltas from the model.
- *
- * @since 3.6
- */
-abstract public class UpdateTests extends TestCase {
- Display fDisplay;
- Shell fShell;
- ITreeModelViewer fViewer;
- TestModelUpdatesListener fListener;
-
- public UpdateTests(String name) {
- super(name);
- }
-
- /**
- * @throws java.lang.Exception
- */
- protected void setUp() throws Exception {
- fDisplay = PlatformUI.getWorkbench().getDisplay();
- fShell = new Shell(fDisplay/*, SWT.ON_TOP | SWT.SHELL_TRIM*/);
- fShell.setMaximized(true);
- fShell.setLayout(new FillLayout());
-
- fViewer = createViewer(fDisplay, fShell);
-
- fListener = new TestModelUpdatesListener(false, false);
- fViewer.addViewerUpdateListener(fListener);
- fViewer.addLabelUpdateListener(fListener);
- fViewer.addModelChangedListener(fListener);
-
- fShell.open ();
- }
-
- abstract protected ITreeModelViewer createViewer(Display display, Shell shell);
-
- /**
- * @throws java.lang.Exception
- */
- protected void tearDown() throws Exception {
- fViewer.removeLabelUpdateListener(fListener);
- fViewer.removeViewerUpdateListener(fListener);
- fViewer.removeModelChangedListener(fListener);
-
- // Close the shell and exit.
- fShell.close();
- while (!fShell.isDisposed()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- }
-
- /**
- * This test:
- * - creates a simple model
- * - replaces the list of elements with a shorter list of elements
- * - refreshes the viewer
- */
- public void testRemoveElements() {
- TestModel model = TestModel.simpleSingleLevel();
- fViewer.setAutoExpandLevel(-1);
-
- // Create the listener
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
-
- // Update the model
- TestElement root = model.getRootElement();
- TreePath rootPath = new TreePath(new Object[] {});
- TestElement[] newElements = new TestElement[] {
- new TestElement(model, "1", new TestElement[0]),
- new TestElement(model, "2", new TestElement[0]),
- new TestElement(model, "3", new TestElement[0]),
- };
- model.setElementChildren(rootPath, newElements);
-
- // Reset the listener to NOT fail on redundant updates.
- // When elements are remvoed from the model and the model is
- // refreshed the viewer will issue an IChildrenUpdate for the
- // missing elements as an optimization.
- fListener.reset(rootPath, root, -1, false, false);
-
- model.postDelta(new ModelDelta(root, IModelDelta.CONTENT));
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
- /**
- * This test:
- * - creates a simple model
- * - sets a list of children to one of the elements
- * - refreshes the viewer
- */
- public void testAddNewChildren() {
- TestModel model = TestModel.simpleSingleLevel();
- fViewer.setAutoExpandLevel(-1);
-
- // Create the listener
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, true, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
-
- // Update the model
- TestElement element = model.getRootElement().getChildren()[0];
- TreePath elementPath = new TreePath(new Object[] { element });
- TestElement[] newChildren = new TestElement[] {
- new TestElement(model, "1.1", new TestElement[0]),
- new TestElement(model, "1.2", new TestElement[0]),
- new TestElement(model, "1.3", new TestElement[0]),
- };
- model.setElementChildren(elementPath, newChildren);
-
- // Reset the viewer to ignore redundant updates. The '1' element
- // will be updated for "hasChildren" before it is expanded, which is
- // expected.
- TreePath rootPath = TreePath.EMPTY;
- TestElement rootElement = model.getRootElement();
- fListener.reset(rootPath, rootElement, -1, false, false);
-
- // Refresh the viewer
- model.postDelta(new ModelDelta(rootElement, IModelDelta.CONTENT));
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
-
- private void removeElement(TestModel model, int index) {
- ModelDelta delta = model.removeElementChild(TreePath.EMPTY, index);
-
- // Remove delta should generate no new updates, but we still need to wait for the event to
- // be processed.
- fListener.reset();
- model.postDelta(delta);
- while (!fListener.isFinished(TestModelUpdatesListener.MODEL_CHANGED_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
- private void addElement(TestModel model, String label, int position) {
- ModelDelta delta = model.addElementChild(TreePath.EMPTY, position, new TestElement(model, label, new TestElement[0]));
-
- // Remove delta should generate no new updates, but we still need to wait for the event to
- // be processed.
- fListener.reset();
- model.postDelta(delta);
- while (!fListener.isFinished(TestModelUpdatesListener.MODEL_CHANGED_COMPLETE | TestModelUpdatesListener.CONTENT_UPDATES_COMPLETE | TestModelUpdatesListener.LABEL_UPDATES_COMPLETE))
- if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
- }
-
- public void testRepeatedAddRemoveElement() {
- //TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(fViewer);
-
- TestModel model = TestModel.simpleSingleLevel();
- fViewer.setAutoExpandLevel(-1);
-
- // Create the listener
- fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, false, false);
-
- // Set the input into the view and update the view.
- fViewer.setInput(model.getRootElement());
- while (!fListener.isFinished()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- model.validateData(fViewer, TreePath.EMPTY);
-
- // Update the model
- removeElement(model, 2);
- addElement(model, "3-new", 3);
- removeElement(model, 4);
- addElement(model, "5-new", 5);
- removeElement(model, 1);
- addElement(model, "1-new", 1);
- removeElement(model, 3);
- addElement(model, "4-new", 4);
- }
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerDeltaTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerDeltaTests.java
deleted file mode 100644
index f310178..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerDeltaTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualTreeModelViewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.6
- */
-public class VirtualViewerDeltaTests extends DeltaTests {
-
- public VirtualViewerDeltaTests(String name) {
- super(name);
- }
-
- protected ITreeModelContentProviderTarget createViewer(Display display, Shell shell) {
- return new VirtualTreeModelViewer(fDisplay, 0, new PresentationContext("TestViewer"));
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerLazyModeTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerLazyModeTests.java
deleted file mode 100644
index 6afa8f6..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerLazyModeTests.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import junit.framework.TestCase;
-
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualTreeModelViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Tests which verify the operation of the virtual viewer in the lazy mode.
- * Note: the virtual viewer doesn't support lazy mode yet, so this class
- * is really just a big place holder.
- *
- * @since 3.6
- */
-public class VirtualViewerLazyModeTests extends TestCase {
- Display fDisplay;
- Shell fShell;
- ITreeModelViewer fViewer;
- TestModelUpdatesListener fListener;
-
- public VirtualViewerLazyModeTests(String name) {
- super(name);
- }
-
- /**
- * @throws java.lang.Exception
- */
- protected void setUp() throws Exception {
- fDisplay = PlatformUI.getWorkbench().getDisplay();
- fShell = new Shell(fDisplay/*, SWT.ON_TOP | SWT.SHELL_TRIM*/);
- fShell.setMaximized(true);
- fShell.setLayout(new FillLayout());
-
- fViewer = createViewer(fDisplay, fShell);
-
- fListener = new TestModelUpdatesListener(false, false);
- fViewer.addViewerUpdateListener(fListener);
- fViewer.addLabelUpdateListener(fListener);
- fViewer.addModelChangedListener(fListener);
-
- fShell.open ();
- }
-
- protected ITreeModelViewer createViewer(Display display, Shell shell) {
- return new VirtualTreeModelViewer(fDisplay, SWT.VIRTUAL, new PresentationContext("TestViewer"));
- }
-
- /**
- * @throws java.lang.Exception
- */
- protected void tearDown() throws Exception {
- fViewer.removeLabelUpdateListener(fListener);
- fViewer.removeViewerUpdateListener(fListener);
- fViewer.removeModelChangedListener(fListener);
-
- // Close the shell and exit.
- fShell.close();
- while (!fShell.isDisposed()) if (!fDisplay.readAndDispatch ()) fDisplay.sleep ();
- }
-
- public void test() {
- // TODO
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerPerformanceTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerPerformanceTests.java
deleted file mode 100644
index 2c4e6cd..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerPerformanceTests.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualTreeModelViewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.6
- */
-public class VirtualViewerPerformanceTests extends PerformanceTests {
-
- public VirtualViewerPerformanceTests(String name) {
- super(name);
- }
-
- protected ITreeModelContentProviderTarget createViewer(Display display, Shell shell) {
- return new VirtualTreeModelViewer(fDisplay, 0, new PresentationContext("TestViewer"));
- }
-
- protected int getTestModelDepth() {
- return 7;
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerSelectionTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerSelectionTests.java
deleted file mode 100644
index e716acf..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerSelectionTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualTreeModelViewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.6
- */
-public class VirtualViewerSelectionTests extends SelectionTests {
-
- public VirtualViewerSelectionTests(String name) {
- super(name);
- }
-
- protected ITreeModelViewer createViewer(Display display, Shell shell) {
- return new VirtualTreeModelViewer(fDisplay, 0, new PresentationContext("TestViewer"));
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerStateTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerStateTests.java
deleted file mode 100644
index 5a4e4d6..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerStateTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualTreeModelViewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.6
- */
-public class VirtualViewerStateTests extends StateTests {
-
- public VirtualViewerStateTests(String name) {
- super(name);
- }
-
- protected ITreeModelViewer createViewer(Display display, Shell shell) {
- return new VirtualTreeModelViewer(fDisplay, 0, new PresentationContext("TestViewer"));
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerUpdateTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerUpdateTests.java
deleted file mode 100644
index 507be51..0000000
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/viewer/model/VirtualViewerUpdateTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipe.debug.tests.viewer.model;
-
-import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualTreeModelViewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @since 3.6
- */
-public class VirtualViewerUpdateTests extends UpdateTests {
-
- public VirtualViewerUpdateTests(String name) {
- super(name);
- }
-
- protected ITreeModelViewer createViewer(Display display, Shell shell) {
- return new VirtualTreeModelViewer(fDisplay, 0, new PresentationContext("TestViewer"));
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AutomatedSuite.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AutomatedSuite.java
deleted file mode 100644
index 8d60693..0000000
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AutomatedSuite.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipe.debug.tests.launching.AcceleratorSubstitutionTests;
-import org.eclipe.debug.tests.launching.LaunchConfigurationTests;
-import org.eclipe.debug.tests.launching.LaunchHistoryTests;
-import org.eclipe.debug.tests.launching.LaunchManagerTests;
-import org.eclipe.debug.tests.launching.RefreshTabTests;
-import org.eclipe.debug.tests.view.memory.MemoryRenderingTests;
-import org.eclipe.debug.tests.viewer.model.ChildrenUpdateTests;
-import org.eclipe.debug.tests.viewer.model.FilterTransformTests;
-import org.eclipe.debug.tests.viewer.model.JFaceViewerCheckTests;
-import org.eclipe.debug.tests.viewer.model.JFaceViewerContentTests;
-import org.eclipe.debug.tests.viewer.model.JFaceViewerDeltaTests;
-import org.eclipe.debug.tests.viewer.model.JFaceViewerSelectionTests;
-import org.eclipe.debug.tests.viewer.model.JFaceViewerStateTests;
-import org.eclipe.debug.tests.viewer.model.JFaceViewerUpdateTests;
-import org.eclipe.debug.tests.viewer.model.PresentationContextTests;
-import org.eclipe.debug.tests.viewer.model.VirtualViewerDeltaTests;
-import org.eclipe.debug.tests.viewer.model.VirtualViewerLazyModeTests;
-import org.eclipe.debug.tests.viewer.model.VirtualViewerSelectionTests;
-import org.eclipe.debug.tests.viewer.model.VirtualViewerStateTests;
-import org.eclipe.debug.tests.viewer.model.VirtualViewerUpdateTests;
-import org.eclipse.debug.tests.statushandlers.StatusHandlerTests;
-
-/**
- * Tests for integration and nightly builds.
- *
- * @since 3.6
- */
-public class AutomatedSuite extends TestSuite {
-
- /**
- * Returns the suite. This is required to use the JUnit Launcher.
- *
- * @return the test suite
- */
- public static Test suite() {
- return new AutomatedSuite();
- }
-
- /**
- * Constructs the automated test suite. Adds all tests.
- */
- public AutomatedSuite() {
- // JFace viewer tests
- addTest(new TestSuite(JFaceViewerCheckTests.class));
- addTest(new TestSuite(JFaceViewerContentTests.class));
- addTest(new TestSuite(JFaceViewerDeltaTests.class));
- addTest(new TestSuite(JFaceViewerSelectionTests.class));
- addTest(new TestSuite(JFaceViewerStateTests.class));
- addTest(new TestSuite(JFaceViewerUpdateTests.class));
-
- // Virtual viewer tests
- addTest(new TestSuite(VirtualViewerDeltaTests.class));
- addTest(new TestSuite(VirtualViewerLazyModeTests.class));
- addTest(new TestSuite(VirtualViewerSelectionTests.class));
- addTest(new TestSuite(VirtualViewerStateTests.class));
- addTest(new TestSuite(VirtualViewerUpdateTests.class));
-
- // Viewer neutral tests
- addTest(new TestSuite(FilterTransformTests.class));
- addTest(new TestSuite(ChildrenUpdateTests.class));
- addTest(new TestSuite(PresentationContextTests.class));
-
- // Memory view
- addTest(new TestSuite(MemoryRenderingTests.class));
-
- // Launch framework
- addTest(new TestSuite(LaunchConfigurationTests.class));
- addTest(new TestSuite(AcceleratorSubstitutionTests.class));
- addTest(new TestSuite(LaunchHistoryTests.class));
- addTest(new TestSuite(LaunchManagerTests.class));
- addTest(new TestSuite(RefreshTabTests.class));
-
- // Status handlers
- addTest(new TestSuite(StatusHandlerTests.class));
- }
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/PerformanceSuite.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/PerformanceSuite.java
deleted file mode 100644
index 98fcfac..0000000
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/PerformanceSuite.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipe.debug.tests.viewer.model.JFaceViewerPerformanceTests;
-import org.eclipe.debug.tests.viewer.model.VirtualViewerPerformanceTests;
-
-/**
- * Tests for release builds.
- *
- * @since 3.6
- */
-public class PerformanceSuite extends TestSuite {
-
- /**
- * Returns the suite. This is required to use the JUnit Launcher.
- *
- * @return the test suite
- */
- public static Test suite() {
- return new PerformanceSuite();
- }
-
- /**
- * Constructs the automated test suite. Adds all tests.
- */
- public PerformanceSuite() {
- // JFace viewer tests
- addTest(new TestSuite(JFaceViewerPerformanceTests.class));
-
- // Virtual viewer tests
- addTest(new TestSuite(VirtualViewerPerformanceTests.class));
- }
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/TestsPlugin.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/TestsPlugin.java
deleted file mode 100644
index 6652d33..0000000
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/TestsPlugin.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- * IBM - ongoing enhancements
- *******************************************************************************/
-package org.eclipse.debug.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- *
- * @since 3.6
- */
-public class TestsPlugin extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.debug.tests"; //$NON-NLS-1$
-
- // The shared instance
- private static TestsPlugin plugin;
-
- /**
- * The constructor
- */
- public TestsPlugin() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static TestsPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the file corresponding to the specified path from within this bundle
- * @param path
- * @return the file corresponding to the specified path from within this bundle, or
- * <code>null</code> if not found
- */
- public File getFileInPlugin(IPath path) {
- try {
- Bundle bundle = getDefault().getBundle();
- URL installURL= new URL(bundle.getEntry("/"), path.toString());
- URL localURL= FileLocator.toFileURL(installURL);//Platform.asLocalURL(installURL);
- return new File(localURL.getFile());
- } catch (IOException e) {
- return null;
- }
- }
-
- /**
- * Creates a new project with the specified name
- * @param projectName
- * @return a new project with the specified name
- * @throws CoreException
- */
- public static IProject createProject(String projectName) throws CoreException {
- IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
- IProject project= root.getProject(projectName);
- if (!project.exists()) {
- project.create(null);
- } else {
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- }
-
- if (!project.isOpen()) {
- project.open(null);
- }
- return project;
- }
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/statushandlers/StatusHandler.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/statushandlers/StatusHandler.java
deleted file mode 100644
index 6315b43..0000000
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/statushandlers/StatusHandler.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.tests.statushandlers;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.core.IStatusHandler;
-
-/**
- * Test status handler
- */
-public class StatusHandler implements IStatusHandler {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object)
- */
- public Object handleStatus(IStatus status, Object source) throws CoreException {
- return null;
- }
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/statushandlers/StatusHandlerTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/statushandlers/StatusHandlerTests.java
deleted file mode 100644
index bb002ca..0000000
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/statushandlers/StatusHandlerTests.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.tests.statushandlers;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IStatusHandler;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.core.Preferences;
-import org.eclipse.debug.tests.TestsPlugin;
-
-/**
- * Tests status handlers
- */
-public class StatusHandlerTests extends TestCase {
-
- /**
- * Status for which a handler is registered.
- */
- public static final IStatus STATUS = new Status(IStatus.ERROR, TestsPlugin.PLUGIN_ID, 333,"", null);
-
- /**
- * Tests that a status handler extension exists
- */
- public void testStatusHandlerExtension() {
- IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler(STATUS);
- assertNotNull("missing status handler extension", handler);
- assertTrue("Unexpected handler", handler instanceof StatusHandler);
- }
-
- /**
- * Tests that status handlers are not returned when preference is disabled
- */
- public void testDisableStatusHandlers() {
- try {
- Preferences.setBoolean(DebugPlugin.getUniqueIdentifier(), IInternalDebugCoreConstants.PREF_ENABLE_STATUS_HANDLERS, false, new InstanceScope());
- IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler(STATUS);
- assertNull("status handler extension should be disabled", handler);
- } finally {
- Preferences.setBoolean(DebugPlugin.getUniqueIdentifier(), IInternalDebugCoreConstants.PREF_ENABLE_STATUS_HANDLERS, true, new InstanceScope());
- }
- }
-
-}
diff --git a/org.eclipse.debug.tests/test-import/Import1.launch b/org.eclipse.debug.tests/test-import/Import1.launch
deleted file mode 100644
index cb886fe..0000000
--- a/org.eclipse.debug.tests/test-import/Import1.launch
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="ArrayDetailTestsDef"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DebugTests"/>
-<mapAttribute key="org.eclipse.jdt.launchingVM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP">
-<mapEntry key="org.eclipse.jdt.launching.JAVA_COMMAND" value="java"/>
-</mapAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/DebugTests/src/ArrayDetailTestsDef.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-</launchConfiguration>
diff --git a/org.eclipse.debug.tests/test-import/Import2.launch b/org.eclipse.debug.tests/test-import/Import2.launch
deleted file mode 100644
index 23065eb..0000000
--- a/org.eclipse.debug.tests/test-import/Import2.launch
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="ArrayTests"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DebugTests"/>
-<mapAttribute key="org.eclipse.jdt.launchingVM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP">
-<mapEntry key="org.eclipse.jdt.launching.JAVA_COMMAND" value="java"/>
-</mapAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/DebugTests/src/ArrayTests.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-</launchConfiguration>
diff --git a/org.eclipse.debug.tests/test-import/Import3.launch b/org.eclipse.debug.tests/test-import/Import3.launch
deleted file mode 100644
index db7943d..0000000
--- a/org.eclipse.debug.tests/test-import/Import3.launch
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/DebugTests/src/Breakpoints.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="Breakpoints"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DebugTests"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/DebugTests/src/Breakpoints.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-</launchConfiguration>
diff --git a/org.eclipse.debug.tests/test-import/Import4.launch b/org.eclipse.debug.tests/test-import/Import4.launch
deleted file mode 100644
index 6878540..0000000
--- a/org.eclipse.debug.tests/test-import/Import4.launch
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="ByteArrayTests"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DebugTests"/>
-<mapAttribute key="org.eclipse.jdt.launchingVM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP">
-<mapEntry key="org.eclipse.jdt.launching.JAVA_COMMAND" value="java"/>
-</mapAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/DebugTests/src/ByteArrayTests.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-</launchConfiguration>
diff --git a/org.eclipse.debug.tests/test-import/Import5.launch b/org.eclipse.debug.tests/test-import/Import5.launch
deleted file mode 100644
index 61e32f5..0000000
--- a/org.eclipse.debug.tests/test-import/Import5.launch
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="CompileError"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DebugTests"/>
-<mapAttribute key="org.eclipse.jdt.launchingVM_INSTALL_TYPE_SPECIFIC_ATTRS_MAP">
-<mapEntry key="org.eclipse.jdt.launching.JAVA_COMMAND" value="java"/>
-</mapAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/DebugTests/src/CompileError.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-</launchConfiguration>
diff --git a/org.eclipse.debug.tests/test.xml b/org.eclipse.debug.tests/test.xml
deleted file mode 100644
index c23a3b1..0000000
--- a/org.eclipse.debug.tests/test.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="${basedir}\..\.."/>
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="plugin-name" value="org.eclipse.debug.tests"/>
- <property name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the regression tests that need to be run. -->
- <target name="suite">
- <property name="platform-debug-folder"
- value="${eclipse-home}/platform_debug_folder"/>
- <delete dir="${platform-debug-folder}" quiet="true"/>
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${platform-debug-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname"
- value="org.eclipse.debug.tests.AutomatedSuite"/>
- </ant>
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-
-</project>
diff --git a/org.eclipse.debug.ui/.classpath b/org.eclipse.debug.ui/.classpath
deleted file mode 100644
index 95b3cfa..0000000
--- a/org.eclipse.debug.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="ui"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.debug.ui/.cvsignore b/org.eclipse.debug.ui/.cvsignore
deleted file mode 100644
index c5e82d7..0000000
--- 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 03fe0ac..0000000
--- a/org.eclipse.debug.ui/.options
+++ /dev/null
@@ -1,11 +0,0 @@
-org.eclipse.debug.ui/debug = false
-org.eclipse.debug.ui/debug/viewers/model = false
-org.eclipse.debug.ui/debug/viewers/viewer = false
-org.eclipse.debug.ui/debug/viewers/deltas = false
-org.eclipse.debug.ui/debug/viewers/contentProvider = false
-org.eclipse.debug.ui/debug/viewers/updateSequence = false
-org.eclipse.debug.ui/debug/contextlaunching = false
-org.eclipse.debug.ui/debug/launchhistory = false
-org.eclipse.debug.ui/debug/viewers/stateSaveRestore = false
-org.eclipse.debug.ui/debug/viewers/presentationId =
-org.eclipse.debug.ui/debug/breadcrumb = false
diff --git a/org.eclipse.debug.ui/.project b/org.eclipse.debug.ui/.project
deleted file mode 100644
index 787d855..0000000
--- a/org.eclipse.debug.ui/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.debug.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.debug.ui/.settings/org.eclipse.core.resources.prefs b/org.eclipse.debug.ui/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 46dcee1..0000000
--- a/org.eclipse.debug.ui/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Thu Mar 09 10:33:21 CST 2006
-eclipse.preferences.version=1
-encoding//ui/org/eclipse/debug/internal/ui/elements/adapters/Messages.properties=8859_1
-encoding//ui/org/eclipse/debug/internal/ui/importexport/breakpoints/BreakpointImportExport.properties=8859_1
diff --git a/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bc985ad..0000000
--- a/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,101 +0,0 @@
-#Thu Oct 15 14:59:52 CDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,HIGH
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,EXPERIMENTAL,CONTEXTLAUNCHING
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.debug.ui/.settings/org.eclipse.pde.prefs b/org.eclipse.debug.ui/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 7686374..0000000
--- a/org.eclipse.debug.ui/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,17 +0,0 @@
-#Tue Jan 30 11:38:16 CST 2007
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.deprecated=1
-compilers.p.illegal-att-value=0
-compilers.p.missing-packages=0
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.p.unused-element-or-attribute=1
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/org.eclipse.debug.ui/META-INF/MANIFEST.MF b/org.eclipse.debug.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 97ec5f4..0000000
--- a/org.eclipse.debug.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,73 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.debug.ui; singleton:=true
-Bundle-Version: 3.6.0.qualifier
-Bundle-Activator: org.eclipse.debug.internal.ui.DebugUIPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.debug.internal.ui;x-internal:=true,
- org.eclipse.debug.internal.ui.actions;x-internal:=true,
- org.eclipse.debug.internal.ui.actions.breakpointGroups;x-internal:=true,
- org.eclipse.debug.internal.ui.actions.breakpoints;x-internal:=true,
- org.eclipse.debug.internal.ui.actions.expressions;x-internal:=true,
- org.eclipse.debug.internal.ui.actions.variables;x-internal:=true,
- org.eclipse.debug.internal.ui.actions.variables.details;x-internal:=true,
- org.eclipse.debug.internal.ui.commands.actions;x-internal:=true,
- org.eclipse.debug.internal.ui.contextlaunching;x-internal:=true,
- org.eclipse.debug.internal.ui.contexts;x-internal:=true,
- org.eclipse.debug.internal.ui.elements.adapters;x-internal:=true,
- org.eclipse.debug.internal.ui.importexport.breakpoints;x-internal:=true,
- org.eclipse.debug.internal.ui.importexport.launchconfigurations;x-internal:=true,
- org.eclipse.debug.internal.ui.launchConfigurations;x-internal:=true,
- org.eclipse.debug.internal.ui.memory;x-internal:=true,
- org.eclipse.debug.internal.ui.memory.provisional;x-internal:=true,
- org.eclipse.debug.internal.ui.model.elements;x-internal:=true,
- org.eclipse.debug.internal.ui.preferences;x-internal:=true,
- org.eclipse.debug.internal.ui.sourcelookup;x-internal:=true,
- org.eclipse.debug.internal.ui.sourcelookup.browsers;x-internal:=true,
- org.eclipse.debug.internal.ui.stringsubstitution;x-internal:=true,
- org.eclipse.debug.internal.ui.viewers;x-internal:=true,
- org.eclipse.debug.internal.ui.viewers.breadcrumb;x-internal:=true,
- org.eclipse.debug.internal.ui.viewers.model;x-friends:="org.eclipse.debug.tests",
- org.eclipse.debug.internal.ui.viewers.model.provisional;
- x-friends:="org.eclipse.debug.examples.ui,
- org.eclipse.jdt.debug.ui,
- org.eclipse.cdt.dsf.ui,
- org.eclipse.cdt.dsf.gdb.ui,
- org.eclipse.debug.tests",
- org.eclipse.debug.internal.ui.viewers.provisional;x-friends:="org.eclipse.debug.tests",
- org.eclipse.debug.internal.ui.viewers.update;x-internal:=true,
- org.eclipse.debug.internal.ui.views;x-internal:=true,
- org.eclipse.debug.internal.ui.views.breakpoints;x-internal:=true,
- org.eclipse.debug.internal.ui.views.console;x-internal:=true,
- org.eclipse.debug.internal.ui.views.expression;x-internal:=true,
- org.eclipse.debug.internal.ui.views.launch;x-internal:=true,
- org.eclipse.debug.internal.ui.views.memory;x-internal:=true,
- org.eclipse.debug.internal.ui.views.memory.renderings;x-internal:=true,
- org.eclipse.debug.internal.ui.views.modules;x-internal:=true,
- org.eclipse.debug.internal.ui.views.registers;x-internal:=true,
- org.eclipse.debug.internal.ui.views.variables;x-internal:=true,
- org.eclipse.debug.internal.ui.views.variables.details;x-internal:=true,
- org.eclipse.debug.ui,
- org.eclipse.debug.ui.actions,
- org.eclipse.debug.ui.console,
- org.eclipse.debug.ui.contexts,
- org.eclipse.debug.ui.memory,
- org.eclipse.debug.ui.sourcelookup
-Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.variables;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui.console;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.help;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.debug.core;bundle-version="[3.6.0,4.0.0)";visibility:=reexport,
- org.eclipse.jface.text;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui.workbench.texteditor;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui.editors;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.core.filesystem;bundle-version="[1.2.0,2.0.0)"
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Import-Package: com.ibm.icu.text
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/org.eclipse.debug.ui/about.html b/org.eclipse.debug.ui/about.html
deleted file mode 100644
index 4602330..0000000
--- a/org.eclipse.debug.ui/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.debug.ui/build.properties b/org.eclipse.debug.ui/build.properties
deleted file mode 100644
index 6cf5232..0000000
--- a/org.eclipse.debug.ui/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = icons/,\
- plugin.xml,\
- plugin.properties,\
- .,\
- about.html,\
- META-INF/,\
- .options
-
-source.. = ui/
-src.includes = about.html,\
- schema/
diff --git a/org.eclipse.debug.ui/doc/.cvsignore b/org.eclipse.debug.ui/doc/.cvsignore
deleted file mode 100644
index c3d27e2..0000000
--- a/org.eclipse.debug.ui/doc/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-book.css
-org_eclipse_debug_ui_consoleColorProviders.html
-org_eclipse_debug_ui_consoleLineTrackers.html
-org_eclipse_debug_ui_debugModelPresentations.html
-org_eclipse_debug_ui_launchConfigurationTabGroups.html
-org_eclipse_debug_ui_launchConfigurationTypeImages.html
-org_eclipse_debug_ui_launchGroups.html
-org_eclipse_debug_ui_launchShortcuts.html
-org_eclipse_debug_ui_sourceContainerPresentations.html
-org_eclipse_debug_ui_stringVariablePresentations.html
-schema.css
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/changevariablevalue_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/changevariablevalue_co.gif
deleted file mode 100644
index d33c4d3..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/changevariablevalue_co.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 6775edf..0000000
--- 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/collapseall.gif b/org.eclipse.debug.ui/icons/full/dlcl16/collapseall.gif
deleted file mode 100644
index bc3c2be..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/collapseall.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/copy_edit_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/copy_edit_co.gif
deleted file mode 100644
index 98626a8..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/copy_edit_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/copyviewtoclipboard_tsk.gif b/org.eclipse.debug.ui/icons/full/dlcl16/copyviewtoclipboard_tsk.gif
deleted file mode 100644
index 3a4c6c3..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/copyviewtoclipboard_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/debuglast_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/debuglast_co.gif
deleted file mode 100644
index 83482f5..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/debuglast_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/det_pane_hide.gif b/org.eclipse.debug.ui/icons/full/dlcl16/det_pane_hide.gif
deleted file mode 100644
index 0c564ff..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/det_pane_hide.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/det_pane_right.gif b/org.eclipse.debug.ui/icons/full/dlcl16/det_pane_right.gif
deleted file mode 100644
index ce1a29c..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/det_pane_right.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/det_pane_under.gif b/org.eclipse.debug.ui/icons/full/dlcl16/det_pane_under.gif
deleted file mode 100644
index 5bffca2..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/det_pane_under.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/disabled_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/disabled_co.gif
deleted file mode 100644
index 803d910..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/disabled_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 587f8c9..0000000
--- 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/display_selected_mb.gif b/org.eclipse.debug.ui/icons/full/dlcl16/display_selected_mb.gif
deleted file mode 100644
index db124cb..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/display_selected_mb.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/edtsrclkup_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/edtsrclkup_co.gif
deleted file mode 100644
index 2c6b58b..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/edtsrclkup_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/enabled_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/enabled_co.gif
deleted file mode 100644
index 0e83deb..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/enabled_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/export_brkpts.gif b/org.eclipse.debug.ui/icons/full/dlcl16/export_brkpts.gif
deleted file mode 100644
index 57e9ffd..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/export_brkpts.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/filter_ps.gif b/org.eclipse.debug.ui/icons/full/dlcl16/filter_ps.gif
deleted file mode 100644
index 6c54da9..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/filter_ps.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/import_brkpts.gif b/org.eclipse.debug.ui/icons/full/dlcl16/import_brkpts.gif
deleted file mode 100644
index e416bf0..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/import_brkpts.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/lock_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/lock_co.gif
deleted file mode 100644
index b776478..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/lock_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/memoryreset_tsk.gif b/org.eclipse.debug.ui/icons/full/dlcl16/memoryreset_tsk.gif
deleted file mode 100644
index bd3b45d..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/memoryreset_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/metharg_obj.gif b/org.eclipse.debug.ui/icons/full/dlcl16/metharg_obj.gif
deleted file mode 100644
index f538ca7..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/metharg_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/monitorexpression_tsk.gif b/org.eclipse.debug.ui/icons/full/dlcl16/monitorexpression_tsk.gif
deleted file mode 100644
index dfbf68f..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/monitorexpression_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/new_con.gif b/org.eclipse.debug.ui/icons/full/dlcl16/new_con.gif
deleted file mode 100644
index 8c682c0..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/new_con.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/next_thread_nav.gif b/org.eclipse.debug.ui/icons/full/dlcl16/next_thread_nav.gif
deleted file mode 100644
index 59276a3..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/next_thread_nav.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/prev_thread_nav.gif b/org.eclipse.debug.ui/icons/full/dlcl16/prev_thread_nav.gif
deleted file mode 100644
index 6882d9c..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/prev_thread_nav.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/printview_tsk.gif b/org.eclipse.debug.ui/icons/full/dlcl16/printview_tsk.gif
deleted file mode 100644
index 4d2722f..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/printview_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/prop_ps.gif b/org.eclipse.debug.ui/icons/full/dlcl16/prop_ps.gif
deleted file mode 100644
index 0fbf9d0..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/prop_ps.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 ecd1be5..0000000
--- 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 559e462..0000000
--- 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/removememory_tsk.gif b/org.eclipse.debug.ui/icons/full/dlcl16/removememory_tsk.gif
deleted file mode 100644
index 559e462..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/removememory_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/restart_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/restart_co.gif
deleted file mode 100644
index a3c6fc5..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/restart_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 8652797..0000000
--- 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/runlast_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/runlast_co.gif
deleted file mode 100644
index 0c361fd..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/runlast_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/runtoline_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/runtoline_co.gif
deleted file mode 100644
index 50912b3..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/runtoline_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/skip_brkp.gif b/org.eclipse.debug.ui/icons/full/dlcl16/skip_brkp.gif
deleted file mode 100644
index 8b1e9b4..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/skip_brkp.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/stepbystep_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/stepbystep_co.gif
deleted file mode 100644
index fdbf370..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/stepbystep_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 61c5ad7..0000000
--- 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 c194def..0000000
--- 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 67fa335..0000000
--- 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 e47777b..0000000
--- 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/synced.gif b/org.eclipse.debug.ui/icons/full/dlcl16/synced.gif
deleted file mode 100644
index 4f6e43a..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/synced.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/terminate_all_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/terminate_all_co.gif
deleted file mode 100644
index 1a33ac8..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/terminate_all_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 4f3dcba..0000000
--- 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/terminate_rem_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/terminate_rem_co.gif
deleted file mode 100644
index 9b46637..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/terminate_rem_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 8341fba..0000000
--- 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/dlcl16/toggledetailpane_co.gif b/org.eclipse.debug.ui/icons/full/dlcl16/toggledetailpane_co.gif
deleted file mode 100644
index edb400b..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/toggledetailpane_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dlcl16/var_cntnt_prvdr.gif b/org.eclipse.debug.ui/icons/full/dlcl16/var_cntnt_prvdr.gif
deleted file mode 100644
index 50b6cec..0000000
--- a/org.eclipse.debug.ui/icons/full/dlcl16/var_cntnt_prvdr.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 6434db2..0000000
--- 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/environment_co.gif b/org.eclipse.debug.ui/icons/full/dtool16/environment_co.gif
deleted file mode 100644
index 11640f1..0000000
--- a/org.eclipse.debug.ui/icons/full/dtool16/environment_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dtool16/profile_exc.gif b/org.eclipse.debug.ui/icons/full/dtool16/profile_exc.gif
deleted file mode 100644
index a5edd3a..0000000
--- a/org.eclipse.debug.ui/icons/full/dtool16/profile_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 a252bf0..0000000
--- 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/dtool16/term_restart.gif b/org.eclipse.debug.ui/icons/full/dtool16/term_restart.gif
deleted file mode 100644
index fa0df6f..0000000
--- a/org.eclipse.debug.ui/icons/full/dtool16/term_restart.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/dtool16/watch_exp.gif b/org.eclipse.debug.ui/icons/full/dtool16/watch_exp.gif
deleted file mode 100644
index 38f60cd..0000000
--- a/org.eclipse.debug.ui/icons/full/dtool16/watch_exp.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/changevariablevalue_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/changevariablevalue_co.gif
deleted file mode 100644
index 87e57e3..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/changevariablevalue_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/collapseall.gif b/org.eclipse.debug.ui/icons/full/elcl16/collapseall.gif
deleted file mode 100644
index dc923f5..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/collapseall.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/copy_edit_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/copy_edit_co.gif
deleted file mode 100644
index 7f5fe98..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/copy_edit_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/copyviewtoclipboard_tsk.gif b/org.eclipse.debug.ui/icons/full/elcl16/copyviewtoclipboard_tsk.gif
deleted file mode 100644
index 540860f..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/copyviewtoclipboard_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/debuglast_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/debuglast_co.gif
deleted file mode 100644
index cb68be1..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/debuglast_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/delete_config.gif b/org.eclipse.debug.ui/icons/full/elcl16/delete_config.gif
deleted file mode 100644
index b6922ac..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/delete_config.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/det_pane_hide.gif b/org.eclipse.debug.ui/icons/full/elcl16/det_pane_hide.gif
deleted file mode 100644
index 42fca3f..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/det_pane_hide.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/det_pane_right.gif b/org.eclipse.debug.ui/icons/full/elcl16/det_pane_right.gif
deleted file mode 100644
index d590470..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/det_pane_right.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/det_pane_under.gif b/org.eclipse.debug.ui/icons/full/elcl16/det_pane_under.gif
deleted file mode 100644
index dee0cbc..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/det_pane_under.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/disabled_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/disabled_co.gif
deleted file mode 100644
index f6b9f8a..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/disabled_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 d8fdd8a..0000000
--- 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/display_selected_mb.gif b/org.eclipse.debug.ui/icons/full/elcl16/display_selected_mb.gif
deleted file mode 100644
index 3637794..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/display_selected_mb.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/dissolve_group.gif b/org.eclipse.debug.ui/icons/full/elcl16/dissolve_group.gif
deleted file mode 100644
index d077125..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/dissolve_group.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/drop_to_frame.gif b/org.eclipse.debug.ui/icons/full/elcl16/drop_to_frame.gif
deleted file mode 100644
index 63a0f19..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/drop_to_frame.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/edtsrclkup_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/edtsrclkup_co.gif
deleted file mode 100644
index 94eedf6..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/edtsrclkup_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/enabled_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/enabled_co.gif
deleted file mode 100644
index 9cacb96..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/enabled_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/expandall.gif b/org.eclipse.debug.ui/icons/full/elcl16/expandall.gif
deleted file mode 100644
index c4a67bb..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/expandall.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/export_brkpts.gif b/org.eclipse.debug.ui/icons/full/elcl16/export_brkpts.gif
deleted file mode 100644
index c1083f8..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/export_brkpts.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/filter_ps.gif b/org.eclipse.debug.ui/icons/full/elcl16/filter_ps.gif
deleted file mode 100644
index a4c9e60..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/filter_ps.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/hierarchicalLayout.gif b/org.eclipse.debug.ui/icons/full/elcl16/hierarchicalLayout.gif
deleted file mode 100644
index 2344861..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/hierarchicalLayout.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/import_brkpts.gif b/org.eclipse.debug.ui/icons/full/elcl16/import_brkpts.gif
deleted file mode 100644
index ffcd7b8..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/import_brkpts.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/lock_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/lock_co.gif
deleted file mode 100644
index 68fd6cf..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/lock_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/memoryreset_tsk.gif b/org.eclipse.debug.ui/icons/full/elcl16/memoryreset_tsk.gif
deleted file mode 100644
index 5f0e7c2..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/memoryreset_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/metharg_obj.gif b/org.eclipse.debug.ui/icons/full/elcl16/metharg_obj.gif
deleted file mode 100644
index 9e3a547..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/metharg_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/monitorexpression_tsk.gif b/org.eclipse.debug.ui/icons/full/elcl16/monitorexpression_tsk.gif
deleted file mode 100644
index 252d7eb..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/monitorexpression_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/new_con.gif b/org.eclipse.debug.ui/icons/full/elcl16/new_con.gif
deleted file mode 100644
index 9d05088..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/new_con.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/next_thread_nav.gif b/org.eclipse.debug.ui/icons/full/elcl16/next_thread_nav.gif
deleted file mode 100644
index f976732..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/next_thread_nav.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/pin.gif b/org.eclipse.debug.ui/icons/full/elcl16/pin.gif
deleted file mode 100644
index ec50b70..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/pin.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/prev_thread_nav.gif b/org.eclipse.debug.ui/icons/full/elcl16/prev_thread_nav.gif
deleted file mode 100644
index b04b512..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/prev_thread_nav.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/printview_tsk.gif b/org.eclipse.debug.ui/icons/full/elcl16/printview_tsk.gif
deleted file mode 100644
index 045de75..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/printview_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/prop_ps.gif b/org.eclipse.debug.ui/icons/full/elcl16/prop_ps.gif
deleted file mode 100644
index 6223cfc..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/prop_ps.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 28a3785..0000000
--- 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 2cd9c54..0000000
--- 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/removememory_tsk.gif b/org.eclipse.debug.ui/icons/full/elcl16/removememory_tsk.gif
deleted file mode 100644
index 2cd9c54..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/removememory_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/restart_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/restart_co.gif
deleted file mode 100644
index 5708b00..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/restart_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 16f4e25..0000000
--- 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/runlast_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/runlast_co.gif
deleted file mode 100644
index afb6fa9..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/runlast_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/runtoline_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/runtoline_co.gif
deleted file mode 100644
index ec2c353..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/runtoline_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/skip_brkp.gif b/org.eclipse.debug.ui/icons/full/elcl16/skip_brkp.gif
deleted file mode 100644
index c1751c3..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/skip_brkp.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/stepbystep_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/stepbystep_co.gif
deleted file mode 100644
index 4635a71..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/stepbystep_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 75d165b..0000000
--- 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 1ec36ae..0000000
--- 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 4c2f219..0000000
--- 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 161e3f5..0000000
--- 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/synced.gif b/org.eclipse.debug.ui/icons/full/elcl16/synced.gif
deleted file mode 100644
index 870934b..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/synced.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/terminate_all_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/terminate_all_co.gif
deleted file mode 100644
index 6d47276..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/terminate_all_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 dc47edf..0000000
--- 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/terminate_rem_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/terminate_rem_co.gif
deleted file mode 100644
index 8124628..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/terminate_rem_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 330fc38..0000000
--- 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/elcl16/toggledetailpane_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/toggledetailpane_co.gif
deleted file mode 100644
index ea13622..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/toggledetailpane_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/var_cntnt_prvdr.gif b/org.eclipse.debug.ui/icons/full/elcl16/var_cntnt_prvdr.gif
deleted file mode 100644
index 245c72e..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/var_cntnt_prvdr.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/writeerr_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/writeerr_co.gif
deleted file mode 100644
index 27e7c9d..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/writeerr_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/elcl16/writeout_co.gif b/org.eclipse.debug.ui/icons/full/elcl16/writeout_co.gif
deleted file mode 100644
index 43d51bc..0000000
--- a/org.eclipse.debug.ui/icons/full/elcl16/writeout_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 afe775b..0000000
--- 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/environment_co.gif b/org.eclipse.debug.ui/icons/full/etool16/environment_co.gif
deleted file mode 100644
index 716df43..0000000
--- a/org.eclipse.debug.ui/icons/full/etool16/environment_co.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/etool16/profile_exc.gif b/org.eclipse.debug.ui/icons/full/etool16/profile_exc.gif
deleted file mode 100644
index b7f03d5..0000000
--- a/org.eclipse.debug.ui/icons/full/etool16/profile_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 57f4102..0000000
--- 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/etool16/term_restart.gif b/org.eclipse.debug.ui/icons/full/etool16/term_restart.gif
deleted file mode 100644
index 88276ce..0000000
--- a/org.eclipse.debug.ui/icons/full/etool16/term_restart.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/etool16/watch_exp.gif b/org.eclipse.debug.ui/icons/full/etool16/watch_exp.gif
deleted file mode 100644
index d37495a..0000000
--- a/org.eclipse.debug.ui/icons/full/etool16/watch_exp.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 f529c5a..0000000
--- 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/debug_persp.gif b/org.eclipse.debug.ui/icons/full/eview16/debug_persp.gif
deleted file mode 100644
index ac5431f..0000000
--- 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 ac5431f..0000000
--- 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/details_view.gif b/org.eclipse.debug.ui/icons/full/eview16/details_view.gif
deleted file mode 100644
index c81630a..0000000
--- a/org.eclipse.debug.ui/icons/full/eview16/details_view.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/eview16/memory_view.gif b/org.eclipse.debug.ui/icons/full/eview16/memory_view.gif
deleted file mode 100644
index 7ce1112..0000000
--- a/org.eclipse.debug.ui/icons/full/eview16/memory_view.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/eview16/module_view.gif b/org.eclipse.debug.ui/icons/full/eview16/module_view.gif
deleted file mode 100644
index cb55e33..0000000
--- a/org.eclipse.debug.ui/icons/full/eview16/module_view.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/eview16/register_view.gif b/org.eclipse.debug.ui/icons/full/eview16/register_view.gif
deleted file mode 100644
index 7134210..0000000
--- a/org.eclipse.debug.ui/icons/full/eview16/register_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 e35f594..0000000
--- 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 c55cb58..0000000
--- 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/arraypartition_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/arraypartition_obj.gif
deleted file mode 100644
index 052915a..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/arraypartition_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/brkp_grp.gif b/org.eclipse.debug.ui/icons/full/obj16/brkp_grp.gif
deleted file mode 100644
index 173661c..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/brkp_grp.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/brkp_grp_disabled.gif b/org.eclipse.debug.ui/icons/full/obj16/brkp_grp_disabled.gif
deleted file mode 100644
index 5ea466b..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/brkp_grp_disabled.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 a831fe7..0000000
--- 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/brkp_type.gif b/org.eclipse.debug.ui/icons/full/obj16/brkp_type.gif
deleted file mode 100644
index 31c40ea..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/brkp_type.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 74b26c3..0000000
--- 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/common_tab.gif b/org.eclipse.debug.ui/icons/full/obj16/common_tab.gif
deleted file mode 100644
index d11c996..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/common_tab.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 c1e4ee3..0000000
--- 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/debugts_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/debugts_obj.gif
deleted file mode 100644
index 0d71e42..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/debugts_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 81fb7b4..0000000
--- 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/environment_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/environment_obj.gif
deleted file mode 100644
index 3150162..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/environment_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/envvar_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/envvar_obj.gif
deleted file mode 100644
index 0f07692..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/envvar_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/export_config_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/export_config_obj.gif
deleted file mode 100644
index 9beac78..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/export_config_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 66fd649..0000000
--- 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/file_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/file_obj.gif
deleted file mode 100644
index 7ccc6a7..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/file_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/fldr_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/fldr_obj.gif
deleted file mode 100644
index 51e703b..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/fldr_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/genericreggroup_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/genericreggroup_obj.gif
deleted file mode 100644
index bb86ad3..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/genericreggroup_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/genericregister_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/genericregister_obj.gif
deleted file mode 100644
index 7134210..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/genericregister_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/genericvariable_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/genericvariable_obj.gif
deleted file mode 100644
index 1f4ec30..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/genericvariable_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/import_config_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/import_config_obj.gif
deleted file mode 100644
index ee58d82e..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/import_config_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/inst_ptr.gif b/org.eclipse.debug.ui/icons/full/obj16/inst_ptr.gif
deleted file mode 100644
index d58bf89..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/inst_ptr.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/inst_ptr_top.gif b/org.eclipse.debug.ui/icons/full/obj16/inst_ptr_top.gif
deleted file mode 100644
index 34ac8ac..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/inst_ptr_top.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/jar_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/jar_obj.gif
deleted file mode 100644
index 2fa1d77..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/jar_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 b0dfd3b..0000000
--- 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 57f4102..0000000
--- 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/memory_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/memory_obj.gif
deleted file mode 100644
index cdc52ef..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/memory_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/memorychanged_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/memorychanged_obj.gif
deleted file mode 100644
index 0733d3d..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/memorychanged_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 aa15e0a..0000000
--- 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 9f0d791..0000000
--- 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/persp_tab.gif b/org.eclipse.debug.ui/icons/full/obj16/persp_tab.gif
deleted file mode 100644
index 9328079..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/persp_tab.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/prj_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/prj_obj.gif
deleted file mode 100644
index a4ea580..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/prj_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/read_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/read_obj.gif
deleted file mode 100644
index c876ebd..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/read_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/read_obj_disabled.gif b/org.eclipse.debug.ui/icons/full/obj16/read_obj_disabled.gif
deleted file mode 100644
index 0ee65cd..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/read_obj_disabled.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/readwrite_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/readwrite_obj.gif
deleted file mode 100644
index b11bfe2..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/readwrite_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/readwrite_obj_disabled.gif b/org.eclipse.debug.ui/icons/full/obj16/readwrite_obj_disabled.gif
deleted file mode 100644
index d58def4..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/readwrite_obj_disabled.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/refresh_tab.gif b/org.eclipse.debug.ui/icons/full/obj16/refresh_tab.gif
deleted file mode 100644
index 3ec515b..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/refresh_tab.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/rundebug.gif b/org.eclipse.debug.ui/icons/full/obj16/rundebug.gif
deleted file mode 100644
index 6b3911b..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/rundebug.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 f1e585b..0000000
--- 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/stckframe_running_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/stckframe_running_obj.gif
deleted file mode 100644
index 0a44550..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/stckframe_running_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/terminatedlaunch_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/terminatedlaunch_obj.gif
deleted file mode 100644
index 76596dd..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/terminatedlaunch_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 b8ca14a..0000000
--- 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 45c23a9..0000000
--- 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 a7302ed..0000000
--- 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/obj16/workset.gif b/org.eclipse.debug.ui/icons/full/obj16/workset.gif
deleted file mode 100644
index 2e4de3d..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/workset.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/write_obj.gif b/org.eclipse.debug.ui/icons/full/obj16/write_obj.gif
deleted file mode 100644
index feb8e94..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/write_obj.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/obj16/write_obj_disabled.gif b/org.eclipse.debug.ui/icons/full/obj16/write_obj_disabled.gif
deleted file mode 100644
index 2ddc3b8..0000000
--- a/org.eclipse.debug.ui/icons/full/obj16/write_obj_disabled.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/ovr16/error.gif b/org.eclipse.debug.ui/icons/full/ovr16/error.gif
deleted file mode 100644
index 119dccc..0000000
--- a/org.eclipse.debug.ui/icons/full/ovr16/error.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/ovr16/skip_breakpoint_ov.gif b/org.eclipse.debug.ui/icons/full/ovr16/skip_breakpoint_ov.gif
deleted file mode 100644
index 61c75c2..0000000
--- a/org.eclipse.debug.ui/icons/full/ovr16/skip_breakpoint_ov.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 e1e4536..0000000
--- 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/ovr16/transparent.gif b/org.eclipse.debug.ui/icons/full/ovr16/transparent.gif
deleted file mode 100644
index a9a3cdc..0000000
--- a/org.eclipse.debug.ui/icons/full/ovr16/transparent.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/wizban/adddir_wiz.png b/org.eclipse.debug.ui/icons/full/wizban/adddir_wiz.png
deleted file mode 100644
index 684431c..0000000
--- a/org.eclipse.debug.ui/icons/full/wizban/adddir_wiz.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/wizban/addsrcloc_wiz.png b/org.eclipse.debug.ui/icons/full/wizban/addsrcloc_wiz.png
deleted file mode 100644
index 6a8d691..0000000
--- a/org.eclipse.debug.ui/icons/full/wizban/addsrcloc_wiz.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/wizban/debug_wiz.png b/org.eclipse.debug.ui/icons/full/wizban/debug_wiz.png
deleted file mode 100644
index d238c0b..0000000
--- a/org.eclipse.debug.ui/icons/full/wizban/debug_wiz.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/wizban/editdir_wiz.png b/org.eclipse.debug.ui/icons/full/wizban/editdir_wiz.png
deleted file mode 100644
index 0b19626..0000000
--- a/org.eclipse.debug.ui/icons/full/wizban/editdir_wiz.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/wizban/edtsrclkup_wiz.png b/org.eclipse.debug.ui/icons/full/wizban/edtsrclkup_wiz.png
deleted file mode 100644
index 8dca8ee..0000000
--- a/org.eclipse.debug.ui/icons/full/wizban/edtsrclkup_wiz.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/wizban/export_brkpts_wizban.png b/org.eclipse.debug.ui/icons/full/wizban/export_brkpts_wizban.png
deleted file mode 100644
index 6434b3a..0000000
--- a/org.eclipse.debug.ui/icons/full/wizban/export_brkpts_wizban.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/wizban/export_config_wizban.png b/org.eclipse.debug.ui/icons/full/wizban/export_config_wizban.png
deleted file mode 100644
index 0763ebb..0000000
--- a/org.eclipse.debug.ui/icons/full/wizban/export_config_wizban.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/wizban/import_brkpts_wizban.png b/org.eclipse.debug.ui/icons/full/wizban/import_brkpts_wizban.png
deleted file mode 100644
index f4d9e6d..0000000
--- a/org.eclipse.debug.ui/icons/full/wizban/import_brkpts_wizban.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/wizban/import_config_wizban.png b/org.eclipse.debug.ui/icons/full/wizban/import_config_wizban.png
deleted file mode 100644
index b720285..0000000
--- a/org.eclipse.debug.ui/icons/full/wizban/import_config_wizban.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/wizban/profile_wiz.png b/org.eclipse.debug.ui/icons/full/wizban/profile_wiz.png
deleted file mode 100644
index 7229ca0..0000000
--- a/org.eclipse.debug.ui/icons/full/wizban/profile_wiz.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/icons/full/wizban/run_wiz.png b/org.eclipse.debug.ui/icons/full/wizban/run_wiz.png
deleted file mode 100644
index 16edc87..0000000
--- a/org.eclipse.debug.ui/icons/full/wizban/run_wiz.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/plugin.properties b/org.eclipse.debug.ui/plugin.properties
deleted file mode 100644
index a7fffe4..0000000
--- a/org.eclipse.debug.ui/plugin.properties
+++ /dev/null
@@ -1,379 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# QNX Software Systems - Mikhail Khodjaiants - Registers View (Bug 53640)
-# Wind River Systems - Pawel Piech - Added Modules view (bug 211158)
-# Wind River Systems - Ted Williams -[Memory View] Memory View: Workflow Enhancements (bug 215432)
-###############################################################################
-
-pluginName=Debug UI
-
-accessAction.label=&Access
-BreakpointsView.name=Breakpoints
-ConsoleColorProvidersExtensionName= Console Color Providers
-ConsoleFont.description= The font used by the debug console.
-ConsoleFont.label= Console font
-ConsoleLineTrackersExtensionName= Console Line Trackers
-LaunchingPreferencePage.name=Launching
-LaunchDelegatesPreferencePage.name=Default Launchers
-ViewManagementPreferencePage.name=View Management
-ConsolePreferencePage.name=Console
-DebugModelContextBindingsName=Debug Model Context Bindings
-ContextViewBindingsName=Context View Bindings
-BreakpointOrganizersName=Breakpoint Organizers
-VariableValueEditorsName=Variable Value Editors
-
-ContextLaunchingRunMenu.name=&Run
-ContextLaunchingRunMenu.tooltip=Run the selected item
-
-ContextLaunchingDebugMenu.name=&Debug
-ContextLaunchingDebugMenu.tooltip=Debug the selected item
-
-ContextLaunchingProfileMenu.name=&Profile
-ContextLaunchingProfileMenu.tooltip=Profile the selected item
-
-ContextualLaunchingPrefPage.name=Contextual Launching
-
-DefaultLaunchConfigurationsPropPage.name=Run/Debug Settings
-
-BreakpointActionSet.label=Breakpoints
-CollapseAll.label=Collapse All
-CollapseAll.tooltip= Collapse All
-CopyToClipboardAction.label=&Copy Stack
-CopyVariablesToClipboardAction.label=Copy &Variables
-CopyExpressionsToClipboardAction.label=Copy &Expressions
-CopyRegistersToClipboardAction.label=Copy &Registers
-DebugActionSet.label=Debug
-debugCurrentInstructionPointer=Debug Current Instruction Pointer
-debugCallStack=Debug Call Stack
-DebugDropDownAction.label=Debug
-DebugHistoryMenuAction.label=Debug &History
-DebugLastAction.label=&Debug Last Launched
-DebugLaunchGroup.label=De&bug
-DebugLaunchGroup.title=Select or configure an application to debug
-DebugModelPresentationExtensionName=Debug Model Presentation
-
-LaunchConfigurationTabsExtension.name=Launch Configuration Tabs
-
-DebugPerspective.name=Debug
-DebugPerspective.description=This Debug perspective is designed to support application debugging. It incorporates views for displaying the debug stack, variables and breakpoint management.
-
-command.openDebugPerspective.description = Open the debug perspective
-DebugPreferencePage.name=Run/Debug
-DebugView.name=Debug
-DebugViewsCategory.name=Debug
-DebugWithConfigurationAction.label=Debu&g As
-DetailPaneFontDefinition.label=Detail pane text font
-DetailPaneFontDefinition.description=The detail pane text font is used in the detail panes of debug views.
-DetailPaneFactoriesExtension.name=Detail Pane Factories
-DisableBreakpointsAction.label=&Disable
-EnableBreakpointsAction.label=&Enable
-ExpandAll.label=Expand All
-ExpandAll.tooltip=Expand All
-ExpressionView.name=Expressions
-GroupBy.label=&Group By
-GroupBy.tooltip=Show
-LinkWithDebugView.label=Link with Debug View
-LinkWithDebugView.tooltip=Link with Debug View
-LaunchActionSet.label=Launch
-LaunchConfigurationTabGroupExtensionName=Launch Configuration Tab Group
-LaunchShortcutsName=Launch Shortcut
-LaunchConfigurationTypeImageExtensionName=Launch Configuration Type Image
-LaunchGroupsExtensionName=Launch Groups
-modificationAction.label=&Modification
-ModulesView.name=Modules
-OpenDebugConfigurations.label=De&bug Configurations...
-OpenRunConfigurations.label=Ru&n Configurations...
-OpenProfileConfigurations.label=&Profile Configurations...
-processPropertyPageName=Process Information
-ProfileLaunchGroup.label=&Profile
-ProfileLaunchGroup.title=Select or configure an application to profile
-ProfileDropDownAction.label=Profile
-ProfileWithConfigurationAction.label=Pro&file As
-ProfileHistoryMenuAction.label=Profile Histor&y
-ProfileLastAction.label=Profi&le Last Launched
-ProfileActionSet.label=Profile
-RegistersView.name=Registers
-RelaunchAction.label=Re&launch
-RemoveAction.label=Rem&ove
-RemoveAllAction.label=Remove A&ll
-RemoveAllBreakpointsAction.label=Remo&ve All Breakpoints
-RemoveAllBreakpointsAction.tooltip=Remove All Breakpoints
-RemoveAllExpressionsAction.tooltip=Remove All Expressions
-RemoveAllTerminatedAction.label=Remove &All Terminated
-RemoveAllTerminatedAction.tooltip=Remove All Terminated Launches
-RemoveBreakpointAction.tooltip=Remove Selected Breakpoints
-RemoveExpressionAction.tooltip=Remove Selected Expressions
-ResumeAction.label=Resu&me
-RunDropDownAction.label=Run
-RunMenu.label=&Run
-RunLastAction.label=&Run Last Launched
-RunLaunchGroup.label=Ru&n
-RunLaunchGroup.title=Select or configure an application to run
-RunHistoryMenuAction.label=Run His&tory
-RunWithConfigurationAction.label=Run A&s
-RunToLine.label=Run to &Line
-SelectAll.label=Select &All
-StepWithFiltersAction.label=Use Step &Filters
-StepWithFiltersAction.tooltip=Use Step Filters/Step Debug
-StepIntoAction.label=Step &Into
-StepOverAction.label=Step &Over
-StepReturnAction.label=Step Ret&urn
-StringVariablePresentationsName=String Variable Presentations
-SuspendAction.label=&Suspend
-TerminateAction.label=&Terminate
-ToggleBreakpointAction.label=Toggle Brea&kpoint
-ToggleBreakpointsTargetFactoriesExtension.name=Toggle Breakpoints Target Factories
-ToggleLineBreakpointAction.label=Toggle &Line Breakpoint
-ToggleMethodBreakpointAction.label=Toggle &Method Breakpoint
-ToggleWatchpointAction.label=Toggle &Watchpoint
-BreakpointTypesMenu.label=B&reakpoint Types
-VariablesView.name=Variables
-VariableTextFontDefinition.label=Variable text font
-VariableTextFontDefinition.description=Font to use for the label text of entries in the Variables, Registers and Expression views as well as the Inspect Popup Dialog.
-StringVariablePreferencePage.name=String Substitution
-ToggleMemoryMonitorsPaneAction.name = &Toggle Memory Monitors Pane
-ToggleMemoryMonitorsPaneAction.tooltip = Toggle Memory Monitors Pane
-ToggleSplitPaneAction.name = Toggle &Split Pane
-ToggleSplitPaneAction.tooltip = Toggle Split Pane
-LinkRenderingPanesAction.name = &Link Memory Rendering Panes
-LinkRenderingPanesAction.tooltip = Link Memory Rendering Panes
-AddRemoveRenderingMenu.name = Add/Remove Rendering
-AddRenderingAction.name = Add Rendering
-RemoveRenderingAction.name = Remove Rendering
-PerspectivePreferencePage.name = Perspectives
-LaunchConfigurationsPage.name = Launch Configurations
-
-#string substitution variables
-string_prompt.description=Returns the text value entered into a prompt dialog. When one argument is provided, it is used as a prompt hint on the input dialog. When a second argument is provided, it is used as an initial value in the input dialog. The first and second arguments must be separated with a ':'.
-password_prompt.description=Returns the text value entered into a password prompt dialog. When one argument is provided, it is used as a prompt hint on the input dialog. When a second argument is provided, it is used as an initial value in the input dialog. The first and second arguments must be separated with a ':'.
-file_prompt.description=Returns the absolute file system path of a file chosen in a file selection dialog. When one argument is provided, it is used a prompt hint on the dialog title. When a second argument is provided, it is used as an initial value for the file selection dialog. The first and second arguments must be separated with a ':'.
-folder_prompt.description=Returns the absolute file system path of a directory chosen in a directory selection dialog. When one argument is provided, it is used a prompt hint on the dialog title. When a second argument is provided, it is used as an initial value for the directory selection dialog. The first and second arguments must be separated with a ':'.
-selected_text.description=Returns the text currently selected in the active editor.
-selected_resource_loc.description=Returns the absolute file system path of the selected resource.
-selected_resource_path.description=Returns the workspace relative path of the selected resource.
-selected_resource_name.description=Returns the name of the selected resource.
-
-providerName=Eclipse.org
-
-runCategory.name= Run/Debug
-runCategory.description= Run/Debug command category
-
-NoSourceFoundEditor.name= No Source Found
-
-Context.debugging.description= Debugging Programs
-Context.debugging.name= Debugging
-
-Context.console.description= In I/O Console
-Context.console.name= In I/O Console
-
-Context.memoryview.description = In Memory View
-Context.memoryview.name = In Memory View
-
-ActionContext.breakpointsview.name=In Breakpoints View
-ActionContext.breakpointsview.description=The breakpoints view context
-
-ActionDefinition.eof.name= EOF
-ActionDefinition.eof.description= Send end of file
-
-ActionDefinition.addMemoryBlock.name= Add Memory Block
-ActionDefinition.addMemoryBlock.description=Add Memory block
-
-ActionDefinition.toggleStepFilters.name= Use Step Filters
-ActionDefinition.toggleStepFilters.description= Toggles enablement of debug step filters
-
-ActionDefinition.stepInto.name= Step Into
-ActionDefinition.stepInto.description= Step into
-
-ActionDefinition.stepOver.name= Step Over
-ActionDefinition.stepOver.description= Step over
-
-ActionDefinition.stepReturn.name= Step Return
-ActionDefinition.stepReturn.description= Step return
-
-ActionDefinition.restart.name=Restart
-ActionDefinition.restart.description=Restart a process or debug target without terminating and re-launching
-
-ActionDefinition.resume.name=Resume
-ActionDefinition.resume.description=Resume
-
-ActionDefinition.runToLine.name=Run to Line
-ActionDefinition.runToLine.description=Resume and break when execution reaches the current line
-
-ActionDefinition.terminate.name=Terminate
-ActionDefinition.terminate.description=Terminate
-
-ActionDefinition.terminateAndRelaunch.name=Terminate and Relaunch
-ActionDefinition.terminateAndRelaunch.description=Terminate and Relaunch
-
-ActionDefinition.toggleBreakpoint.name=Toggle Breakpoint
-ActionDefinition.toggleBreakpoint.description=Creates or removes a breakpoint
-
-ActionDefinition.suspend.name=Suspend
-ActionDefinition.suspend.description=Suspend
-
-ActionDefinition.openProfile.name=Profile...
-ActionDefinition.openProfile.description=Open profile launch configuration dialog
-
-ActionDefinition.profileLast.name=Profile Last Launched
-ActionDefinition.profileLast.description=Profile the last launch in profile mode
-
-ActionDefinition.openRun.name=Run...
-ActionDefinition.openRun.description=Open run launch configuration dialog
-
-ActionDefinition.debugLast.name=Debug Last Launched
-ActionDefinition.debugLast.description=Debug the last launch in debug mode
-
-ActionDefinition.runLast.name=Run Last Launched
-ActionDefinition.runLast.description=Relaunch the last launch in run mode
-
-ActionDefinition.openDebug.name=Debug...
-ActionDefinition.openDebug.description=Open debug launch configuration dialog
-
-
-ActionDefinition.toggleWatchpoint.name=Toggle Watchpoint
-ActionDefinition.toggleWatchpoint.description=Creates or removes a watchpoint
-
-ActionDefinition.toggleMethodBreakpoint.name=Toggle Method Breakpoint
-ActionDefinition.toggleMethodBreakpoint.description=Creates or removes a method breakpoint
-
-ActionDefinition.removeAllBreakpoints.name=Remove All Breakpoints
-ActionDefinition.removeAllBreakpoints.description=Removes all breakpoints
-
-ActionDefinition.skipAllBreakpoints.name=Skip All Breakpoints
-ActionDefinition.skipAllBreakpoints.description=Sets whether or not any breakpoint should suspend execution
-
-SkipAllBreakpointsAction.label=S&kip All Breakpoints
-editWatchExpressionAction.label=&Edit Watch Expression...
-editWatchExpressionAction.tooltip=Edit the selected watch expression
-reevaluateWatchExpressionAction.label=&Reevaluate Watch Expression
-reevaluateWatchExpressionAction.tooltip=Reevaluate the watch expression in the selected stack frame
-addWatchExpressionAction.label=&Add Watch Expression...
-addWatchExpressionAction.tooltip=Create a new watch expression
-convertToWatchExpressionAction.label=Convert to &Watch Expression
-convertToWatchExpressionAction.tooltip=Convert an inspect expression to a watch expression
-Watch.label=Wa&tch
-
-enableWatchExpressionAction.label=Enable
-enableWatchExpressionAction.tooltip=Enable watch expression
-
-disableWatchExpressionAction.label=Disable
-disableWatchExpressionAction.tooltip=Disable watch expression
-
-BreakpointMarkerPreference.label= Breakpoints
-
-SourceContainerPresentationsName = Source Container Presentations
-
-DebugContextMenu.label=&Debug As
-RunContextMenu.label=&Run As
-ProfileContextMenu.label=&Profile As
-
-containerName.workingSet = Working set
-sourceNotFoundEditorName=Source Not Found Editor
-
-debugPresentation.label= Debug
-
-MemoryViewName = Memory
-
-MemoryViewTableFontDefinition.label=Memory view table font
-MemoryViewTableFontDefinition.description=The font used in the table of the memory view.
-
-RawHex = Hex
-ASCIIName = ASCII
-SignedIntegerName = Signed Integer
-UnsignedIntegerName = Unsigned Integer
-Endianess = Endianess
-BigEndianActionName = Big Endian
-LittleEndianActionName = Little Endian
-RestoreDefEndianessActionName = Restore Default
-HexIntegerName = Hex Integer
-
-ViewManagementAction.label=&View Management...
-
-setDefaultGroup.label=&Select Default Working Set...
-setDefaultGroup.tooltip=Select Default Working Set
-clearDefaultGroup.label=&Deselect Default Working Set
-clearDefaultGroup.tooltip=Deselect Default Working Set
-workingSets.label=&Working Sets...
-workingSets.tooltip=Manage Working Sets
-
-editGroup.label=&Edit Working Set...
-ToggleDefault.label=Defaul&t Working Set
-
-Project.label=Projects
-Project.others=Others (no project)
-File.label=Files
-File.others=Others (no file)
-BreakpointType.label=Breakpoint Types
-BreakpointType.others=Others (type unspecified)
-WorkingSet.label=Resource Working Sets
-WorkingSet.others=Others (no working set)
-BreakpointWorkingSet.label=Breakpoint Working Sets
-BreakpointWorkingSet.others=Others (no working set)
-BreakpointWorkingSet.name=Breakpoint
-BreakpointWorkingSet.description=Breakpoint workingsets contain listings of workspace breakpoints
-memoryRenderingsExtensionPointName = Memory Renderings
-TableRenderingPrefActionName = &Table Renderings Preferences...
-
-
-NewMemoryViewAction.label=&New Memory View
-NewMemoryViewAction.tooltip=New Memory View
-PinMemoryBlockAction.label=&Pin Memory Monitor
-PinMemoryBlockAction.tooltip=Pin Memory Monitor
-TableRenderingInfo.label = Rendering Selection
-
-preferenceKeywords.general=run debug breakpoints variables color
-preferenceKeywords.console=console stdout stderr color
-preferenceKeywords.launching=launching build
-preferenceKeywords.stringSubstitution=variables
-preferenceKeywords.viewManagement=views
-preferenceKeywords.perspective=perspectives switching assign automatic run debug
-preferenceKeywords.launchConfigurations=filters launch migration configurations run debug
-preferenceKeywords.launchDelegates=launch delegate duplicate run debug profile mode configuration launchers launcher modes
-preferenceKeywords.contextLaunching=run debug profile launch contextual delegate configuration execute
-
-exportBreakpoints.label=E&xport Breakpoints...
-importBreakpoints.label=I&mport Breakpoints...
-exportBreakpoints.name=Breakpoints
-importBreakpoints.description=Import breakpoints from the local file system.
-exportBreakpoints.description=Export breakpoints to the local file system.
-
-importLaunchConfigurations.name=Launch Configurations
-importLaunchConfigurations.description=Import launch configurations from the local file system.
-exportLaunchConfigurations.description=Export launch configurations to the local file system.
-
-switchMemoryBlock.label = Switch &Memory Monitor
-switchMemoryBlock.tooltip = Switch Memory Monitor
-toggleMemoryMonitorsPane.label = Toggle Memory Monitors Pane
-toggleMemoryMonitorsPane.description = Toggle visibility of the Memory Monitors Pane
-nextMemoryBlockCommand.label = Next Memory Monitor
-nextMemoryBlockCommand.description = Show renderings from next memory monitor.
-newRenderingCommand.label = New Rendering
-newRenderingCommand.description = Add a new rendering.
-closeRenderingCommand.label = Close Rendering
-closeRenderingCommand.description = Close the selected rendering.
-memoryViewPrefAction.label = &Preferences...
-resetMemoryMonitorAction.label = &Reset
-
-ConsolePreferencesAction.label = &Preferences...
-ConsolePreferencesAction.tooltip = Opens the console's Preferences Page
-
-command.description.0 = Go to Address
-command.name.0 = Go to Address
-context.description.0 = In Table Memory Rendering
-context.name.0 = In Table Memory Rendering
-command.description.1 = Load next page of memory
-command.name.1 = Next Page of Memory
-command.description.2 = Load previous page of memory
-command.name.2 = Previous Page of Memory
-
-console.background.label= Process console background
-console.out.label= Standard out
-console.in.label= Standard in
-console.err.label= Standard error
\ 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 a862624..0000000
--- a/org.eclipse.debug.ui/plugin.xml
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.debug.ui/schema/breakpointOrganizers.exsd b/org.eclipse.debug.ui/schema/breakpointOrganizers.exsd
deleted file mode 100644
index f803277..0000000
--- a/org.eclipse.debug.ui/schema/breakpointOrganizers.exsd
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="breakpointOrganizers" name="Breakpoint Organizers"/>
- </appInfo>
- <documentation>
- Breakpoint organizers categorize breakpoints based on some specific criteria. For example, a breakpoint organizer is provided to categorize breakpoints by project.
-
-Organizers with the specified name will be automatically created by the Debug Platform and presented to the user as options for grouping breakpoints. The supplied class, which must implement org.eclipse.debug.ui.IBreakpointOrganizerDelegate, will be loaded only as necessary, to avoid early plugin activation.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="breakpointOrganizer" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="breakpointOrganizer">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- Unique identifier for this breakpoint organizer.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- Implementation of <code>org.eclipse.debug.ui.IBreakpointOrganizerDelegate</code> that performs categorization. Since 3.3, the class may optionally implement <code>org.eclipse.debug.ui.IBreakpointOrganizerDelegateExtension</code>.
- </documentation>
- <appInfo>
- <meta.attribute kind="java"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- Label for this organizer which is suitable for presentation to the user.
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
- Optional path to an icon which can be shown for this organizer.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="othersLabel" type="string">
- <annotation>
- <documentation>
- Optional label for this organizer which is suitable for presentation to the user to describe breakpoints that do not fall into a category supplied by this organizer. For example, if an organizer categorizes breakpoints by working sets, but a breakpoint does not belong to a working set, this label will be used. When unspecified, "Others" is used.
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 3.1
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- Following is an example of a breakpoint organizer extension.
-<pre>
-<extension
- point="org.eclipse.debug.ui.breakpointOrganizers">
- <breakpointOrganizer
- class="com.example.BreakpointOrganizer"
- id="com.example.BreakpointOrganizer"
- label="Example Organizer"
- icon="icons/full/obj16/example_org.gif"/>
-</extension>
-</pre>
-In the above example, the supplied factory will be included in the list of options for grouping breakpoints ("Group By > Example Organizer"). When selected, the associated organizer will be used to categorize breakpoints.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.debug.ui.IBreakpointOrganizerDelegate</b>. Since 3.3 the class may optionally implement <b>org.eclipse.debug.ui.IBreakpointOrganizerDelegateExtension</b>.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- The Debug Platform provides breakpoint organizers for projects, files, breakpoint types, and working sets.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2005 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/schema/consoleColorProviders.exsd b/org.eclipse.debug.ui/schema/consoleColorProviders.exsd
deleted file mode 100644
index e7be4e7..0000000
--- a/org.eclipse.debug.ui/schema/consoleColorProviders.exsd
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="consoleColorProviders" name="Console Color Providers"/>
- </appInfo>
- <documentation>
- This extension point provides a mechanism for contributing a console document coloring scheme for a process. The color provider will be used to color output in the console.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="consoleColorProvider" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="consoleColorProvider">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this console color provider.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies a fully qualified name of a Java class that implements <code>IConsoleColorProvider</code>
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.debug.ui.console.IConsoleColorProvider"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="processType" type="string" use="required">
- <annotation>
- <documentation>
- specifies the type of process this color provider is for. This attribute corresponds to the process attribute <code>IProcess.ATTR_PROCESS_TYPE</code>.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 2.1
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a console color provider extension point:
-<pre>
-<extension point="org.eclipse.debug.ui.consoleColorProviders">
- <consoleColorProvider
- id="com.example.ExampleConsoleColorProvider"
- class="com.example.ExampleConsoleColorProvider"
- processType="ExampleProcessType">
- </consoleColorProvider>
-</extension>
-</pre>
-In the above example, the contributed color provider will be used for processes of type "ExampleProcessType", which corresponds to the process attribute IProcess.ATTR_PROCESS_TYPE. Process types are client defined, and are set by clients that create processes.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.debug.ui.console.IConsoleColorProvider</b>.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-Copyright (c) 2000, 2005 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/schema/consoleLineTrackers.exsd b/org.eclipse.debug.ui/schema/consoleLineTrackers.exsd
deleted file mode 100644
index 7b9d2eb..0000000
--- a/org.eclipse.debug.ui/schema/consoleLineTrackers.exsd
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="consoleLineTrackers" name="Console Line Trackers"/>
- </appInfo>
- <documentation>
- This extension point provides a mechanism to listen to console output for a type of process.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="consoleLineTracker" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="consoleLineTracker">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this console line tracker.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies a fully qualified name of a Java class that implements <code>IConsoleLineTracker</code>
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.debug.ui.console.IConsoleLineTracker"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="processType" type="string" use="required">
- <annotation>
- <documentation>
- specifies the type of process this line tracker is for. This attribute corresponds to the process attribute <code>IProcess.ATTR_PROCESS_TYPE</code>.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 2.1
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a console line tracker extension point:
-
- <pre>
-<extension point="org.eclipse.debug.ui.consoleLineTrackers">
- <consoleLineTracker
- id="com.example.ExampleConsoleLineTracker"
- class="com.example.ExampleConsoleLineTracker"
- processType="ExampleProcessType">
- </consoleLineTracker>
-</extension>
-</pre>
-In the above example, the contributed line tracker will be notified as lines are appended to the console for processes of type "ExampleProcessType", which corresponds to the process attribute IProcess.ATTR_PROCESS_TYPE. Process types are client defined, and are set by clients that create processes.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.debug.ui.console.IConsoleLineTracker</b>.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-Copyright (c) 2000, 2005 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/schema/contextViewBindings.exsd b/org.eclipse.debug.ui/schema/contextViewBindings.exsd
deleted file mode 100644
index 2346368..0000000
--- a/org.eclipse.debug.ui/schema/contextViewBindings.exsd
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="contextViewBindings" name="Context View Bindings"/>
- </appInfo>
- <documentation>
- This extension point provides a mechanism for associating a view with a context identifier. When a context is activated by the Debug view, views associated with it (and also views associated with any parent contexts) are opened, closed, or activated. Contributors have the option to override the automatic open and close behavior.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appInfo>
- <meta.element />
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="contextViewBinding" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="perspective" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="contextViewBinding">
- <complexType>
- <attribute name="contextId" type="string" use="required">
- <annotation>
- <documentation>
- Specifies the context identifier that this binding is for.
- </documentation>
- <appInfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.ui.contexts/context/@id"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="viewId" type="string" use="required">
- <annotation>
- <documentation>
- Specifies the identifier of the view which should be associated with the specified context. When the specified context is enabled, this view will be automatically brought to the front. When elements are selected in the Debug view, contexts associated with those elements (as specified by extensions of the debugModelContextBindings extension point) are automatically enabled.
-Note that this only occurs in perspectives which are specified by the perspective elements, or for which the user has requested "automatic view management" via the preferences.
- </documentation>
- <appInfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.ui.views/view/@id"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="autoOpen" type="boolean">
- <annotation>
- <documentation>
- Specifies whether the view should be automatically opened when the given context is enabled. If unspecified, the value of this attribute is <code>true</code>. If this attribute is specified <code>false</code>, the view will not be automatically opened, but it will still be brought to the front if it is open when the given context is enabled. Clients are intended to specify <code>false</code> to avoid cluttering the perspective with views that are used infrequently.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="autoClose" type="boolean">
- <annotation>
- <documentation>
- Clients are not intended to specify this attribute except in rare cases.
-Specifies whether the view should be automatically closed when the given context is disabled (this occurs when all debug targets that contained the specified context have terminated). When unspecified, the value of this attribute is <code>true</code>. This attribute should only be specified <code>false</code> in the unlikely case that a debugging view must remain open even when the user is not debugging.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="perspective">
- <annotation>
- <documentation>
- Specifies a perspective in which the view management will be enabled (since 3.5).
- </documentation>
- </annotation>
- <complexType>
- <attribute name="perspectiveId" type="string">
- <annotation>
- <documentation>
- Identifier of the perspective in which to enable view management.
- </documentation>
- <appInfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.ui.perspectives/perspective/@id"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 3.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a context view binding contribution:
-<pre>
-<extension
- point="org.eclipse.debug.ui.contextViewBindings">
- <contextViewBinding
- contextId="com.example.mydebugger.debugging"
- viewId="com.example.view"
- autoOpen="true"
- autoClose="false">
- </contextViewBinding>
-</extension>
-</pre>
-In the above example, when a context with the specified identifier is activated by the Debug view, the given view will be automatically opened. When a context which is bound to a different debug model is activated that isn't associated with the view, the view will not be automatically closed.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiinfo"/>
- </appInfo>
- <documentation>
- Since 3.5 , the <samp>perspective</samp> element can be used to spectify a perspectives in which to enable view management. A product or the user override this setting, by specifying the <samp>org.eclipse.debug.ui.manage_view_perspectives</samp> preference with a comma-delimited set of perspective IDs.
- </documentation>
- </annotation>
-
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2003, 2005 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/schema/debugModelContextBindings.exsd b/org.eclipse.debug.ui/schema/debugModelContextBindings.exsd
deleted file mode 100644
index f7b729e..0000000
--- a/org.eclipse.debug.ui/schema/debugModelContextBindings.exsd
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="debugModelContextBindings" name="Debug Model Context Bindings"/>
- </appinfo>
- <documentation>
- This extension point provides a mechanism for specifying a context that should be associated with the given debug model.
-
-The Debug view uses these bindings to automatically enable contexts. When an element in the Debug view which provides an <code>IDebugModelProvider</code> adapter or a stack frame with the specified debug model identifier is selected, the context with the given identifier will be enabled.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="modelContextBinding" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="modelContextBinding">
- <complexType>
- <attribute name="debugModelId" type="string" use="required">
- <annotation>
- <documentation>
- specifies the debug model identifier this binding is for
- </documentation>
- </annotation>
- </attribute>
- <attribute name="contextId" type="string" use="required">
- <annotation>
- <documentation>
- specifies the context identifier of the context that should be associated with the given debug model
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.ui.contexts/context/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- 3.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- The following is an example of a debug model context binding contribution:
-<pre>
-<extension
- point="org.eclipse.debug.ui.debugModelContextBindings">
- <modelContextBinding
- contextId="com.example.myLanguage.debugging"
- debugModelId="com.example.myLanguageDebugModel">
- </modelContextBinding>
-</extension>
-</pre>
-In the above example, when a stack frame with the debug model identifier of "com.example.myLanguageDebugModel" is selected, the context with the identifier "com.example.myLanguage.debugging" will be enabled.
- </documentation>
- </annotation>
-
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2004, 2005 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/schema/debugModelPresentations.exsd b/org.eclipse.debug.ui/schema/debugModelPresentations.exsd
deleted file mode 100644
index b577aec..0000000
--- a/org.eclipse.debug.ui/schema/debugModelPresentations.exsd
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="debugModelPresentations" name="Debug Model Presentation"/>
- </appinfo>
- <documentation>
- 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.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="debugModelPresentation" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="debugModelPresentation">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- fully qualifed name of a Java class that implements the
-<code>org.eclipse.debug.ui.IDebugModelPresentation</code>
-interface. Since 3.1, debug model presentations may optionally implement <code>IColorProvider</code> and <code>IFontProvider</code> to override default fonts and colors for debug elements.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.debug.ui.IDebugModelPresentation"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- the identifier of the debug model this presentation is responsible for
- </documentation>
- </annotation>
- </attribute>
- <attribute name="detailsViewerConfiguration" type="string">
- <annotation>
- <documentation>
- the fully qualified name of the Java class that is an instance of <code>org.eclipse.jface.text.source.SourceViewerConfiguration</code>. When specified, the source viewer configuration will be used in the "details" area of the variables and expressions view when displaying the details of an element from the debug model associated with this debug model presentation. When unspecified, a default configuration is used.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.jface.text.source.SourceViewerConfiguration:"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- The following is an example of a debug model presentations extension point:
-
-<p>
-<pre>
- <extension point = "org.eclipse.debug.ui.debugModelPresentations">
- <debugModelPresentation
- class = "com.example.JavaModelPresentation"
- id = "com.example.JavaDebugModel">
- </debugModelPresentation>
- </extension>
-</pre>
-</p>
-In the example above, the class
-<samp>com.example.JavaModelPresentation</samp> will be
-used to render and present debug elements originating
-from the debug model identified by
-<samp>com.example.JavaDebugModel</samp>.
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiInfo"/>
- </appinfo>
- <documentation>
- Value of the action attribute <samp>class</samp> must be a fully
-qualified class name of a Java class that implements
-<samp>org.eclipse.debug.ui.IDebugModelPresentation</samp>. Since 3.1, debug model presentations may optionally implement <code>IColorProvider</code> and <code>IFontProvider</code> to override default fonts and colors for debug elements.
- </documentation>
- </annotation>
-
-
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2000, 2005 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/schema/detailPaneFactories.exsd b/org.eclipse.debug.ui/schema/detailPaneFactories.exsd
deleted file mode 100644
index 3a89fb4..0000000
--- a/org.eclipse.debug.ui/schema/detailPaneFactories.exsd
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="detailPaneFactories" name="Detail Pane Factories Extension"/>
- </appInfo>
- <documentation>
- This extension point allows clients to contribute custom renderings for the detail pane in the variables, registers and expression views. To contribute a custom detail pane, an implementation of <code>IDetailPaneFactory</code> is registered using this extension point. A detail pane factory creates an <code>IDetailPane</code> for each custom rendering.
-<p>
-Views with detail panes allow users select from available detail panes via the context menu. All contributions to this extension point are checked agaist the current selection. A detail factory should provide an enablement expression to ensure lazy plug-in loading. A factory will only be instantiated if its expression evaluates to true for the current selection (see the example extension point for an example enablement expression). Each applicable factory is then consulted for the types of detail panes it can produce for the current selection.
-</p>
- </documentation>
- </annotation>
-
- <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
-
- <element name="extension">
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="detailFactories"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="detailFactories">
- <complexType>
- <sequence>
- <element ref="enablement" minOccurs="0" maxOccurs="1"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this factory
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- fully qualified name of a class that implements <code>org.eclipse.debug.ui.IDetailPaneFactory</code>
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.debug.ui.IDetailPaneFactory"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 3.3
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- Following in an example of a detail pane factory extension with an expression that enables for selections containing exactly two Java variables:
-<p>
-<pre>
-<extension point="org.eclipse.debug.ui.detailPaneFactories">
- <detailFactories
- class="org.eclipse.temp.JavaTableDetailPaneFactory"
- name="javaTableDetailPaneFactory">
- <enablement>
- <with
- variable="selection">
- <count
- value="2">
- </count>
- <iterate>
- <instanceof
- value="org.eclipse.jdt.debug.core.IJavaVariable">
- </instanceof>
- </iterate>
- </with>
- </enablement>
- </detailFactories>
-</extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.debug.ui.IDetailPaneFactory</b>.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- The debug platform contributes a detail pane factory providing a default text source viewer detail pane. The default detail pane displays textual details of a selected element based on the corresponding debug model presentation's implementation of <code>computeDetail(IValue value, IValueDetailListener listener)</code>.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2000, 2006 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/schema/launchConfigurationTabGroups.exsd b/org.eclipse.debug.ui/schema/launchConfigurationTabGroups.exsd
deleted file mode 100644
index d4c7b16..0000000
--- a/org.eclipse.debug.ui/schema/launchConfigurationTabGroups.exsd
+++ /dev/null
@@ -1,185 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="launchConfigurationTabGroups" name="Launch Configuration Tab Groups"/>
- </appinfo>
- <documentation>
- This extension point provides a mechanism for contributing a group of tabs to the launch configuration
-dialog for a type of launch configuration.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="launchConfigurationTabGroup" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="launchConfigurationTabGroup">
- <complexType>
- <sequence>
- <element ref="launchMode" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this launch configuration tab group.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="type" type="string" use="required">
- <annotation>
- <documentation>
- specifies a launch configuration type that this tab group is applicable to (corresponds to the id of a launch configuration type extension).
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.debug.core.launchConfigurationTypes/launchConfigurationType/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies a fully qualified name of a Java class that implements <code>ILaunchConfigurationTabGroup</code>.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="helpContextId" type="string">
- <annotation>
- <documentation>
- an optional identifier that specifies the help context to associate with this tab group's launch configuration type
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- A description of the Launch Configuration Type
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="launchMode">
- <annotation>
- <documentation>
- A launch mode element specifies a launch mode this tab group is specific to. A tab group can be associated with one or more launch modes. For backwards compatibility (previous to 3.0), a launch mode does not need to be specified. When unspecified, a tab group is registered as the default tab group for the associated launch configration type (i.e. applicable to all supported launch modes for which a specific tab group has not been contributed).
- </documentation>
- </annotation>
- <complexType>
- <attribute name="mode" type="string" use="required">
- <annotation>
- <documentation>
- identifier for a launch mode this tab group is specific to.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.debug.core.launchModes/launchMode/@mode"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="perspective" type="string">
- <annotation>
- <documentation>
- the default perspective identifier associated with this launch configuration type and launch mode. This allows an extension to cause a perspective switch (or open) when a corresponding launch is registered with the debug plug-in. When unspecified, it indicates that by default, no perspective switch should occurr.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.ui.perspectives/perspective/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- A description of the Launch Configuration Type specific to this launchMode.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- The following is an example of a launch configuration tab group extension point:
-
-<p>
-<pre>
- <extension point="org.eclipse.debug.ui.launchConfigurationTabGroups">
- <launchConfigurationTabGroup
- id="com.example.ExampleTabGroup"
- type="com.example.ExampleLaunchConfigurationTypeIdentifier"
- class="com.example.ExampleLaunchConfigurationTabGroupClass">
- </launchConfigurationTabGroup>
- </extension>
-</pre>
-</p>
-
-In the above example, the contributed tab group will be shown for the launch configuration type with
-identifier <samp>com.example.ExampleLaunchConfigurationTypeIdentifier</samp>.
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiInfo"/>
- </appinfo>
- <documentation>
- Value of the attribute <code>class</code> must be a fully qualified name of a Java class that implements the
-interface <code>org.eclipse.debug.ui.ILaunchConfigurationTabGroup</code>.
- </documentation>
- </annotation>
-
-
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2000, 2005 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/schema/launchConfigurationTabs.exsd b/org.eclipse.debug.ui/schema/launchConfigurationTabs.exsd
deleted file mode 100644
index b764fef..0000000
--- a/org.eclipse.debug.ui/schema/launchConfigurationTabs.exsd
+++ /dev/null
@@ -1,168 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="launchConfigurationTabs" name="Launch Configuration Tabs"/>
- </appinfo>
- <documentation>
- This extension point is to contribute launch configuration tabs (one or more) to an existing launch configuration tab group.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="tab"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="tab">
- <annotation>
- <documentation>
- describes an individual launch configuration tab contribution
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="placement" minOccurs="0" maxOccurs="1"/>
- <element ref="associatedDelegate" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- the unique id of this contributed tab
- </documentation>
- </annotation>
- </attribute>
- <attribute name="group" type="string" use="required">
- <annotation>
- <documentation>
- the unique id of an existnig <code>ILaunchConfigurationTabGroup</code> that this tab should be contributed to
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.debug.ui.launchConfigurationTabGroups/launchConfigurationTabGroup/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- a human readable name for this tab. The provided name does not have to be the name that appears on the tab itself, but should sufficiently describe the tab.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- fully qualified name of the java class that implements <code>ILaunchConfigurationTab</code>.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.debug.ui.ILaunchConfigurationTab"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="placement">
- <annotation>
- <documentation>
- This element allows contributors to specify relative locale for their contributed tab
- </documentation>
- </annotation>
- <complexType>
- <attribute name="after" type="string" use="required">
- <annotation>
- <documentation>
- Specifies the id of the tab that this tab should appear immediately after in the left to right arrangement of tabs. The ID specified here should match the value returned by org.eclipse.debug.ui.AbstractLaunchConfigurationTab.getID(), which may be different than the ID specified in the tab declaration of this extension point.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="associatedDelegate">
- <annotation>
- <documentation>
- This attribute is used to map a contrinbuted tab to one or more launch delegates. This allows tabs to be filtered from the launch dialog based on what launch delegate is selected as the current default. For example, if two plug-ins contribute launch delegates and tabs for the same launch mode, only one set of tabs will be displayed to the user based on the enabled delegate chosen by the user.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="delegate" type="string" use="required">
- <annotation>
- <documentation>
- The id of the <code>launchDelegate</code> that this tab is associated with. The association allows the tab to be filtered based on the modesets supported by the delegates.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.debug.core.launchDelegates/launchDelegate/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- 3.3
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- The following example adds the tab "FooTab" to the local java application launch tab group.
-
-<p>
-<pre>
-<extension point="org.eclipse.debug.ui.launchConfigurationTabs">
- <tab
- class="org.eclipse.jdt.debug.ui.launchConfigurations.FooTab"
- group="org.eclipse.jdt.debug.ui.launchConfigurationTabGroup.localJavaApplication"
- id="org.eclipse.jdt.debug.ui.fooTab"
- name="Foo Tab">
- </tab>
- </extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
-
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- The debug platform provides two abstract classes that clients should subclass when implementing launch tabs. See <code>AbstractLaunchConfigurationTab</code> and <code>AbstractOptionLaunchConfigurationTab</code> in package <code>org.eclipse.debug.ui</code>.
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2006 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/schema/launchConfigurationTypeImages.exsd b/org.eclipse.debug.ui/schema/launchConfigurationTypeImages.exsd
deleted file mode 100644
index 95e9fa4..0000000
--- a/org.eclipse.debug.ui/schema/launchConfigurationTypeImages.exsd
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="launchConfigurationTypeImages" name="Launch Configuration Type Images"/>
- </appinfo>
- <documentation>
- This extension point provides a way to associate an image with a launch configuration type.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="launchConfigurationTypeImage" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="launchConfigurationTypeImage">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this launch configuration type image.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="configTypeID" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified ID of a launch configuration type.(in 2.1, this attribute can also be specified using the "type" attribute, to be consistent with the launchConfigurationTabGroups extension point).
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.debug.core.launchConfigurationTypes/launchConfigurationType/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="icon" type="string" use="required">
- <annotation>
- <documentation>
- specifies the plugin-relative path of an image file.
- </documentation>
- <appinfo>
- <meta.attribute kind="resource"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- The following is an example of a launch configuration type image extension point:
-
-<p>
-<pre>
- <extension point="org.eclipse.debug.ui.launchConfigurationTypeImages">
- <launchConfigurationTypeImage
- id="com.example.FirstLaunchConfigurationTypeImage"
- configTypeID="com.example.FirstLaunchConfigurationType"
- icon="icons/FirstLaunchConfigurationType.gif">
- </launchConfigurationTypeImage>
- </extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2000, 2005 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/schema/launchGroups.exsd b/org.eclipse.debug.ui/schema/launchGroups.exsd
deleted file mode 100644
index de97963..0000000
--- a/org.eclipse.debug.ui/schema/launchGroups.exsd
+++ /dev/null
@@ -1,168 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="launchGroups" name="Launch Groups"/>
- </appinfo>
- <documentation>
- This extension point provides support for defining a group of launch configurations to be viewed together in the launch configuration dialog, and support a launch history (recent and favorite launches).
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="launchGroup" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="launchGroup">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this launch group.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="mode" type="string" use="required">
- <annotation>
- <documentation>
- specifies the launch mode associated with this group - i.e. run or debug.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.debug.core.launchModes/launchMode/@mode"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="category" type="string">
- <annotation>
- <documentation>
- specifies the category of launch configurations in this group. When unspecified, the category is <code>null</code>.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.debug.core.launchConfigurationTypes/launchConfigurationType/@category"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- specifies a translatable label used to render this group.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="image" type="string" use="required">
- <annotation>
- <documentation>
- specifies a plug-in relative path to an image used to render this group in trees, lists, tabs, etc.
- </documentation>
- <appinfo>
- <meta.attribute kind="resource"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="bannerImage" type="string" use="required">
- <annotation>
- <documentation>
- specifies a plug-in relative path to an image used to render this group in a wizard or dialog banner area.
- </documentation>
- <appinfo>
- <meta.attribute kind="resource"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="public" type="string">
- <annotation>
- <documentation>
- specifies whether this launch group is public and should be have a visible launch history tab in the debug preferences. The implied value is <code>true</code>, when not specified.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="title" type="string">
- <annotation>
- <documentation>
- title to display in the launch wizard when this launch group is opened - for example "Select or configure an application to debug" (since 3.1)
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- 2.1
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- The following is an example of a launch group extension point:
-<p>
-<pre>
- <extension point="org.eclipse.debug.ui.launchGroups">
- <launchGroup
- id="com.example.ExampleLaunchGroupId"
- mode="run"
- label="Run"
- image="icons\run.gif"
- bannerImage="icons\runBanner.gif">
- </launchGroup>
- </extension>
-</pre>
-</p>
-In the above example, the launch group will consist of all launch configurations with no category that support run mode.
- </documentation>
- </annotation>
-
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2000, 2005 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/schema/launchShortcuts.exsd b/org.eclipse.debug.ui/schema/launchShortcuts.exsd
deleted file mode 100644
index 53d0156..0000000
--- a/org.eclipse.debug.ui/schema/launchShortcuts.exsd
+++ /dev/null
@@ -1,416 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="launchShortcuts" name="Launch Shortcuts"/>
- </appinfo>
- <documentation>
- This extension point provides support for selection sensitive launching. Extensions register a shortcut which
-appears in the run and/or debug cascade menus to launch the workbench selection or active editor.
- </documentation>
- </annotation>
-
- <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="shortcut" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="shortcut">
- <annotation>
- <appinfo>
- <meta.element labelAttribute="label"/>
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="perspective" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="contextualLaunch" minOccurs="0" maxOccurs="1"/>
- <element ref="enablement" minOccurs="0" maxOccurs="1"/>
- <element ref="configurationType" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="description" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- specifies a unique identifier for this launch shortcut.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="modes" type="string" use="required">
- <annotation>
- <documentation>
- specifies a comma-separated list of modes this shortcut supports.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- specifies the fully qualified name of a class which implements
-<code>org.eclipse.debug.ui.ILaunchShortcut</code>.
-
-New in 3.4, clients can implement <code>org.eclipse.debug.ui.ILaunchShortcut2</code> to participate in context sensitive launching of resource and non-resource based artifacts.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.debug.ui.ILaunchShortcut"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- specifies a label used to render this shortcut.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
- specifies a plugin-relative path to an image used to render this shortcut. Icon is optional because it is up to other plugins (i.e. Views) to render it.
- </documentation>
- <appinfo>
- <meta.attribute kind="resource"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="category" type="string">
- <annotation>
- <documentation>
- specifies the launch configuration type category this shortcut is applicable for. When unspecified, the category is <code>null</code> (default).
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.debug.core.launchConfigurationTypes/launchConfigurationType/@category"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="helpContextId" type="string">
- <annotation>
- <documentation>
- an optional identifier that specifies the help context to associate with this launch shortcut
- </documentation>
- </annotation>
- </attribute>
- <attribute name="path" type="string">
- <annotation>
- <documentation>
- an optional menu path used to group launch shortcuts in menus. Launch shortcuts are grouped alphabetically based on the <code>path</code> attribute, and then sorted alphabetically within groups based on the <code>label</code> attribute. When unspecified, a shortcut appears in the last group. This attribute was added in the 3.0.1 release.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- Provides a human readable description of what the shortcut does (or will do) if the user selects it. A Description provided in this field will apply as the default description for all of the modes listed in the modes attribute. This attribute was added in the 3.3 release.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="perspective">
- <annotation>
- <appinfo>
- <meta.element deprecated="true"/>
- </appinfo>
- <documentation>
- The <code>perspective</code> element has been <b>deprecated</b> in the 3.1 release. The top level Run/Debug/Profile cascade menus now support contextual (selection sensitive) launching, and clients should provide a <code>contextualLaunch</code> element instead.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- the unique identifier of a perspective in which a menu shortcut for this launch shortcut will appear.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.ui.perspectives/perspective/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="contextualLaunch">
- <annotation>
- <documentation>
- Holds all descriptions for adding shortcuts to the selection sensitive Run/Debug/Profile cascade menus. Only objects that provide an <code>org.eclipse.debug.ui.actions.ILaunchable</code> adapter are considered for the cascade menus. The <code>org.eclipse.debug.ui.actions.ILaunchable</code> interface is simply used to tag objects that support contextual launching.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="contextLabel" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="enablement" minOccurs="0" maxOccurs="1"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="contextLabel">
- <annotation>
- <documentation>
- Specify the label for a contextual launch mode.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="mode" type="string" use="required">
- <annotation>
- <documentation>
- specifies a mode from the set {"run","debug","profile"}
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.debug.core.launchModes/launchMode/@mode"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- specifies the label to appear in the contextual launch menu.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="configurationType">
- <annotation>
- <documentation>
- This element allows more that one associated launch configuration type to be specified for this launch shortcut. This element was added in the 3.3 release.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- This attribute is the identifier of an existing launch configuration type that is to be associated with this launch shortcut. This association is then used to determine what launch shortcuts apply to what types for context sensitive launching.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.debug.core.launchConfigurationTypes/launchConfigurationType/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="description">
- <annotation>
- <documentation>
- Provides a mode specific description for this launch shortcut. This element was added in the 3.3. release.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="mode" type="string" use="required">
- <annotation>
- <documentation>
- A launch mode identifier this description applies to. For example, "run".
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string" use="required">
- <annotation>
- <documentation>
- The desciption for this launch shortcut when invoked in the associated mode.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- The following is an example of the Java Application launch shortcut contribution with an enablement expression, an associated launch configuration type id and descriptions for run and debug mode:
-
-<p>
-<pre>
- <extension point="org.eclipse.debug.ui.launchShortcuts">
- <shortcut
- label="Java Application"
- icon="$nl$/icons/full/etool16/java_app.gif"
- helpContextId="org.eclipse.jdt.debug.ui.shortcut_local_java_application"
- modes="run, debug"
- class="org.eclipse.jdt.internal.debug.ui.launcher.JavaApplicationLaunchShortcut"
- description="Launch a local Java application"
- id="org.eclipse.jdt.debug.ui.localJavaShortcut">
- <description
- description="Runs a local Java application"
- mode="run">
- </description>
- <description
- description="Debugs a local Java application"
- mode="debug">
- </description>
- <contextualLaunch>
- <enablement>
- <with variable="selection">
- <count value="1"/>
- <iterate>
- <or>
- <test property="org.eclipse.jdt.launching.hasMain"/>
- <and>
- <test property="org.eclipse.jdt.launching.isContainer"/>
- <test property="org.eclipse.jdt.launching.hasProjectNature" args="org.eclipse.jdt.core.javanature"/>
- </and>
- </or>
- </iterate>
- </with>
- </enablement>
- </contextualLaunch>
- <configurationType
- id="org.eclipse.jdt.launching.localJavaApplication">
- </configurationType>
- </shortcut>
-</extension>
-</pre>
-</p>
-<p>
-In the above example, a launch shortcut will be shown in the run and debug cascade menus with the label
-"Java Application". Furthermore, the shortcut will only appear if the selected item contains a main method or is a Java project, and has an <code>org.eclipse.debug.ui.actions.ILaunchable</code> adapter.
-</p>
-<p>
-For more information on property testers see <code>org.eclipse.core.expressions.PropertyTester</code>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiInfo"/>
- </appinfo>
- <documentation>
- <p>
-Value of the attribute <b>class</b> must be a fully qualified name of a Java class that implements the
-interface <b>org.eclipse.debug.ui.ILaunchShortcut</b>.
-New in 3.4, clients can implement <code>org.eclipse.debug.ui.ILaunchShortcut2</code> to participate in context sensitive launching of resource and non-resource based artifacts.
-</p>
-<p>
-Since 3.1, the debug platform registers a command handler for each launch shortcut and its applicable modes to allow clients to define key-bindings for a launch shortcut. The command id for a handler is generated as the launch shortcut id attribute, followed by a dot and the applicable launch mode. For example, the command id for the above launch shortcut example would be <code>com.example.ExampleLaunchShortcutId.debug</code> for launching in debug mode. A command and key binding could be defined as follows, to bind "<code>ALT-SHIFT-D, E</code>" to the launch shortcut.
-<pre>
- <extension point="org.eclipse.ui.commands">
- <command
- name="Debug Example Launch"
- description="Debug Example Launch"
- categoryId="org.eclipse.debug.ui.category.run"
- id="com.example.ExampleLaunchShortcutId.debug">
- </command>
- <keyBinding
- keySequence="M3+M2+D E"
- contextId="org.eclipse.ui.globalScope"
- commandId="com.example.ExampleLaunchShortcutId.debug"
- keyConfigurationId="org.eclipse.ui.defaultAcceleratorConfiguration">
- </keyBinding>
- </extension>
-</pre>
-</p>
-<p>
-Since 3.3, launch shortcuts can now indicate what kind of launch configuration(s) they will create using the configurationType element. In the event that a given launch shortcut can create more than one type of launch configuration, more than one type can be specified using this element.<br>
-Example:
-<pre>
- <extension point="org.eclipse.debug.ui.launchShortcuts">
- <shortcut
- class="MyShortcut"
- description="Launches a simple program"
- id="myShortcut"
- label="My Shortcut"
- modes="run">
- <configurationType
- id="mylaunchtypes">
- </configurationType>
- </shortcut>
- </extension>
-</pre>
-</p>
-<p>
-Since 3.3, launch shortcuts can provdie a human readable description. This is used to aid novice users during the context launching process when they are presented with a listing of launch shortcuts to choose from.<br>
-Descriptions can be provided in one of two ways:
-<ol>
-<li>A general description can be provided for the shortcut, which will apply to all modes that the shortcut supports</li>
-<li>Each description can be specified for a specific mode</li>
-</ol>
-Example of general description which applies to run and debug modes:
-<pre>
- <shortcut
- class="MyShortcut"
- description="Launches a simple program"
- id="myShortcut"
- label="My Shortcut"
- modes="run, debug">
- </shortcut>
- </extension>
-</pre>
-Example of a description for the run mode only:
-<pre>
- <extension point="org.eclipse.debug.ui.launchShortcuts">
- <shortcut
- class="MyShortcut"
- id="myShortcut"
- label="My Shortcut"
- modes="run, debug">
- <description
- description="Runs a simple program"
- mode="run">
- </description>
- </shortcut>
- </extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
-
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2000, 2007 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/schema/memoryRenderings.exsd b/org.eclipse.debug.ui/schema/memoryRenderings.exsd
deleted file mode 100644
index 132a7cb..0000000
--- a/org.eclipse.debug.ui/schema/memoryRenderings.exsd
+++ /dev/null
@@ -1,212 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="memoryRenderings" name="Memory Renderings"/>
- </appinfo>
- <documentation>
- Allows plug-ins to contribute arbitrary renderings for memory blocks and bind memory blocks to renderings. For example, a rendering may translate raw bytes of a memory block into ASCII characters.
- </documentation>
- </annotation>
-
- <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
-
- <element name="extension">
- <complexType>
- <choice>
- <element ref="renderingType" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="renderingBindings" minOccurs="0" maxOccurs="unbounded"/>
- </choice>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="renderingType">
- <annotation>
- <documentation>
- This element defines a rendering type.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- human-readable name of this rendering type
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- unique identifier for this rendering
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- fully qualified name of the Java class that implements <code>org.eclipse.debug.ui.memory.IMemoryRenderingTypeDelegate</code>
- </documentation>
- <appinfo>
- <meta.attribute kind="java"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="renderingBindings">
- <annotation>
- <documentation>
- Binds memory blocks with available renderings.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="enablement" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="renderingIds" type="string">
- <annotation>
- <documentation>
- comma delimited list of memory rendering type identifiers, specifying available rendering types for memory blocks this binding is enabled for. Must not be specified when <code>class</code> is provided.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="primaryId" type="string">
- <annotation>
- <documentation>
- memory rendering type identifier, specifying the default rendering type to be considered primary for memory blocks this binding is enabled for. When there is more than one default rendering type bound to a memory block, the UI may use the information to determine which rendering should be made visible (i.e the primrary one). Must not be specified when <code>class</code> is provided. Clients should be careful to specify only one primary rendering type per memory block.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.debug.ui.memoryRenderings/renderingType/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="class" type="string">
- <annotation>
- <documentation>
- fully qualified name of the Java class that implements <code>org.eclipse.debug.ui.memory.IMemoryRenderingBindingsProvider</code>, allowing for dynamic rendering bindings. When specified, <code>renderingIds</code>, <code>defaultIds</code>, and <code>primaryId</code> must not be specified.
- </documentation>
- <appinfo>
- <meta.attribute kind="java"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="defaultIds" type="string">
- <annotation>
- <documentation>
- comma delimited list of memory rendering type identifiers, specifying default rendering types for memory blocks this binding is enabled for. Must not be specified when <code>class</code> is provided.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- 3.1 - replacement for memoryRenderingTypes extension point which was considered experimental in 3.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- The following is an example for defining a new rendering type and binding.
-
-<p>
-<pre>
-<extension point="org.eclipse.debug.ui.memoryRenderings">
- <renderingType
- name="Sample Rendering"
- id="com.example.sampleRendering"
- class="com.example.SampleRenderingTypeDelegate">
- </renderingType>
- <renderingBindings
- renderingIds="com.example.sampleRendering">
- <enablement>
- <instanceof value="com.example.SampleMemoryBlock"/>
- </enablement>
- </renderingBindings>
-</extension>
-</pre>
-</p>
-
-In the above example, a new rendering type, Sample Rendering, is defined. The class <code>com.example.SampleRenderingTypeDelegate</code> implements <code>org.eclipse.debug.ui.memory.IMemoryRenderingTypeDelegate</code> and will be used to create new renderings of this type. The rendering is bound to instances of <code>com.exmaple.SampleMemoryBlock</code>.
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiInfo"/>
- </appinfo>
- <documentation>
- <p>
-<li>Value of the attribute <b>class</b> in a <b>renderingType</b> element must be a fully qualifed name of a Java class that implements <b>org.eclipse.debug.ui.memory.IMemoryRenderingTypeDelegate</b>.</li>
-<li>Value of the attribute <b>class</b> in a <b>renderingBindings</b> element must be a fully qualifed name of a Java class that implements <b>org.eclipse.debug.ui.memory.IMemoryRenderingBindingsProvider</b>.</li>
-</p>
- </documentation>
- </annotation>
-
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- <p>
-The debug platform provides the following rendering types:<br>
-<li>Hex Rendering (rendering id: org.eclipse.debug.ui.rendering.raw_memory)</li>
-<li>ASCII Rendering (rendering id: org.eclipse.debug.ui.rendering.ascii)</li>
-<li>Signed Integer Rendering (rendering id: org.eclipse.debug.ui.rendering.signedint)</li>
-<li>Unsigned Integer Rendering (rendering id: org.eclipse.debug.ui.rendering.unsignedint) </li>
-<br>
-</p>
-<p>
-The debug platform provides a memory view to host renderings.
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2004, 2005 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/schema/sourceContainerPresentations.exsd b/org.eclipse.debug.ui/schema/sourceContainerPresentations.exsd
deleted file mode 100644
index e350ba0..0000000
--- a/org.eclipse.debug.ui/schema/sourceContainerPresentations.exsd
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="sourceContainerPresentations" name="Source Container Presentations"/>
- </appinfo>
- <documentation>
- Extension point to define a presentation aspects of a source container type.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="sourceContainerPresentation" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="sourceContainerPresentation">
- <annotation>
- <documentation>
- An extension point to define presentation aspects of a source container type.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- The unique id used to refer to this implementation.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
- The icon that should be displayed for the source container type and instances.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="containerTypeID" type="string" use="required">
- <annotation>
- <documentation>
- The unique identifier of the source container type for which this presentation is being provided.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.debug.core.sourceContainerTypes/sourceContainerType/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="browserClass" type="string">
- <annotation>
- <documentation>
- A class that can be called to display a browse dialog for the source container type. Must implement <code>ISourceLocationBrowser</code>.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.debug.internal.ui.sourcelookup.ISourceLocationBrowser"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- 3.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- Following is an example of an source container presentation definition.
-<pre>
- <extension point="org.eclipse.debug.ui.sourceContainerPresentations">
- <sourceContainerPresentation
- browserClass="org.eclipse.debug.internal.ui.sourcelookup.browsers.ProjectSourceContainerBrowser"
- containerTypeID="org.eclipse.debug.core.containerType.project"
- icon="icons/full/obj16/prj_obj.gif"
- id="org.eclipse.debug.ui.containerPresentation.project">
- </sourceContainerPresentation>
- </extension>
-</pre>
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiInfo"/>
- </appinfo>
- <documentation>
- Value of the attribute <b>browserClass</b> must be a fully qualified name of a Java class that implements the interface <b>ISourceLocationBrowser</b>.
- </documentation>
- </annotation>
-
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2003, 2005 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/schema/stringVariablePresentations.exsd b/org.eclipse.debug.ui/schema/stringVariablePresentations.exsd
deleted file mode 100644
index d81d9bd..0000000
--- a/org.eclipse.debug.ui/schema/stringVariablePresentations.exsd
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="stringVariablePresentations" name="String Variable Presentations"/>
- </appInfo>
- <documentation>
- This extension point provides a mechanism for contributing a user interface/presentation for a string substitution variable (i.e. a context variable or value variable).
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="variablePresentation" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="variablePresentation">
- <complexType>
- <attribute name="variableName" type="string" use="required">
- <annotation>
- <documentation>
- specifies the variable this presentation is for
- </documentation>
- </annotation>
- </attribute>
- <attribute name="argumentSelector" type="string" use="required">
- <annotation>
- <documentation>
- specifies a fully qualified name of a Java class that implements <code>IArgumentSelector</code>
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 2.1
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- The following is an example of a variable presentation contribution:
-<pre>
-<extension point="org.eclipse.debug.ui.stringVariablePresentations">
- <variablePresentation
- variableName="example_variable"
- argumentSelector="com.example.ExampleArgumentChooser">
- </variablePresentation>
-</extension>
-</pre>
-In the above example, the contributed presentation will be used for the variable named "example_variable". An argument selector is specified to configure an argument applicable to the variable.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute <b>argumentSelector</b> must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.debug.ui.stringsubstitution.IArgumentSelector</b>.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-Copyright (c) 2003, 2005 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/schema/toggleBreakpointsTargetFactories.exsd b/org.eclipse.debug.ui/schema/toggleBreakpointsTargetFactories.exsd
deleted file mode 100644
index 6221b60..0000000
--- a/org.eclipse.debug.ui/schema/toggleBreakpointsTargetFactories.exsd
+++ /dev/null
@@ -1,163 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="toggleBreakpointsTargetFactories" name="toggleBreakpointsTargetFactories"/>
- </appinfo>
- <documentation>
- This extension point provides a mechanism for contributing breakpoint toggle action targets which can be registered for specific editors, debug models, or files.
- </documentation>
- </annotation>
-
- <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="toggleTargetFactory" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="toggleTargetFactory">
- <annotation>
- <documentation>
- Element declaring a toggle breakpoints target factory. This element can optionally contain an enablement element which determines when this factory is going to be applicable. The evaluation context for the enablement expression includes:
-(default variable) - the active workbench part of type IWorkbenchPart
-"debugContext" - currently active debug context selection, of type List
-"editorInput" - the editor input to the editor if the currently active part is an editor, of type IEditorInput
-"selection" - the current selection in the active part, of type List
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="enablement" minOccurs="0" maxOccurs="1"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- Specifies a unique identifier for this breakpoint toggle target.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- Class implementing the IToggleBreakpointsTargetFactory interface.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.debug.ui.actions.IToggleBreakpointsTargetFactory"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- 3.5
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- The following is an example of a breakpoint toggle target factory extension.
-
-<p>
-<pre>
- <extension point="org.eclipse.debug.ui.toggleBreakpointsTargetFactories">
- <toggleTargetFactory
- id="com.example.ExampleBreakpointToggleTargetFactory"
- class="com.example.BreakpointToggleTargetFactory">
- <enablement>
- <!-- Test the active debug context. Enable only if the active context
- is an element from "Example" debugger, or if there is no debug context
- associated with the context element. Also enable if debug context is
- empty -->
- <with variable="debugContext">
- <iterate>
- <or>
- <test property="org.eclipse.debug.ui.getModelIdentifier" value="com.example.model"/>
- <test property="org.eclipse.debug.ui.getModelIdentifier" value=""/>
- </or>
- </iterate>
- </with>
- <!-- If the debug context matches of if there isno active debug context.
- Enable the breakpoint toggle for the "Example" editors -->
- <instanceof value="com.example.Editor"/>
- </enablement>
- </toggleTargetFactory>
- </extension>
-</pre>
-</p>
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiInfo"/>
- </appinfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.debug.ui.actions.IToggleBreakpointsTargetFactory</b>.
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2007 Wind River Systems and others.<br>
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/schema/variableValueEditors.exsd b/org.eclipse.debug.ui/schema/variableValueEditors.exsd
deleted file mode 100644
index b30281a..0000000
--- a/org.eclipse.debug.ui/schema/variableValueEditors.exsd
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.debug.ui" id="variableValueEditors" name="Variable Value Editors"/>
- </appinfo>
- <documentation>
- This extension point provides a mechanism for contributing variable value editors for a particular debug model. Variable value editors are used to edit/save variable values. When the user invokes the "Change Value..." or "Assign Value" (details pane) actions on a variable in the Variables view, the contributed <code>org.eclipse.debug.ui.actions.IVariableValueEditor</code> will be invoked to change the value.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="variableValueEditor"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="variableValueEditor">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- Implementation of <code>org.eclipse.debug.ui.actions.IVariableValueEditor</code>
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.debug.ui.actions.IVariableValueEditor"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="modelId" type="string" use="required">
- <annotation>
- <documentation>
- The debug model identifier for which the given variable value editor is applicable.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- 3.1
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- <pre>
- <extension
- point="org.eclipse.debug.ui.variableValueEditors">
- <variableEditor
- modelId="com.examples.myDebugModel"
- class="com.examples.variables.MyVariableValueEditor"/>
- </extension>
-</pre>
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiInfo"/>
- </appinfo>
- <documentation>
- Value of the attribute <b>class</b> must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.debug.ui.actions.IVariableValueEditor</b>.
- </documentation>
- </annotation>
-
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2004, 2005 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.debug.ui/scripts/exportplugin.xml b/org.eclipse.debug.ui/scripts/exportplugin.xml
deleted file mode 100644
index 2b66e4c..0000000
--- a/org.eclipse.debug.ui/scripts/exportplugin.xml
+++ /dev/null
@@ -1,35 +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="Export 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_3.0.0" />
- </target>
-
- <!-- Create the jar of .class files, and copy other important files to export dir -->
- <target name="export" depends="init">
- <mkdir dir="${destdir}" />
- <delete dir="${dest}" />
- <mkdir dir="${dest}" />
- <jar
- jarfile="${dest}/dtui.jar"
- basedir="bin"
- />
- <!-- Create the source zip -->
- <zip zipfile="${dest}/dtuisrc.zip">
- <fileset dir="ui"/>
- </zip>
- <copy file="plugin.xml" todir="${dest}"/>
- <copy file="plugin.properties" todir="${dest}"/>
- <copy file=".classpath" todir="${dest}"/>
- <copy file=".options" todir="${dest}"/>
- <copy todir="${dest}/icons">
- <fileset dir="icons" />
- </copy>
- </target>
-
-</project>
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugCheckboxSelectionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugCheckboxSelectionDialog.java
deleted file mode 100644
index cf7ce86..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugCheckboxSelectionDialog.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-
-/**
- * This class provides selection dialog using a check box table viewer.
- *
- * @since 3.4
- */
-public abstract class AbstractDebugCheckboxSelectionDialog extends AbstractDebugSelectionDialog {
-
- /**
- * Whether to add Select All / De-select All buttons to the custom footer controls.
- */
- private boolean fShowSelectButtons = false;
-
- /**
- * Constructor
- * @param parentShell
- */
- public AbstractDebugCheckboxSelectionDialog(Shell parentShell) {
- super(parentShell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- }
-
- /**
- * Returns the viewer cast to the correct instance. Possibly <code>null</code> if
- * the viewer has not been created yet.
- * @return the viewer cast to CheckboxTableViewer
- */
- protected CheckboxTableViewer getCheckBoxTableViewer() {
- return (CheckboxTableViewer) fViewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#initializeControls()
- */
- protected void initializeControls() {
- List selectedElements = getInitialElementSelections();
- if (selectedElements != null && !selectedElements.isEmpty()){
- getCheckBoxTableViewer().setCheckedElements(selectedElements.toArray());
- getCheckBoxTableViewer().setSelection(StructuredSelection.EMPTY);
- }
- super.initializeControls();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#createViewer(org.eclipse.swt.widgets.Composite)
- */
- protected StructuredViewer createViewer(Composite parent){
- //by default return a checkbox table viewer
- Table table = new Table(parent, SWT.BORDER | SWT.SINGLE | SWT.CHECK);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = 150;
- table.setLayoutData(gd);
- return new CheckboxTableViewer(table);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#addViewerListeners(org.eclipse.jface.viewers.StructuredViewer)
- */
- protected void addViewerListeners(StructuredViewer viewer) {
- getCheckBoxTableViewer().addCheckStateListener(new DefaultCheckboxListener());
- }
-
- /**
- * A checkbox state listener that ensures that exactly one element is checked
- * and enables the OK button when this is the case.
- *
- */
- private class DefaultCheckboxListener implements ICheckStateListener{
- public void checkStateChanged(CheckStateChangedEvent event) {
- getButton(IDialogConstants.OK_ID).setEnabled(isValid());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.AbstractDebugSelectionDialog#isValid()
- */
- protected boolean isValid() {
- return getCheckBoxTableViewer().getCheckedElements().length > 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
- protected void okPressed() {
- Object[] elements = getCheckBoxTableViewer().getCheckedElements();
- setResult(Arrays.asList(elements));
- super.okPressed();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#addCustomFooterControls(org.eclipse.swt.widgets.Composite)
- */
- protected void addCustomFooterControls(Composite parent) {
- if (fShowSelectButtons){
- Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_HORIZONTAL);
- GridData gd = (GridData) comp.getLayoutData();
- gd.horizontalAlignment = SWT.END;
- Button button = SWTFactory.createPushButton(comp, DebugUIMessages.AbstractDebugCheckboxSelectionDialog_0, null);
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- getCheckBoxTableViewer().setAllChecked(true);
- getButton(IDialogConstants.OK_ID).setEnabled(isValid());
- }
- });
- button = SWTFactory.createPushButton(comp, DebugUIMessages.AbstractDebugCheckboxSelectionDialog_1, null);
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- getCheckBoxTableViewer().setAllChecked(false);
- getButton(IDialogConstants.OK_ID).setEnabled(isValid());
- }
- });
- }
- }
-
- /**
- * If this setting is set to true before the dialog is opened, a Select All and
- * a De-select All button will be added to the custom footer controls. The default
- * setting is false.
- *
- * @param setting whether to show the select all and de-select all buttons
- */
- protected void setShowSelectAllButtons(boolean setting){
- fShowSelectButtons = setting;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugListSelectionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugListSelectionDialog.java
deleted file mode 100644
index 5235b91..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugListSelectionDialog.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This class provides a simple selection dialog displaying items in a table.
- *
- * @since 3.3
- */
-public abstract class AbstractDebugListSelectionDialog extends AbstractDebugSelectionDialog {
-
- protected TableViewer fListViewer;
-
- /**
- * Constructor
- * @param parentShell
- */
- public AbstractDebugListSelectionDialog(Shell parentShell) {
- super(parentShell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.AbstractDebugSelectionDialog#createViewer(org.eclipse.swt.widgets.Composite)
- */
- protected StructuredViewer createViewer(Composite parent){
- //by default return a table viewer
- fListViewer = new TableViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = 150;
- fListViewer.getTable().setLayoutData(gd);
- return fListViewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#addViewerListeners(org.eclipse.jface.viewers.StructuredViewer)
- */
- protected void addViewerListeners(StructuredViewer viewer) {
- viewer.addSelectionChangedListener(new ISelectionChangedListener(){
- public void selectionChanged(SelectionChangedEvent event) {
- getButton(IDialogConstants.OK_ID).setEnabled(isValid());
- }
- });
- viewer.addDoubleClickListener(new IDoubleClickListener(){
- public void doubleClick(DoubleClickEvent event) {
- if (isValid()){
- okPressed();
- }
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.AbstractDebugSelectionDialog#isValid()
- */
- protected boolean isValid() {
- if(fListViewer != null) {
- ISelection sel = fListViewer.getSelection();
- if(sel instanceof IStructuredSelection) {
- return ((IStructuredSelection)sel).size() == 1;
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
- protected void okPressed() {
- ISelection selection = fViewer.getSelection();
- if (selection instanceof IStructuredSelection) {
- setResult(((IStructuredSelection) selection).toList());
- }
- super.okPressed();
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugSelectionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugSelectionDialog.java
deleted file mode 100644
index cbf3d08..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugSelectionDialog.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-import java.util.List;
-
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.IBaseLabelProvider;
-import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.SelectionDialog;
-
-/**
- * This class provides the framework for a general selection dialog class.
- *
- * @see AbstractDebugListSelectionDialog
- * @see AbstractDebugCheckboxSelectionDialog
- *
- * @since 3.3
- */
-public abstract class AbstractDebugSelectionDialog extends SelectionDialog {
-
- protected StructuredViewer fViewer = null;
-
- /**
- * Constructor
- * @param parentShell
- */
- public AbstractDebugSelectionDialog(Shell parentShell) {
- super(parentShell);
- setDialogBoundsSettings(getDialogBoundsSettings(), Dialog.DIALOG_PERSISTSIZE);
- }
-
- /**
- * returns the dialog settings area id
- * @return the id of the dialog settings area
- */
- protected abstract String getDialogSettingsId();
-
- /**
- * Returns the object to use as input for the viewer
- * @return the object to use as input for the viewer
- */
- protected abstract Object getViewerInput();
-
- /**
- * Create and return a viewer to use in this dialog.
- *
- * @param parent the composite the viewer should be created in
- * @return the viewer to use in the dialog
- */
- protected abstract StructuredViewer createViewer(Composite parent);
-
- /**
- * Returns if the dialog and/or current selection is/are valid.
- * This method is polled when selection changes are made to update the enablement
- * of the OK button by default
- * @return true if the dialog is in a valid state, false otherwise
- *
- * @since 3.4
- */
- protected abstract boolean isValid();
-
- /**
- * Returns the content provider for the viewer
- * @return the content provider for the viewer
- */
- protected IContentProvider getContentProvider() {
- //by default return a simple array content provider
- return new ArrayContentProvider();
- }
-
- /**
- * Returns the label provider used by the viewer
- * @return the label provider used in the viewer
- */
- protected IBaseLabelProvider getLabelProvider() {
- return new DefaultLabelProvider();
- }
-
- /**
- * Returns the help context id for this dialog
- * @return the help context id for this dialog
- */
- abstract protected String getHelpContextId();
-
- /**
- * This method allows listeners to be added to the viewer after it
- * is created.
- */
- /**
- * This method allows listeners to be added to the viewer. Called
- * after the viewer has been created and its input set.
- *
- * @param viewer the viewer returned by createViewer()
- */
- protected void addViewerListeners(StructuredViewer viewer){
- //do nothing by default
- }
-
- /**
- * This method allows custom controls to be added before the viewer
- * @param parent the parent composite to add these custom controls to
- */
- protected void addCustomHeaderControls(Composite parent) {
- //do nothing by default
- }
-
- /**
- * This method allows custom controls to be added after the viewer
- * @param parent the parent composite to add these controls to
- */
- protected void addCustomFooterControls(Composite parent) {
- //do nothing by default
- }
-
- /**
- * This method allows the newly created controls to be initialized.
- * This method is called only once all controls have been created from the
- * <code>createContents</code> method.
- *
- * By default this method initializes the OK button control.
- */
- protected void initializeControls() {
- getButton(IDialogConstants.OK_ID).setEnabled(isValid());
- }
-
- /**
- * Returns the viewer used to display information in this dialog.
- * Can be <code>null</code> if the viewer has not been created.
- * @return viewer used in this dialog
- */
- protected Viewer getViewer(){
- return fViewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
- Composite comp = (Composite) super.createContents(parent);
- initializeControls();
- return comp;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Control createDialogArea(Composite parent) {
- initializeDialogUnits(parent);
- Composite comp = (Composite) super.createDialogArea(parent);
- addCustomHeaderControls(comp);
- String label = getMessage();
- if(label != null && !IInternalDebugCoreConstants.EMPTY_STRING.equals(label)) {
- SWTFactory.createWrapLabel(comp, label, 1);
- }
- label = getViewerLabel();
- if(label != null && !IInternalDebugCoreConstants.EMPTY_STRING.equals(label)) {
- SWTFactory.createLabel(comp, label, 1);
- }
- fViewer = createViewer(comp);
- fViewer.setLabelProvider(getLabelProvider());
- fViewer.setContentProvider(getContentProvider());
- fViewer.setInput(getViewerInput());
- List selectedElements = getInitialElementSelections();
- if (selectedElements != null && !selectedElements.isEmpty()){
- fViewer.setSelection(new StructuredSelection(selectedElements));
- }
- addViewerListeners(fViewer);
- addCustomFooterControls(comp);
- Dialog.applyDialogFont(comp);
- String help = getHelpContextId();
- if(help != null) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, help);
- }
- return comp;
- }
-
- /**
- * This method returns the label describing what to do with the viewer. Typically this label
- * will include the key accelerator to get to the viewer via the keyboard
- * @return the label for the viewer
- */
- abstract protected String getViewerLabel();
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionDialog#getDialogBoundsSettings()
- */
- protected IDialogSettings getDialogBoundsSettings() {
- IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(getDialogSettingsId());
- if (section == null) {
- section = settings.addNewSection(getDialogSettingsId());
- }
- return section;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/BreakpointImageProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/BreakpointImageProvider.java
deleted file mode 100644
index 6f8b99e..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/BreakpointImageProvider.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.texteditor.IAnnotationImageProvider;
-import org.eclipse.ui.texteditor.MarkerAnnotation;
-
-/**
- * Provides managed images for breakpoint annotations.
- * @since 3.0
- */
-public class BreakpointImageProvider implements IAnnotationImageProvider {
-
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getManagedImage(org.eclipse.jface.text.source.Annotation)
- */
- public Image getManagedImage(Annotation annotation) {
- if (annotation instanceof MarkerAnnotation) {
- IMarker marker = ((MarkerAnnotation)annotation).getMarker();
- if (marker != null) {
- IBreakpoint breakpoint = DebugPlugin.getDefault().getBreakpointManager().getBreakpoint(marker);
- if (breakpoint != null) {
- return DebugUIPlugin.getModelPresentation().getImage(breakpoint);
- }
- }
- }
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getImageDescriptorId(org.eclipse.jface.text.source.Annotation)
- */
- public String getImageDescriptorId(Annotation annotation) {
- return null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getImageDescriptor(java.lang.String)
- */
- public ImageDescriptor getImageDescriptor(String imageDescritporId) {
- return null;
- }
-}
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 a09ae6d..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Generic color manager.
- */
-public class ColorManager {
-
- private static ColorManager fgColorManager;
-
- private ColorManager() {
- }
-
- public static ColorManager getDefault() {
- if (fgColorManager == null) {
- fgColorManager= new ColorManager();
- }
- return fgColorManager;
- }
-
- protected Map fColorTable= new HashMap(10);
-
- public Color getColor(RGB rgb) {
- Color color= (Color) fColorTable.get(rgb);
- if (color == null) {
- color= new Color(Display.getCurrent(), rgb);
- fColorTable.put(rgb, color);
- }
- return color;
- }
-
- public void dispose() {
- Iterator e= fColorTable.values().iterator();
- while (e.hasNext())
- ((Color) e.next()).dispose();
- }
-}
-
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/CompositeDebugImageDescriptor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/CompositeDebugImageDescriptor.java
deleted file mode 100644
index e43235c..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/CompositeDebugImageDescriptor.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.resource.CompositeImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Point;
-
-/**
- * A JDIImageDescriptor consists of a main icon and several adornments. The adornments
- * are computed according to flags set on creation of the descriptor.
- */
-public class CompositeDebugImageDescriptor extends CompositeImageDescriptor {
-
- /** Flag to render the skip breakpoint adornment */
- public final static int SKIP_BREAKPOINT= 0x0001;
-
- private Image fBaseImage;
- private int fFlags;
- private Point fSize;
-
- /**
- * Create a new composite image descriptor.
- *
- * @param baseImage an image used as the base image
- * @param flags flags indicating which adornments are to be rendered
- *
- */
- public CompositeDebugImageDescriptor(Image baseImage, int flags) {
- setBaseImage(baseImage);
- setFlags(flags);
- }
-
- /**
- * @see CompositeImageDescriptor#getSize()
- */
- protected Point getSize() {
- if (fSize == null) {
- ImageData data= getBaseImage().getImageData();
- setSize(new Point(data.width, data.height));
- }
- return fSize;
- }
-
- /**
- * @see Object#equals(java.lang.Object)
- */
- public boolean equals(Object object) {
- if (!(object instanceof CompositeDebugImageDescriptor)){
- return false;
- }
- CompositeDebugImageDescriptor other= (CompositeDebugImageDescriptor)object;
- return (getBaseImage().equals(other.getBaseImage()) && getFlags() == other.getFlags());
- }
-
- /**
- * @see Object#hashCode()
- */
- public int hashCode() {
- return getBaseImage().hashCode() | getFlags();
- }
-
- /**
- * @see CompositeImageDescriptor#drawCompositeImage(int, int)
- */
- protected void drawCompositeImage(int width, int height) {
- ImageData bg= getBaseImage().getImageData();
- if (bg == null) {
- bg= DEFAULT_IMAGE_DATA;
- }
- drawImage(bg, 0, 0);
- drawOverlays();
- }
-
- /**
- * Add any overlays to the image as specified in the flags.
- */
- protected void drawOverlays() {
- int flags= getFlags();
- int x= 0;
- int y= 0;
- ImageData data= null;
- if ((flags & SKIP_BREAKPOINT) != 0) {
- x= 0;
- y= 0;
- data= DebugUITools.getImage(IDebugUIConstants.IMG_OVR_SKIP_BREAKPOINT).getImageData();
- drawImage(data, x, y);
- }
- }
-
- protected Image getBaseImage() {
- return fBaseImage;
- }
-
- protected void setBaseImage(Image image) {
- fBaseImage = image;
- }
-
- protected int getFlags() {
- return fFlags;
- }
-
- protected void setFlags(int flags) {
- fFlags = flags;
- }
-
- protected void setSize(Point size) {
- fSize = size;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugModelPropertyTester.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugModelPropertyTester.java
deleted file mode 100644
index 39b92de..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugModelPropertyTester.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Wind River Systems (Pawel Piech) - added support for IDebugModelProvider (Bug 212314)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IDebugModelProvider;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IDisconnect;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.ITerminate;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-
-/**
- * This class is used to check properties of a debug model. Two properties can be checked.
- * Using "getModelIdentifier" compares the debug model identifier of the receiver against the
- * expected value passed as an argument. The "isTerminatedOrDisconnected" property checks if
- * the receiver is terminated or disconnected.
- *
- * @since 3.3
- */
-public class DebugModelPropertyTester extends PropertyTester {
-
- public static final String MODEL_TYPE_PROPERTY = "getModelIdentifier"; //$NON-NLS-1$
- public static final String IS_TERMINATED_OR_DISCONNECTED_PROPERTY = "isTerminatedOrDisconnected"; //$NON-NLS-1$
-
- /* (non-Javadoc)
- * @see org.eclipse.core.expressions.PropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
- */
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- if (MODEL_TYPE_PROPERTY.equals(property)){
- IDebugTarget target = null;
- if(receiver instanceof IProcess) {
- target = (IDebugTarget) ((IProcess)receiver).getAdapter(IDebugTarget.class);
- }
- else if(receiver instanceof IDebugElement) {
- target = (IDebugTarget) ((IDebugElement)receiver).getAdapter(IDebugTarget.class);
- }
- if(target != null) {
- // check that the expected value argument is valid
- if (expectedValue == null || expectedValue.equals(IInternalDebugCoreConstants.EMPTY_STRING)){
- return false;
- }
- //!target.isTerminated() && !target.isDisconnected()
- if(expectedValue.equals(target.getModelIdentifier())) {
- return true;
- }
- }
- IDebugModelProvider modelProvider = null;
- if (receiver instanceof IAdaptable) {
- modelProvider = (IDebugModelProvider) ((IAdaptable)receiver).getAdapter(IDebugModelProvider.class);
- } else {
- modelProvider =
- (IDebugModelProvider) Platform.getAdapterManager().
- getAdapter(receiver, IDebugModelProvider.class);
- }
- if (modelProvider != null) {
- String[] ids = modelProvider.getModelIdentifiers();
- for (int i = 0; i < ids.length; i++) {
- if (ids[i].equals(expectedValue)) {
- return true;
- }
- }
- return false;
- }
- // There is no element selected with an associated debug model.
- // Return true iff the expected value is an empty string.
- return "".equals(expectedValue); //$NON-NLS-1$
- } else if (IS_TERMINATED_OR_DISCONNECTED_PROPERTY.equals(property)){
- if (receiver instanceof ITerminate && ((ITerminate)receiver).isTerminated()){
- return true;
- } if (receiver instanceof IDisconnect && ((IDisconnect)receiver).isDisconnected()){
- return true;
- } else {
- return false;
- }
- } else {
- return false;
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspectiveFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspectiveFactory.java
deleted file mode 100644
index 93b2f7d..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspectiveFactory.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-import org.eclipse.ui.console.IConsoleConstants;
-
-/**
- * The debug perspective factory.
- */
-public class DebugPerspectiveFactory implements IPerspectiveFactory {
-
- /**
- * @see IPerspectiveFactory#createInitialLayout(IPageLayout)
- */
- public void createInitialLayout(IPageLayout layout) {
-
- IFolderLayout consoleFolder = layout.createFolder(IInternalDebugUIConstants.ID_CONSOLE_FOLDER_VIEW, IPageLayout.BOTTOM, (float)0.75, layout.getEditorArea());
- consoleFolder.addView(IConsoleConstants.ID_CONSOLE_VIEW);
- consoleFolder.addView(IPageLayout.ID_TASK_LIST);
- consoleFolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
- consoleFolder.addPlaceholder(IPageLayout.ID_PROP_SHEET);
-
- IFolderLayout navFolder= layout.createFolder(IInternalDebugUIConstants.ID_NAVIGATOR_FOLDER_VIEW, IPageLayout.TOP, (float) 0.45, layout.getEditorArea());
- navFolder.addView(IDebugUIConstants.ID_DEBUG_VIEW);
- navFolder.addPlaceholder(IPageLayout.ID_RES_NAV);
-
- IFolderLayout toolsFolder= layout.createFolder(IInternalDebugUIConstants.ID_TOOLS_FOLDER_VIEW, IPageLayout.RIGHT, (float) 0.50, IInternalDebugUIConstants.ID_NAVIGATOR_FOLDER_VIEW);
- toolsFolder.addView(IDebugUIConstants.ID_VARIABLE_VIEW);
- toolsFolder.addView(IDebugUIConstants.ID_BREAKPOINT_VIEW);
- toolsFolder.addPlaceholder(IDebugUIConstants.ID_EXPRESSION_VIEW);
- toolsFolder.addPlaceholder(IDebugUIConstants.ID_REGISTER_VIEW);
-
- IFolderLayout outlineFolder= layout.createFolder(IInternalDebugUIConstants.ID_OUTLINE_FOLDER_VIEW, IPageLayout.RIGHT, (float) 0.75, layout.getEditorArea());
- outlineFolder.addView(IPageLayout.ID_OUTLINE);
-
- layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
- layout.addActionSet(IDebugUIConstants.DEBUG_ACTION_SET);
-
- setContentsOfShowViewMenu(layout);
- }
-
- /**
- * Sets the initial contents of the "Show View" menu.
- */
- protected void setContentsOfShowViewMenu(IPageLayout layout) {
- layout.addShowViewShortcut(IDebugUIConstants.ID_DEBUG_VIEW);
- layout.addShowViewShortcut(IDebugUIConstants.ID_VARIABLE_VIEW);
- layout.addShowViewShortcut(IDebugUIConstants.ID_BREAKPOINT_VIEW);
- layout.addShowViewShortcut(IDebugUIConstants.ID_EXPRESSION_VIEW);
- layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
- layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
- layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
deleted file mode 100644
index 2047230..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
+++ /dev/null
@@ -1,355 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * QNX Software Systems - Mikhail Khodjaiants - Registers View (Bug 53640)
- * QNX Software Systems - Mikhail Khodjaiants - Bug 114664
- * Wind River Systems - Pawel Piech - Added Modules view (bug 211158)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.debug.internal.core.IConfigurationElementConstants;
-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 org.osgi.framework.Bundle;
-
-/**
- * The images provided by the debug plugin.
- */
-public class DebugPluginImages {
-
- /**
- * The image registry containing <code>Image</code>s and <code>ImageDescriptor</code>s.
- */
- private static ImageRegistry imageRegistry;
-
- private static final String ATTR_LAUNCH_CONFIG_TYPE_ICON = "icon"; //$NON-NLS-1$
- private static final String ATTR_LAUNCH_CONFIG_TYPE_ID = "configTypeID"; //$NON-NLS-1$
-
- private static String ICONS_PATH = "$nl$/icons/full/"; //$NON-NLS-1$
-
- // Use IPath and toOSString to build the names to ensure they have the slashes correct
- private final static String CTOOL= ICONS_PATH + "etool16/"; //basic colors - size 16x16 //$NON-NLS-1$
- private final static String DTOOL= ICONS_PATH + "dtool16/"; //basic colors - size 16x16 //$NON-NLS-1$
- private final static String DLCL= ICONS_PATH + "dlcl16/"; //disabled - size 16x16 //$NON-NLS-1$
- private final static String ELCL= ICONS_PATH + "elcl16/"; //enabled - size 16x16 //$NON-NLS-1$
- private final static String OBJECT= ICONS_PATH + "obj16/"; //basic colors - size 16x16 //$NON-NLS-1$
- private final static String WIZBAN= ICONS_PATH + "wizban/"; //basic colors - size 16x16 //$NON-NLS-1$
- private final static String OVR= ICONS_PATH + "ovr16/"; //basic colors - size 7x8 //$NON-NLS-1$
- private final static String VIEW= ICONS_PATH + "eview16/"; // views //$NON-NLS-1$
-
- /**
- * Declare all images
- */
- private static void declareImages() {
- // Actions
- declareRegistryImage(IDebugUIConstants.IMG_ACT_DEBUG, CTOOL + "debug_exc.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_ACT_RUN, CTOOL + "run_exc.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_ACT_SYNCED, ELCL + "synced.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_SKIP_BREAKPOINTS, ELCL + "skip_brkp.gif"); //$NON-NLS-1$
-
- //menus
- declareRegistryImage(IDebugUIConstants.IMG_LCL_CHANGE_VARIABLE_VALUE, ELCL + "changevariablevalue_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_CHANGE_VARIABLE_VALUE, DLCL + "changevariablevalue_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_CHANGE_VARIABLE_VALUE, ELCL + "changevariablevalue_co.gif"); //$NON-NLS-1$
-
- declareRegistryImage(IDebugUIConstants.IMG_LCL_CONTENT_ASSIST, ELCL + "metharg_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_DLCL_CONTENT_ASSIST, DLCL + "metharg_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_ELCL_CONTENT_ASSIST, ELCL + "metharg_obj.gif"); //$NON-NLS-1$
-
- //Local toolbars
- declareRegistryImage(IDebugUIConstants.IMG_LCL_DETAIL_PANE, ELCL + "toggledetailpane_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_LCL_DETAIL_PANE_UNDER, ELCL + "det_pane_under.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_LCL_DETAIL_PANE_RIGHT, ELCL + "det_pane_right.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_LCL_DETAIL_PANE_HIDE, ELCL + "det_pane_hide.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_LCL_LOCK, ELCL + "lock_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_LCL_TYPE_NAMES, ELCL + "tnames_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_LCL_DISCONNECT, ELCL + "disconnect_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_LCL_REMOVE_ALL, ELCL + "rem_all_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_LCL_REMOVE, ELCL + "rem_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_LCL_SHOW_LOGICAL_STRUCTURE, ELCL + "var_cntnt_prvdr.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_LCL_COLLAPSE_ALL, ELCL + "collapseall.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_LCL_TERMINATE, ELCL + "terminate_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_LCL_RUN_TO_LINE, ELCL + "runtoline_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_LCL_MONITOR_EXPRESSION, ELCL + "monitorexpression_tsk.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_LCL_REMOVE_MEMORY, ELCL + "removememory_tsk.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_LCL_RESET_MEMORY, ELCL + "memoryreset_tsk.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_LCL_COPY_VIEW_TO_CLIPBOARD, ELCL + "copyviewtoclipboard_tsk.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_LCL_PRINT_TOP_VIEW_TAB, ELCL + "printview_tsk.gif"); //$NON-NLS-1$
-
- // disabled local toolbars
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE, DLCL + "toggledetailpane_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_UNDER, DLCL + "det_pane_under.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_RIGHT, DLCL + "det_pane_right.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_HIDE, DLCL + "det_pane_hide.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_LOCK, DLCL + "lock_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_TYPE_NAMES, DLCL + "tnames_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_SHOW_LOGICAL_STRUCTURE, DLCL + "var_cntnt_prvdr.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_COLLAPSE_ALL, DLCL + "collapseall.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_TERMINATE, DLCL + "terminate_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_REMOVE_ALL, DLCL + "rem_all_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_REMOVE, DLCL + "rem_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_RUN_TO_LINE, DLCL + "runtoline_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_MONITOR_EXPRESSION, DLCL + "monitorexpression_tsk.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_REMOVE_MEMORY, DLCL + "removememory_tsk.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_RESET_MEMORY, DLCL + "memoryreset_tsk.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_COPY_VIEW_TO_CLIPBOARD, DLCL + "copyviewtoclipboard_tsk.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_PRINT_TOP_VIEW_TAB, DLCL + "printview_tsk.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DUPLICATE_CONFIG, DLCL + "copy_edit_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_NEW_CONFIG, DLCL + "new_con.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DELETE_CONFIG, DLCL + "rem_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_FILTER_CONFIGS, DLCL + "filter_ps.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DISCONNECT, DLCL + "disconnect_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_SUSPEND, DLCL + "suspend_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_RESUME, DLCL + "resume_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_STEP_RETURN, DLCL+ "stepreturn_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_STEP_OVER, DLCL + "stepover_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_STEP_INTO, DLCL + "stepinto_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_TERMINATE_AND_REMOVE, DLCL + "terminate_rem_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_TERMINATE_ALL, DLCL + "terminate_all_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_TERMINATE_AND_RELAUNCH, DTOOL + "term_restart.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_TOGGLE_STEP_FILTERS, DLCL+"stepbystep_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_NEXT_THREAD, DLCL+"next_thread_nav.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_PREVIOUS_THREAD, DLCL+"prev_thread_nav.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_RESTART, DLCL+"restart_co.gif"); //$NON-NLS-1$
-
- // enabled local toolbars
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE, ELCL + "toggledetailpane_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_UNDER, ELCL + "det_pane_under.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_RIGHT, ELCL + "det_pane_right.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_HIDE, ELCL + "det_pane_hide.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_LOCK, ELCL + "lock_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_TYPE_NAMES, ELCL + "tnames_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_SHOW_LOGICAL_STRUCTURE, ELCL + "var_cntnt_prvdr.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_COLLAPSE_ALL, ELCL + "collapseall.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_TERMINATE, ELCL + "terminate_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_MONITOR_EXPRESSION, ELCL + "monitorexpression_tsk.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_REMOVE_MEMORY, ELCL + "removememory_tsk.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_RESET_MEMORY, ELCL + "memoryreset_tsk.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_COPY_VIEW_TO_CLIPBOARD, ELCL + "copyviewtoclipboard_tsk.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_PRINT_TOP_VIEW_TAB, ELCL + "printview_tsk.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_REMOVE_ALL, ELCL + "rem_all_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_REMOVE, ELCL + "rem_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_HIERARCHICAL, ELCL + "hierarchicalLayout.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_FILTER_CONFIGS, ELCL + "filter_ps.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DUPLICATE_CONFIG, ELCL + "copy_edit_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_NEW_CONFIG, ELCL + "new_con.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DELETE_CONFIG, ELCL + "delete_config.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_SUSPEND, ELCL + "suspend_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_RESUME, ELCL + "resume_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_STEP_RETURN, ELCL + "stepreturn_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_STEP_OVER, ELCL + "stepover_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_STEP_INTO, ELCL + "stepinto_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DROP_TO_FRAME, ELCL + "drop_to_frame.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_TERMINATE_AND_REMOVE, ELCL + "terminate_rem_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_TERMINATE_ALL, ELCL + "terminate_all_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_TERMINATE_AND_RELAUNCH, CTOOL + "term_restart.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_TOGGLE_STEP_FILTERS, ELCL+"stepbystep_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_STANDARD_OUT, ELCL+"writeout_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_STANDARD_ERR, ELCL+"writeerr_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_NEXT_THREAD, ELCL+"next_thread_nav.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_PREVIOUS_THREAD, ELCL+"prev_thread_nav.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_RESTART, ELCL+"restart_co.gif"); //$NON-NLS-1$
-
- //Object
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_LAUNCH_DEBUG, OBJECT + "ldebug_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_LAUNCH_RUN, OBJECT + "lrun_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_LAUNCH_RUN_TERMINATED, OBJECT + "terminatedlaunch_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET, OBJECT + "debugt_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET_SUSPENDED, OBJECT + "debugts_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET_TERMINATED, OBJECT + "debugtt_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_THREAD_RUNNING, OBJECT + "thread_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_THREAD_SUSPENDED, OBJECT + "threads_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_THREAD_TERMINATED, OBJECT + "threadt_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_STACKFRAME, OBJECT + "stckframe_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_STACKFRAME_RUNNING, OBJECT + "stckframe_running_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_VARIABLE, OBJECT + "genericvariable_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_REGISTER, OBJECT + "genericregister_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_REGISTER_GROUP, OBJECT + "genericreggroup_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT, OBJECT + "brkp_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT_DISABLED, OBJECT + "brkpd_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT_GROUP, OBJECT + "brkp_grp.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_BREAKPOINT_GROUP_DISABLED, OBJECT + "brkp_grp_disabled.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_WATCHPOINT, OBJECT + "readwrite_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_WATCHPOINT_DISABLED, OBJECT + "readwrite_obj_disabled.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_ACCESS_WATCHPOINT, OBJECT + "read_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_ACCESS_WATCHPOINT_DISABLED, OBJECT + "read_obj_disabled.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_MODIFICATION_WATCHPOINT, OBJECT + "write_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_MODIFICATION_WATCHPOINT_DISABLED, OBJECT + "write_obj_disabled.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_OS_PROCESS, OBJECT + "osprc_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_OS_PROCESS_TERMINATED, OBJECT + "osprct_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_EXPRESSION, OBJECT + "expression_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_INSTRUCTION_POINTER_TOP, OBJECT + "inst_ptr_top.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_INSTRUCTION_POINTER, OBJECT + "inst_ptr.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_OBJS_ARRAY_PARTITION, OBJECT + "arraypartition_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_ENV_VAR, OBJECT + "envvar_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_OBJECT_MEMORY_CHANGED, OBJECT + "memorychanged_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_OBJECT_MEMORY, OBJECT + "memory_obj.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_OBJS_BREAKPOINT_TYPE, OBJECT + "brkp_type.gif"); //$NON-NLS-1$
-
- // tabs
- declareRegistryImage(IInternalDebugUIConstants.IMG_OBJS_COMMON_TAB, OBJECT + "common_tab.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_OBJS_REFRESH_TAB, OBJECT + "refresh_tab.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_OBJS_PERSPECTIVE_TAB, OBJECT + "persp_tab.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OBJS_ENVIRONMENT, OBJECT + "environment_obj.gif"); //$NON-NLS-1$
-
- // Views
- declareRegistryImage(IDebugUIConstants.IMG_VIEW_BREAKPOINTS, VIEW + "breakpoint_view.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_VIEW_EXPRESSIONS, VIEW + "watchlist_view.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_VIEW_LAUNCHES, VIEW + "debug_view.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_VIEW_VARIABLES, VIEW + "variable_view.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_CVIEW_MEMORY_VIEW, VIEW + "memory_view.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_CVIEW_MODULES_VIEW, VIEW + "module_view.gif"); //$NON-NLS-1$
-
- // Perspectives
- declareRegistryImage(IDebugUIConstants.IMG_PERSPECTIVE_DEBUG, VIEW + "debug_persp.gif"); //$NON-NLS-1$
-
- //Wizard Banners
- declareRegistryImage(IDebugUIConstants.IMG_WIZBAN_DEBUG, WIZBAN + "debug_wiz.png"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_WIZBAN_RUN, WIZBAN + "run_wiz.png"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_WIZBAN_IMPORT_BREAKPOINTS, WIZBAN + "import_brkpts_wizban.png"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_WIZBAN_EXPORT_BREAKPOINTS, WIZBAN + "export_brkpts_wizban.png"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_WIZBAN_IMPORT_CONFIGS, WIZBAN + "import_config_wizban.png"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_WIZBAN_EXPORT_CONFIGS, WIZBAN + "export_config_wizban.png"); //$NON-NLS-1$
-
- // Overlays
- declareRegistryImage(IDebugUIConstants.IMG_OVR_ERROR, OVR + "error.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_OVR_TRANSPARENT, OVR + "transparent.gif"); //$NON-NLS-1$
- declareRegistryImage(IDebugUIConstants.IMG_OVR_SKIP_BREAKPOINT, OVR + "skip_breakpoint_ov.gif"); //$NON-NLS-1$
-
- //source location
- declareRegistryImage(IInternalDebugUIConstants.IMG_SRC_LOOKUP_MENU, ELCL + "edtsrclkup_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_SRC_LOOKUP_MENU_DLCL, DLCL + "edtsrclkup_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_SRC_LOOKUP_MENU_ELCL, ELCL + "edtsrclkup_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_SRC_LOOKUP_TAB, ELCL + "edtsrclkup_co.gif"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ADD_SRC_LOC_WIZ, WIZBAN + "addsrcloc_wiz.png"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_EDIT_SRC_LOC_WIZ, WIZBAN + "edtsrclkup_wiz.png"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_ADD_SRC_DIR_WIZ, WIZBAN + "adddir_wiz.png"); //$NON-NLS-1$
- declareRegistryImage(IInternalDebugUIConstants.IMG_EDIT_SRC_DIR_WIZ, WIZBAN + "editdir_wiz.png"); //$NON-NLS-1$
-
- // launch configuration types
- //try to get the images from the config types themselves, cache those that could not be found
- IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_LAUNCH_CONFIGURATION_TYPE_IMAGES);
- IConfigurationElement[] configElements= extensionPoint.getConfigurationElements();
- for (int i = 0; i < configElements.length; i++) {
- IConfigurationElement configElement = configElements[i];
- ImageDescriptor descriptor = DebugUIPlugin.getImageDescriptor(configElement, ATTR_LAUNCH_CONFIG_TYPE_ICON);
- if (descriptor == null) {
- descriptor = ImageDescriptor.getMissingImageDescriptor();
- }
- String configTypeID = configElement.getAttribute(ATTR_LAUNCH_CONFIG_TYPE_ID);
- if (configTypeID == null) {
- // bug 12652
- configTypeID = configElement.getAttribute(IConfigurationElementConstants.TYPE);
- }
- imageRegistry.put(configTypeID, descriptor);
- }
- }
-
- /**
- * 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();
- Bundle bundle = Platform.getBundle(DebugUIPlugin.getUniqueIdentifier());
- URL url = null;
- if (bundle != null){
- url = FileLocator.find(bundle, new Path(path), null);
- if(url != null) {
- desc = ImageDescriptor.createFromURL(url);
- }
- }
- imageRegistry.put(key, desc);
- }
-
- /**
- * Returns the ImageRegistry.
- */
- public static ImageRegistry getImageRegistry() {
- if (imageRegistry == null) {
- initializeImageRegistry();
- }
- return imageRegistry;
- }
-
- /**
- * Returns whether the image registry has been initialized.
- *
- * @return whether the image registry has been initialized
- */
- public synchronized static boolean isInitialized() {
- return imageRegistry != null;
- }
-
- /**
- * 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 org.eclipse.jface.resource.ImageRegistry
- */
- public synchronized static ImageRegistry initializeImageRegistry() {
- if (imageRegistry == null) {
- imageRegistry = new ImageRegistry(DebugUIPlugin.getStandardDisplay());
- 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) {
- return getImageRegistry().getDescriptor(key);
- }
-}
-
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIAdapterFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIAdapterFactory.java
deleted file mode 100644
index e788f80..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIAdapterFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainerWorkbenchAdapter;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointPersistableElementAdapter;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.model.IWorkbenchAdapter2;
-
-public class DebugUIAdapterFactory implements IAdapterFactory {
-
- /**
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(Object, Class)
- */
- public Object getAdapter(Object obj, Class adapterType) {
- if (adapterType.isInstance(obj)) {
- return obj;
- }
-
- if (adapterType == IPersistableElement.class) {
- if (obj instanceof IBreakpoint) {
- return new BreakpointPersistableElementAdapter((IBreakpoint)obj);
- }
- }
-
- if (adapterType == IWorkbenchAdapter.class) {
- if (obj instanceof BreakpointContainer) {
- return new BreakpointContainerWorkbenchAdapter();
- }
- }
-
- if (adapterType == IWorkbenchAdapter2.class) {
- if (obj instanceof BreakpointContainer) {
- return new BreakpointContainerWorkbenchAdapter();
- }
- }
-
- return null;
- }
-
- /**
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList() {
- return new Class[] {IPersistableElement.class, IWorkbenchAdapter.class, IWorkbenchAdapter2.class};
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java
deleted file mode 100644
index 72518dc..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- * Wind River Systems - Ted Williams - [Memory View] Memory View: Workflow Enhancements (Bug 215432)
- * Remy Chi Jian Suen - Make WorkingDirectoryBlock from JDT a Debug API class (Bug 221973)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class DebugUIMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.debug.internal.ui.DebugUIMessages";//$NON-NLS-1$
-
- public static String AbstractAsyncTableRendering_2;
-
- public static String AbstractDebugCheckboxSelectionDialog_0;
-
- public static String AbstractDebugCheckboxSelectionDialog_1;
-
- public static String DebugUIPlugin_23;
- public static String DebugUIPlugin_24;
- public static String DebugUIPlugin_0;
-
- public static String DebugUIPlugin_25;
- public static String DebugUIPlugin_Build_error__Check_log_for_details__2;
- public static String DebugUIPlugin_Run_Debug_1;
-
- public static String DefaultLabelProvider__disconnected__1;
-
- public static String DefaultLabelProvider_0;
- public static String DefaultLabelProvider_1;
- public static String DefaultLabelProvider__unknown__1;
- public static String DefaultLabelProvider_Breakpoint_1;
- public static String DefaultLabelProvider_12;
- public static String DefaultLabelProvider_13;
- public static String DefaultLabelProvider_15;
- public static String DefaultLabelProvider_16;
- public static String MultipleInputDialog_6;
- public static String MultipleInputDialog_7;
- public static String MultipleInputDialog_8;
-
- public static String SwitchMemoryBlockAction_4;
-
- public static String WorkingDirectoryStatusHandler_0;
- public static String WorkingDirectoryStatusHandler_Eclipse_Runtime_1;
-
- public static String DebugUITools_3;
- public static String DebugUITools_Error_1;
- public static String DebugUITools_Exception_occurred_during_launch_2;
-
- public static String InstructionPointerAnnotation_0;
- public static String InstructionPointerAnnotation_1;
-
- public static String DefaultLabelProvider_17;
-
- //
- // Action
- //
- public static String AddMemoryBlockAction_title;
- public static String AddMemoryBlockAction_tooltip;
- public static String AddMemoryBlockAction_failed;
- public static String AddMemoryBlockAction_input_invalid;
- public static String AddMemoryRenderingDialog_Memory_Monitor;
- public static String AddMemoryRenderingAction_Add_renderings;
- public static String AddMemoryRenderingDialog_Memory_renderings;
- public static String AddMemoryRenderingDialog_Add_memory_rendering;
- public static String AddMemoryBlockAction_noMemoryBlock;
- public static String AddMemoryRenderingDialog_Add_New;
- public static String AddMemoryRenderingDialog_Unknown;
- public static String RemoveMemoryBlockAction_title;
- public static String RemoveMemoryBlockAction_tooltip;
- public static String MemoryViewCellModifier_failure_title;
- public static String MemoryViewCellModifier_failed;
- public static String MemoryViewCellModifier_data_is_invalid;
- public static String ResetMemoryBlockAction_title;
- public static String ResetMemoryBlockAction_tootip;
- public static String GoToAddressAction_title;
- public static String GoToAddressAction_Go_to_address_failed;
- public static String GoToAddressAction_Address_is_invalid;
- public static String CopyViewToClipboardAction_title;
- public static String CopyViewToClipboardAction_tooltip;
- public static String PrintViewTabAction_title;
- public static String PrintViewTabAction_tooltip;
- public static String PrintViewTabAction_jobtitle;
- public static String ReformatAction_title;
-
- //
- // Dialog
- //
- public static String MonitorMemoryBlockDialog_EnterExpressionToMonitor;
- public static String MonitorMemoryBlockDialog_MonitorMemory;
- public static String MonitorMemoryBlockDialog_NumberOfBytes;
- public static String GoToAddressDialog_Address;
- public static String GoToAddressDialog_GoToAddress;
- public static String CodePagesPrefDialog_1;
- public static String CodePagesPrefDialog_2;
- public static String CodePagesPrefDialog_4;
- public static String CodePagesPrefDialog_6;
- public static String CodePagesPrefDialog_7;
- public static String CodePagesPrefDialog_8;
- public static String CodePagesPrefDialog_9;
- public static String CodePagesPrefDialog_0;
-
- //
- // View Tab
- //
- public static String MemoryView_Memory_monitors;
- public static String MemoryBlocksTreeViewPane_0;
- public static String MemoryBlocksTreeViewPane_1;
- public static String MemoryBlocksTreeViewPane_2;
- public static String MemoryView_Memory_renderings;
- public static String MemoryViewContentProvider_Unable_to_retrieve_content;
-
- //
- // Views
- //
- public static String RemoveMemoryRenderingAction_Remove_rendering;
- public static String EmptyViewTab_Unable_to_create;
- public static String CreateRenderingTab_Memory_monitor;
- public static String CreateRenderingTab_Select_renderings_to_create;
- public static String CreateRenderingTab_Add_renderings;
- public static String CreateRenderingTab_0;
- public static String CreateRenderingTab_1;
- public static String CreateRenderingTab_2;
-
- public static String CreateRenderingTab_label;
-
- public static String CreateRendering_0;
- public static String CreateRendering_1;
-
- //
- // Managers
- //
- public static String ShowAddressColumnAction_0;
- public static String ShowAddressColumnAction_1;
- public static String ImageDescriptorRegistry_0;
- public static String ErrorRendering_0;
- public static String AbstractTableRendering_1;
- public static String AbstractTableRendering_2;
- public static String AbstractTableRendering_3;
- public static String AbstractTableRendering_4;
- public static String AbstractTableRendering_6;
- public static String AbstractTableRendering_8;
- public static String AbstractTableRendering_10;
- public static String AbstractTableRendering_11;
- public static String AbstractTableRendering_12;
- public static String AbstractTableRendering_13;
- public static String AbstractTableRendering_16;
- public static String AbstractTableRendering_18;
- public static String AbstractTableRendering_20;
- public static String SetPaddedStringDialog_0;
- public static String SetPaddedStringDialog_1;
-
-
- public static String TableRenderingPropertiesPage_1;
- public static String TableRenderingPropertiesPage_2;
- public static String TableRenderingPropertiesPage_3;
- public static String TableRenderingPropertiesPage_4;
- public static String TableRenderingPropertiesPage_5;
- public static String TableRenderingPropertiesPage_6;
- public static String TableRenderingPropertiesPage_8;
- public static String TableRenderingPropertiesPage_9;
- public static String TableRenderingPropertiesPage_10;
- public static String TableRenderingPropertiesPage_11;
- public static String TableRenderingPropertiesPage_12;
- public static String TableRenderingPropertiesPage_13;
- public static String TableRenderingPropertiesPage_14;
- public static String TableRenderingPropertiesPage_15;
- public static String TableRenderingPropertiesPage_16;
- public static String TableRenderingPropertiesPage_17;
- public static String TableRenderingPropertiesPage_18;
- public static String TableRenderingPropertiesPage_19;
- public static String TableRenderingPropertiesPage_20;
- public static String TableRenderingPropertiesPage_21;
- public static String TableRenderingPropertiesPage_22;
- public static String TableRenderingPropertiesPage_23;
- public static String TableRenderingPropertiesPage_25;
- public static String TableRenderingPropertiesPage_26;
- public static String TableRenderingPrefAction_0;
- public static String TableRenderingPreferencePage_0;
- public static String TableRenderingPreferencePage_2;
- public static String TableRenderingPreferencePage_3;
- public static String TableRenderingPreferencePage_4;
- public static String TableRenderingPreferencePage_5;
- public static String TableRenderingPreferencePage_6;
- public static String TableRenderingPreferencePage_7;
- public static String TableRenderingPreferencePage_8;
- public static String TableRenderingPreferencePage_9;
- public static String TableRenderingPreferencePage_10;
- public static String TableRenderingContentProvider_0;
- public static String TableRenderingContentProvider_1;
- public static String TableRenderingContentProvider_2;
- public static String SwitchMemoryBlockAction_0;
- public static String ResetMemoryBlockPreferencePage_0;
- public static String ResetMemoryBlockPreferencePage_1;
- public static String ResetMemoryBlockPreferencePage_2;
- public static String ResetMemoryBlockPreferencePage_3;
- public static String FormatTableRenderingAction_0;
- public static String FormatTableRenderingAction_1;
- public static String FormatTableRenderingAction_2;
- public static String FormatTableRenderingAction_3;
- public static String FormatTableRenderingAction_4;
- public static String FormatTableRenderingAction_5;
- public static String FormatTableRenderingAction_6;
- public static String FormatTableRenderingAction_7;
- public static String FormatTableRenderingAction_8;
- public static String FormatTableRenderingAction_9;
- public static String FormatTableRenderingAction_11;
- public static String FormatTableRenderingAction_13;
- public static String FormatTableRenderingAction_15;
- public static String FormatTableRenderingAction_16;
- public static String FormatTableRenderingDialog_0;
- public static String FormatTableRenderingDialog_1;
- public static String FormatTableRenderingDialog_2;
- public static String FormatTableRenderingDialog_3;
- public static String FormatTableRenderingDialog_4;
- public static String FormatTableRenderingDialog_5;
- public static String AbstractAsyncTableRendering_1;
- public static String CreateRendering_2;
- public static String SetPaddedStringPreferencePage_0;
- public static String ViewPaneOrientationAction_0;
- public static String ViewPaneOrientationAction_1;
- public static String ViewPaneOrientationAction_2;
- public static String ViewPaneOrientationAction_3;
- public static String GoToAddressComposite_0;
- public static String GoToAddressComposite_1;
- public static String GoToAddressComposite_2;
- public static String GoToAddressComposite_4;
- public static String GoToAddressComposite_5;
- public static String GoToAddressComposite_6;
- public static String GoToAddressComposite_7;
-
- //
- // Blocks
- //
- public static String WorkingDirectoryBlock_4;
- public static String WorkingDirectoryBlock_7;
- public static String WorkingDirectoryBlock_0;
- public static String WorkingDirectoryBlock_Working_Directory_8;
- public static String WorkingDirectoryBlock_10;
- public static String WorkingDirectoryBlock_12;
- public static String WorkingDirectoryBlock_17;
- public static String WorkingDirectoryBlock_18;
- public static String WorkingDirectoryBlock_19;
- public static String WorkingDirectoryBlock_20;
- public static String WorkingDirectoryBlock_1;
- public static String WorkingDirectoryBlock_Exception_occurred_reading_configuration___15;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, DebugUIMessages.class);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties
deleted file mode 100644
index f0e2cb0..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties
+++ /dev/null
@@ -1,238 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Wind River Systems - Ted Williams - [Memory View] Memory View: Workflow Enhancements (Bug 215432)
-# Remy Chi Jian Suen - Make WorkingDirectoryBlock from JDT a Debug API class (Bug 221973)
-###############################################################################
-
-DebugUIPlugin_23=Build in Progress
-DebugUIPlugin_24=Wait for build to finish?
-DebugUIPlugin_25=Launching {0}
-DebugUIPlugin_0=\ (waiting for build...)
-DebugUIPlugin_Build_error__Check_log_for_details__2=Build error. Check log for details.
-DebugUIPlugin_Run_Debug_1=Run/Debug
-
-DefaultLabelProvider__disconnected__1=<disconnected>
-DefaultLabelProvider_1=<terminated>
-DefaultLabelProvider_0=...
-DefaultLabelProvider__unknown__1=<unknown>
-DefaultLabelProvider_Breakpoint_1=Breakpoint
-DefaultLabelProvider_12=\ (pending)
-DefaultLabelProvider_13=\ <error(s)_during_the_evaluation>
-DefaultLabelProvider_15=\ (disabled)
-DefaultLabelProvider_16=<terminated, exit value: {0}>
-MultipleInputDialog_6=&Browse...
-MultipleInputDialog_7=Select a file:
-MultipleInputDialog_8=Varia&bles...
-
-WorkingDirectoryStatusHandler_Eclipse_Runtime_1=Eclipse Runtime
-WorkingDirectoryStatusHandler_0=Eclipse is not able to set the working directory specified by the program being launched as the current runtime does not support working directories.\nContinue launch without setting the working directory?
-
-DebugUITools_3=Launching
-DebugUITools_Error_1=Error
-DebugUITools_Exception_occurred_during_launch_2=Exception occurred during launch
-
-InstructionPointerAnnotation_0=Debug Current Instruction Pointer
-InstructionPointerAnnotation_1=Debug Call Stack
-
-DefaultLabelProvider_17=\ [line: {0}]
-
-##############################################################
-# Action
-##############################################################
-AddMemoryBlockAction_title=Add Memory Monitor
-AddMemoryBlockAction_tooltip=Add Memory Monitor
-AddMemoryBlockAction_failed =Add Memory Monitor Failed.
-AddMemoryBlockAction_input_invalid = Input is invalid.
-AddMemoryRenderingDialog_Memory_Monitor=Memory Monitor
-AddMemoryRenderingAction_Add_renderings=Add Rendering(s)
-AddMemoryRenderingDialog_Memory_renderings=Memory Rendering(s)
-AddMemoryRenderingDialog_Add_memory_rendering=Add Memory Rendering
-AddMemoryBlockAction_noMemoryBlock = Failed to get memory monitor.
-AddMemoryRenderingDialog_Add_New=Add New...
-AddMemoryRenderingDialog_Unknown=Unknown
-RemoveMemoryBlockAction_title=Remove Memory Monitor
-RemoveMemoryBlockAction_tooltip=Remove Memory Monitor
-MemoryViewCellModifier_failure_title = Edit Memory
-MemoryViewCellModifier_failed = Edit failed:
-MemoryViewCellModifier_data_is_invalid = Data is invalid.
-ResetMemoryBlockAction_title = Reset to Base Address
-ResetMemoryBlockAction_tootip = Reset to Base Address
-ResetMemoryBlockPreferencePage_0=Reset Memory Monitor
-ResetMemoryBlockPreferencePage_1=When resetting memory monitor:
-ResetMemoryBlockPreferencePage_2=Reset visible renderings
-ResetMemoryBlockPreferencePage_3=Reset all renderings
-GoToAddressAction_title = Go to Address...
-GoToAddressComposite_0=Go to Address:
-GoToAddressComposite_1=OK
-GoToAddressComposite_2=Cancel
-GoToAddressComposite_4=Go to Offset:
-GoToAddressComposite_5=Jump Memory Units:
-GoToAddressComposite_6=Input as Hex
-GoToAddressComposite_7=Unable to calculate address from offset.
-GoToAddressAction_Go_to_address_failed = Go To Address Failed
-GoToAddressAction_Address_is_invalid = Address is invalid
-FormatTableRenderingAction_0=Format...
-FormatTableRenderingAction_1=Please specify column and row size.
-FormatTableRenderingAction_2=Row Size:
-FormatTableRenderingAction_3=unit(s) per row
-FormatTableRenderingAction_4=Column Size:
-FormatTableRenderingAction_5=unit(s) per column
-FormatTableRenderingAction_6=Restore Defaults
-FormatTableRenderingAction_7=Preview:
-FormatTableRenderingAction_8=Save as Defaults
-FormatTableRenderingAction_9=Preview is not available.
-FormatTableRenderingDialog_0=Default Row Size:
-FormatTableRenderingDialog_1=unit(s) per row
-FormatTableRenderingDialog_2=Default Column Size:
-FormatTableRenderingDialog_3=unit(s) per column
-FormatTableRenderingDialog_4=Failed to Save Settings
-FormatTableRenderingDialog_5=Default settings cannot be saved.
-CopyViewToClipboardAction_title = Copy To Clipboard
-CopyViewToClipboardAction_tooltip = Copy To Clipboard
-PrintViewTabAction_title = Print
-PrintViewTabAction_tooltip = Print
-PrintViewTabAction_jobtitle = Memory for
-ReformatAction_title = Resize to Fit
-
-##############################################################
-# Dialog
-##############################################################
-MonitorMemoryBlockDialog_EnterExpressionToMonitor = Enter address or expression to monitor:
-MonitorMemoryBlockDialog_MonitorMemory = Monitor Memory
-MonitorMemoryBlockDialog_NumberOfBytes = Number of bytes:
-GoToAddressDialog_Address = Address:
-GoToAddressDialog_GoToAddress = Go To Address...
-CodePagesPrefDialog_1=Select Codepages
-CodePagesPrefDialog_2=Memory to ASCII strings:
-CodePagesPrefDialog_4=Memory to EBCDIC strings:
-CodePagesPrefDialog_6=Invalid codepage
-CodePagesPrefDialog_7=ASCII codepage entered is invalid.
-CodePagesPrefDialog_8=Invalid codepage
-CodePagesPrefDialog_9=EBCDIC codepage entered is invalid.
-CodePagesPrefDialog_0=The codepage is not supported.
-
-##############################################################
-# View Tab
-##############################################################
-MemoryView_Memory_monitors=Monitors
-MemoryBlocksTreeViewPane_0=Remove All Memory Monitors
-MemoryBlocksTreeViewPane_1=Are you sure you want to remove all memory monitors?
-MemoryBlocksTreeViewPane_2=Remove All
-MemoryView_Memory_renderings=Renderings
-MemoryViewContentProvider_Unable_to_retrieve_content = Unable to retrieve content.
-
-##############################################################
-# Views
-##############################################################
-RemoveMemoryRenderingAction_Remove_rendering=Remove Rendering
-EmptyViewTab_Unable_to_create=Unable to create
-CreateRenderingTab_Memory_monitor=Memory Monitor:
-CreateRenderingTab_label=New Renderings...
-CreateRenderingTab_Select_renderings_to_create=Select rendering(s) to create:
-CreateRenderingTab_Add_renderings=Add Rendering(s)
-CreateRenderingTab_0=No rendering is selected.
-CreateRenderingTab_1=Add Rendering Failed
-CreateRenderingTab_2=No rendering is selected.
-CreateRendering_0=Add Memory Rendering Failed
-CreateRendering_1=Unable to add the selected rendering.
-CreateRendering_2=Pending
-
-##############################################################
-# Managers
-##############################################################
-ShowAddressColumnAction_0=Hide Address Column
-ShowAddressColumnAction_1=Show Address Column
-ImageDescriptorRegistry_0=Allocating image for wrong display
-ErrorRendering_0=Reason:\n
-AbstractTableRendering_1=Unable to get the base address from the memory block.
-AbstractTableRendering_2=Address
-AbstractTableRendering_3=Error occurred:\n
-AbstractTableRendering_8=Unknown
-AbstractTableRendering_4=Next Page
-AbstractTableRendering_6=Previous Page
-AbstractTableRendering_10=Unable to get base address.
-AbstractTableRendering_11=Address is out of range.
-AbstractTableRendering_12=Reset Failed.
-AbstractTableRendering_13=Unable to reset to the base address.
-AbstractTableRendering_20=Default format is invalid:
-AbstractTableRendering_16=Please specify row and column sizes to use.
-AbstractTableRendering_18=Save these settings to avoid this problem in the future.
-AbstractAsyncTableRendering_1=Pending...
-AbstractAsyncTableRendering_2=Create Table Rendering
-SetPaddedStringDialog_0=Padded String
-SetPaddedStringDialog_1=Enter string to show unretrievable memory.
-SetPaddedStringPreferencePage_0=Padded String:
-TableRenderingPropertiesPage_1=Rendering:
-TableRenderingPropertiesPage_2=Selected Address:
-TableRenderingPropertiesPage_3=units
-TableRenderingPropertiesPage_4=Length:
-TableRenderingPropertiesPage_5=Selected Content:
-TableRenderingPropertiesPage_6=Addressable Size:
-TableRenderingPropertiesPage_8=bits
-TableRenderingPropertiesPage_9=Changed:
-TableRenderingPropertiesPage_10=Changed:
-TableRenderingPropertiesPage_11=Unknown
-TableRenderingPropertiesPage_12=Unknown
-TableRenderingPropertiesPage_13=Big Endian
-TableRenderingPropertiesPage_14=Little Endian
-TableRenderingPropertiesPage_15=Unknown
-TableRenderingPropertiesPage_16=Data Endianess:
-TableRenderingPropertiesPage_17=Unknown
-TableRenderingPropertiesPage_18=Big Endian
-TableRenderingPropertiesPage_19=Little Endian
-TableRenderingPropertiesPage_20=Unknown
-TableRenderingPropertiesPage_21=Display Endianess:
-TableRenderingPropertiesPage_22=Readable:
-TableRenderingPropertiesPage_23=Writable:
-TableRenderingPropertiesPage_25=Line Address:
-TableRenderingPropertiesPage_26=Units Per Line:
-TableRenderingContentProvider_0=Unable to load memory from the specified address: 0x
-TableRenderingContentProvider_1=Buffer start and end address are invalid.
-TableRenderingContentProvider_2=Buffer start and end address are invalid.
-TableRenderingPreferencePage_10=Select memory loading mode when rendering is scrolled to end of buffer:
-TableRenderingPreferencePage_2=Number of lines per page:
-TableRenderingPreferencePage_3=Page size cannot be less than 1.
-TableRenderingPreferencePage_4=Sizes specified are invalid.
-TableRenderingPreferencePage_0=Automatic
-TableRenderingPreferencePage_5=Number of lines to preload
-TableRenderingPreferencePage_6=Before visible region:
-TableRenderingPreferencePage_7=After visible region:
-TableRenderingPreferencePage_8=Manual
-TableRenderingPreferencePage_9=Minimum number of lines to preload is 1.
-TableRenderingPrefAction_0=Table Renderings
-SwitchMemoryBlockAction_0=Unknown
-SwitchMemoryBlockAction_4=Pending
-FormatTableRenderingAction_11=Format specified is invalid.
-FormatTableRenderingAction_13=Column size cannot be larger than the row size.
-FormatTableRenderingAction_15=<Address>
-FormatTableRenderingAction_16=&Format...
-ViewPaneOrientationAction_0=Horizontal Orientation
-ViewPaneOrientationAction_1=Horizontal Orientation
-ViewPaneOrientationAction_2=Vertical Orientation
-ViewPaneOrientationAction_3=Vertical Orientation
-AbstractDebugCheckboxSelectionDialog_0=&Select All
-AbstractDebugCheckboxSelectionDialog_1=&Deselect All
-
-##############################################################
-# Blocks
-##############################################################
-
-WorkingDirectoryBlock_4=Select a &workspace relative working directory:
-WorkingDirectoryBlock_7=Select a working directory for the launch configuration:
-WorkingDirectoryBlock_0=W&orkspace...
-WorkingDirectoryBlock_Working_Directory_8=Working Directory
-WorkingDirectoryBlock_10=Working directory does not exist
-WorkingDirectoryBlock_12=Working directory:
-WorkingDirectoryBlock_17=Variabl&es...
-WorkingDirectoryBlock_18=Defa&ult:
-WorkingDirectoryBlock_19=Ot&her:
-WorkingDirectoryBlock_20=Working directory not specified
-WorkingDirectoryBlock_1=&File System...
-WorkingDirectoryBlock_Exception_occurred_reading_configuration___15=Exception occurred reading configuration:
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 9af543b..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
+++ /dev/null
@@ -1,1271 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Sascha Radike - bug 56642
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.core.resources.ISaveContext;
-import org.eclipse.core.resources.ISaveParticipant;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
-import org.eclipse.core.runtime.jobs.IJobManager;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchListener;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.IStatusHandler;
-import org.eclipse.debug.core.Launch;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager;
-import org.eclipse.debug.internal.ui.launchConfigurations.ClosedProjectFilter;
-import org.eclipse.debug.internal.ui.launchConfigurations.DeletedProjectFilter;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationEditDialog;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTypeFilter;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchGroupExtension;
-import org.eclipse.debug.internal.ui.launchConfigurations.PerspectiveManager;
-import org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility;
-import org.eclipse.debug.internal.ui.sourcelookup.SourceLookupManager;
-import org.eclipse.debug.internal.ui.stringsubstitution.SelectedResourceManager;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointOrganizerManager;
-import org.eclipse.debug.internal.ui.views.console.ProcessConsoleManager;
-import org.eclipse.debug.internal.ui.views.launch.DebugElementHelper;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.ILaunchGroup;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.ui.progress.IProgressService;
-import org.eclipse.ui.themes.IThemeManager;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.packageadmin.PackageAdmin;
-import org.osgi.util.tracker.ServiceTracker;
-import org.w3c.dom.Document;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * The Debug UI Plug-in.
- *
- * Since 3.3 this plugin registers an <code>ISaveParticipant</code>, allowing this plugin to participate
- * in workspace persistence life-cycles
- *
- * @see ISaveParticipant
- * @see ILaunchListener
- * @see LaunchConfigurationManager
- * @see PerspectiveManager
- * @see ContextLaunch
- */
-public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener {
-
-
- /**
- * The singleton debug plug-in instance
- */
- private static DebugUIPlugin fgDebugUIPlugin = null;
-
- /**
- * A utility presentation used to obtain labels
- */
- protected static IDebugModelPresentation fgPresentation = null;
-
- /**
- * Default label provider
- */
- private static DefaultLabelProvider fgDefaultLabelProvider;
-
- /**
- * Launch configuration attribute - used by the stand-in launch
- * config working copies that are created while a launch is waiting
- * for a build to finish. This attribute allows the EditLaunchConfigurationAction
- * to access the original config if the user asks to edit it.
- */
- public static String ATTR_LAUNCHING_CONFIG_HANDLE= getUniqueIdentifier() + "launching_config_handle"; //$NON-NLS-1$
-
- /**
- * Singleton console document manager
- */
- private ProcessConsoleManager fProcessConsoleManager = null;
-
- /**
- * Perspective manager
- */
- private PerspectiveManager fPerspectiveManager = null;
-
- /**
- * Launch configuration manager
- */
- private LaunchConfigurationManager fLaunchConfigurationManager = null;
-
- /**
- * Context launching manager
- */
- private LaunchingResourceManager fContextLaunchingManager = null;
-
- /**
- * Image descriptor registry used for images with common overlays.
- *
- * @since 3.1
- */
- private ImageDescriptorRegistry fImageDescriptorRegistry;
-
- /**
- * Service tracker and service used for finding plug-ins associated
- * with a class.
- */
- private ServiceTracker fServiceTracker;
- private PackageAdmin fPackageAdminService;
-
- /**
- * A set of <code>ISaveParticipant</code>s that want to contribute to saving via this plugin
- *
- * @since 3.3
- */
- private Set fSaveParticipants = new HashSet();
-
- /**
- * Theme listener.
- *
- * @since 3.4
- */
- private IPropertyChangeListener fThemeListener;
-
-
- public static boolean DEBUG = false;
-
- /**
- * Dummy launch node representing a launch that is waiting
- * for a build to finish before proceeding. This node exists
- * to provide immediate feedback to the user in the Debug view and
- * allows termination, which equates to cancellation of the launch.
- */
- public static class PendingLaunch extends Launch {
- private Job fJob;
- public PendingLaunch(ILaunchConfiguration launchConfiguration, String mode, Job job) {
- super(launchConfiguration, mode, null);
- fJob= job;
- }
-
- // Allow the user to terminate the dummy launch as a means to
- // cancel the launch while waiting for a build to finish.
- public boolean canTerminate() {
- return true;
- }
-
- public void terminate() throws DebugException {
- fJob.cancel();
- }
- }
-
- /**
- * Returns the bundle the given class originated from.
- *
- * @param clazz a class
- * @return the bundle the given class originated from, or <code>null</code>
- * if unable to be determined
- * @since 3.1
- */
- public Bundle getBundle(Class clazz) {
- if (fPackageAdminService != null) {
- return fPackageAdminService.getBundle(clazz);
- }
- return null;
- }
-
- /**
- * Constructs the debug UI plug-in
- */
- public DebugUIPlugin() {
- super();
- fgDebugUIPlugin= this;
- }
-
- /**
- * If the debug flag is set the specified message is printed to the console
- * @param message
- */
- public static void debug(String message) {
- if (DEBUG) {
- System.out.println(message);
- }
- }
-
- /**
- * Returns the singleton instance of the debug plug-in.
- */
- public static DebugUIPlugin getDefault() {
- if(fgDebugUIPlugin == null) {
- fgDebugUIPlugin = new DebugUIPlugin();
- }
- return fgDebugUIPlugin;
- }
-
- /**
- * Convenience method which returns the unique identifier of this plug-in.
- */
- public static String getUniqueIdentifier() {
- return IDebugUIConstants.PLUGIN_ID;
- }
-
- /**
- * Returns the default delegating model presentation
- * @return the default delegating model presentation
- */
- public static IDebugModelPresentation getModelPresentation() {
- if (fgPresentation == null) {
- fgPresentation = new DelegatingModelPresentation();
- }
- return fgPresentation;
- }
-
- /**
- * Returns the launch configuration manager
- * @return the launch configuration manager
- */
- public LaunchConfigurationManager getLaunchConfigurationManager() {
- if (fLaunchConfigurationManager == null) {
- fLaunchConfigurationManager = new LaunchConfigurationManager();
- }
- return fLaunchConfigurationManager;
- }
-
- /**
- * Returns the context launching resource manager. If one has not been created prior to this
- * method call, a new manager is created and initialized, by calling its startup() method.
- * @return the context launching resource manager
- *
- * @since 3.3
- */
- public LaunchingResourceManager getLaunchingResourceManager() {
- if(fContextLaunchingManager == null) {
- fContextLaunchingManager = new LaunchingResourceManager();
- fContextLaunchingManager.startup();
- }
- return fContextLaunchingManager;
- }
-
- /**
- * Returns the currently active workbench window or <code>null</code>
- * if none.
- *
- * @return the currently active workbench window or <code>null</code>
- */
- public static IWorkbenchWindow getActiveWorkbenchWindow() {
- return getDefault().getWorkbench().getActiveWorkbenchWindow();
- }
-
- /**
- * Returns the currently active workbench window shell or <code>null</code>
- * if none.
- *
- * @return the currently active workbench window shell or <code>null</code>
- */
- public static Shell getShell() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window == null) {
- IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
- if (windows.length > 0) {
- return windows[0].getShell();
- }
- }
- else {
- return window.getShell();
- }
- return null;
- }
-
- /**
- * Returns the default label provider for the debug UI.
- */
- public static ILabelProvider getDefaultLabelProvider() {
- if (fgDefaultLabelProvider == null) {
- fgDefaultLabelProvider = new DefaultLabelProvider();
- }
- return fgDefaultLabelProvider;
- }
-
- /**
- * Creates an extension. If the extension plug-in has not
- * been loaded a busy cursor will be activated during the duration of
- * the load.
- *
- * @param element the config element defining the extension
- * @param classAttribute the name of the attribute carrying the class
- * @return the extension object
- */
- public static Object createExtension(final IConfigurationElement element, final String classAttribute) throws CoreException {
- // If plug-n has been loaded create extension.
- // Otherwise, show busy cursor then create extension.
- Bundle bundle = Platform.getBundle(element.getContributor().getName());
- if (bundle.getState() == Bundle.ACTIVE) {
- return element.createExecutableExtension(classAttribute);
- }
- 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];
- }
- return ret[0];
- }
-
- /**
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#createImageRegistry()
- */
- protected ImageRegistry createImageRegistry() {
- return DebugPluginImages.initializeImageRegistry();
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- try {
- if (fProcessConsoleManager != null) {
- fProcessConsoleManager.shutdown();
- }
-
- BreakpointOrganizerManager.getDefault().shutdown();
-
- if (fPerspectiveManager != null) {
- fPerspectiveManager.shutdown();
- }
- if (fLaunchConfigurationManager != null) {
- fLaunchConfigurationManager.shutdown();
- }
- if(fContextLaunchingManager != null) {
- fContextLaunchingManager.shutdown();
- }
-
- ColorManager.getDefault().dispose();
-
- if (fgPresentation != null) {
- fgPresentation.dispose();
- }
-
- if (fImageDescriptorRegistry != null) {
- fImageDescriptorRegistry.dispose();
- }
-
- SourceLookupFacility.shutdown();
-
- DebugElementHelper.dispose();
-
- fServiceTracker.close();
- fPackageAdminService = null;
-
- fSaveParticipants.clear();
-
- ResourcesPlugin.getWorkspace().removeSaveParticipant(this);
-
- if (fThemeListener != null) {
- if (PlatformUI.isWorkbenchRunning())
- PlatformUI.getWorkbench().getThemeManager().removePropertyChangeListener(fThemeListener);
- fThemeListener= null;
- }
-
- } finally {
- super.stop(context);
- }
- }
-
- /**
- * Add the specified <code>ISaveParticipant</code> to the current listing of
- * registered participants
- * @param participant
- * @return true if this current listing did not already contain the specified participant
- * @since 3.3
- */
- public boolean addSaveParticipant(ISaveParticipant participant) {
- return fSaveParticipants.add(participant);
- }
-
- /**
- * Removes the specified <code>ISaveParticipant</code> from the current listing of registered
- * participants
- * @param participant
- * @return true if the set contained the specified element
- *
- * @since 3.3
- */
- public boolean removeSaveParticipant(ISaveParticipant participant) {
- return fSaveParticipants.remove(participant);
- }
-
- /**
- * @see AbstractUIPlugin#startup()
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- ResourcesPlugin.getWorkspace().addSaveParticipant(this,
- new ISaveParticipant() {
- public void saving(ISaveContext saveContext) throws CoreException {
- savePluginPreferences();
- for(Iterator iter = fSaveParticipants.iterator(); iter.hasNext();) {
- ((ISaveParticipant)iter.next()).saving(saveContext);
- }
- }
- public void rollback(ISaveContext saveContext) {
- for(Iterator iter = fSaveParticipants.iterator(); iter.hasNext();) {
- ((ISaveParticipant)iter.next()).rollback(saveContext);
- }
- }
- public void prepareToSave(ISaveContext saveContext) throws CoreException {
- for(Iterator iter = fSaveParticipants.iterator(); iter.hasNext();) {
- ((ISaveParticipant)iter.next()).prepareToSave(saveContext);
- }
- }
- public void doneSaving(ISaveContext saveContext) {
- for(Iterator iter = fSaveParticipants.iterator(); iter.hasNext();) {
- ((ISaveParticipant)iter.next()).doneSaving(saveContext);
- }
- }
- });
- DEBUG = "true".equals(Platform.getDebugOption("org.eclipse.debug.ui/debug")); //$NON-NLS-1$//$NON-NLS-2$
-
- // make sure the perspective manager is created
- // and be the first debug event listener
- fPerspectiveManager = new PerspectiveManager();
- fPerspectiveManager.startup();
-
- getLaunchingResourceManager();
-
- // Listen to launches to lazily create "launch processors"
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- ILaunch[] launches = launchManager.getLaunches();
- if (launches.length > 0) {
- // if already launches, initialize processors
- initializeLaunchListeners();
- } else {
- // if no launches, wait for first launch to initialize processors
- launchManager.addLaunchListener(this);
- }
-
- // start the breakpoint organizer manager
- BreakpointOrganizerManager.getDefault();
-
- fServiceTracker = new ServiceTracker(context, PackageAdmin.class.getName(), null);
- fServiceTracker.open();
- fPackageAdminService = (PackageAdmin) fServiceTracker.getService();
-
- getLaunchConfigurationManager().startup();
-
- if (PlatformUI.isWorkbenchRunning()) {
- fThemeListener= new IPropertyChangeListener() {
-
- public void propertyChange(PropertyChangeEvent event) {
- if (IThemeManager.CHANGE_CURRENT_THEME.equals(event.getProperty()))
- DebugUIPreferenceInitializer.setThemeBasedPreferences(getPreferenceStore(), true);
- }
- };
- PlatformUI.getWorkbench().getThemeManager().addPropertyChangeListener(fThemeListener);
- }
-
- // do the asynchronous exec last - see bug 209920
- getStandardDisplay().asyncExec(
- new Runnable() {
- public void run() {
- //initialize the selected resource `
- SelectedResourceManager.getDefault();
- // forces launch shortcuts to be initialized so their key-bindings work
- getLaunchConfigurationManager().getLaunchShortcuts();
- }
- });
- }
-
- /**
- * Utility method with conventions
- */
- public static void errorDialog(Shell shell, String title, String message, IStatus s) {
- // if the 'message' resource string and the IStatus' message are the same,
- // don't show both in the dialog
- if (s != null && message.equals(s.getMessage())) {
- message= null;
- }
- ErrorDialog.openError(shell, title, message, s);
- }
-
- /**
- * Utility method with conventions
- */
- public static void errorDialog(Shell shell, String title, String message, Throwable t) {
- IStatus status;
- if (t instanceof CoreException) {
- status= ((CoreException)t).getStatus();
- // if the 'message' resource string and the IStatus' message are the same,
- // don't show both in the dialog
- if (status != null && message.equals(status.getMessage())) {
- message= null;
- }
- } else {
- status= new Status(IStatus.ERROR, getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, "Error within Debug UI: ", t); //$NON-NLS-1$
- log(status);
- }
- ErrorDialog.openError(shell, title, message, status);
- }
-
- /**
- * Logs the specified status with this plug-in's log.
- *
- * @param status status to log
- */
- public static void log(IStatus status) {
- getDefault().getLog().log(status);
- }
-
- /**
- * Logs the specified throwable with this plug-in's log.
- *
- * @param t throwable to log
- */
- public static void log(Throwable t) {
- log(newErrorStatus("Error logged from Debug UI: ", t)); //$NON-NLS-1$
- }
-
- /**
- * Logs an internal error with the specified message.
- *
- * @param message the error message to log
- */
- public static void logErrorMessage(String message) {
- // this message is intentionally not internationalized, as an exception may
- // be due to the resource bundle itself
- log(newErrorStatus("Internal message logged from Debug UI: " + message, null)); //$NON-NLS-1$
- }
-
- /**
- * Returns a new error status for this plug-in with the given message
- * @param message the message to be included in the status
- * @param exception the exception to be included in the status or <code>null</code> if none
- * @return a new error status
- */
- public static IStatus newErrorStatus(String message, Throwable exception) {
- return new Status(IStatus.ERROR, getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, message, exception);
- }
-
- /**
- * Open the launch configuration dialog on the specified launch
- * configuration. The dialog displays the tabs for a single configuration
- * only (a tree of launch configuration is not displayed)
- * <p>
- * If a status is specified, a status handler is consulted to handle the
- * status. The status handler is passed the instance of the launch
- * configuration dialog that is opened. This gives the status handler an
- * opportunity to perform error handling/initialization as required.
- * </p>
- * @param shell the parent shell for the launch configuration dialog
- * @param configuration the configuration to display
- * @param groupIdentifier group identifier of the launch group the launch configuration
- * belongs to
- * @param status the status to display, or <code>null</code> if none
- * @param showCancel if the cancel button should be shown in the particular instance of the dialog
- * @return the return code from opening the launch configuration dialog -
- * one of <code>Window.OK</code> or <code>Window.CANCEL</code>
- *
- * @since 3.3
- *
- */
- public static int openLaunchConfigurationEditDialog(Shell shell, ILaunchConfiguration configuration, String groupIdentifier, IStatus status, boolean showCancel) {
- LaunchGroupExtension group = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(groupIdentifier);
- if (group != null) {
- LaunchConfigurationEditDialog dialog = new LaunchConfigurationEditDialog(shell, configuration, group, showCancel);
- dialog.setInitialStatus(status);
- return dialog.open();
- }
- return Window.CANCEL;
- }
-
- /**
- * Open the launch configuration dialog on the specified launch
- * configuration. The dialog displays the tabs for a single configuration
- * only (a tree of launch configuration is not displayed)
- * <p>
- * If a status is specified, a status handler is consulted to handle the
- * status. The status handler is passed the instance of the launch
- * configuration dialog that is opened. This gives the status handler an
- * opportunity to perform error handling/initialization as required.
- * </p>
- * @param shell the parent shell for the launch configuration dialog
- * @param configuration the configuration to display
- * @param groupIdentifier group identifier of the launch group the launch configuration
- * belongs to
- * @param reservednames a set of launch configuration names that cannot be used when creating or renaming
- * the specified launch configuration
- * @param status the status to display, or <code>null</code> if none
- * @param setDefaults whether to set default values in the configuration
- * @return the return code from opening the launch configuration dialog -
- * one of <code>Window.OK</code> or <code>Window.CANCEL</code>
- *
- * @since 3.3
- *
- */
- public static int openLaunchConfigurationPropertiesDialog(Shell shell, ILaunchConfiguration configuration, String groupIdentifier, Set reservednames, IStatus status, boolean setDefaults) {
- LaunchGroupExtension group = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(groupIdentifier);
- if (group != null) {
- LaunchConfigurationPropertiesDialog dialog = new LaunchConfigurationPropertiesDialog(shell, configuration, group, reservednames);
- dialog.setInitialStatus(status);
- dialog.setDefaultsOnOpen(setDefaults);
- return dialog.open();
- }
- return Window.CANCEL;
- }
-
- /**
- * Save all dirty editors in the workbench.
- * Returns whether the operation succeeded.
- *
- * @return whether all saving was completed
- * @deprecated Saving has been moved to the launch delegate <code>LaunchConfigurationDelegate</code> to allow for scoped saving
- * of resources that are only involved in the current launch, no longer the entire workspace
- */
- protected static boolean saveAllEditors(boolean confirm) {
- if (getActiveWorkbenchWindow() == null) {
- return false;
- }
- return PlatformUI.getWorkbench().saveAllEditors(confirm);
- }
-
- /**
- * Save & build the workspace according to the user-specified preferences. Return <code>false</code> if
- * any problems were encountered, <code>true</code> otherwise.
- *
- * @deprecated this method is no longer to be used. It is an artifact from 2.0, and all saving is now done with the
- * launch delegate <code>LaunchConfigurationDelegate</code>
- */
- public static boolean saveAndBuild() {
- boolean status = true;
- String saveDirty = getDefault().getPreferenceStore().getString(IInternalDebugUIConstants.PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH);
- boolean buildBeforeLaunch = getDefault().getPreferenceStore().getBoolean(IDebugUIConstants.PREF_BUILD_BEFORE_LAUNCH);
-
- // If we're ignoring dirty editors, check if we need to build
- if (saveDirty.equals(MessageDialogWithToggle.NEVER)) {
- if (buildBeforeLaunch) {
- return doBuild();
- }
- } else {
- status = saveAllEditors(saveDirty.equals(MessageDialogWithToggle.PROMPT));
- if (status && buildBeforeLaunch) {
- status = doBuild();
- }
- }
-
- return status;
- }
-
- private static boolean doBuild() {
- try {
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- try {
- ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, monitor);
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- });
- } catch (InterruptedException e) {
- // canceled by user
- return false;
- } catch (InvocationTargetException e) {
- String title= DebugUIMessages.DebugUIPlugin_Run_Debug_1;
- String message= DebugUIMessages.DebugUIPlugin_Build_error__Check_log_for_details__2;
- Throwable t = e.getTargetException();
- errorDialog(getShell(), title, message, t);
- return false;
- }
- return true;
- }
-
- /**
- * Returns the workbench's display.
- *
- */
- public static Display getStandardDisplay() {
- return PlatformUI.getWorkbench().getDisplay();
- }
-
- /**
- * Returns the a color based on the type of output.
- * Valid types:
- * <li>CONSOLE_SYS_OUT_RGB</li>
- * <li>CONSOLE_SYS_ERR_RGB</li>
- * <li>CONSOLE_SYS_IN_RGB</li>
- * <li>CHANGED_VARIABLE_RGB</li>
- */
- public static Color getPreferenceColor(String type) {
- return ColorManager.getDefault().getColor(PreferenceConverter.getColor(getDefault().getPreferenceStore(), type));
- }
-
- /**
- * Returns the process console manager. The manager will be created lazily on
- * the first access.
- *
- * @return ProcessConsoleManager
- */
- public ProcessConsoleManager getProcessConsoleManager() {
- if (fProcessConsoleManager == null) {
- fProcessConsoleManager = new ProcessConsoleManager();
- }
- return fProcessConsoleManager;
- }
-
- /**
- * Returns a Document that can be used to build a DOM tree
- * @return the Document
- * @throws ParserConfigurationException if an exception occurs creating the document builder
- * @since 3.0
- */
- public static Document getDocument() throws ParserConfigurationException {
- DocumentBuilderFactory dfactory= DocumentBuilderFactory.newInstance();
-
- DocumentBuilder docBuilder= dfactory.newDocumentBuilder();
- Document doc= docBuilder.newDocument();
- return doc;
- }
-
- /**
- * When the first launch is added, instantiate launch processors,
- * and stop listening to launch notifications.
- *
- * @see org.eclipse.debug.core.ILaunchListener#launchAdded(org.eclipse.debug.core.ILaunch)
- */
- public void launchAdded(ILaunch launch) {
- DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this);
- initializeLaunchListeners();
- }
-
- /**
- * Creates/starts launch listeners after a launch has been added.
- * <p>
- * Launch processors are:
- * <ul>
- * <li>console document manager</li>
- * <li>perspective manager</li>
- * </ul>
- * </p>
- */
- private void initializeLaunchListeners() {
- getProcessConsoleManager().startup();
- SourceLookupManager.getDefault();
- }
-
- /**
- * Returns the perspective manager.
- *
- * @return
- */
- public PerspectiveManager getPerspectiveManager() {
- return fPerspectiveManager;
- }
-
- /**
- * @see org.eclipse.debug.core.ILaunchListener#launchChanged(org.eclipse.debug.core.ILaunch)
- */
- public void launchChanged(ILaunch launch) {}
-
- /**
- * @see org.eclipse.debug.core.ILaunchListener#launchRemoved(org.eclipse.debug.core.ILaunch)
- */
- public void launchRemoved(ILaunch launch) {}
-
- /**
- * Return the ILaunch associated with a model element, or null if there is
- * no such association.
- *
- * @param element the model element
- * @return the ILaunch associated with the element, or null.
- * @since 3.6
- */
- public static ILaunch getLaunch(Object element) {
- // support for custom models
- ILaunch launch= (ILaunch)DebugPlugin.getAdapter(element, ILaunch.class);
- if (launch == null) {
- // support for standard debug model
- if (element instanceof IDebugElement) {
- launch= ((IDebugElement)element).getLaunch();
- } else if (element instanceof ILaunch) {
- launch= ((ILaunch)element);
- } else if (element instanceof IProcess) {
- launch= ((IProcess)element).getLaunch();
- }
- }
- return launch;
- }
-
-
- /**
- * Save dirty editors before launching, according to preferences.
- *
- * @return whether to proceed with launch
- * @deprecated Saving has been moved to the launch delegate <code>LaunchConfigurationDelegate</code> to allow for scoped saving
- * of resources that are only involved in the current launch, no longer the entire workspace
- */
- public static boolean preLaunchSave() {
- String saveDirty = getDefault().getPreferenceStore().getString(IInternalDebugUIConstants.PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH);
- if (saveDirty.equals(MessageDialogWithToggle.NEVER)) {
- return true;
- }
- return saveAllEditors(saveDirty.equals(MessageDialogWithToggle.PROMPT));
- }
-
- /**
- * Builds the workspace (according to preferences) and launches the given launch
- * configuration in the specified mode. May return null if auto build is in process and
- * user cancels the launch.
- *
- * @param configuration the configuration to launch
- * @param mode launch mode - run or debug
- * @param monitor progress monitor
- * @exception CoreException if an exception occurs while building or launching
- * @return resulting launch or <code>null</code> if user cancels
- */
- public static ILaunch buildAndLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
- boolean buildBeforeLaunch = getDefault().getPreferenceStore().getBoolean(IDebugUIConstants.PREF_BUILD_BEFORE_LAUNCH);
-
- monitor.beginTask(IInternalDebugCoreConstants.EMPTY_STRING, 1);
- try
- {
- return configuration.launch(
- mode,
- new SubProgressMonitor(monitor, 1),
- buildBeforeLaunch);
- }
- finally
- {
- monitor.done();
- }
- }
-
- /**
- * Saves and builds the workspace according to current preference settings and
- * launches the given launch configuration in the specified mode in the
- * foreground with a progress dialog. Reports any exceptions that occur
- * in an error dialog.
- *
- * @param configuration the configuration to launch
- * @param mode launch mode
- * @since 3.0
- */
- public static void launchInForeground(final ILaunchConfiguration configuration, final String mode) {
- final IJobManager jobManager = Job.getJobManager();
- IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
- boolean wait = false;
-
- if (jobManager.find(ResourcesPlugin.FAMILY_AUTO_BUILD).length > 0 || jobManager.find(ResourcesPlugin.FAMILY_MANUAL_BUILD).length >0) {
- String waitForBuild = store.getString(IInternalDebugUIConstants.PREF_WAIT_FOR_BUILD);
-
- if (waitForBuild.equals(MessageDialogWithToggle.PROMPT)) {
- MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoCancelQuestion(getShell(), DebugUIMessages.DebugUIPlugin_23, DebugUIMessages.DebugUIPlugin_24, null, false, store, IInternalDebugUIConstants.PREF_WAIT_FOR_BUILD); //
-
- switch (dialog.getReturnCode()) {
- case IDialogConstants.CANCEL_ID:
- return;
- case IDialogConstants.YES_ID:
- wait = false;
- break;
- case IDialogConstants.NO_ID:
- wait = true;
- break;
- }
- } else if (waitForBuild.equals(MessageDialogWithToggle.ALWAYS)) {
- wait = true;
- }
- }
-
- if (wait) {
- IWorkbench workbench = DebugUIPlugin.getDefault().getWorkbench();
- IProgressService progressService = workbench.getProgressService();
- final IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- /* Setup progress monitor
- * - Waiting for jobs to finish (2)
- * - Build & launch (98) */
- monitor.beginTask(MessageFormat.format(DebugUIMessages.DebugUIPlugin_25, new Object[] {configuration.getName()}), 100);
-
- try {
- jobManager.join(ResourcesPlugin.FAMILY_MANUAL_BUILD, new SubProgressMonitor(monitor, 1));
- jobManager.join(ResourcesPlugin.FAMILY_AUTO_BUILD, new SubProgressMonitor(monitor, 1));
- }
- catch (InterruptedException e) {/* continue*/}
- if (!monitor.isCanceled()) {
- try {
- buildAndLaunch(configuration, mode, new SubProgressMonitor(monitor, 98));
- }
- catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- }
- };
- try {
- progressService.busyCursorWhile(runnable);
- }
- catch (InterruptedException e) {}
- catch (InvocationTargetException e2) {
- handleInvocationTargetException(e2, configuration, mode);
- }
- } else {
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- /* Setup progress monitor
- * - Build & launch (1) */
- monitor.beginTask(MessageFormat.format(DebugUIMessages.DebugUIPlugin_25, new Object[] {configuration.getName()}), 1);
- try {
- buildAndLaunch(configuration, mode, new SubProgressMonitor(monitor, 1));
- }
- catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- };
- try {
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(runnable);
- }
- catch (InvocationTargetException e) {
- handleInvocationTargetException(e, configuration, mode);
- }
- catch (InterruptedException e) {}
-
- }
- }
-
- private static void handleInvocationTargetException(InvocationTargetException e, ILaunchConfiguration configuration, String mode) {
- Throwable targetException = e.getTargetException();
- Throwable t = e;
- if (targetException instanceof CoreException) {
- t = targetException;
- }
- if (t instanceof CoreException) {
- CoreException ce = (CoreException)t;
- IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler(ce.getStatus());
- if (handler != null) {
- ILaunchGroup group = DebugUITools.getLaunchGroup(configuration, mode);
- if (group != null) {
- DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUIPlugin.getShell(), new StructuredSelection(configuration), group.getIdentifier(), ce.getStatus());
- return;
- }
- }
- if ((ce.getStatus().getSeverity() & (IStatus.ERROR | IStatus.WARNING)) == 0) {
- // If the exception is a CoreException with a status other
- // than ERROR or WARNING, don't open an error dialog.
- return;
- }
- }
- DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), DebugUIMessages.DebugUITools_Error_1, DebugUIMessages.DebugUITools_Exception_occurred_during_launch_2, t); //
- }
-
- /**
- * Saves and builds the workspace according to current preference settings and
- * launches the given launch configuration in the specified mode in a background
- * Job with progress reported via the Job. Exceptions are reported in the Progress
- * view.
- *
- * @param configuration the configuration to launch
- * @param mode launch mode
- * @since 3.0
- */
- public static void launchInBackground(final ILaunchConfiguration configuration, final String mode) {
- final IJobManager jobManager = Job.getJobManager();
- IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
- boolean wait = (jobManager.find(ResourcesPlugin.FAMILY_AUTO_BUILD).length > 0) || (jobManager.find(ResourcesPlugin.FAMILY_MANUAL_BUILD).length > 0);
- String waitPref = store.getString(IInternalDebugUIConstants.PREF_WAIT_FOR_BUILD);
- if (wait) { // if there are build jobs running, do we wait or not??
- if (waitPref.equals(MessageDialogWithToggle.PROMPT)) {
- MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoCancelQuestion(getShell(), DebugUIMessages.DebugUIPlugin_23, DebugUIMessages.DebugUIPlugin_24, null, false, store, IInternalDebugUIConstants.PREF_WAIT_FOR_BUILD); //
- switch (dialog.getReturnCode()) {
- case IDialogConstants.CANCEL_ID:
- return;
- case IDialogConstants.YES_ID:
- wait = true;
- break;
- case IDialogConstants.NO_ID:
- wait = false;
- break;
- }
- }
- else {
- wait = waitPref.equals(MessageDialogWithToggle.ALWAYS);
- }
- }
- final boolean waitInJob = wait;
- Job job = new Job(MessageFormat.format(DebugUIMessages.DebugUIPlugin_25, new Object[] {configuration.getName()})) {
- public IStatus run(final IProgressMonitor monitor) {
- /* Setup progress monitor
- * - Waiting for jobs to finish (2)
- * - Build & launch (98) */
- monitor.beginTask(DebugUIMessages.DebugUITools_3, 100);
- try {
- if(waitInJob) {
- StringBuffer buffer = new StringBuffer(configuration.getName());
- buffer.append(DebugUIMessages.DebugUIPlugin_0);
- ILaunchConfigurationWorkingCopy workingCopy = configuration.copy(buffer.toString());
- workingCopy.setAttribute(ATTR_LAUNCHING_CONFIG_HANDLE, configuration.getMemento());
- final ILaunch pendingLaunch = new PendingLaunch(workingCopy, mode, this);
- DebugPlugin.getDefault().getLaunchManager().addLaunch(pendingLaunch);
- IJobChangeListener listener= new IJobChangeListener() {
- public void sleeping(IJobChangeEvent event) {}
- public void scheduled(IJobChangeEvent event) {}
- public void running(IJobChangeEvent event) {}
- public void awake(IJobChangeEvent event) {}
- public void aboutToRun(IJobChangeEvent event) {}
- public void done(IJobChangeEvent event) {
- DebugPlugin dp = DebugPlugin.getDefault();
- if (dp != null) {
- dp.getLaunchManager().removeLaunch(pendingLaunch);
- }
- removeJobChangeListener(this);
- }
- };
- addJobChangeListener(listener);
- try {
- jobManager.join(ResourcesPlugin.FAMILY_MANUAL_BUILD, new SubProgressMonitor(monitor, 1));
- jobManager.join(ResourcesPlugin.FAMILY_AUTO_BUILD, new SubProgressMonitor(monitor, 1));
- }
- catch (InterruptedException e) {/*just continue.*/}
- DebugPlugin.getDefault().getLaunchManager().removeLaunch(pendingLaunch);
- }
- else {
- monitor.worked(2); /* don't wait for jobs to finish */
- }
- if (!monitor.isCanceled()) {
- buildAndLaunch(configuration, mode, new SubProgressMonitor(monitor, 98));
- }
- } catch (CoreException e) {
- final IStatus status = e.getStatus();
- IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler(status);
- if (handler == null) {
- return status;
- }
- final ILaunchGroup group = DebugUITools.getLaunchGroup(configuration, mode);
- if (group == null) {
- return status;
- }
- Runnable r = new Runnable() {
- public void run() {
- DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUIPlugin.getShell(), new StructuredSelection(configuration), group.getIdentifier(), status);
- }
- };
- DebugUIPlugin.getStandardDisplay().asyncExec(r);
- }
- finally {
- monitor.done();
- }
-
- return Status.OK_STATUS;
- }
- };
-
- IWorkbench workbench = DebugUIPlugin.getDefault().getWorkbench();
- IProgressService progressService = workbench.getProgressService();
-
- job.setPriority(Job.INTERACTIVE);
- job.setName(MessageFormat.format(DebugUIMessages.DebugUIPlugin_25, new Object[] {configuration.getName()}));
-
- if (wait) {
- progressService.showInDialog(workbench.getActiveWorkbenchWindow().getShell(), job);
- }
- job.schedule();
- }
-
- /**
- * Returns the label with any accelerators removed.
- *
- * @return label without accelerators
- */
- public static String removeAccelerators(String label) {
- String title = label;
- if (title != null) {
- // strip out any '&' (accelerators)
- int index = title.indexOf('&');
- if (index == 0) {
- title = title.substring(1);
- } else if (index > 0) {
- //DBCS languages use "(&X)" format
- if (title.charAt(index - 1) == '(' && title.length() >= index + 3 && title.charAt(index + 2) == ')') {
- String first = title.substring(0, index - 1);
- String last = title.substring(index + 3);
- title = first + last;
- } else if (index < (title.length() - 1)) {
- String first = title.substring(0, index);
- String last = title.substring(index + 1);
- title = first + last;
- }
- }
- }
- return title;
- }
-
- /**
- * Returns the label with any DBCS accelerator moved to the end of the string.
- * See bug 186921.
- *
- * @return label with moved accelerator
- */
- public static String adjustDBCSAccelerator(String label) {
- String title = label;
- if (title != null) {
- // strip out any '&' (accelerators)
- int index = title.indexOf('&');
- if (index > 0) {
- //DBCS languages use "(&X)" format
- if (title.charAt(index - 1) == '(' && title.length() >= index + 3 && title.charAt(index + 2) == ')') {
- String first = title.substring(0, index - 1);
- String accel = title.substring(index - 1, index + 3);
- String last = title.substring(index + 3);
- title = first + last;
- if (title.endsWith("...")) { //$NON-NLS-1$
- title = title.substring(0, title.length() - 3);
- title = title + accel + "..."; //$NON-NLS-1$
- } else {
- title = title + accel;
- }
- }
- }
- }
- return title;
- }
-
- /**
- * Returns the image descriptor registry used for this plug-in.
- *
- * @since 3.1
- */
- public static ImageDescriptorRegistry getImageDescriptorRegistry() {
- if (getDefault().fImageDescriptorRegistry == null) {
- getDefault().fImageDescriptorRegistry = new ImageDescriptorRegistry();
- }
- return getDefault().fImageDescriptorRegistry;
- }
-
- /**
- * Returns an image descriptor for the icon referenced by the given attribute
- * and configuration element, or <code>null</code> if none.
- *
- * @param element
- * @param attr
- * @return image descriptor or <code>null</code>
- */
- public static ImageDescriptor getImageDescriptor(IConfigurationElement element, String attr) {
- Bundle bundle = Platform.getBundle(element.getContributor().getName());
- String iconPath = element.getAttribute(attr);
- if (iconPath != null) {
- URL iconURL = FileLocator.find(bundle , new Path(iconPath), null);
- if (iconURL != null) {
- return ImageDescriptor.createFromURL(iconURL);
- }
- }
- return null;
- }
-
- /**
- * Returns an image descriptor for the icon referenced by the given path
- * and contributor name, or <code>null</code> if none.
- *
- * @param name the name of the contributor
- * @param path the path of the icon (from the configuration element)
- * @return image descriptor or <code>null</code>
- * @since 3.3
- */
- public static ImageDescriptor getImageDescriptor(String name, String path) {
- Bundle bundle = Platform.getBundle(name);
- if (path != null) {
- URL iconURL = FileLocator.find(bundle , new Path(path), null);
- if (iconURL != null) {
- return ImageDescriptor.createFromURL(iconURL);
- }
- }
- return null;
- }
-
- /**
- * Performs extra filtering for launch configurations based on the preferences set on the
- * Launch Configurations page
- * @param config the config to filter
- * @return true if it should pass the filter, false otherwise
- * @since 3.2
- */
- public static boolean doLaunchConfigurationFiltering(ILaunchConfiguration config) {
- boolean ret = true;
- if(DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_CLOSED)) {
- ret &= new ClosedProjectFilter().select(null, null, config);
- }
- if(DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_DELETED)) {
- ret &= new DeletedProjectFilter().select(null, null, config);
- }
- if(DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_TYPES)) {
- try {
- ret &= new LaunchConfigurationTypeFilter().select(null, null, config.getType());
- }
- catch(CoreException e) {
- DebugUIPlugin.log(e);
- }
- }
- return ret;
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java
deleted file mode 100644
index 494d1e8..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
-import org.eclipse.debug.internal.ui.views.memory.MemoryViewUtil;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.resource.ColorRegistry;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.ui.PlatformUI;
-
-public class DebugUIPreferenceInitializer extends AbstractPreferenceInitializer {
-
- public DebugUIPreferenceInitializer() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- IPreferenceStore prefs = DebugUIPlugin.getDefault().getPreferenceStore();
-// Debug PreferencePage
- prefs.setDefault(IDebugUIConstants.PREF_BUILD_BEFORE_LAUNCH, true);
- prefs.setDefault(IInternalDebugUIConstants.PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH, MessageDialogWithToggle.PROMPT);
- prefs.setDefault(IDebugUIConstants.PREF_SHOW_DEBUG_PERSPECTIVE_DEFAULT, IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
- prefs.setDefault(IDebugUIConstants.PREF_SHOW_RUN_PERSPECTIVE_DEFAULT, IDebugUIConstants.PERSPECTIVE_NONE);
- prefs.setDefault(IDebugUIConstants.PREF_AUTO_REMOVE_OLD_LAUNCHES, true);
- prefs.setDefault(IDebugUIConstants.PREF_ACTIVATE_WORKBENCH, true);
- prefs.setDefault(IInternalDebugUIConstants.PREF_ACTIVATE_DEBUG_VIEW, true);
- prefs.setDefault(IInternalDebugUIConstants.PREF_SWITCH_TO_PERSPECTIVE, MessageDialogWithToggle.NEVER);
- prefs.setDefault(IInternalDebugUIConstants.PREF_SWITCH_PERSPECTIVE_ON_SUSPEND, MessageDialogWithToggle.PROMPT);
- prefs.setDefault(IInternalDebugUIConstants.PREF_WAIT_FOR_BUILD, MessageDialogWithToggle.ALWAYS);
- prefs.setDefault(IDebugUIConstants.PREF_REUSE_EDITOR, true);
- prefs.setDefault(IDebugUIConstants.PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE, false);
- prefs.setDefault(IInternalDebugUIConstants.PREF_RELAUNCH_IN_DEBUG_MODE, MessageDialogWithToggle.NEVER);
- prefs.setDefault(IInternalDebugUIConstants.PREF_CONTINUE_WITH_COMPILE_ERROR, MessageDialogWithToggle.PROMPT);
- prefs.setDefault(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_ALL_BREAKPOINTS, true);
- prefs.setDefault(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_BREAKPOINTS_FROM_CONTAINER, true);
- prefs.setDefault(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_ALL_EXPRESSIONS, true);
-
- /**
- * Context launching preferences. Appear on the the Launching preference page
- *
- * @since 3.3.0
- */
- prefs.setDefault(IInternalDebugUIConstants.PREF_USE_CONTEXTUAL_LAUNCH, true);
- prefs.setDefault(IInternalDebugUIConstants.PREF_LAUNCH_PARENT_PROJECT, true);
- prefs.setDefault(IInternalDebugUIConstants.PREF_LAUNCH_LAST_IF_NOT_LAUNCHABLE, false);
-
- //View Management preference page
- prefs.setDefault(IDebugUIConstants.PREF_MANAGE_VIEW_PERSPECTIVES, IDebugUIConstants.PREF_MANAGE_VIEW_PERSPECTIVES_DEFAULT);
- prefs.setDefault(IInternalDebugUIConstants.PREF_TRACK_VIEWS, true);
-
- //ConsolePreferencePage
- prefs.setDefault(IDebugPreferenceConstants.CONSOLE_WRAP, false);
- prefs.setDefault(IDebugPreferenceConstants.CONSOLE_WIDTH, 80);
- prefs.setDefault(IDebugPreferenceConstants.CONSOLE_OPEN_ON_OUT, true);
- prefs.setDefault(IDebugPreferenceConstants.CONSOLE_OPEN_ON_ERR, true);
- prefs.setDefault(IDebugPreferenceConstants.CONSOLE_LIMIT_CONSOLE_OUTPUT, true);
- prefs.setDefault(IDebugPreferenceConstants.CONSOLE_LOW_WATER_MARK, 80000);
- prefs.setDefault(IDebugPreferenceConstants.CONSOLE_HIGH_WATER_MARK, 100000);
- prefs.setDefault(IDebugPreferenceConstants.CONSOLE_TAB_WIDTH, 8);
-
- // console colors
- setThemeBasedPreferences(prefs, false);
-
- PreferenceConverter.setDefault(prefs, IDebugUIConstants.PREF_CHANGED_VALUE_BACKGROUND, new RGB(255, 255, 0));
- PreferenceConverter.setDefault(prefs, IDebugUIConstants.PREF_MEMORY_HISTORY_UNKNOWN_COLOR, new RGB(114, 119, 129));
- PreferenceConverter.setDefault(prefs, IDebugUIConstants.PREF_MEMORY_HISTORY_KNOWN_COLOR, new RGB(0, 0, 0));
-
- //Launching Preference Page
- prefs.setDefault(IDebugUIConstants.PREF_MAX_HISTORY_SIZE, 10);
- prefs.setDefault(IInternalDebugUIConstants.PREF_REMOVE_FROM_LAUNCH_HISTORY, true);
-
- //VariableViewsPreferencePage
- prefs.setDefault(IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_ORIENTATION, IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_UNDERNEATH);
- PreferenceConverter.setDefault(prefs, IDebugUIConstants.PREF_CHANGED_DEBUG_ELEMENT_COLOR, new RGB(255, 0, 0));
- prefs.setDefault(IDebugPreferenceConstants.PREF_DETAIL_PANE_WORD_WRAP, false);
- prefs.setDefault(IDebugUIConstants.PREF_MAX_DETAIL_LENGTH, 10000);
-
- //Registers View
- prefs.setDefault(IDebugPreferenceConstants.REGISTERS_DETAIL_PANE_ORIENTATION, IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_UNDERNEATH);
-
- // Variable/Expression view default settings
- prefs.setDefault(IDebugUIConstants.ID_VARIABLE_VIEW + '+' + "org.eclipse.debug.ui.ShowDetailPaneAction", true); //$NON-NLS-1$
- prefs.setDefault(IDebugUIConstants.ID_EXPRESSION_VIEW + '+' + "org.eclipse.debug.ui.ShowDetailPaneAction", true); //$NON-NLS-1$
- prefs.setDefault(IDebugUIConstants.ID_VARIABLE_VIEW + '+' + "org.eclipse.debug.ui.ShowTypeNamesAction", false); //$NON-NLS-1$
- prefs.setDefault(IDebugUIConstants.ID_EXPRESSION_VIEW + '+' + "org.eclipse.debug.ui.ShowTypeNamesAction", false); //$NON-NLS-1$
-
- // set default for column size preference
- prefs.setDefault(IDebugPreferenceConstants.PREF_COLUMN_SIZE,
- IDebugPreferenceConstants.PREF_COLUMN_SIZE_DEFAULT);
-
- // set default for row size preference
- prefs.setDefault(IDebugPreferenceConstants.PREF_ROW_SIZE,
- IDebugPreferenceConstants.PREF_ROW_SIZE_DEFAULT);
-
- // set default padded string
- prefs.setDefault(IDebugUIConstants.PREF_PADDED_STR,
- IDebugPreferenceConstants.PREF_PADDED_STR_DEFAULT);
-
- // set default code page for ascii and ebcdic
- prefs.setDefault(IDebugUIConstants.PREF_DEFAULT_ASCII_CODE_PAGE,
- IDebugPreferenceConstants.DEFAULT_ASCII_CP);
- prefs.setDefault(IDebugUIConstants.PREF_DEFAULT_EBCDIC_CODE_PAGE,
- IDebugPreferenceConstants.DEFAULT_EBCDIC_CP);
-
- if (MemoryViewUtil.isLinuxGTK()) {
- prefs.setDefault(IDebugPreferenceConstants.PREF_DYNAMIC_LOAD_MEM, false);
- }
- else {
- prefs.setDefault(IDebugPreferenceConstants.PREF_DYNAMIC_LOAD_MEM, true);
- }
-
- prefs.setDefault(IDebugPreferenceConstants.PREF_TABLE_RENDERING_PAGE_SIZE, IDebugPreferenceConstants.DEFAULT_PAGE_SIZE);
- prefs.setDefault(IDebugPreferenceConstants.PREF_RESET_MEMORY_BLOCK, IDebugPreferenceConstants.RESET_VISIBLE);
- prefs.setDefault(IDebugPreferenceConstants.PREF_TABLE_RENDERING_PRE_BUFFER_SIZE,IDebugPreferenceConstants.DEFAULT_PAGE_SIZE);
- prefs.setDefault(IDebugPreferenceConstants.PREF_TABLE_RENDERING_POST_BUFFER_SIZE,IDebugPreferenceConstants.DEFAULT_PAGE_SIZE);
-
- /**
- * new launch configuration filtering options
- * @since 3.2
- */
- prefs.setDefault(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_CLOSED, true);
- prefs.setDefault(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_DELETED, true);
- prefs.setDefault(IInternalDebugUIConstants.PREF_FILTER_WORKING_SETS, false);
- prefs.setDefault(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_TYPES, false);
-
- /**
- * Debug view mode default
- *
- * @since 3.5
- */
- prefs.setDefault(IDebugPreferenceConstants.DEBUG_VIEW_MODE, IDebugPreferenceConstants.DEBUG_VIEW_MODE_AUTO);
- }
-
- /**
- * Returns the RGB for the given key in the given color registry.
- *
- * @param registry the color registry
- * @param key the key for the constant in the registry
- * @param defaultRGB the default RGB if no entry is found
- * @return RGB the RGB
- * @since 3.4
- */
- private static RGB findRGB(ColorRegistry registry, String key, RGB defaultRGB) {
- if (registry == null)
- return defaultRGB;
-
- RGB rgb= registry.getRGB(key);
- if (rgb != null)
- return rgb;
-
- return defaultRGB;
- }
-
- /**
- * Sets the default value and fires a property
- * change event if necessary.
- *
- * @param store the preference store
- * @param key the preference key
- * @param newValue the new value
- * @param fireEvent <code>false</code> if no event should be fired
- * @since 3.4
- */
- private static void setDefault(IPreferenceStore store, String key, RGB newValue, boolean fireEvent) {
- if (!fireEvent) {
- PreferenceConverter.setDefault(store, key, newValue);
- } else {
- RGB oldValue= null;
- if (store.isDefault(key))
- oldValue= PreferenceConverter.getDefaultColor(store, key);
-
- PreferenceConverter.setDefault(store, key, newValue);
-
- if (oldValue != null && !oldValue.equals(newValue))
- store.firePropertyChangeEvent(key, oldValue, newValue);
- }
- }
-
- public static void setThemeBasedPreferences(IPreferenceStore store, boolean fireEvent) {
- ColorRegistry registry= null;
- if (PlatformUI.isWorkbenchRunning())
- registry= PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
-
- setDefault(store,
- IDebugPreferenceConstants.CONSOLE_BAKGROUND_COLOR,
- findRGB(registry, IInternalDebugUIConstants.THEME_CONSOLE_COLOR_BACKGROUND, new RGB(255, 255, 255)), fireEvent);
- setDefault(store,
- IDebugPreferenceConstants.CONSOLE_SYS_OUT_COLOR,
- findRGB(registry, IInternalDebugUIConstants.THEME_CONSOLE_COLOR_STD_OUT, new RGB(0, 0, 0)), fireEvent);
- setDefault(store,
- IDebugPreferenceConstants.CONSOLE_SYS_IN_COLOR,
- findRGB(registry, IInternalDebugUIConstants.THEME_CONSOLE_COLOR_STD_IN, new RGB(0, 200, 125)), fireEvent);
- setDefault(store,
- IDebugPreferenceConstants.CONSOLE_SYS_ERR_COLOR,
- findRGB(registry, IInternalDebugUIConstants.THEME_CONSOLE_COLOR_STD_ERR, new RGB(255, 0, 0)), fireEvent);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java
deleted file mode 100644
index 083e584..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java
+++ /dev/null
@@ -1,568 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * QNX Software Systems - Mikhail Khodjaiants - Registers View (Bug 53640)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchDelegate;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IDisconnect;
-import org.eclipse.debug.core.model.IExpression;
-import org.eclipse.debug.core.model.ILineBreakpoint;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.IRegister;
-import org.eclipse.debug.core.model.IRegisterGroup;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.ITerminate;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.debug.core.model.IWatchExpression;
-import org.eclipse.debug.core.model.IWatchpoint;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension;
-import org.eclipse.debug.internal.ui.views.variables.IndexedVariablePartition;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-import com.ibm.icu.text.MessageFormat;
-
-public class DefaultLabelProvider implements ILabelProvider {
-
- /**
- * @see ILabelProvider#getImage(Object)
- */
- public Image getImage(Object element) {
- String key= getImageKey(element);
- if (key == null && element instanceof ILaunch) {
- return null;
- }
- if (key == null && element instanceof IAdaptable) {
- IWorkbenchAdapter de= (IWorkbenchAdapter) ((IAdaptable) element).getAdapter(IWorkbenchAdapter.class);
- if (de != null) {
- ImageDescriptor descriptor= de.getImageDescriptor(element);
- if( descriptor != null) {
- return descriptor.createImage();
- }
- }
- return null;
- }
- if(element instanceof LaunchShortcutExtension) {
- return ((LaunchShortcutExtension)element).getImageDescriptor().createImage();
- }
- return DebugPluginImages.getImage(key);
- }
-
- /**
- * Returns the key (<code>String</code>) of the default image
- * appropriate for the given element or <code>null</code>
- * if no default image is defined.
- */
- public String getImageKey(Object element) {
- if (element instanceof IDebugElement) {
- // Group elements into debug elements and non-debug elements
- // to reduce the number of instanceof checks performed
- if (element instanceof IRegister) {
- return IDebugUIConstants.IMG_OBJS_REGISTER;
- } else if (element instanceof IRegisterGroup) {
- return IDebugUIConstants.IMG_OBJS_REGISTER_GROUP;
- } else if (element instanceof IVariable || element instanceof IValue) {
- if (element instanceof IndexedVariablePartition) {
- return IInternalDebugUIConstants.IMG_OBJS_ARRAY_PARTITION;
- }
- return IDebugUIConstants.IMG_OBJS_VARIABLE;
- } else if (element instanceof IStackFrame) {
- if (((IStackFrame)element).getThread().isSuspended()) {
- return IDebugUIConstants.IMG_OBJS_STACKFRAME;
- }
- return IDebugUIConstants.IMG_OBJS_STACKFRAME_RUNNING;
- } else if (element instanceof IThread) {
- IThread thread = (IThread)element;
- if (thread.isSuspended()) {
- return IDebugUIConstants.IMG_OBJS_THREAD_SUSPENDED;
- } else if (thread.isTerminated()) {
- return IDebugUIConstants.IMG_OBJS_THREAD_TERMINATED;
- } else {
- return IDebugUIConstants.IMG_OBJS_THREAD_RUNNING;
- }
- } else if (element instanceof IDebugTarget) {
- IDebugTarget target= (IDebugTarget) element;
- if (target.isTerminated() || target.isDisconnected()) {
- return IDebugUIConstants.IMG_OBJS_DEBUG_TARGET_TERMINATED;
- } else if (target.isSuspended()) {
- return IDebugUIConstants.IMG_OBJS_DEBUG_TARGET_SUSPENDED;
- } else {
- return IDebugUIConstants.IMG_OBJS_DEBUG_TARGET;
- }
- } else if (element instanceof IExpression) {
- return IDebugUIConstants.IMG_OBJS_EXPRESSION;
- }
- } else {
- if (element instanceof IMarker) {
- return getMarkerImageKey((IMarker)element);
- } else if (element instanceof IBreakpoint) {
- return getBreakpointImageKey((IBreakpoint)element);
- } else if (element instanceof IProcess) {
- if (((IProcess) element).isTerminated()) {
- return IDebugUIConstants.IMG_OBJS_OS_PROCESS_TERMINATED;
- }
- return IDebugUIConstants.IMG_OBJS_OS_PROCESS;
- } else if (element instanceof ILaunch) {
- // determine the image from the launch config type
- ILaunch launch= (ILaunch)element;
- ILaunchConfiguration configuration = launch.getLaunchConfiguration();
- if (configuration != null) {
- try {
- return configuration.getType().getIdentifier();
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- return null;
- }
- }
- // if no config, use the old "mode" way
- if (launch.getLaunchMode().equals(ILaunchManager.DEBUG_MODE)) {
- return IDebugUIConstants.IMG_OBJS_LAUNCH_DEBUG;
- } else if (launch.isTerminated()) {
- return IDebugUIConstants.IMG_OBJS_LAUNCH_RUN_TERMINATED;
- } else {
- return IDebugUIConstants.IMG_OBJS_LAUNCH_RUN;
- }
- } else if (element instanceof ILaunchConfigurationType) {
- return ((ILaunchConfigurationType)element).getIdentifier();
- } else if (element instanceof ILaunchConfiguration) {
- try {
- return ((ILaunchConfiguration)element).getType().getIdentifier();
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- return null;
- }
- }
- }
- return null;
- }
-
- /**
- * @see ILabelProvider#getText(Object)
- */
- public String getText(Object element) {
- StringBuffer label= new StringBuffer();
- try {
- // Group elements into debug elements and non-debug elements
- // to reduce the number of instanceof checks performed
- if (element instanceof IDebugElement) {
- if (element instanceof IStackFrame) {
- label.append(((IStackFrame)element).getName());
- } else if (element instanceof IndexedVariablePartition) {
- label.append(((IndexedVariablePartition)element).getName());
- } else if (element instanceof IVariable) {
- label.append(getVariableText((IVariable)element));
- } else if (element instanceof IThread) {
- label.append(((IThread)element).getName());
- } else if (element instanceof IDebugTarget) {
- label.append((((IDebugTarget)element).getName()));
- } else if (element instanceof IExpression) {
- label.append(getExpressionText((IExpression)element));
- } else if (element instanceof IRegisterGroup) {
- label.append(getRegisterGroupText((IRegisterGroup)element));
- } else if (element instanceof IValue) {
- label.append(((IValue)element).getValueString());
- }
- } else {
- if (element instanceof IMarker) {
- label.append(getMarkerText((IMarker) element));
- } else if (element instanceof IBreakpoint) {
- label.append(getBreakpointText((IBreakpoint)element));
- } else if (element instanceof IProcess) {
- label.append(((IProcess) element).getLabel());
- } else if (element instanceof ILaunch) {
- label.append(getLaunchText((ILaunch) element));
- } else if (element instanceof ILaunchConfiguration) {
- label.append(((ILaunchConfiguration)element).getName());
- } else if (element instanceof ILaunchConfigurationType) {
- label.append(((ILaunchConfigurationType)element).getName());
- } else if(element instanceof ILaunchDelegate) {
- ILaunchDelegate delegate = (ILaunchDelegate) element;
- String name = delegate.getName();
- if(name == null) {
- name = delegate.getContributorName();
- }
- label.append(name);
- } else if(element instanceof LaunchShortcutExtension) {
- label.append(((LaunchShortcutExtension)element).getLabel());
- } else if (element instanceof String) {
- label.append(element);
- } else {
- label.append(getAdapterLabel(element));
- }
- }
- if (element instanceof ITerminate) {
- if (((ITerminate) element).isTerminated()) {
- String terminatedMessage= null;
- if (element instanceof IProcess) {
- IProcess process = (IProcess)element;
- int exit = process.getExitValue();
- terminatedMessage= MessageFormat.format(DebugUIMessages.DefaultLabelProvider_16, new String[]{new Integer(exit).toString()});
- } else {
- terminatedMessage= DebugUIMessages.DefaultLabelProvider_1;
- }
- label.insert(0, terminatedMessage);
- }
- } else if (element instanceof IDisconnect) {
- if (((IDisconnect) element).isDisconnected()) {
- label.insert(0, DebugUIMessages.DefaultLabelProvider__disconnected__1);
- }
- }
- } catch (DebugException e) {
- DebugUIPlugin.log(e);
- label.append(DebugUIMessages.DefaultLabelProvider__unknown__1);
- }
- return label.toString();
- }
-
- /**
- * Returns default label for a breakpoint.
- *
- * @param breakpoint
- * @return default label for a breakpoint
- */
- private String getBreakpointText(IBreakpoint breakpoint) {
- IResource resource = breakpoint.getMarker().getResource();
- StringBuffer label = new StringBuffer();
- if (resource != null) {
- label.append(resource.getName());
- }
- if (breakpoint instanceof ILineBreakpoint) {
- try {
- int lineNumber = ((ILineBreakpoint)breakpoint).getLineNumber();
- label.append(MessageFormat.format(DebugUIMessages.DefaultLabelProvider_17, new String[]{Integer.toString(lineNumber)}));
- } catch (CoreException e) {
- }
- }
- return label.toString();
- }
-
- public String getAdapterLabel(Object object) {
- if (object instanceof IAdaptable) {
- IWorkbenchAdapter de= (IWorkbenchAdapter) ((IAdaptable) object).getAdapter(IWorkbenchAdapter.class);
- if (de != null) {
- return de.getLabel(object);
- }
- }
- return DebugUIMessages.DefaultLabelProvider__unknown__1;
- }
-
- /**
- * Used to render launch history items in the re-launch drop downs
- */
- protected String getLaunchText(ILaunch launch) {
- if (launch.getLaunchConfiguration() == null || (!launch.getLaunchConfiguration().exists() && !launch.getLaunchConfiguration().isWorkingCopy())) {
- return DebugUIMessages.DefaultLabelProvider__unknown__1;
- }
- // new launch configuration
- ILaunchConfiguration config = launch.getLaunchConfiguration();
- StringBuffer buff= new StringBuffer(config.getName());
- buff.append(" ["); //$NON-NLS-1$
- try {
- buff.append(config.getType().getName());
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- }
- buff.append("]"); //$NON-NLS-1$
- return buff.toString();
- }
-
- protected String getExpressionText(IExpression expression) {
- if (expression instanceof IWatchExpression) {
- return getWatchExpressionText((IWatchExpression) expression);
- }
- StringBuffer buffer= new StringBuffer(expression.getExpressionText());
- String valueString= null;
- IValue value= expression.getValue();
- if (value != null) {
- try {
- valueString= value.getValueString();
- } catch (DebugException de) {
- DebugUIPlugin.log(de);
- }
- }
- if (valueString != null && valueString.length() > 0) {
- buffer.append("= "); //$NON-NLS-1$
- buffer.append(valueString);
- }
- return buffer.toString();
- }
-
- /**
- * @param expression
- * @return
- */
- protected String getWatchExpressionText(IWatchExpression expression) {
- StringBuffer result= new StringBuffer();
-
- String snippet = expression.getExpressionText().trim();
- StringBuffer snippetBuffer = new StringBuffer();
- if (snippet.length() > 30){
- snippetBuffer.append(snippet.substring(0, 15));
- snippetBuffer.append(DebugUIMessages.DefaultLabelProvider_0);
- snippetBuffer.append(snippet.substring(snippet.length() - 15));
- } else {
- snippetBuffer.append(snippet);
- }
- snippet = snippetBuffer.toString().replaceAll("[\n\r\t]+", " "); //$NON-NLS-1$//$NON-NLS-2$
-
- result.append('"');
- result.append(snippet);
- result.append('"');
-
- if (expression.isPending()) {
- result.append(DebugUIMessages.DefaultLabelProvider_12);
- } else if (expression.hasErrors()) {
- result.append(DebugUIMessages.DefaultLabelProvider_13);
- } else {
- IValue value= expression.getValue();
- if (value != null) {
- String valueString= DebugUIPlugin.getModelPresentation().getText(value);
- if (valueString.length() > 0) {
- result.append(" = ").append(valueString); //$NON-NLS-1$
- }
- }
- }
- if (!expression.isEnabled()) {
- result.append(DebugUIMessages.DefaultLabelProvider_15);
- }
- return result.toString();
- }
-
- protected String getVariableText(IVariable variable) {
- StringBuffer buffer= new StringBuffer();
- try {
- IValue value = variable.getValue();
- buffer.append(variable.getName());
- buffer.append(" = "); //$NON-NLS-1$
- buffer.append(value.getValueString());
- } catch (DebugException de) {
- DebugUIPlugin.log(de);
- }
- return buffer.toString();
- }
-
- protected String getRegisterGroupText(IRegisterGroup registerGroup) {
- StringBuffer buffer= new StringBuffer();
- try {
- buffer.append(registerGroup.getName());
- } catch (DebugException de) {
- DebugUIPlugin.log(de);
- }
- return buffer.toString();
- }
-
- protected String getMarkerText(IMarker marker) {
- try {
- if (marker.exists() && marker.isSubtypeOf(IBreakpoint.BREAKPOINT_MARKER)) {
- return DebugUIMessages.DefaultLabelProvider_Breakpoint_1;
- }
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- }
- return IInternalDebugCoreConstants.EMPTY_STRING;
- }
-
- protected String getMarkerImageKey(IMarker marker) {
- try {
- IBreakpoint breakpoint= DebugPlugin.getDefault().getBreakpointManager().getBreakpoint(marker);
- if (breakpoint != null && marker.exists()) {
- if (breakpoint.isEnabled()) {
- return IDebugUIConstants.IMG_OBJS_BREAKPOINT;
- }
- return IDebugUIConstants.IMG_OBJS_BREAKPOINT_DISABLED;
- }
- } catch (CoreException e) {
- }
- return null;
- }
-
- protected String getBreakpointImageKey(IBreakpoint breakpoint) {
- if (breakpoint != null && breakpoint.getMarker().exists()) {
- try {
- boolean enabled = breakpoint.isEnabled();
- if (breakpoint instanceof IWatchpoint) {
- IWatchpoint watchpoint = (IWatchpoint) breakpoint;
- if (watchpoint.isAccess()) {
- if (watchpoint.isModification()) {
- //access and modification
- if (enabled) {
- return IDebugUIConstants.IMG_OBJS_WATCHPOINT;
- }
- return IDebugUIConstants.IMG_OBJS_WATCHPOINT_DISABLED;
- }
- if (enabled) {
- return IDebugUIConstants.IMG_OBJS_ACCESS_WATCHPOINT;
- }
- return IDebugUIConstants.IMG_OBJS_ACCESS_WATCHPOINT_DISABLED;
- } else if (watchpoint.isModification()) {
- if (enabled) {
- return IDebugUIConstants.IMG_OBJS_MODIFICATION_WATCHPOINT;
- }
- return IDebugUIConstants.IMG_OBJS_MODIFICATION_WATCHPOINT_DISABLED;
- } else {
- //neither access nor modification
- return IDebugUIConstants.IMG_OBJS_WATCHPOINT_DISABLED;
- }
- }
- if (enabled) {
- return IDebugUIConstants.IMG_OBJS_BREAKPOINT;
- }
- return IDebugUIConstants.IMG_OBJS_BREAKPOINT_DISABLED;
- } catch (CoreException e) {
- }
- }
- return null;
- }
-
- /**
- * @see IBaseLabelProvider#addListener(ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- }
-
- /**
- * @see IBaseLabelProvider#dispose()
- */
- public void dispose() {
- }
-
- /**
- * @see IBaseLabelProvider#isLabelProperty(Object, String)
- */
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- /**
- * @see IBaseLabelProvider#removeListener(ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- }
-
- /**
- * Returns the given string with special chars in escaped sequences.
- *
- * @param label
- * @return the given string with special chars in escaped sequences
- * @since 3.3
- */
- public static String escapeSpecialChars(String string) {
- if (string == null) {
- return null;
- }
- StringBuffer escaped = new StringBuffer();
- for (int i = 0; i < string.length(); i++) {
- char c = string.charAt(i);
- switch (c) {
- case '\b':
- escaped.append("\\b"); //$NON-NLS-1$
- break;
- case '\f':
- escaped.append("\\f"); //$NON-NLS-1$
- break;
- case '\n':
- escaped.append("\\n"); //$NON-NLS-1$
- break;
- case '\r':
- escaped.append("\\r"); //$NON-NLS-1$
- break;
- case '\t':
- escaped.append("\\t"); //$NON-NLS-1$
- break;
- case '\\':
- escaped.append("\\\\"); //$NON-NLS-1$
- break;
- default:
- escaped.append(c);
- break;
- }
- }
- return escaped.toString();
- }
-
- /**
- * Returns the string with escaped sequences replaced with single chars.
- *
- * @param string
- * @return the string with escaped sequences replaced with single chars
- * @since 3.3
- */
- public static String encodeEsacpedChars(String string) {
- if (string == null) {
- return null;
- }
- StringBuffer encoded = new StringBuffer();
- if (string.length() == 1) {
- return string;
- }
- for (int i = 0; i < string.length(); i++) {
- char c = string.charAt(i);
- if (c == '\\') {
- switch (string.charAt(i+1)) {
- case 'b':
- c= '\b';
- i++;
- break;
- case 'f':
- c= '\f';
- i++;
- break;
- case 'n':
- c= '\n';
- i++;
- break;
- case 'r':
- c= '\r';
- i++;
- break;
- case 't':
- c= '\t';
- i++;
- break;
- case '\'':
- c= '\'';
- i++;
- break;
- case '\\':
- c= '\\';
- i++;
- break;
- default :
- break;
- }
- }
- encoded.append(c);
- }
- return encoded.toString();
- }
-}
-
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 8f3425e..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java
+++ /dev/null
@@ -1,478 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugEditorPresentation;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IDebugModelPresentationExtension;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.IInstructionPointerPresentation;
-import org.eclipse.debug.ui.IValueDetailListener;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.jface.viewers.IColorProvider;
-import org.eclipse.jface.viewers.IFontProvider;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-
-/**
- * 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, IDebugEditorPresentation,
- IColorProvider, IFontProvider, IInstructionPointerPresentation, IDebugModelPresentationExtension {
-
- /**
- * A mapping of attribute ids to their values
- * @see IDebugModelPresentation#setAttribute
- */
- private HashMap fAttributes= new HashMap(3);
- /**
- * A table of label providers keyed by debug model identifiers.
- */
- private HashMap fLabelProviders= new HashMap(5);
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDebugEditorPresentation#removeAnnotations(org.eclipse.ui.IEditorPart, org.eclipse.debug.core.model.IThread)
- */
- public void removeAnnotations(IEditorPart editorPart, IThread thread) {
- IDebugModelPresentation presentation = getConfiguredPresentation(thread);
- if (presentation instanceof IDebugEditorPresentation) {
- ((IDebugEditorPresentation)presentation).removeAnnotations(editorPart, thread);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDebugEditorPresentation#addAnnotations(org.eclipse.ui.IEditorPart, org.eclipse.debug.core.model.IStackFrame)
- */
- public boolean addAnnotations(IEditorPart editorPart, IStackFrame frame) {
- IDebugModelPresentation presentation = getConfiguredPresentation(frame);
- if (presentation instanceof IDebugEditorPresentation) {
- return((IDebugEditorPresentation)presentation).addAnnotations(editorPart, frame);
- }
- return false;
- }
-
- /**
- * Constructs a new DelegatingLabelProvider that delegates to extensions
- * of kind <code>org.eclipse.debug.ui.debugLabelProvider</code>
- */
- public DelegatingModelPresentation() {
- IExtensionPoint point= Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.ID_DEBUG_MODEL_PRESENTATION);
- if (point != null) {
- IExtension[] extensions= point.getExtensions();
- for (int i= 0; i < extensions.length; i++) {
- IExtension extension= extensions[i];
- IConfigurationElement[] configElements= extension.getConfigurationElements();
- for (int j= 0; j < configElements.length; j++) {
- IConfigurationElement elt= configElements[j];
- String id= elt.getAttribute("id"); //$NON-NLS-1$
- if (id != null) {
- IDebugModelPresentation lp= new LazyModelPresentation(this, elt);
- getLabelProviders().put(id, lp);
- }
- }
- }
- }
- }
-
- /**
- * Delegate to all extensions.
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- Iterator i= getLabelProviders().values().iterator();
- while (i.hasNext()) {
- ((ILabelProvider) i.next()).addListener(listener);
- }
- }
-
- /**
- * Delegate to all extensions.
- *
- * @see IBaseLabelProvider#dispose()
- */
- public void dispose() {
- Iterator i= getLabelProviders().values().iterator();
- while (i.hasNext()) {
- ((ILabelProvider) i.next()).dispose();
- }
- }
-
- /**
- * @see IDebugModelPresentation#getImage(Object)
- */
- public Image getImage(Object item) {
- // Attempt to delegate
- IDebugModelPresentation lp= getConfiguredPresentation(item);
- if (lp != null) {
- Image image= lp.getImage(item);
- if (image != null) {
- return image;
- }
- }
- // If no delegate returned an image, use the default
- return getDefaultImage(item);
- }
-
- /**
- * @see IDebugModelPresentation#getText(Object)
- */
- public String getText(Object item) {
- IDebugModelPresentation lp= getConfiguredPresentation(item);
- if (lp != null) {
- return lp.getText(item);
- }
- return getDefaultText(item);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ISourcePresentation#getEditorInput(java.lang.Object)
- */
- public IEditorInput getEditorInput(Object item) {
- IDebugModelPresentation lp= getConfiguredPresentation(item);
- if (lp != null) {
- return lp.getEditorInput(item);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ISourcePresentation#getEditorId(org.eclipse.ui.IEditorInput, java.lang.Object)
- */
- public String getEditorId(IEditorInput input, Object objectInput) {
- IDebugModelPresentation lp= getConfiguredPresentation(objectInput);
- if (lp != null) {
- return lp.getEditorId(input, objectInput);
- }
- return null;
- }
-
-
- /**
- * Returns a default text label for the debug element
- */
- protected String getDefaultText(Object element) {
- return DebugUIPlugin.getDefaultLabelProvider().getText(element);
- }
-
- /**
- * Returns a default image for the debug element
- */
- protected Image getDefaultImage(Object element) {
- return DebugUIPlugin.getDefaultLabelProvider().getImage(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDebugModelPresentation#computeDetail(org.eclipse.debug.core.model.IValue, org.eclipse.debug.ui.IValueDetailListener)
- */
- public void computeDetail(IValue value, IValueDetailListener listener) {
- IDebugModelPresentation lp= getConfiguredPresentation(value);
- if (lp != null) {
- lp.computeDetail(value, listener);
- } else {
- listener.detailComputed(value, getText(value));
- }
- }
-
- /**
- * Delegate to all extensions.
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- Iterator i= getLabelProviders().values().iterator();
- while (i.hasNext()) {
- ((ILabelProvider) i.next()).removeListener(listener);
- }
- }
-
- /**
- * Delegate to the appropriate label provider.
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
- */
- public boolean isLabelProperty(Object element, String property) {
- if (element instanceof IDebugElement) {
- IDebugModelPresentation lp= getConfiguredPresentation(element);
- if (lp != null) {
- return lp.isLabelProperty(element, property);
- }
- }
-
- return true;
- }
-
- /**
- * Returns a configured model presentation for the given object,
- * or <code>null</code> if one is not registered.
- */
- protected IDebugModelPresentation getConfiguredPresentation(Object element) {
- String id= null;
- if (element instanceof IDebugElement) {
- IDebugElement de= (IDebugElement) element;
- id= de.getModelIdentifier();
- } else if (element instanceof IMarker) {
- IMarker m= (IMarker) element;
- IBreakpoint bp = DebugPlugin.getDefault().getBreakpointManager().getBreakpoint(m);
- if (bp != null) {
- id= bp.getModelIdentifier();
- }
- } else if (element instanceof IBreakpoint) {
- id = ((IBreakpoint)element).getModelIdentifier();
- }
- if (id != null) {
- return getPresentation(id);
- }
-
- return null;
- }
-
- /**
- * Returns the presentation registered for the given id, or <code>null</code>
- * of nothing is registered for the id.
- */
- public IDebugModelPresentation getPresentation(String id) {
- return (IDebugModelPresentation) getLabelProviders().get(id);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDebugModelPresentation#setAttribute(java.lang.String, java.lang.Object)
- */
- public void setAttribute(String id, Object value) {
- if (value == null) {
- return;
- }
- basicSetAttribute(id, value);
- Iterator presentations = fLabelProviders.values().iterator();
- while (presentations.hasNext()) {
- ((IDebugModelPresentation)presentations.next()).setAttribute(id, value);
- }
- }
-
- /**
- * Sets the value of the given attribute without setting in child presentations.
- *
- * @param id id
- * @param value value
- */
- protected void basicSetAttribute(String id, Object value) {
- getAttributes().put(id, value);
- }
-
- /**
- * Whether or not to show variable type names.
- * This option is configured per model presentation.
- * This allows this option to be set per view, for example.
- */
- protected boolean showVariableTypeNames() {
- Boolean show= (Boolean) fAttributes.get(DISPLAY_VARIABLE_TYPE_NAMES);
- show= show == null ? Boolean.FALSE : show;
- return show.booleanValue();
- }
-
- /**
- * Returns the raw attribute map
- * @return the raw attribute map
- */
- public HashMap getAttributes() {
- return fAttributes;
- }
-
- /**
- * Returns a copy of the attribute map for this presentation.
- *
- * @return a copy of the attribute map for this presentation
- * @since 3.0
- */
- public Map getAttributeMap() {
- return (Map) getAttributes().clone();
- }
-
- protected HashMap getLabelProviders() {
- return fLabelProviders;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
- */
- public Color getForeground(Object element) {
- IDebugModelPresentation presentation = getConfiguredPresentation(element);
- if (presentation instanceof IColorProvider) {
- IColorProvider colorProvider = (IColorProvider) presentation;
- return colorProvider.getForeground(element);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
- */
- public Color getBackground(Object element) {
- IDebugModelPresentation presentation = getConfiguredPresentation(element);
- if (presentation instanceof IColorProvider) {
- IColorProvider colorProvider = (IColorProvider) presentation;
- return colorProvider.getBackground(element);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
- */
- public Font getFont(Object element) {
- IDebugModelPresentation presentation = getConfiguredPresentation(element);
- if (presentation instanceof IFontProvider) {
- IFontProvider fontProvider = (IFontProvider) presentation;
- return fontProvider.getFont(element);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IInstructionPointerPresentation#getInstructionPointerAnnotation(org.eclipse.ui.IEditorPart, org.eclipse.debug.core.model.IStackFrame)
- */
- public Annotation getInstructionPointerAnnotation(IEditorPart editorPart, IStackFrame frame) {
- IDebugModelPresentation presentation = getConfiguredPresentation(frame);
- Annotation annotation = null;
- String id = null;
- Image image = null;
- String text = null;
- if (presentation instanceof IInstructionPointerPresentation) {
- // first check if an annotaion object is provided
- IInstructionPointerPresentation pointerPresentation = (IInstructionPointerPresentation) presentation;
- annotation = pointerPresentation.getInstructionPointerAnnotation(editorPart, frame);
- if (annotation == null) {
- // next check for a marker annotation specification extension
- id = pointerPresentation.getInstructionPointerAnnotationType(editorPart, frame);
- if (id == null) {
- // check for an image
- image = pointerPresentation.getInstructionPointerImage(editorPart, frame);
- }
- text = pointerPresentation.getInstructionPointerText(editorPart, frame);
- }
- }
- if (annotation == null) {
- boolean defaultAnnotation = id == null;
- if (id == null || text == null || (defaultAnnotation && image == null)) {
- IThread thread = frame.getThread();
- IStackFrame tos = null;
- boolean top = false;
- try {
- tos = thread.getTopStackFrame();
- top = frame.equals(tos);
- } catch (DebugException de) {
- }
- if (id == null) {
- if (top) {
- id = IDebugUIConstants.ANNOTATION_TYPE_INSTRUCTION_POINTER_CURRENT;
- } else {
- id = IDebugUIConstants.ANNOTATION_TYPE_INSTRUCTION_POINTER_SECONDARY;
- }
- }
- if (text == null) {
- if (top) {
- text = DebugUIMessages.InstructionPointerAnnotation_0;
- } else {
- text = DebugUIMessages.InstructionPointerAnnotation_1;
- }
- }
- if (defaultAnnotation && image == null) {
- if (top) {
- image = DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_INSTRUCTION_POINTER_TOP);
- } else {
- image = DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_INSTRUCTION_POINTER);
- }
- }
- }
- if (defaultAnnotation) {
- annotation = new InstructionPointerAnnotation(frame, id, text, image);
- } else {
- annotation = new DynamicInstructionPointerAnnotation(frame, id, text);
- }
- }
- return annotation;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IInstructionPointerPresentation#getMarkerAnnotationSpecificationId(org.eclipse.ui.IEditorPart, org.eclipse.debug.core.model.IStackFrame)
- */
- public String getInstructionPointerAnnotationType(IEditorPart editorPart, IStackFrame frame) {
- IDebugModelPresentation presentation = getConfiguredPresentation(frame);
- if (presentation instanceof IInstructionPointerPresentation) {
- return ((IInstructionPointerPresentation)presentation).getInstructionPointerAnnotationType(editorPart, frame);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IInstructionPointerPresentation#getInstructionPointerImage(org.eclipse.ui.IEditorPart, org.eclipse.debug.core.model.IStackFrame)
- */
- public Image getInstructionPointerImage(IEditorPart editorPart, IStackFrame frame) {
- IDebugModelPresentation presentation = getConfiguredPresentation(frame);
- if (presentation instanceof IInstructionPointerPresentation) {
- return ((IInstructionPointerPresentation)presentation).getInstructionPointerImage(editorPart, frame);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IInstructionPointerPresentation#getInstructionPointerText(org.eclipse.ui.IEditorPart, org.eclipse.debug.core.model.IStackFrame)
- */
- public String getInstructionPointerText(IEditorPart editorPart, IStackFrame frame) {
- IDebugModelPresentation presentation = getConfiguredPresentation(frame);
- if (presentation instanceof IInstructionPointerPresentation) {
- return ((IInstructionPointerPresentation)presentation).getInstructionPointerText(editorPart, frame);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDebugModelPresentationExtension#requiresUIThread(java.lang.Object)
- */
- public boolean requiresUIThread(Object element) {
- IDebugModelPresentation presentation = getConfiguredPresentation(element);
- if (presentation == null) {
- // default label provider will be used
- return !DebugPluginImages.isInitialized();
- }
- if (presentation instanceof IDebugModelPresentationExtension) {
- return ((IDebugModelPresentationExtension)presentation).requiresUIThread(element);
- }
- return false;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DynamicInstructionPointerAnnotation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DynamicInstructionPointerAnnotation.java
deleted file mode 100644
index 6ca45c4..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DynamicInstructionPointerAnnotation.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.jface.text.source.Annotation;
-
-/**
- * Client specified instruction pointer annotation.
- */
-public class DynamicInstructionPointerAnnotation extends Annotation {
-
- /**
- * The frame for this instruction pointer annotation. This is necessary only so that
- * instances of this class can be distinguished by equals().
- */
- private IStackFrame fStackFrame;
-
- /**
- *
- * @param frame
- * @param markerAnnotationSpecificationId
- * @param text
- */
- public DynamicInstructionPointerAnnotation(IStackFrame frame, String markerAnnotationSpecificationId, String text) {
- super(markerAnnotationSpecificationId, false, text);
- fStackFrame = frame;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object other) {
- if (other instanceof DynamicInstructionPointerAnnotation) {
- return getStackFrame().equals(((DynamicInstructionPointerAnnotation)other).getStackFrame());
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getStackFrame().hashCode();
- }
-
- /**
- * Returns the stack frame associated with this annotation
- *
- * @return the stack frame associated with this annotation
- */
- private IStackFrame getStackFrame() {
- return fStackFrame;
- }
-
-}
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 ace7df9..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * QNX Software Systems - Mikhail Khodjaiants - Registers View (Bug 53640)
- * Wind River Systems - Pawel Piech - Added Modules view (bug 211158)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-/**
- * Help context ids for the debug ui.
- * <p>
- * This interface contains constants only; it is not intended to be implemented
- * or extended.
- * </p>
- *
- */
-public interface IDebugHelpContextIds {
-
- public static final String PREFIX = IDebugUIConstants.PLUGIN_ID + "."; //$NON-NLS-1$
-
- // Actions
- public static final String CHANGE_VALUE_ACTION = PREFIX + "change_value_action_context"; //$NON-NLS-1$
- public static final String OPEN_BREAKPOINT_ACTION = PREFIX + "open_breakpoint_action_context"; //$NON-NLS-1$
- public static final String RELAUNCH_HISTORY_ACTION = PREFIX + "relaunch_history_action_context"; //$NON-NLS-1$
- public static final String SHOW_BREAKPOINTS_FOR_MODEL_ACTION = PREFIX + "show_breakpoints_for_model_action_context"; //$NON-NLS-1$
- public static final String COPY_BREAKPOINTS_ACTION = PREFIX + "copy_breakpoints_action_context"; //$NON-NLS-1$
- public static final String PASTE_BREAKPOINTS_ACTION = PREFIX + "paste_breakpoints_action_context"; //$NON-NLS-1$
- public static final String SHOW_TYPES_ACTION = PREFIX + "show_types_action_context"; //$NON-NLS-1$
- public static final String VARIABLES_CONTENT_PROVIDERS_ACTION = PREFIX + "variables_content_providers_action_context"; //$NON-NLS-1$
- public static final String VARIABLES_SELECT_LOGICAL_STRUCTURE = PREFIX + "variables_select_logical_structure"; //$NON-NLS-1$
- public static final String VARIABLES_SELECT_DETAIL_PANE = PREFIX + "variables_select_detail_pane_action_context"; //$NON-NLS-1$
- public static final String VARIABLES_AUTO_EXPAND = PREFIX + "variables_auto_expand_action_context"; //$NON-NLS-1$
- public static final String SELECT_WORKING_SET_ACTION = PREFIX + "select_working_set_context"; //$NON-NLS-1$
- public static final String CLEAR_WORKING_SET_ACTION = PREFIX + "clear_working_set_context"; //$NON-NLS-1$
- public static final String EDIT_LAUNCH_CONFIGURATION_ACTION = PREFIX + "edit_launch_configuration_action_context"; //$NON-NLS-1$
- public static final String OPEN_LAUNCH_CONFIGURATION_ACTION = PREFIX + "open_launch_configuration_action_context"; //$NON-NLS-1$
- public static final String LINK_BREAKPOINTS_WITH_DEBUG_ACTION= PREFIX + "link_breakpoints_with_debug_context"; //$NON-NLS-1$
- public static final String EDIT_SOURCELOOKUP_ACTION = PREFIX + "edit_source_lookup_path_context";//$NON-NLS-1$
- public static final String LOOKUP_SOURCE_ACTION = PREFIX + "lookup_source_context";//$NON-NLS-1$
- public static final String SKIP_ALL_BREAKPOINT_ACTION = PREFIX + "skip_all_breakpoints_context"; //$NON-NLS-1$
- public static final String AUTO_MANAGE_VIEWS_ACTION = PREFIX + "auto_manage_views_context"; //$NON-NLS-1$
- public static final String FIND_ELEMENT_ACTION = PREFIX + "find_element_context"; //$NON-NLS-1$
- public static final String DETAIL_PANE = PREFIX + "detail_pane_context"; //$NON-NLS-1$
- public static final String DETAIL_PANE_ASSIGN_VALUE_ACTION = PREFIX + "detail_pane_assign_value_action_context"; //$NON-NLS-1$
- public static final String DETAIL_PANE_CONTENT_ASSIST_ACTION = PREFIX + "detail_pane_content_assist_action_context"; //$NON-NLS-1$
- public static final String DETAIL_PANE_CUT_ACTION = PREFIX + "detail_pane_cut_action_context"; //$NON-NLS-1$
- public static final String DETAIL_PANE_COPY_ACTION = PREFIX + "detail_pane_copy_action_context"; //$NON-NLS-1$
- public static final String DETAIL_PANE_PASTE_ACTION = PREFIX + "detail_pane_paste_action_context"; //$NON-NLS-1$
- public static final String DETAIL_PANE_SELECT_ALL_ACTION = PREFIX + "detail_pane_select_all_action_context"; //$NON-NLS-1$
- public static final String DETAIL_PANE_FIND_REPLACE_ACTION = PREFIX + "detail_pane_find_replace_action_context"; //$NON-NLS-1$
- public static final String DETAIL_PANE_WORD_WRAP_ACTION = PREFIX + "detail_pane_word_wrap_action_context"; //$NON-NLS-1$
- public static final String DETAIL_PANE_MAX_LENGTH_ACTION = PREFIX + "detail_pane_max_length_action_context"; //$NON-NLS-1$
- public static final String CONSOLE_TERMINATE_ACTION = PREFIX + "console_terminate_action_context"; //$NON-NLS-1$
- public static final String CONSOLE_REMOVE_ALL_TERMINATED = PREFIX + "console_remove_all_terminated_context"; //$NON-NLS-1$
- public static final String CONSOLE_REMOVE_LAUNCH = PREFIX + "console_remove_launch_context"; //$NON-NLS-1$;
- public static final String CONSOLE_SHOW_PREFERENCES = PREFIX + "console_show_preferences_action_context"; //$NON-NLS-1$
- public static final String SHOW_COLUMNS_ACTION = PREFIX + "show_columns_context"; //$NON-NLS-1$;
- public static final String CONFIGURE_COLUMNS_ACTION = PREFIX + "configure_columns_context"; //$NON-NLS-1$;
- public static final String MEMORY_VIEW_PANE_ORIENTATION_ACTION = PREFIX + "memory_view_pane_orientation_action_context"; //$NON-NLS-1$
- public static final String SHOW_WHEN_STDOUT_CHANGES_ACTION = PREFIX + "show_stdout_action_context"; //$NON-NLS-1$
- public static final String SHOW_WHEN_STDERR_CHANGES_ACTION = PREFIX + "show_stderr_action_context"; //$NON-NLS-1$
- public static final String HORIZONTAL_DETAIL_PANE_LAYOUT_ACTION = PREFIX + "horizontal_detail_pane_layout_action_context"; //$NON-NLS-1$
- public static final String VERTICAL_DETAIL_PANE_LAYOUT_ACTION = PREFIX + "vertical_detail_pane_layout_action_context"; //$NON-NLS-1$
- public static final String DETAIL_PANE_HIDDEN_LAYOUT_ACTION = PREFIX + "detail_pane_hidden_layout_action_context"; //$NON-NLS-1$
- public static final String DEBUG_VIEW_MODE_AUTO_ACTION = PREFIX + "debug_view_mode_auto_action_context"; //$NON-NLS-1$
- public static final String DEBUG_VIEW_MODE_FULL_ACTION = PREFIX + "debug_view_mode_full_action_context"; //$NON-NLS-1$
- public static final String DEBUG_VIEW_MODE_COMPACT_ACTION = PREFIX + "debug_view_mode_compact_action_context"; //$NON-NLS-1$
- public static final String DEBUG_VIEW_DROP_DOWN_AUTOEXPAND_ACTION = PREFIX + "debug_view_drop_down_autoexpand_action_context"; //$NON-NLS-1$
-
- // Views
- public static final String DEBUG_VIEW = PREFIX + "debug_view_context"; //$NON-NLS-1$
- public static final String VARIABLE_VIEW = PREFIX + "variable_view_context"; //$NON-NLS-1$
- public static final String BREAKPOINT_VIEW = PREFIX + "breakpoint_view_context"; //$NON-NLS-1$
- public static final String EXPRESSION_VIEW = PREFIX + "expression_view_context"; //$NON-NLS-1$
- public static final String LAUNCH_CONFIGURATION_VIEW = PREFIX + "launch_configuration_view_context"; //$NON-NLS-1$
- public static final String REGISTERS_VIEW = PREFIX + "registers_view_context"; //$NON-NLS-1$
- public static final String PROCESS_CONSOLE = PREFIX + "process_console_context"; //$NON-NLS-1$
- public static final String MODULES_VIEW = PREFIX + "modules_view_context"; //$NON-NLS-1$
-
- // Preference pages
- public static final String DEBUG_PREFERENCE_PAGE = PREFIX + "debug_preference_page_context"; //$NON-NLS-1$
- public static final String CONSOLE_PREFERENCE_PAGE = PREFIX + "console_preference_page_context"; //$NON-NLS-1$
- public static final String SIMPLE_VARIABLE_PREFERENCE_PAGE = PREFIX + "simple_variable_preference_page_context"; //$NON-NLS-1$
- public static final String PERSPECTIVE_PREFERENCE_PAGE = PREFIX + "perspective_preference_page_context"; //$NON-NLS-1$
- public static final String LAUNCHING_PREFERENCE_PAGE = PREFIX + "launching_preference_page_context"; //$NON-NLS-1$
- public static final String LAUNCH_CONFIGURATION_PREFERENCE_PAGE = PREFIX + "launch_configuration_preference_page_context"; //$NON-NLS-1$
- public static final String VIEW_MANAGEMENT_PREFERENCE_PAGE = PREFIX + "view_management_preference_page_context"; //$NON-NLS-1$
- public static final String LAUNCH_DELEGATES_PREFERENCE_PAGE = PREFIX + "launch_delegate_preference_page_context"; //$NON-NLS-1$
-
- // Dialogs
- public static final String LAUNCH_CONFIGURATION_DIALOG = PREFIX + "launch_configuration_dialog"; //$NON-NLS-1$
- public static final String LAUNCH_CONFIGURATION_PROPERTIES_DIALOG = PREFIX + "launch_configuration_properties_dialog"; //$NON-NLS-1$
- public static final String SINGLE_LAUNCH_CONFIGURATION_DIALOG = PREFIX + "single_launch_configuration_dialog"; //$NON-NLS-1$
- public static final String VARIABLE_SELECTION_DIALOG = PREFIX + "variable_selection_dialog_context"; //$NON-NLS-1$
- public static final String EDIT_SOURCELOOKUP_DIALOG = PREFIX + "edit_source_lookup_path_dialog";//$NON-NLS-1$
- public static final String SOURCELOOKUP_TAB = PREFIX + "launch_configuration_dialog_source_tab";//$NON-NLS-1$
- public static final String ADD_SOURCE_CONTAINER_DIALOG = PREFIX + "add_source_container_dialog";//$NON-NLS-1$
- public static final String ADD_PROJECT_CONTAINER_DIALOG = PREFIX + "project_source_container_dialog";//$NON-NLS-1$
- public static final String ADD_FOLDER_CONTAINER_DIALOG = PREFIX + "folder_source_container_dialog";//$NON-NLS-1$
- public static final String ADD_ARCHIVE_CONTAINER_DIALOG = PREFIX + "archive_source_container_dialog";//$NON-NLS-1$
- public static final String MULTIPLE_SOURCE_DIALOG = PREFIX + "multiple_source_selection_dialog";//$NON-NLS-1$
- public static final String ADD_WATCH_EXPRESSION_DIALOG= PREFIX + "add_watch_expression_dialog_context"; //$NON-NLS-1$
- public static final String EDIT_WATCH_EXPRESSION_DIALOG = PREFIX + "edit_watch_expression_dialog_context"; //$NON-NLS-1$
- public static final String FIND_ELEMENT_DIALOG = PREFIX + "find_element_dialog_context"; //$NON-NLS-1$
- public static final String CONFIGURE_COLUMNS_DIALOG = PREFIX + "configure_columns_dialog_context"; //$NON-NLS-1$;
- public static final String GROUP_BREAKPOINTS_DIALOG = PREFIX + "group_breakpoints_dialog_context"; //$NON-NLS-1$
- public static final String ORGANIZE_FAVORITES_DIALOG = PREFIX + "organize_favorites_dialog_context"; //$NON-NLS-1$
- public static final String SELECT_DEFAULT_WORKINGSET_DIALOG = PREFIX + "select_breakpoint_workingset_dialog"; //$NON-NLS-1$
- public static final String DELETE_ASSOCIATED_LAUNCH_CONFIGS_DIALOG = PREFIX + "delete_associated_launch_configs_dialog"; //$NON-NLS-1$
- public static final String SELECT_LAUNCH_MODES_DIALOG = PREFIX + "select_launch_modes_dialog"; //$NON-NLS-1$
- public static final String SELECT_LAUNCHERS_DIALOG = PREFIX + "select_launchers_dialog"; //$NON-NLS-1$
- public static final String SELECT_RESOURCES_TO_SAVE_DIALOG = PREFIX + "select_resources_to_save_dialog"; //$NON-NLS-1$
- public static final String SELECT_LAUNCH_METHOD_DIALOG = PREFIX + "select_launch_method_dialog"; //$NON-NLS-1$
- public static final String SELECT_LAUNCH_CONFIGURATION_DIALOG = PREFIX + "select_launch_configuration_dialog"; //$NON-NLS-1$
- public static final String SELECT_DIRECTORY_SOURCE_CONTAINER_DIALOG = PREFIX + "select_directory_source_container_dialog"; //$NON-NLS-1$
- public static final String SELECT_CONFIGURATION_TYPE_DIALOG = PREFIX + "select_configuration_type_dialog"; //$NON-NLS-1$
- public static final String SELECT_FAVORITES_DIALOG = PREFIX + "select_favorites_dialog"; //$NON-NLS-1$
- public static final String SELECT_NATIVE_ENVIRONMENT_DIALOG = PREFIX + "select_native_environment_dialog"; //$NON-NLS-1$
- public static final String SELECT_LAUNCH_CONFIGURATION_MIGRATION_DIALOG = PREFIX + "select_launch_configuration_migration_dialog"; //$NON-NLS-1$
-
- // Property pages
- public static final String PROCESS_PROPERTY_PAGE = PREFIX + "process_property_page_context"; //$NON-NLS-1$
- public static final String PROCESS_PAGE_RUN_AT = PREFIX + "process_page_run_at_time_widget"; //$NON-NLS-1$
- public static final String RUN_DEBUG_RESOURCE_PROPERTY_PAGE = PREFIX + "run_debug_resource_property_page"; //$NON-NLS-1$
-
- // Launch configuration dialog pages
- public static final String LAUNCH_CONFIGURATION_DIALOG_COMMON_TAB = PREFIX + "launch_configuration_dialog_common_tab"; //$NON-NLS-1$
- public static final String LAUNCH_CONFIGURATION_DIALOG_PERSPECTIVE_TAB = PREFIX + "launch_configuration_dialog_perspective_tab"; //$NON-NLS-1$
- public static final String LAUNCH_CONFIGURATION_DIALOG_REFRESH_TAB = PREFIX + "launch_configuration_dialog_refresh_tab"; //$NON-NLS-1$
- public static final String LAUNCH_CONFIGURATION_DIALOG_ENVIRONMENT_TAB = PREFIX + "launch_configuration_dialog_environment_tab"; //$NON-NLS-1$
-
- // Working set page
- public static final String WORKING_SET_PAGE = PREFIX + "working_set_page_context"; //$NON-NLS-1$
-
- //Wizards
- public static final String IMPORT_BREAKPOINTS_WIZARD_PAGE = PREFIX + "import_breakpoints_wizard_page_context"; //$NON-NLS-1$
- public static final String EXPORT_BREAKPOINTS_WIZARD_PAGE = PREFIX + "export_breakpoints_wizard_page_context"; //$NON-NLS-1$
- public static final String IMPORT_LAUNCH_CONFIGURATIONS_PAGE = PREFIX + "import_launch_configurations_context"; //$NON-NLS-1$
- public static final String EXPORT_LAUNCH_CONFIGURATIONS_PAGE = PREFIX + "export_launch_configurations_context"; //$NON-NLS-1$
-
- //Editor
- public static final String NO_SOURCE_EDITOR = PREFIX + "debugger_editor_no_source_common";//$NON-NLS-1$
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java
deleted file mode 100644
index ccaf43b..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java
+++ /dev/null
@@ -1,430 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * QNX Software Systems - Mikhail Khodjaiants - Bug 114664
- * Wind River Systems - Pawel Piech - Added Modules view (bug 211158)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-import org.eclipse.debug.internal.ui.views.memory.MemoryBlocksTreeViewPane;
-import org.eclipse.debug.internal.ui.views.memory.RenderingViewPane;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-
-public interface IInternalDebugUIConstants {
-
- public static final String DIALOGSTORE_LASTEXTJAR= "org.eclipse.debug.ui.lastextjar"; //$NON-NLS-1$
-
- //Folders
- public static final String ID_NAVIGATOR_FOLDER_VIEW= "org.eclipse.debug.internal.ui.NavigatorFolderView"; //$NON-NLS-1$
- public static final String ID_TOOLS_FOLDER_VIEW= "org.eclipse.debug.internal.ui.ToolsFolderView"; //$NON-NLS-1$
- public static final String ID_CONSOLE_FOLDER_VIEW= "org.eclipse.debug.internal.ui.ConsoleFolderView"; //$NON-NLS-1$
- public static final String ID_OUTLINE_FOLDER_VIEW= "org.eclipse.debug.internal.ui.OutlineFolderView"; //$NON-NLS-1$
-
- // tool images
- public static final String IMG_LCL_COLLAPSE_ALL = "IMG_LCL_COLLAPSE_ALL"; //$NON-NLS-1$
- public static final String IMG_LCL_TERMINATE = "IMG_LCL_TERMINATE"; //$NON-NLS-1$
- public static final String IMG_LCL_SHOW_LOGICAL_STRUCTURE = "IMG_LCL_SHOW_LOGICAL_STRUCTURE"; //$NON-NLS-1$
- public static final String IMG_LCL_RUN_TO_LINE= "IMG_LCL_RUN_TO_LINE"; //$NON-NLS-1$
- public static final String IMG_SRC_LOOKUP_MENU = "IMG_SRC_LOOKUP_MENU"; //$NON-NLS-1$
- public static final String IMG_LCL_MONITOR_EXPRESSION= "IMG_LCL_MONITOR_EXPRESSION"; //$NON-NLS-1$
- public static final String IMG_LCL_REMOVE_MEMORY= "IMG_LCL_REMOVE_MEMORY"; //$NON-NLS-1$
- public static final String IMG_LCL_RESET_MEMORY= "IMG_LCL_RESET_MEMORY";//$NON-NLS-1$
- public static final String IMG_LCL_COPY_VIEW_TO_CLIPBOARD = "IMG_LCL_COPY_VIEW_TO_CLIPBOARD"; //$NON-NLS-1$
- public static final String IMG_LCL_PRINT_TOP_VIEW_TAB = "IMG_LCL_PRINT_TOP_VIEW_TAB"; //$NON-NLS-1$
-
- // disabled local tool images
- public static final String IMG_DLCL_LOCK= "IMG_DLCL_LOCK"; //$NON-NLS-1$
- public static final String IMG_DLCL_DETAIL_PANE= "IMG_DLCL_DETAIL_PANE"; //$NON-NLS-1$
- public static final String IMG_DLCL_CHANGE_VARIABLE_VALUE= "IMG_DLCL_CHANGE_VARIABLE_VALUE"; //$NON-NLS-1$
- public static final String IMG_DLCL_TYPE_NAMES= "IMG_DLCL_TYPE_NAMES"; //$NON-NLS-1$
- public static final String IMG_DLCL_SHOW_LOGICAL_STRUCTURE= "IMG_DLCL_SHOW_LOGICAL_STRUCTURE"; //$NON-NLS-1$
- public static final String IMG_DLCL_DETAIL_PANE_UNDER= "IMG_DLCL_DETAIL_PANE_UNDER"; //$NON-NLS-1$
- public static final String IMG_DLCL_DETAIL_PANE_RIGHT= "IMG_DLCL_DETAIL_PANE_RIGHT"; //$NON-NLS-1$
- public static final String IMG_DLCL_DETAIL_PANE_HIDE= "IMG_DLCL_DETAIL_PANE_HIDE"; //$NON-NLS-1$
- public static final String IMG_DLCL_COLLAPSE_ALL = "IMG_DLCL_COLLAPSE_ALL"; //$NON-NLS-1$
- public static final String IMG_DLCL_TERMINATE = "IMG_DLCL_TERMINATE"; //$NON-NLS-1$
- public static final String IMG_DLCL_REMOVE_ALL = "IMG_DLCL_REMOVE_ALL"; //$NON-NLS-1$
- public static final String IMG_DLCL_REMOVE = "IMG_DLCL_REMOVE"; //$NON-NLS-1$
- public static final String IMG_DLCL_RUN_TO_LINE= "IMG_DLCL_RUN_TO_LINE"; //$NON-NLS-1$
- public static final String IMG_SRC_LOOKUP_MENU_DLCL = "IMG_SRC_LOOKUP_MENU_DISABLED"; //$NON-NLS-1$
- public static final String IMG_DLCL_MONITOR_EXPRESSION= "IMG_DLCL_MONITOR_EXPRESSION"; //$NON-NLS-1$
- public static final String IMG_DLCL_REMOVE_MEMORY= "IMG_DLCL_REMOVE_MEMORY"; //$NON-NLS-1$
- public static final String IMG_DLCL_RESET_MEMORY= "IMG_DLCL_RESET_MEMORY"; //$NON-NLS-1$
- public static final String IMG_DLCL_COPY_VIEW_TO_CLIPBOARD= "IMG_DLCL_COPY_VIEW_TO_CLIPBOARD"; //$NON-NLS-1$
- public static final String IMG_DLCL_PRINT_TOP_VIEW_TAB= "IMG_DLCL_PRINT_TOP_VIEW_TAB"; //$NON-NLS-1$
- public static final String IMG_DLCL_NEW_CONFIG = "IMG_DLCL_NEW_CONFIG"; //$NON-NLS-1$
- public static final String IMG_DLCL_DUPLICATE_CONFIG = "IMG_DLCL_DUPLICATE_CONFIG"; //$NON-NLS-1$
- public static final String IMG_DLCL_DELETE_CONFIG = "IMG_DLCL_DELETE_CONFIG"; //$NON-NLS-1$
- public static final String IMG_DLCL_FILTER_CONFIGS = "IMG_DLCL_FILTER_CONFIGS"; //$NON-NLS-1$
- public static final String IMG_DLCL_SUSPEND = "IMG_DLCL_SUSPEND"; //$NON-NLS-1$
- public static final String IMG_DLCL_RESUME = "IMG_DLCL_RESUME"; //$NON-NLS-1$
- public static final String IMG_DLCL_STEP_RETURN = "IMG_DLCL_STEP_RETURN"; //$NON-NLS-1$
- public static final String IMG_DLCL_STEP_OVER = "IMG_DLCL_STEP_OVER"; //$NON-NLS-1$
- public static final String IMG_DLCL_STEP_INTO = "IMG_DLCL_STEP_INTO"; //$NON-NLS-1$
- public static final String IMG_DLCL_TERMINATE_AND_REMOVE = "IMG_DLCL_TERMINATE_AND_REMOVE"; //$NON-NLS-1$
- public static final String IMG_DLCL_TERMINATE_ALL = "IMG_DLCL_TERMINATE_ALL"; //$NON-NLS-1$
- public static final String IMG_DLCL_TERMINATE_AND_RELAUNCH = "IMG_DLCL_TERMINATE_AND_RELAUNCH"; //$NON-NLS-1$
- public static final String IMG_DLCL_TOGGLE_STEP_FILTERS = "IMG_DLCL_TOGGLE_STEP_FILTERS"; //$NON-NLS-1$
- public static final String IMG_DLCL_NEXT_THREAD = "IMG_DLCL_NEXT_THREAD"; //$NON-NLS-1$
- public static final String IMG_DLCL_PREVIOUS_THREAD = "IMG_DLCL_PREVIOUS_THREAD"; //$NON-NLS-1$
- public static final String IMG_DLCL_RESTART = "IMG_DLCL_RESTART"; //$NON-NLS-1$
-
- //TODO: Move this IDebugUIConstants. Created too late in 3.2 cycle to add API.
- //The enabled icon is already API.
- public static final String IMG_DLCL_DISCONNECT= "IMG_DLCL_DISCONNECT"; //$NON-NLS-1$
-
- // enabled local tool images
- public static final String IMG_ELCL_LOCK= "IMG_ELCL_LOCK"; //$NON-NLS-1$
- public static final String IMG_ELCL_DETAIL_PANE= "IMG_ELCL_DETAIL_PANE"; //$NON-NLS-1$
- public static final String IMG_ELCL_CHANGE_VARIABLE_VALUE= "IMG_ELCL_CHANGE_VARIABLE_VALUE"; //$NON-NLS-1$
- public static final String IMG_ELCL_TYPE_NAMES= "IMG_ELCL_TYPE_NAMES"; //$NON-NLS-1$
- public static final String IMG_ELCL_SHOW_LOGICAL_STRUCTURE= "IMG_ELCL_SHOW_LOGICAL_STRUCTURE"; //$NON-NLS-1$
- public static final String IMG_ELCL_DETAIL_PANE_UNDER= "IMG_ELCL_DETAIL_PANE_UNDER"; //$NON-NLS-1$
- public static final String IMG_ELCL_DETAIL_PANE_RIGHT= "IMG_ELCL_DETAIL_PANE_RIGHT"; //$NON-NLS-1$
- public static final String IMG_ELCL_DETAIL_PANE_HIDE= "IMG_ELCL_DETAIL_PANE_HIDE"; //$NON-NLS-1$
- public static final String IMG_ELCL_COLLAPSE_ALL = "IMG_ELCL_COLLAPSE_ALL"; //$NON-NLS-1$
- public static final String IMG_ELCL_TERMINATE = "IMG_ELCL_TERMINATE"; //$NON-NLS-1$
- public static final String IMG_SRC_LOOKUP_MENU_ELCL = "IMG_SRC_LOOKUP_MENU_ENABLED"; //$NON-NLS-1$
- public static final String IMG_ELCL_MONITOR_EXPRESSION= "IMG_ELCL_MONITOR_EXPRESSION"; //$NON-NLS-1$
- public static final String IMG_ELCL_REMOVE_MEMORY= "IMG_ELCL_REMOVE_MEMORY"; //$NON-NLS-1$
- public static final String IMG_ELCL_RESET_MEMORY= "IMG_ELCL_RESET_MEMORY"; //$NON-NLS-1$
- public static final String IMG_ELCL_COPY_VIEW_TO_CLIPBOARD= "IMG_ELCL_COPY_VIEW_TO_CLIPBOARD"; //$NON-NLS-1$
- public static final String IMG_ELCL_PRINT_TOP_VIEW_TAB= "IMG_ELCL_PRINT_TOP_VIEW_TAB"; //$NON-NLS-1$
- public static final String IMG_ELCL_REMOVE_ALL = "IMG_ELCL_REMOVE_ALL"; //$NON-NLS-1$
- public static final String IMG_ELCL_REMOVE = "IMG_ELCL_REMOVE"; //$NON-NLS-1$
- public static final String IMG_ELCL_HIERARCHICAL = "IMG_ELCL_HIERARCHICAL"; //$NON-NLS-1$
- public static final String IMG_ELCL_HELP = "IMG_ELCL_HELP"; //$NON-NLS-1$
- public static final String IMG_ELCL_NEW_CONFIG = "IMG_ELCL_NEW_CONFIG"; //$NON-NLS-1$
- public static final String IMG_ELCL_DELETE_CONFIG = "IMG_ELCL_DELETE_CONFIG"; //$NON-NLS-1$
- public static final String IMG_ELCL_FILTER_CONFIGS = "IMG_ELCL_FILTER_CONFIGS"; //$NON-NLS-1$
- public static final String IMG_ELCL_DUPLICATE_CONFIG = "IMG_ELCL_DUPLICATE_CONFIG"; //$NON-NLS-1$
- public static final String IMG_ELCL_SUSPEND = "IMG_ELCL_SUSPEND"; //$NON-NLS-1$
- public static final String IMG_ELCL_RESUME = "IMG_ELCL_RESUME"; //$NON-NLS-1$
- public static final String IMG_ELCL_STEP_RETURN = "IMG_ELCL_STEP_RETURN"; //$NON-NLS-1$
- public static final String IMG_ELCL_STEP_OVER = "IMG_ELCL_STEP_OVER"; //$NON-NLS-1$
- public static final String IMG_ELCL_STEP_INTO = "IMG_ELCL_STEP_INTO"; //$NON-NLS-1$
- public static final String IMG_ELCL_DROP_TO_FRAME = "IMG_ELCL_DROP_TO_FRAME"; //$NON-NLS-1$
- public static final String IMG_ELCL_TERMINATE_AND_REMOVE = "IMG_ELCL_TERMINATE_AND_REMOVE"; //$NON-NLS-1$
- public static final String IMG_ELCL_TERMINATE_ALL = "IMG_ELCL_TERMINATE_ALL"; //$NON-NLS-1$
- public static final String IMG_ELCL_TERMINATE_AND_RELAUNCH = "IMG_ELCL_TERMINATE_AND_RELAUNCH"; //$NON-NLS-1$
- public static final String IMG_ELCL_TOGGLE_STEP_FILTERS = "IMG_ELCL_TOGGLE_STEP_FILTERS"; //$NON-NLS-1$
- public static final String IMG_ELCL_STANDARD_OUT = "IMG_ELCL_STANDARD_OUT"; //$NON-NLS-1$
- public static final String IMG_ELCL_STANDARD_ERR = "IMG_ELCL_STANDARD_ERR"; //$NON-NLS-1$
- public static final String IMG_ELCL_NEXT_THREAD = "IMG_ELCL_NEXT_THREAD"; //$NON-NLS-1$
- public static final String IMG_ELCL_PREVIOUS_THREAD = "IMG_ELCL_PREVIOUS_THREAD"; //$NON-NLS-1$
- public static final String IMG_ELCL_RESTART = "IMG_ELCL_RESTART"; //$NON-NLS-1$
-
- public static final String IMG_OBJS_COMMON_TAB = "IMG_OBJS_COMMON_TAB"; //$NON-NLS-1$
- public static final String IMG_OBJS_REFRESH_TAB = "IMG_OBJS_REFRESH_TAB"; //$NON-NLS-1$
- public static final String IMG_OBJS_PERSPECTIVE_TAB = "IMG_OBJS_PERSPECTIVE_TAB"; //$NON-NLS-1$
- public static final String IMG_OBJS_ARRAY_PARTITION = "IMG_OBJS_ARRAY_PARTITION"; //$NON-NLS-1$
- public static final String IMG_SRC_LOOKUP_TAB = "IMG_SRC_LOOKUP_TAB"; //$NON-NLS-1$
- public static final String IMG_OBJECT_MEMORY_CHANGED="IMG_OBJECT_MEMORY_CHANGED"; //$NON-NLS-1$
- public static final String IMG_OBJECT_MEMORY="IMG_OBJECT_MEMORY"; //$NON-NLS-1$
- public static final String IMG_OBJS_BREAKPOINT_TYPE="IMG_OBJ_BREAKPOINT_TYPE"; //$NON-NLS-1$
-
- // wizard images
- public static final String IMG_WIZBAN_IMPORT_BREAKPOINTS = "IMG_WIZBAN_IMPORT_BREAKPOINTS"; //$NON-NLS-1$
- public static final String IMG_WIZBAN_EXPORT_BREAKPOINTS = "IMG_WIZBAN_EXPORT_BREAKPOINTS"; //$NON-NLS-1$
- public static final String IMG_WIZBAN_IMPORT_CONFIGS = "IMG_WIZBAN_IMPORT_CONFIGS"; //$NON-NLS-1$
- public static final String IMG_WIZBAN_EXPORT_CONFIGS = "IMG_WIZBAN_EXPORT_CONFIGS"; //$NON-NLS-1$
- public static final String IMG_ADD_SRC_LOC_WIZ = "IMG_ADD_SRC_LOCATION"; //$NON-NLS-1$
- public static final String IMG_EDIT_SRC_LOC_WIZ = "IMG_EDIT_SRC_LOCATION"; //$NON-NLS-1$
- public static final String IMG_ADD_SRC_DIR_WIZ = "IMG_ADD_SRC_DIRECTORY"; //$NON-NLS-1$
- public static final String IMG_EDIT_SRC_DIR_WIZ = "IMG_EDIT_SRC_DIRECTORY"; //$NON-NLS-1$
-
- // internal preferences
- /**
- * XML for perspective settings - see PerspectiveManager.
- * @since 3.0
- */
- public static final String PREF_LAUNCH_PERSPECTIVES = IDebugUIConstants.PLUGIN_ID + ".PREF_LAUNCH_PERSPECTIVES"; //$NON-NLS-1$
-
- /**
- * Preference for enabling/disabling launch configuration filtering based on project accessibility status
- *
- * @since 3.2
- */
- public static final String PREF_FILTER_LAUNCH_CLOSED = IDebugUIConstants.PLUGIN_ID + ".PREF_FILTER_LAUNCH_CLOSED"; //$NON-NLS-1$
-
- /**
- * Preference for enabling/disabling launch configuration filtering based on project context
- *
- * @since 3.2
- */
- public static final String PREF_FILTER_LAUNCH_DELETED = IDebugUIConstants.PLUGIN_ID + ".PREF_FILTER_LAUNCH_DELETED"; //$NON-NLS-1$
-
- /**
- * Preference for enabling/disabling filtering based on selected items from the launch configuration type table
- * @since 3.2
- */
- public static final String PREF_FILTER_LAUNCH_TYPES = IDebugUIConstants.PLUGIN_ID + ".PREF_FILTER_LAUNCH_TYPES"; //$NON-NLS-1$
-
- /**
- * Preference that saves which launch configuration types have been checked on the Launch Configurations pref page
- * @since 3.2
- */
- public static final String PREF_FILTER_TYPE_LIST = IDebugUIConstants.PLUGIN_ID + ".PREF_FILTER_TYPE_LIST"; //$NON-NLS-1$
-
- /**
- * Preference for filtering launch configurations based on the currently active working sets
- * @since 3.2
- */
- public static final String PREF_FILTER_WORKING_SETS = IDebugUIConstants.PLUGIN_ID + ".PREF_FILTER_WORKING_SETS"; //$NON-NLS-1$
-
- /**
- * Transparent overlay image identifier.
- */
- public static final String IMG_OVR_TRANSPARENT = "IMG_OVR_TRANSPARENT"; //$NON-NLS-1$
-
- /**
- * Editor Id for the "Source Not Found" editor
- */
- public static final String ID_SOURCE_NOT_FOUND_EDITOR = "org.eclipse.debug.ui.NoSourceFoundEditor"; //$NON-NLS-1$
-
- /**
- * Boolean preference indicating if contextual launch options should be visible
- * to the user rather than the "run as" menu.
- *
- * @since 3.3.0
- * CONTEXTLAUNCHING
- */
- public static final String PREF_USE_CONTEXTUAL_LAUNCH = IDebugUIConstants.PLUGIN_ID + ".UseContextualLaunch"; //$NON-NLS-1$
-
- /**
- * Boolean preference indicating that if the selected resource is not launchable, then we should
- * launch the last configuration that was launched.
- *
- * @since 3.3.0
- * CONTEXTLAUNCHING
- */
- public static final String PREF_LAUNCH_LAST_IF_NOT_LAUNCHABLE = IDebugUIConstants.PLUGIN_ID + ".LaunchLastIfNotLaunchable"; //$NON-NLS-1$
-
- /**
- * Boolean preference indicating if we should always consider the parent project when
- * a selected context is not runnable
- *
- * @since 3.3.0
- * CONTEXTLAUNCHING
- */
- public static final String PREF_LAUNCH_PARENT_PROJECT = IDebugUIConstants.PLUGIN_ID + ".LaunchParentProject"; //$NON-NLS-1$
-
- /**
- * Boolean preference indicating if the user should be prompted prior to removing a launch configuration
- * from the launch history drop down
- *
- * @since 3.4
- */
- public static final String PREF_REMOVE_FROM_LAUNCH_HISTORY = IDebugUIConstants.PLUGIN_ID + ".RemoveFromLaunchHistory"; //$NON-NLS-1$
-
- /**
- * String preference controlling whether editors are saved before launching.
- * Valid values are either "always", "never", or "prompt".
- * If "always" or "never", launching will save editors (or not) automatically.
- * If "prompt", the user will be prompted each time.
- *
- * @since 3.0
- */
- public static final String PREF_SAVE_DIRTY_EDITORS_BEFORE_LAUNCH = IDebugUIConstants.PLUGIN_ID + ".save_dirty_editors_before_launch"; //$NON-NLS-1$
-
- /**
- * Preference specifying that all launches should be DEBUG_MODE if breakpoints exist in the workspace
- * @since 3.0
- */
- public static final String PREF_RELAUNCH_IN_DEBUG_MODE = IDebugUIConstants.PLUGIN_ID + ".relaunch_in_debug_mode"; //$NON-NLS-1$
-
- /**
- * Preference specifying that launches should continue when compile errors exist.
- * @since 3.0
- */
- public static final String PREF_CONTINUE_WITH_COMPILE_ERROR = IDebugUIConstants.PLUGIN_ID + ".cancel_launch_with_compile_errors"; //$NON-NLS-1$
-
- /**
- * Boolean preference controlling whether the debugger will force activate the debug
- * view when a breakpoint is hit.
- *
- * @since 3.0
- */
- public static final String PREF_ACTIVATE_DEBUG_VIEW= IDebugUIConstants.PLUGIN_ID + ".activate_debug_view"; //$NON-NLS-1$
-
- /**
- * String preference controlling whether the debugger switching to
- * the associated perspective when launching.
- * Valid values are either "always", "never", or "prompt".
- * If "always" or "never", launching will switch perspectives (or not) automatically.
- * If "prompt", the user will be prompted each time.
- *
- * @since 3.0
- */
- public static final String PREF_SWITCH_TO_PERSPECTIVE= IDebugUIConstants.PLUGIN_ID + ".switch_to_perspective"; //$NON-NLS-1$
-
- /**
- * String preference controlling whether the debugger switching to
- * the associated perspective when a launch suspends.
- * Valid values are either "always", "never", or "prompt".
- * If "always" or "never", suspension will switch perspectives (or not) automatically.
- * If "prompt", the user will be prompted each time.
- *
- * @since 3.0
- */
- public static final String PREF_SWITCH_PERSPECTIVE_ON_SUSPEND= IDebugUIConstants.PLUGIN_ID + ".switch_perspective_on_suspend"; //$NON-NLS-1$
-
- /**
- * String preference controlling whether the debugger waits for a currently
- * pending (running or waiting) background build to complete before launching.
- * Valid values are either "always", "never", or "prompt".
- * If "always" or "never", launching will wait for builds to finish (or not) automatically.
- * If "prompt", the user will be prompted each time.
- *
- * @since 3.0
- */
- public static final String PREF_WAIT_FOR_BUILD= IDebugUIConstants.PLUGIN_ID + ".wait_for_build"; //$NON-NLS-1$
-
- /**
- * Font for Memory View
- *
- * @since 3.0
- */
- public final static String FONT_NAME = IDebugUIConstants.PLUGIN_ID + ".MemoryViewTableFont"; //$NON-NLS-1$
-
- public final static int ADD_UNIT_PER_LINE = 16; // number of addressable unit per line
- public final static int CHAR_PER_BYTE = 2; // number of characters to represent one byte
-
- /**
- * Memory view's rendering view pane identifier (value <code>"org.eclipse.debug.ui.MemoryView.RenderingViewPane"</code>).
- * @since 3.1
- */
- public static String ID_RENDERING_VIEW_PANE = RenderingViewPane.RENDERING_VIEW_PANE_ID;
-
- /**
- * Memory view's memory block tree viewer's identifier. (value <code>"org.eclipse.debug.ui.MemoryView.MemoryBlocksTreeViewPane"</code>).
- * @since 3.1
- */
- public static String ID_MEMORY_BLOCK_TREE_VIEWER = MemoryBlocksTreeViewPane.PANE_ID;
-
- /**
- * Memory view image identifier
- *
- * @since 3.0
- * */
- public static final String IMG_CVIEW_MEMORY_VIEW= "IMG_CVIEW_MEMORY_VIEW"; //$NON-NLS-1$
-
-
- /**
- * Modules view image identifier
- *
- * @since 3.4
- * */
- public static final String IMG_CVIEW_MODULES_VIEW= "IMG_CVIEW_MODULES_VIEW"; //$NON-NLS-1$
-
- /**
- * Boolean preference controlling whether the debug view tracks
- * views as the user manually opens/closes them for the purpose
- * of not automatically opening/closing such views.
- *
- * @since 3.0
- */
- public static final String PREF_TRACK_VIEWS= IDebugUIConstants.PLUGIN_ID + ".track_views"; //$NON-NLS-1$
-
- /**
- * Comma separated list of view ids closed by the user, that have view context bindings.
- * @since 3.2
- */
- public static final String PREF_USER_VIEW_BINDINGS = IDebugUIConstants.PLUGIN_ID + ".user_view_bindings"; //$NON-NLS-1$
-
- /**
- * Preference storing memento for the default breakpoint working set in
- * the breakpoints view.
- *
- * @since 3.1
- */
- public static final String MEMENTO_BREAKPOINT_WORKING_SET_NAME = DebugUIPlugin.getUniqueIdentifier() + ".MEMENTO_BREAKPOINT_WORKING_SET_NAME"; //$NON-NLS-1$
-
- /**
- * Breakpoint working set identifier.
- *
- * @since 3.1
- * @deprecated There is an API equivalent constant that should be used, see
- * {@link IDebugUIConstants#BREAKPOINT_WORKINGSET_ID}
- */
- public static final String ID_BREAKPOINT_WORKINGSET = "org.eclipse.debug.ui.breakpointWorkingSet"; //$NON-NLS-1$
-
-
- /**
- * Address at the beginning of a page in a table rendering.
- * @since 3.1
- */
- public static final String PROPERTY_PAGE_START_ADDRESS = "pageStart"; //$NON-NLS-1$
-
-
- /**
- * This constant is used as a "quick-fix" for the issue of breakpoint to working set
- * persistence when the state of a project changes.
- *
- * @since 3.2
- */
- public static final String WORKING_SET_NAME = "workingset_name"; //$NON-NLS-1$
-
- /**
- * This constant is used as a "quick-fix" for the issue of breakpoint to working set
- * persistence when the state of a project changes.
- *
- * @since 3.2
- */
- public static final String WORKING_SET_ID = "workingset_id"; //$NON-NLS-1$
-
- /**
- * Annotation type identifier for annotation of the an instruction
- * pointer with a dynamic image. Value is <code>org.eclipse.debug.ui.dynamicIP</code>,
- * identifying a <code>org.eclipse.ui.editors.markerAnnotationSpecification</code>
- * extension.
- *
- * @since 3.2
- */
- public static final String ANNOTATION_TYPE_DYNAMIC_INSTRUCTION_POINTER = "org.eclipse.debug.ui.dynamicIP"; //$NON-NLS-1$
-
- /**
- * Identifier of the external tool builder launch category. Defined here since
- * external tools is actually a dependent plug-in.
- *
- * @since 3.4
- */
- public static final String ID_EXTERNAL_TOOL_BUILDER_LAUNCH_CATEGORY = "org.eclipse.ui.externaltools.builder"; //$NON-NLS-1$
-
- //themes
-
- /**
- * Theme color definition for process console background color.
- *
- * @since 3.4
- */
- public static final String THEME_CONSOLE_COLOR_BACKGROUND= "org.eclipse.debug.ui.console.background"; //$NON-NLS-1$
-
- /**
- * Theme color definition for process console standard out.
- *
- * @since 3.4
- */
- public static final String THEME_CONSOLE_COLOR_STD_OUT= "org.eclipse.debug.ui.console.stream.out"; //$NON-NLS-1$
-
- /**
- * Theme color definition for process console standard in.
- *
- * @since 3.4
- */
- public static final String THEME_CONSOLE_COLOR_STD_IN= "org.eclipse.debug.ui.console.stream.in"; //$NON-NLS-1$
-
- /**
- * Theme color definition for process console standard err.
- *
- * @since 3.4
- */
- public static final String THEME_CONSOLE_COLOR_STD_ERR= "org.eclipse.debug.ui.console.stream.err"; //$NON-NLS-1$
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ILaunchHistoryChangedListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ILaunchHistoryChangedListener.java
deleted file mode 100644
index 1156d2f..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ILaunchHistoryChangedListener.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-/**
- * Implementors of this interface are notified whenever there is a change is
- * made to the launch history. This could be an addition or deletion from either
- * of the run or debug histories, a change to the last launched item, or a
- * change in favorites.
- */
-public interface ILaunchHistoryChangedListener {
-
- /**
- * Notification that the launch history has changed. Any of the run history, debug history
- * or last launched items could have changed. To examine the history items, retrieve them
- * from the <code>DebugUIPlugin</code>.
- */
- public void launchHistoryChanged();
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ILaunchLabelChangedListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ILaunchLabelChangedListener.java
deleted file mode 100644
index fe30134..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ILaunchLabelChangedListener.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-import org.eclipse.debug.ui.ILaunchGroup;
-
-/**
- * Implementors of this interface are notified when a changed has been made to
- * the cache of context sensitive labels stored in the <code>LaunchingResourceManager</code>.
- * A change can come from either a selection change, or from a change to the launch history(s).
- *
- * <p>
- * Clients are intended to implement this interface
- * </p>
- *
- * @since 3.3
- */
-public interface ILaunchLabelChangedListener {
-
- /**
- * This method is called back to by <code>LaunchingResourceManager</code> iff the cache of labels
- * for the current set of listeners has changed
- */
- public void labelChanged();
-
- /**
- * Returns the launch group that this listener is associated with.
- * @return the launch group that this listener is associated with, or <code>null</code> if none
- */
- public ILaunchGroup getLaunchGroup();
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ImageDescriptorRegistry.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ImageDescriptorRegistry.java
deleted file mode 100644
index 35be296..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ImageDescriptorRegistry.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * A registry that maps <code>ImageDescriptors</code> to <code>Image</code>.
- */
-public class ImageDescriptorRegistry {
-
- private HashMap fRegistry= new HashMap(10);
- private Display fDisplay;
-
- /**
- * Creates a new image descriptor registry for the current or default display,
- * respectively.
- */
- public ImageDescriptorRegistry() {
- this(DebugUIPlugin.getStandardDisplay());
- }
-
- /**
- * Creates a new image descriptor registry for the given display. All images
- * managed by this registry will be disposed when the display gets disposed.
- *
- * @param display the display the images managed by this registry are allocated for
- */
- public ImageDescriptorRegistry(Display display) {
- fDisplay= display;
- Assert.isNotNull(fDisplay);
- hookDisplay();
- }
-
- /**
- * Returns the image associated with the given image descriptor.
- *
- * @param descriptor the image descriptor for which the registry manages an image
- * @return the image associated with the image descriptor or <code>null</code>
- * if the image descriptor can't create the requested image.
- */
- public Image get(ImageDescriptor descriptor) {
- if (descriptor == null)
- descriptor= ImageDescriptor.getMissingImageDescriptor();
-
- Image result= (Image)fRegistry.get(descriptor);
- if (result != null)
- return result;
-
- Assert.isTrue(fDisplay == DebugUIPlugin.getStandardDisplay(), DebugUIMessages.ImageDescriptorRegistry_0);
- result= descriptor.createImage();
- if (result != null)
- fRegistry.put(descriptor, result);
- return result;
- }
-
- /**
- * Disposes all images managed by this registry.
- */
- public void dispose() {
- for (Iterator iter= fRegistry.values().iterator(); iter.hasNext(); ) {
- Image image= (Image)iter.next();
- image.dispose();
- }
- fRegistry.clear();
- }
-
- private void hookDisplay() {
- fDisplay.disposeExec(new Runnable() {
- public void run() {
- dispose();
- }
- });
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerAnnotation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerAnnotation.java
deleted file mode 100644
index 38443e0..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerAnnotation.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Default instruction pointer annotation.
- */
-public class InstructionPointerAnnotation extends DynamicInstructionPointerAnnotation {
-
- /**
- * The image for this annotation.
- */
- private Image fImage;
-
- /**
- * Constructs an instruction pointer image.
- *
- * @param frame stack frame the instruction pointer is associated with
- * @param annotationType the type of annotation to display (annotation identifier)
- * @param text the message to display with the annotation as hover help
- * @param image the image used to display the annotation
- */
- public InstructionPointerAnnotation(IStackFrame frame, String annotationType, String text, Image image) {
- super(frame, annotationType, text);
- fImage = image;
- }
-
- /**
- * Returns this annotation's image.
- *
- * @return image
- */
- protected Image getImage() {
- return fImage;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerContext.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerContext.java
deleted file mode 100644
index e7ca30e..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerContext.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-/**
- * Represents the context for a single instruction pointer. This is a convenience class
- * used to store the four objects that comprise an instruction pointer 'context' so it
- * can be stored in collections.
- */
-public class InstructionPointerContext {
-
- /**
- * The thread this context belongs to.
- */
- private IThread fThread;
-
- /**
- * The debug target this context belongs to.
- */
- private IDebugTarget fDebugTarget;
-
- /**
- * The editor that the annotation is being displayed in
- */
- private ITextEditor fEditor;
-
- /**
- * The vertical ruler annotation for this context.
- */
- private Annotation fAnnotation;
-
- public InstructionPointerContext(IDebugTarget target, IThread thread, ITextEditor editor, Annotation annotation) {
- fDebugTarget = target;
- fThread = thread;
- fEditor = editor;
- fAnnotation = annotation;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object other) {
- if (other instanceof InstructionPointerContext) {
- InstructionPointerContext otherContext = (InstructionPointerContext) other;
- if (getAnnotation().equals(otherContext.getAnnotation())){
- return getEditor().equals(otherContext.getEditor());
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getAnnotation().hashCode() + getEditor().hashCode();
- }
-
- /**
- * @return the thread
- */
- public IThread getThread() {
- return fThread;
- }
-
- /**
- * @return the debug target
- */
- public IDebugTarget getDebugTarget() {
- return fDebugTarget;
- }
-
- /**
- * @return the editor
- */
- public ITextEditor getEditor() {
- return fEditor;
- }
-
- /**
- * @return the annotation
- */
- public Annotation getAnnotation() {
- return fAnnotation;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerImageProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerImageProvider.java
deleted file mode 100644
index 93a5ef7..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerImageProvider.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.texteditor.IAnnotationImageProvider;
-
-public class InstructionPointerImageProvider implements IAnnotationImageProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getManagedImage(org.eclipse.jface.text.source.Annotation)
- */
- public Image getManagedImage(Annotation annotation) {
- return ((InstructionPointerAnnotation)annotation).getImage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getImageDescriptorId(org.eclipse.jface.text.source.Annotation)
- */
- public String getImageDescriptorId(Annotation annotation) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.IAnnotationImageProvider#getImageDescriptor(java.lang.String)
- */
- public ImageDescriptor getImageDescriptor(String imageDescritporId) {
- return null;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerManager.java
deleted file mode 100644
index 51a6ab4..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerManager.java
+++ /dev/null
@@ -1,338 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.jface.text.source.IAnnotationModel;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPageListener;
-import org.eclipse.ui.IPartListener2;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchPartReference;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-/**
- * This class tracks instruction pointer contexts for all active debug targets and threads
- * in the current workbench. There should only ever be one instance of this class, obtained
- * via 'getDefault()'.
- */
-public class InstructionPointerManager{
-
- /**
- * The singleton instance of this class.
- */
- private static InstructionPointerManager fgDefault;
-
- /**
- * Set containing all instruction pointer contexts this class manages
- */
- private Set fIPCSet = new HashSet();
-
- /**
- * Maps ITextEditors to the set of instruction pointer contexts that are displayed in the editor
- */
- private Map fEditorMap = new HashMap();
-
- /**
- * Part listener added to editors that contain annotations. Allows instruction pointer contexts to
- * be removed when the editor they are displayed in is removed.
- */
- private IPartListener2 fPartListener;
-
- /**
- * Page listener added to the workbench window to remove part listeners when the page is closed.
- */
- private IPageListener fPageListener;
-
- /**
- * Clients must not instantiate this class.
- */
- private InstructionPointerManager() {
- }
-
- /**
- * Return the singleton instance of this class, creating it if necessary.
- */
- public static InstructionPointerManager getDefault() {
- if (fgDefault == null) {
- fgDefault = new InstructionPointerManager();
- }
- return fgDefault;
- }
-
- /**
- * Adds an instruction pointer annotation in the specified editor for the
- * specified stack frame.
- */
- public void addAnnotation(ITextEditor textEditor, IStackFrame frame, Annotation annotation) {
-
- IDocumentProvider docProvider = textEditor.getDocumentProvider();
- IEditorInput editorInput = textEditor.getEditorInput();
- // If there is no annotation model, there's nothing more to do
- IAnnotationModel annModel = docProvider.getAnnotationModel(editorInput);
- if (annModel == null) {
- return;
- }
-
- // Create the Position object that specifies a location for the annotation
- Position position = null;
- int charStart = -1;
- int length = -1;
- try {
- charStart = frame.getCharStart();
- length = frame.getCharEnd() - charStart;
- } catch (DebugException de) {
- }
- if (charStart < 0) {
- IDocument doc = docProvider.getDocument(editorInput);
- if (doc == null) {
- return;
- }
- try {
- int lineNumber = frame.getLineNumber() - 1;
- IRegion region = doc.getLineInformation(lineNumber);
- charStart = region.getOffset();
- length = region.getLength();
- } catch (BadLocationException ble) {
- return;
- } catch (DebugException de) {
- return;
- }
- }
- if (charStart < 0) {
- return;
- }
- position = new Position(charStart, length);
-
- if (frame.isTerminated()) {
- return;
- }
-
- synchronized (fIPCSet) {
-
- // Add the annotation at the position to the editor's annotation model.
- annModel.removeAnnotation(annotation);
- annModel.addAnnotation(annotation, position);
-
- // Create the instruction pointer context
- InstructionPointerContext ipc = new InstructionPointerContext(frame.getDebugTarget(), frame.getThread(), textEditor, annotation);
-
- // Add the IPC to the set and map
- Set editorIPCs = (Set)fEditorMap.get(textEditor);
- if (editorIPCs == null){
- editorIPCs = new HashSet();
- fEditorMap.put(textEditor, editorIPCs);
- } else {
- editorIPCs.remove(ipc);
- }
- editorIPCs.add(ipc);
- fIPCSet.remove(ipc);
- fIPCSet.add(ipc);
-
- // Add a listener to the editor so we can remove the IPC when the editor is closed
- textEditor.getSite().getPage().addPartListener(getPartListener());
- textEditor.getSite().getPage().getWorkbenchWindow().addPageListener(getPageListener());
- }
- }
-
- /**
- * Remove all annotations associated with the specified debug target that this class
- * is tracking.
- */
- public void removeAnnotations(IDebugTarget debugTarget) {
- synchronized (fIPCSet) {
- Iterator ipcIter = fIPCSet.iterator();
- while (ipcIter.hasNext()) {
- InstructionPointerContext currentIPC = (InstructionPointerContext) ipcIter.next();
- if (currentIPC.getDebugTarget().equals(debugTarget)){
- removeAnnotationFromModel(currentIPC);
- ipcIter.remove();
- removeAnnotationFromEditorMapping(currentIPC);
- }
- }
- }
- }
-
- /**
- * Remove all annotations associated with the specified thread that this class
- * is tracking.
- */
- public void removeAnnotations(IThread thread) {
- synchronized (fIPCSet) {
- Iterator ipcIter = fIPCSet.iterator();
- while (ipcIter.hasNext()) {
- InstructionPointerContext currentIPC = (InstructionPointerContext) ipcIter.next();
- if (currentIPC.getThread().equals(thread)){
- removeAnnotationFromModel(currentIPC);
- ipcIter.remove();
- removeAnnotationFromEditorMapping(currentIPC);
- }
- }
- }
- }
-
- /**
- * Remove all annotations associated with the specified editor that this class
- * is tracking.
- */
- public void removeAnnotations(ITextEditor editor) {
- synchronized (fIPCSet) {
- Set editorIPCs = (Set)fEditorMap.get(editor);
- if (editorIPCs != null){
- Iterator ipcIter = editorIPCs.iterator();
- while (ipcIter.hasNext()) {
- InstructionPointerContext currentIPC = (InstructionPointerContext) ipcIter.next();
- removeAnnotationFromModel(currentIPC);
- fIPCSet.remove(currentIPC);
- }
- fEditorMap.remove(editor);
- }
- }
- }
-
- /**
- * Remove the given ipc from the mapping of editors.
- */
- private void removeAnnotationFromEditorMapping(InstructionPointerContext ipc) {
- Set editorIPCs = (Set)fEditorMap.get(ipc.getEditor());
- if (editorIPCs != null){
- editorIPCs.remove(ipc);
- if (editorIPCs.isEmpty()){
- fEditorMap.remove(ipc.getEditor());
- }
- }
-
- }
-
- /**
- * Remove the annotation from the document model.
- */
- private void removeAnnotationFromModel(InstructionPointerContext ipc){
- IDocumentProvider docProvider = ipc.getEditor().getDocumentProvider();
- if (docProvider != null) {
- IAnnotationModel annotationModel = docProvider.getAnnotationModel(ipc.getEditor().getEditorInput());
- if (annotationModel != null) {
- annotationModel.removeAnnotation(ipc.getAnnotation());
- }
- }
- }
-
- /**
- * Returns the number of instruction pointers.
- * Used by the test suite.
- *
- * @return the number of instruction pointers
- * @since 3.2
- */
- public int getInstructionPointerCount() {
- return fIPCSet.size();
- }
-
- /**
- * Returns the number of keys in the editor to IPC mapping
- * Used by the test suite.
- *
- * @return the number of keys in the editor mapping
- * @since 3.3
- */
- public int getEditorMappingCount() {
- return fEditorMap.size();
- }
-
- /**
- * @return the page listener to add to workbench window.
- */
- private IPageListener getPageListener(){
- if (fPageListener == null){
- fPageListener = new PageListener();
- }
- return fPageListener;
- }
-
- /**
- * @return the part listener to add to editors.
- */
- private IPartListener2 getPartListener(){
- if (fPartListener == null){
- fPartListener = new PartListener();
- }
- return fPartListener;
- }
-
- /**
- * Part listener that is added to editors to track when the editor is no longer is displaying
- * the input containing instruction pointer annotations.
- */
- class PartListener implements IPartListener2{
- public void partActivated(IWorkbenchPartReference partRef) {}
- public void partDeactivated(IWorkbenchPartReference partRef) {}
- public void partHidden(IWorkbenchPartReference partRef) {}
- public void partOpened(IWorkbenchPartReference partRef) {}
- public void partVisible(IWorkbenchPartReference partRef) {}
- public void partBroughtToTop(IWorkbenchPartReference partRef) {}
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partClosed(org.eclipse.ui.IWorkbenchPartReference)
- */
- public void partClosed(IWorkbenchPartReference partRef) {
- IWorkbenchPart part = partRef.getPart(false);
- if (part instanceof ITextEditor){
- removeAnnotations((ITextEditor)part);
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partInputChanged(org.eclipse.ui.IWorkbenchPartReference)
- */
- public void partInputChanged(IWorkbenchPartReference partRef) {
- IWorkbenchPart part = partRef.getPart(false);
- if (part instanceof ITextEditor){
- removeAnnotations((ITextEditor)part);
- }
- }
- }
-
- /**
- * Page listener that is added to the workbench to remove the part listener when the page is closed.
- */
- class PageListener implements IPageListener{
-
- public void pageActivated(IWorkbenchPage page) {}
- public void pageOpened(IWorkbenchPage page) {}
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPageListener#pageClosed(org.eclipse.ui.IWorkbenchPage)
- */
- public void pageClosed(IWorkbenchPage page) {
- page.removePartListener(getPartListener());
- page.getWorkbenchWindow().removePageListener(getPageListener());
- }
-
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchConfigurationTabExtension.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchConfigurationTabExtension.java
deleted file mode 100644
index fbede66..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchConfigurationTabExtension.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.debug.internal.core.IConfigurationElementConstants;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-
-/**
- * Provides a proxy to a launchConfigurationTabs extension point
- *
- * @since 3.3
- */
-public final class LaunchConfigurationTabExtension {
-
- /**
- * The configuration element backing this proxy
- */
- IConfigurationElement fElement = null;
- private Set fDelegates = null;
-
- /**
- * Constructor
- * @param element the <code>IConfigurationElement</code> for this proxy
- */
- public LaunchConfigurationTabExtension(IConfigurationElement element) {
- fElement = element;
- }
-
- /**
- * Returns the unique id of the tab
- * @return the unique id of the tab
- */
- public String getIdentifier() {
- return fElement.getAttribute(IConfigurationElementConstants.ID);
- }
-
- /**
- * Returns the human readable name for the tab, not to be confused with the name that appears on the tab itself
- * @return the name of the tab
- */
- public String getName() {
- return fElement.getAttribute(IConfigurationElementConstants.NAME);
- }
-
- /**
- * Returns the instantiated class of this tab
- * @return the instantiated class of this tab
- */
- public ILaunchConfigurationTab getTab() {
- try {
- Object object = fElement.createExecutableExtension(IConfigurationElementConstants.CLASS);
- if(object instanceof ILaunchConfigurationTab) {
- return (ILaunchConfigurationTab) object;
- }
- } catch (CoreException e) {DebugUIPlugin.log(e);}
- return null;
- }
-
- /**
- * Returns the unique id of the <code>ILaunchConfigurationTabGroup</code> that this tab contributes to
- * @return the id of the <code>ILaunchConfigurationTabGroup</code> this tab contributes to
- */
- public String getTabGroupId() {
- return fElement.getAttribute(IConfigurationElementConstants.GROUP);
- }
-
- /**
- * This method returns the id of the tab that this tab should be placed immediately after.
- * @return the id of the relative tab or <code>null</code> if one has not been specified
- *
- */
- public String getRelativeTabId() {
- IConfigurationElement[] elems = fElement.getChildren(IConfigurationElementConstants.PLACEMENT);
- if(elems.length == 1) {
- return elems[0].getAttribute(IConfigurationElementConstants.AFTER);
- }
- return null;
- }
-
- /**
- * Returns the id of the plugin that contributed this tab extension
- * @return the id of the plugin tat contributed this tab
- */
- public String getPluginIdentifier() {
- return fElement.getContributor().getName();
- }
-
- /**
- * Returns a set of strings of the launch delegates that this tab contribution is associated with
- * @return the set of strings of the associated launch delegates, which can be an empty collection, never <code>null</code>.
- */
- public Set getDelegateSet() {
- if(fDelegates == null) {
- fDelegates = new HashSet();
- IConfigurationElement[] children = fElement.getChildren(IConfigurationElementConstants.ASSOCIATED_DELEGATE);
- String id = null;
- for(int i = 0; i < children.length; i++) {
- id = children[i].getAttribute(IConfigurationElementConstants.DELEGATE);
- if(id != null) {
- fDelegates.add(id);
- }
- }
- }
- return fDelegates;
- }
-}
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 7d33eb1..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java
+++ /dev/null
@@ -1,483 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IExpression;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.debug.internal.ui.views.variables.IndexedVariablePartition;
-import org.eclipse.debug.ui.IDebugEditorPresentation;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IDebugModelPresentationExtension;
-import org.eclipse.debug.ui.IInstructionPointerPresentation;
-import org.eclipse.debug.ui.IValueDetailListener;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.jface.viewers.IColorProvider;
-import org.eclipse.jface.viewers.IFontProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-
-/**
- * A proxy to an IDebugModelPresentation extension. Instantiates the extension
- * when it is needed.
- */
-
-public class LazyModelPresentation implements IDebugModelPresentation, IDebugEditorPresentation,
- IColorProvider, IFontProvider, IInstructionPointerPresentation, IDebugModelPresentationExtension {
-
- /**
- * 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();
-
- /**
- * Non-null when nested inside a delegating model presentation
- */
- private DelegatingModelPresentation fOwner = null;
-
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDebugEditorPresentation#removeAnntations(org.eclipse.ui.IEditorPart, org.eclipse.debug.core.model.IThread)
- */
- public void removeAnnotations(IEditorPart editorPart, IThread thread) {
- IDebugModelPresentation presentation = getPresentation();
- if (presentation instanceof IDebugEditorPresentation) {
- ((IDebugEditorPresentation)presentation).removeAnnotations(editorPart, thread);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDebugEditorPresentation#addAnnotations(org.eclipse.ui.IEditorPart, org.eclipse.debug.core.model.IStackFrame)
- */
- public boolean addAnnotations(IEditorPart editorPart, IStackFrame frame) {
- IDebugModelPresentation presentation = getPresentation();
- if (presentation instanceof IDebugEditorPresentation) {
- return ((IDebugEditorPresentation)presentation).addAnnotations(editorPart, frame);
- }
- return false;
- }
-
- /**
- * Constructs a lazy presentation from the config element.
- */
- public LazyModelPresentation(IConfigurationElement configElement) {
- fConfig = configElement;
- }
-
- /**
- * Constructs a lazy presentation from the config element, owned by the specified
- * delegating model presentation.
- *
- * @param parent owning presentation
- * @param configElement XML configuration element
- */
- public LazyModelPresentation(DelegatingModelPresentation parent, IConfigurationElement configElement) {
- this(configElement);
- fOwner = parent;
- }
-
- /**
- * @see IDebugModelPresentation#getImage(Object)
- */
- public Image getImage(Object element) {
- initImageRegistry();
- Image image = getPresentation().getImage(element);
- if (image == null) {
- image = getDefaultImage(element);
- }
- if (image != null) {
- int flags= computeAdornmentFlags(element);
- if (flags > 0) {
- CompositeDebugImageDescriptor descriptor= new CompositeDebugImageDescriptor(image, flags);
- return DebugUIPlugin.getImageDescriptorRegistry().get(descriptor);
- }
- }
- return image;
- }
-
- /**
- * Initializes the image registry
- */
- private synchronized void initImageRegistry() {
- if (!DebugPluginImages.isInitialized()) {
- DebugUIPlugin.getDefault().getImageRegistry();
- }
- }
-
- /**
- * Computes and return common adornment flags for the given element.
- *
- * @param element
- * @return adornment flags defined in CompositeDebugImageDescriptor
- */
- private int computeAdornmentFlags(Object element) {
- if (element instanceof IBreakpoint) {
- if (!DebugPlugin.getDefault().getBreakpointManager().isEnabled()) {
- return CompositeDebugImageDescriptor.SKIP_BREAKPOINT;
- }
- }
- return 0;
- }
-
- /**
- * Returns a default text label for the debug element
- */
- protected String getDefaultText(Object element) {
- return DebugUIPlugin.getDefaultLabelProvider().getText(element);
- }
-
- /**
- * Returns a default image for the debug element
- */
- protected Image getDefaultImage(Object element) {
- return DebugUIPlugin.getDefaultLabelProvider().getImage(element);
- }
-
- /**
- * @see IDebugModelPresentation#getText(Object)
- */
- public String getText(Object element) {
- if (!(element instanceof IndexedVariablePartition)) {
- // Attempt to delegate
- String text = getPresentation().getText(element);
- if (text != null) {
- return text;
- }
- }
- // If no delegate returned a text label, use the default
- if (showVariableTypeNames()) {
- try {
- if (element instanceof IExpression) {
- StringBuffer buf = new StringBuffer();
- IValue value = ((IExpression)element).getValue();
- if (value != null) {
- buf.append(value.getReferenceTypeName());
- buf.append(' ');
- }
- buf.append(getDefaultText(element));
- return buf.toString();
- } else if (element instanceof IVariable) {
- return new StringBuffer(((IVariable)element).getValue().getReferenceTypeName()).append(' ').append(getDefaultText(element)).toString();
- }
- } catch (DebugException de) {
- DebugUIPlugin.log(de);
- }
- }
- return getDefaultText(element);
- }
-
- /**
- * Whether or not to show variable type names.
- * This option is configured per model presentation.
- * This allows this option to be set per view, for example.
- */
- protected boolean showVariableTypeNames() {
- Boolean show= (Boolean) fAttributes.get(DISPLAY_VARIABLE_TYPE_NAMES);
- show= show == null ? Boolean.FALSE : show;
- return show.booleanValue();
- }
-
- /**
- * @see IDebugModelPresentation#computeDetail(IValue, IValueDetailListener)
- */
- public void computeDetail(IValue value, IValueDetailListener listener) {
- getPresentation().computeDetail(value, listener);
- }
-
- /**
- * @see ISourcePresentation#getEditorInput(Object)
- */
- public IEditorInput getEditorInput(Object element) {
- return getPresentation().getEditorInput(element);
- }
-
- /**
- * @see ISourcePresentation#getEditorId(IEditorInput, Object)
- */
- public String getEditorId(IEditorInput input, Object inputObject) {
- return getPresentation().getEditorId(input, inputObject);
- }
-
- /**
- * @see IBaseLabelProvider#addListener(ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- if (fPresentation != null) {
- getPresentation().addListener(listener);
- }
- fListeners.add(listener);
- }
-
- /**
- * @see IBaseLabelProvider#dispose()
- */
- public void dispose() {
- if (fPresentation != null) {
- getPresentation().dispose();
- }
- fListeners = null;
- }
-
- /**
- * @see IBaseLabelProvider#isLabelProperty(Object, String)
- */
- public boolean isLabelProperty(Object element, String property) {
- if (fPresentation != null) {
- return getPresentation().isLabelProperty(element, property);
- }
- return false;
- }
-
- /**
- * @see IBaseLabelProvider#removeListener(ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- if (fPresentation != null) {
- getPresentation().removeListener(listener);
- }
- ListenerList listeners = fListeners;
- if (listeners != null) {
- listeners.remove(listener);
- }
- }
-
- /**
- * Returns the real presentation, instantiating if required.
- */
- protected IDebugModelPresentation getPresentation() {
- if (fPresentation == null) {
- synchronized (this) {
- if (fPresentation != null) {
- // In the case that the synchronization is enforced, the "blocked" thread
- // should return the presentation configured by the "owning" thread.
- return fPresentation;
- }
- try {
- IDebugModelPresentation tempPresentation= (IDebugModelPresentation) DebugUIPlugin.createExtension(fConfig, "class"); //$NON-NLS-1$
- // configure it
- if (fListeners != null) {
- Object[] list = fListeners.getListeners();
- for (int i= 0; i < list.length; i++) {
- tempPresentation.addListener((ILabelProviderListener)list[i]);
- }
- }
- Iterator keys= fAttributes.keySet().iterator();
- while (keys.hasNext()) {
- String key= (String)keys.next();
- tempPresentation.setAttribute(key, fAttributes.get(key));
- }
- // Only assign to the instance variable after it's been configured. Otherwise,
- // the synchronization is defeated (a thread could return the presentation before
- // it's been configured).
- fPresentation= tempPresentation;
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- }
- }
- }
- return fPresentation;
- }
-
- /**
- * @see IDebugModelPresentation#setAttribute(String, Object)
- */
- public void setAttribute(String id, Object value) {
- if (value == null) {
- return;
- }
- if (fPresentation != null) {
- getPresentation().setAttribute(id, value);
- }
-
- fAttributes.put(id, value);
-
- if (fOwner != null) {
- fOwner.basicSetAttribute(id, value);
- }
- }
-
- /**
- * Returns the identifier of the debug model this
- * presentation is registered for.
- */
- public String getDebugModelIdentifier() {
- return fConfig.getAttribute("id"); //$NON-NLS-1$
- }
-
- /**
- * Returns a new source viewer configuration for the details
- * area of the variables view, or <code>null</code> if
- * unspecified.
- *
- * @return source viewer configuration or <code>null</code>
- * @exception CoreException if unable to create the specified
- * source viewer configuration
- */
- public SourceViewerConfiguration newDetailsViewerConfiguration() throws CoreException {
- String attr = fConfig.getAttribute("detailsViewerConfiguration"); //$NON-NLS-1$
- if (attr != null) {
- return (SourceViewerConfiguration)fConfig.createExecutableExtension("detailsViewerConfiguration"); //$NON-NLS-1$
- }
- return null;
- }
-
- /**
- * Returns a copy of the attributes in this model presentation.
- *
- * @return a copy of the attributes in this model presentation
- * @since 3.0
- */
- public Map getAttributeMap() {
- return (Map) fAttributes.clone();
- }
-
- /**
- * Returns the raw attribute map
- * @return the raw attribute map
- */
- public Map getAttributes() {
- return fAttributes;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
- */
- public Color getForeground(Object element) {
- IDebugModelPresentation presentation = getPresentation();
- if (presentation instanceof IColorProvider) {
- IColorProvider colorProvider = (IColorProvider) presentation;
- return colorProvider.getForeground(element);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
- */
- public Color getBackground(Object element) {
- IDebugModelPresentation presentation = getPresentation();
- if (presentation instanceof IColorProvider) {
- IColorProvider colorProvider = (IColorProvider) presentation;
- return colorProvider.getBackground(element);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
- */
- public Font getFont(Object element) {
- IDebugModelPresentation presentation = getPresentation();
- if (presentation instanceof IFontProvider) {
- IFontProvider fontProvider = (IFontProvider) presentation;
- return fontProvider.getFont(element);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IInstructionPointerPresentation#getInstructionPointerAnnotation(org.eclipse.ui.IEditorPart, org.eclipse.debug.core.model.IStackFrame)
- */
- public Annotation getInstructionPointerAnnotation(IEditorPart editorPart, IStackFrame frame) {
- IDebugModelPresentation presentation = getPresentation();
- if (presentation instanceof IInstructionPointerPresentation) {
- IInstructionPointerPresentation pointerPresentation = (IInstructionPointerPresentation) presentation;
- return pointerPresentation.getInstructionPointerAnnotation(editorPart, frame);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IInstructionPointerPresentation#getMarkerAnnotationSpecificationId(org.eclipse.ui.IEditorPart, org.eclipse.debug.core.model.IStackFrame)
- */
- public String getInstructionPointerAnnotationType(IEditorPart editorPart, IStackFrame frame) {
- IDebugModelPresentation presentation = getPresentation();
- if (presentation instanceof IInstructionPointerPresentation) {
- IInstructionPointerPresentation pointerPresentation = (IInstructionPointerPresentation) presentation;
- return pointerPresentation.getInstructionPointerAnnotationType(editorPart, frame);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IInstructionPointerPresentation#getInstructionPointerImage(org.eclipse.ui.IEditorPart, org.eclipse.debug.core.model.IStackFrame)
- */
- public Image getInstructionPointerImage(IEditorPart editorPart, IStackFrame frame) {
- IDebugModelPresentation presentation = getPresentation();
- if (presentation instanceof IInstructionPointerPresentation) {
- IInstructionPointerPresentation pointerPresentation = (IInstructionPointerPresentation) presentation;
- return pointerPresentation.getInstructionPointerImage(editorPart, frame);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IInstructionPointerPresentation#getInstructionPointerText(org.eclipse.ui.IEditorPart, org.eclipse.debug.core.model.IStackFrame)
- */
- public String getInstructionPointerText(IEditorPart editorPart, IStackFrame frame) {
- IDebugModelPresentation presentation = getPresentation();
- if (presentation instanceof IInstructionPointerPresentation) {
- IInstructionPointerPresentation pointerPresentation = (IInstructionPointerPresentation) presentation;
- return pointerPresentation.getInstructionPointerText(editorPart, frame);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.IDebugModelPresentationExtension#requiresUIThread(java.lang.Object)
- */
- public boolean requiresUIThread(Object element) {
- if (!DebugPluginImages.isInitialized()) {
- // need UI thread for breakpoint adornment and default images
- return true;
- }
- IDebugModelPresentation presentation = getPresentation();
- if (presentation instanceof IDebugModelPresentationExtension) {
- return ((IDebugModelPresentationExtension) presentation).requiresUIThread(element);
- }
- return false;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/MultipleInputDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/MultipleInputDialog.java
deleted file mode 100644
index 51c6753..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/MultipleInputDialog.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.ui.StringVariableSelectionDialog;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-public class MultipleInputDialog extends Dialog {
- protected static final String FIELD_NAME = "FIELD_NAME"; //$NON-NLS-1$
- protected static final int TEXT = 100;
- protected static final int BROWSE = 101;
- protected static final int VARIABLE = 102;
-
- protected Composite panel;
-
- protected List fieldList = new ArrayList();
- protected List controlList = new ArrayList();
- protected List validators = new ArrayList();
- protected Map valueMap = new HashMap();
-
- private String title;
-
-
-
- public MultipleInputDialog(Shell shell, String title) {
- super(shell);
- this.title = title;
- setShellStyle(getShellStyle() | SWT.RESIZE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
- */
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- if (title != null) {
- shell.setText(title);
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonBar(org.eclipse.swt.widgets.Composite)
- */
- protected Control createButtonBar(Composite parent) {
- Control bar = super.createButtonBar(parent);
- validateFields();
- return bar;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Control createDialogArea(Composite parent) {
- Composite container = (Composite)super.createDialogArea(parent);
- container.setLayout(new GridLayout(2, false));
- container.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- panel = new Composite(container, SWT.NONE);
- GridLayout layout = new GridLayout(2, false);
- panel.setLayout(layout);
- panel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- for (Iterator i = fieldList.iterator(); i.hasNext();) {
- FieldSummary field = (FieldSummary)i.next();
- switch(field.type) {
- case TEXT:
- createTextField(field.name, field.initialValue, field.allowsEmpty);
- break;
- case BROWSE:
- createBrowseField(field.name, field.initialValue, field.allowsEmpty);
- break;
- case VARIABLE:
- createVariablesField(field.name, field.initialValue, field.allowsEmpty);
- break;
- }
- }
-
- fieldList = null; // allow it to be gc'd
- Dialog.applyDialogFont(container);
- return container;
- }
-
- public void addBrowseField(String labelText, String initialValue, boolean allowsEmpty) {
- fieldList.add(new FieldSummary(BROWSE, labelText, initialValue, allowsEmpty));
- }
- public void addTextField(String labelText, String initialValue, boolean allowsEmpty) {
- fieldList.add(new FieldSummary(TEXT, labelText, initialValue, allowsEmpty));
- }
- public void addVariablesField(String labelText, String initialValue, boolean allowsEmpty) {
- fieldList.add(new FieldSummary(VARIABLE, labelText, initialValue, allowsEmpty));
- }
-
- protected void createTextField(String labelText, String initialValue, boolean allowEmpty) {
- Label label = new Label(panel, SWT.NONE);
- label.setText(labelText);
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- final Text text = new Text(panel, SWT.SINGLE | SWT.BORDER);
- text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- text.setData(FIELD_NAME, labelText);
-
- // make sure rows are the same height on both panels.
- label.setSize(label.getSize().x, text.getSize().y);
-
- if (initialValue != null) {
- text.setText(initialValue);
- }
-
- if (!allowEmpty) {
- validators.add(new Validator() {
- public boolean validate() {
- return !text.getText().equals(IInternalDebugCoreConstants.EMPTY_STRING);
- }
- });
- text.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateFields();
- }
- });
- }
-
- controlList.add(text);
- }
-
- protected void createBrowseField(String labelText, String initialValue, boolean allowEmpty) {
- Label label = new Label(panel, SWT.NONE);
- label.setText(labelText);
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- Composite comp = new Composite(panel, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight=0;
- layout.marginWidth=0;
- comp.setLayout(layout);
- comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- final Text text = new Text(comp, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 200;
- text.setLayoutData(data);
- text.setData(FIELD_NAME, labelText);
-
- // make sure rows are the same height on both panels.
- label.setSize(label.getSize().x, text.getSize().y);
-
- if (initialValue != null) {
- text.setText(initialValue);
- }
-
- if (!allowEmpty) {
- validators.add(new Validator() {
- public boolean validate() {
- return !text.getText().equals(IInternalDebugCoreConstants.EMPTY_STRING);
- }
- });
-
- text.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateFields();
- }
- });
- }
-
- Button button = createButton(comp, IDialogConstants.IGNORE_ID, DebugUIMessages.MultipleInputDialog_6, false);
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- DirectoryDialog dialog = new DirectoryDialog(getShell());
- dialog.setMessage(DebugUIMessages.MultipleInputDialog_7);
- String currentWorkingDir = text.getText();
- if (!currentWorkingDir.trim().equals(IInternalDebugCoreConstants.EMPTY_STRING)) {
- File path = new File(currentWorkingDir);
- if (path.exists()) {
- dialog.setFilterPath(currentWorkingDir);
- }
- }
-
- String selectedDirectory = dialog.open();
- if (selectedDirectory != null) {
- text.setText(selectedDirectory);
- }
- }
- });
-
- controlList.add(text);
-
- }
-
-
- public void createVariablesField(String labelText, String initialValue, boolean allowEmpty) {
- Label label = new Label(panel, SWT.NONE);
- label.setText(labelText);
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- Composite comp = new Composite(panel, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight=0;
- layout.marginWidth=0;
- comp.setLayout(layout);
- comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- final Text text = new Text(comp, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 200;
- text.setLayoutData(data);
- text.setData(FIELD_NAME, labelText);
-
- // make sure rows are the same height on both panels.
- label.setSize(label.getSize().x, text.getSize().y);
-
- if (initialValue != null) {
- text.setText(initialValue);
- }
-
- if (!allowEmpty) {
- validators.add(new Validator() {
- public boolean validate() {
- return !text.getText().equals(IInternalDebugCoreConstants.EMPTY_STRING);
- }
- });
-
- text.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateFields();
- }
- });
- }
-
- Button button = createButton(comp, IDialogConstants.IGNORE_ID, DebugUIMessages.MultipleInputDialog_8, false);
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
- int code = dialog.open();
- if (code == IDialogConstants.OK_ID) {
- String variable = dialog.getVariableExpression();
- if (variable != null) {
- text.insert(variable);
- }
- }
- }
- });
-
- controlList.add(text);
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
- protected void okPressed() {
- for (Iterator i = controlList.iterator(); i.hasNext(); ) {
- Control control = (Control)i.next();
- if (control instanceof Text) {
- valueMap.put(control.getData(FIELD_NAME), ((Text)control).getText());
- }
- }
- controlList = null;
- super.okPressed();
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#open()
- */
- public int open() {
- applyDialogFont(panel);
- return super.open();
- }
-
- public Object getValue(String key) {
- return valueMap.get(key);
- }
-
- public String getStringValue(String key) {
- return (String) getValue(key);
- }
-
- public void validateFields() {
- for(Iterator i = validators.iterator(); i.hasNext(); ) {
- Validator validator = (Validator) i.next();
- if (!validator.validate()) {
- getButton(IDialogConstants.OK_ID).setEnabled(false);
- return;
- }
- }
- getButton(IDialogConstants.OK_ID).setEnabled(true);
- }
-
- protected class FieldSummary {
- int type;
- String name;
- String initialValue;
- boolean allowsEmpty;
-
- public FieldSummary(int type, String name, String initialValue, boolean allowsEmpty) {
- this.type = type;
- this.name = name;
- this.initialValue = initialValue;
- this.allowsEmpty = allowsEmpty;
- }
- }
-
- protected class Validator {
- boolean validate() {
- return true;
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/Pair.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/Pair.java
deleted file mode 100644
index 69a6bf3..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/Pair.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-/**
- * Pair is a basic tuple of two with classic first and second members.
- * Since Java is non-polymorphic, we use Object(s) for the pair elements
- * and cast our brains out.
- */
-public class Pair {
- public Object fFirst = null;
- public Object fSecond = null;
- public Pair(Object first, Object second) {
- fFirst = first;
- fSecond = second;
- }
- /*
- * String accessors
- */
- public String firstAsString() {
- return (String) fFirst;
- }
- public String secondAsString() {
- return (String) fSecond;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ResourceExtender.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ResourceExtender.java
deleted file mode 100644
index fca1043..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ResourceExtender.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.resources.IFile;
-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.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.ui.IPathEditorInput;
-
-/**
- * ResourceExtender provides property testers for the XML expression language
- * evaluation. We provide a copy in Debug so that launch shortcuts can add
- * contextual launch enablement that does not require their plugins to be
- * loaded. Copied from
- * org.eclipse.jdt.internal.corext.refactoring.participants.xml.ResourceExtender
- */
-public class ResourceExtender extends PropertyTester {
-
- private static final String PROPERTY_MATCHES_PATTERN = "matchesPattern"; //$NON-NLS-1$
-
- private static final String PROJECT_NATURE = "projectNature"; //$NON-NLS-1$
-
- private static final String PROPERTY_MATCHES_CONTENT_TYPE = "matchesContentType"; //$NON-NLS-1$
-
- /* (non-Javadoc)
- * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
- */
- public boolean test(Object receiver, String method, Object[] args, Object expectedValue) {
- IResource resource = (IResource) ((IAdaptable) receiver).getAdapter(IResource.class);
- if (resource == null) {
- if (PROPERTY_MATCHES_CONTENT_TYPE.equals(method)) {
- IPathEditorInput editorInput = (IPathEditorInput) ((IAdaptable) receiver).getAdapter(IPathEditorInput.class);
- if (editorInput != null) {
- IPath path= editorInput.getPath();
- File file= path.toFile();
- if (file.exists()) {
- try {
- FileReader reader= new FileReader(file);
- IContentType contentType= Platform.getContentTypeManager().getContentType((String)expectedValue);
- IContentDescription description= contentType.getDescriptionFor(reader, IContentDescription.ALL);
- reader.close();
- if (description != null) {
- return matchesContentType(description.getContentType(), (String)expectedValue);
- }
- } catch (FileNotFoundException e) {
- return false;
- } catch (IOException e) {
- return false;
- }
- }
- }
- }
- } else {
- if (PROPERTY_MATCHES_PATTERN.equals(method)) {
- String fileName = resource.getName();
- String expected = (String) expectedValue;
- expected = expected.replaceAll("\\.", "\\\\."); //$NON-NLS-1$//$NON-NLS-2$
- expected = expected.replaceAll("\\*", "\\.\\*"); //$NON-NLS-1$//$NON-NLS-2$
- Pattern pattern = Pattern.compile(expected);
- boolean retVal = pattern.matcher(fileName).find();
- return retVal;
- } else if (PROJECT_NATURE.equals(method)) {
- try {
- IProject proj = resource.getProject();
- return proj != null && proj.isAccessible() && proj.hasNature((String) expectedValue);
- } catch (CoreException e) {
- return false;
- }
- } else if (PROPERTY_MATCHES_CONTENT_TYPE.equals(method)) {
- return matchesContentType(resource, (String) expectedValue);
- }
- }
- return false;
- }
-
- /**
- * Returns whether the given type or one of its base types matches the
- * given content type identifier.
- *
- * @param type content type or <code>null</code>
- * @param typeId content type identifier
- * @return
- */
- private boolean matchesContentType(IContentType type, String typeId) {
- while (type != null) {
- if (typeId.equals(type.getId())) {
- return true;
- }
- type = type.getBaseType();
- }
- return false;
- }
-
- /**
- * Returns whether or not the given file's content type matches the
- * specified content type.
- *
- * Content types are looked up in the content type registry.
- *
- * @return whether or not the given resource has the given content type
- */
- private boolean matchesContentType(IResource resource, String contentType) {
- if (resource == null || !(resource instanceof IFile) || !resource.exists()) {
- return false;
- }
- IFile file = (IFile) resource;
- IContentDescription description;
- try {
- description = file.getContentDescription();
- } catch (CoreException e) {
- return false;
- }
- if (description != null) {
- return matchesContentType(description.getContentType(), contentType);
- }
- return false;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java
deleted file mode 100755
index f33cd44..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java
+++ /dev/null
@@ -1,520 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.layout.PixelConverter;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Layout;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-
-/**
- * Factory class to create some SWT resources.
- */
-public class SWTFactory {
-
- /**
- * Returns a width hint for a button control.
- */
- public static int getButtonWidthHint(Button button) {
- button.setFont(JFaceResources.getDialogFont());
- PixelConverter converter= new PixelConverter(button);
- int widthHint= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- }
-
- /**
- * Sets width and height hint for the button control.
- * <b>Note:</b> This is a NOP if the button's layout data is not
- * an instance of <code>GridData</code>.
- *
- * @param the button for which to set the dimension hint
- */
- public static void setButtonDimensionHint(Button button) {
- Assert.isNotNull(button);
- Object gd= button.getLayoutData();
- if (gd instanceof GridData) {
- ((GridData)gd).widthHint= getButtonWidthHint(button);
- ((GridData)gd).horizontalAlignment = GridData.FILL;
- }
- }
-
- /**
- * Creates a check box button using the parents' font
- * @param parent the parent to add the button to
- * @param label the label for the button
- * @param image the image for the button
- * @param checked the initial checked state of the button
- * @param hspan the horizontal span to take up in the parent composite
- * @return a new checked button set to the initial checked state
- * @since 3.3
- */
- public static Button createCheckButton(Composite parent, String label, Image image, boolean checked, int hspan) {
- Button button = new Button(parent, SWT.CHECK);
- button.setFont(parent.getFont());
- button.setSelection(checked);
- if(image != null) {
- button.setImage(image);
- }
- if(label != null) {
- button.setText(label);
- }
- GridData gd = new GridData();
- gd.horizontalSpan = hspan;
- button.setLayoutData(gd);
- setButtonDimensionHint(button);
- return button;
- }
-
- /**
- * Creates and returns a new push button with the given
- * label and/or image.
- *
- * @param parent parent control
- * @param label button label or <code>null</code>
- * @param image image of <code>null</code>
- *
- * @return a new push button
- */
- public static Button createPushButton(Composite parent, String label, Image image) {
- Button button = new Button(parent, SWT.PUSH);
- button.setFont(parent.getFont());
- if (image != null) {
- button.setImage(image);
- }
- if (label != null) {
- button.setText(label);
- }
- GridData gd = new GridData();
- button.setLayoutData(gd);
- SWTFactory.setButtonDimensionHint(button);
- return button;
- }
-
- /**
- * Creates and returns a new push button with the given
- * label and/or image.
- *
- * @param parent parent control
- * @param label button label or <code>null</code>
- * @param image image of <code>null</code>
- * @param fill the alignment for the new button
- *
- * @return a new push button
- * @since 3.4
- */
- public static Button createPushButton(Composite parent, String label, Image image, int fill) {
- Button button = new Button(parent, SWT.PUSH);
- button.setFont(parent.getFont());
- if (image != null) {
- button.setImage(image);
- }
- if (label != null) {
- button.setText(label);
- }
- GridData gd = new GridData(fill);
- button.setLayoutData(gd);
- SWTFactory.setButtonDimensionHint(button);
- return button;
- }
-
- /**
- * Creates and returns a new radio button with the given
- * label.
- *
- * @param parent parent control
- * @param label button label or <code>null</code>
- *
- * @return a new radio button
- */
- public static Button createRadioButton(Composite parent, String label) {
- Button button = new Button(parent, SWT.RADIO);
- button.setFont(parent.getFont());
- if (label != null) {
- button.setText(label);
- }
- GridData gd = new GridData();
- button.setLayoutData(gd);
- SWTFactory.setButtonDimensionHint(button);
- return button;
- }
-
- /**
- * Creates a new label widget
- * @param parent the parent composite to add this label widget to
- * @param text the text for the label
- * @param hspan the horizontal span to take up in the parent composite
- * @return the new label
- * @since 3.2
- *
- */
- public static Label createLabel(Composite parent, String text, int hspan) {
- Label l = new Label(parent, SWT.NONE);
- l.setFont(parent.getFont());
- l.setText(text);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = hspan;
- gd.grabExcessHorizontalSpace = false;
- l.setLayoutData(gd);
- return l;
- }
-
- /**
- * Creates a new label widget
- * @param parent the parent composite to add this label widget to
- * @param text the text for the label
- * @param font the font for the label
- * @param hspan the horizontal span to take up in the parent composite
- * @return the new label
- * @since 3.3
- */
- public static Label createLabel(Composite parent, String text, Font font, int hspan) {
- Label l = new Label(parent, SWT.NONE);
- l.setFont(font);
- l.setText(text);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = hspan;
- l.setLayoutData(gd);
- return l;
- }
-
- /**
- * Creates a wrapping label
- * @param parent the parent composite to add this label to
- * @param text the text to be displayed in the label
- * @param hspan the horizontal span that label should take up in the parent composite
- * @param wrapwidth the width hint that the label should wrap at
- * @return a new label that wraps at a specified width
- * @since 3.3
- */
- public static Label createWrapLabel(Composite parent, String text, int hspan, int wrapwidth) {
- Label l = new Label(parent, SWT.NONE | SWT.WRAP);
- l.setFont(parent.getFont());
- l.setText(text);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = hspan;
- gd.widthHint = wrapwidth;
- l.setLayoutData(gd);
- return l;
- }
-
- /**
- * Creates a new <code>CLabel</code> that will wrap at the specified width and has the specified image
- * @param parent the parent to add this label to
- * @param text the text for the label
- * @param image the image for the label
- * @param hspan the h span to take up in the parent
- * @param wrapwidth the with to wrap at
- * @return a new <code>CLabel</code>
- * @since 3.3
- */
- public static CLabel createWrapCLabel(Composite parent, String text, Image image, int hspan, int wrapwidth) {
- CLabel label = new CLabel(parent, SWT.NONE | SWT.WRAP);
- label.setFont(parent.getFont());
- if(text != null) {
- label.setText(text);
- }
- if(image != null) {
- label.setImage(image);
- }
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = hspan;
- gd.widthHint = wrapwidth;
- label.setLayoutData(gd);
- return label;
- }
-
- /**
- * Creates a wrapping label
- * @param parent the parent composite to add this label to
- * @param text the text to be displayed in the label
- * @param hspan the horizontal span that label should take up in the parent composite
- * @return a new label that wraps at a specified width
- * @since 3.3
- */
- public static Label createWrapLabel(Composite parent, String text, int hspan) {
- Label l = new Label(parent, SWT.NONE | SWT.WRAP);
- l.setFont(parent.getFont());
- l.setText(text);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = hspan;
- l.setLayoutData(gd);
- return l;
- }
-
- /**
- * Creates a new text widget
- * @param parent the parent composite to add this text widget to
- * @param hspan the horizontal span to take up on the parent composite
- * @return the new text widget
- * @since 3.2
- *
- */
- public static Text createSingleText(Composite parent, int hspan) {
- Text t = new Text(parent, SWT.SINGLE | SWT.BORDER);
- t.setFont(parent.getFont());
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = hspan;
- t.setLayoutData(gd);
- return t;
- }
-
- /**
- * Creates a new text widget
- * @param parent the parent composite to add this text widget to
- * @param style the style bits for the text widget
- * @param hspan the horizontal span to take up on the parent composite
- * @param fill the fill for the grid layout
- * @return the new text widget
- * @since 3.3
- */
- public static Text createText(Composite parent, int style, int hspan, int fill) {
- Text t = new Text(parent, style);
- t.setFont(parent.getFont());
- GridData gd = new GridData(fill);
- gd.horizontalSpan = hspan;
- t.setLayoutData(gd);
- return t;
- }
-
- /**
- * Creates a new text widget
- * @param parent the parent composite to add this text widget to
- * @param style the style bits for the text widget
- * @param hspan the horizontal span to take up on the parent composite
- * @return the new text widget
- * @since 3.3
- */
- public static Text createText(Composite parent, int style, int hspan) {
- Text t = new Text(parent, style);
- t.setFont(parent.getFont());
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = hspan;
- t.setLayoutData(gd);
- return t;
- }
-
- /**
- * Creates a new text widget
- * @param parent the parent composite to add this text widget to
- * @param style the style bits for the text widget
- * @param hspan the horizontal span to take up on the parent composite
- * @param width the desired width of the text widget
- * @param height the desired height of the text widget
- * @param fill the fill style for the widget
- * @return the new text widget
- * @since 3.3
- */
- public static Text createText(Composite parent, int style, int hspan, int width, int height, int fill) {
- Text t = new Text(parent, style);
- t.setFont(parent.getFont());
- GridData gd = new GridData(fill);
- gd.horizontalSpan = hspan;
- gd.widthHint = width;
- gd.heightHint = height;
- t.setLayoutData(gd);
- return t;
- }
-
- /**
- * Creates a Group widget
- * @param parent the parent composite to add this group to
- * @param text the text for the heading of the group
- * @param columns the number of columns within the group
- * @param hspan the horizontal span the group should take up on the parent
- * @param fill the style for how this composite should fill into its parent
- * @return the new group
- * @since 3.2
- *
- */
- public static Group createGroup(Composite parent, String text, int columns, int hspan, int fill) {
- Group g = new Group(parent, SWT.NONE);
- g.setLayout(new GridLayout(columns, false));
- g.setText(text);
- g.setFont(parent.getFont());
- GridData gd = new GridData(fill);
- gd.horizontalSpan = hspan;
- g.setLayoutData(gd);
- return g;
- }
-
- /**
- * Creates a Composite widget
- * @param parent the parent composite to add this composite to
- * @param font the font to set on the control
- * @param columns the number of columns within the composite
- * @param hspan the horizontal span the composite should take up on the parent
- * @param fill the style for how this composite should fill into its parent
- * @return the new group
- * @since 3.3
- */
- public static Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill) {
- Composite g = new Composite(parent, SWT.NONE);
- g.setLayout(new GridLayout(columns, false));
- g.setFont(font);
- GridData gd = new GridData(fill);
- gd.horizontalSpan = hspan;
- g.setLayoutData(gd);
- return g;
- }
-
- /**
- * Creates a composite that uses the parent's font and has a grid layout
- * @param parent the parent to add the composite to
- * @param columns the number of columns the composite should have
- * @param hspan the horizontal span the new composite should take up in the parent
- * @param fill the fill style of the composite {@link GridData}
- * @return a new composite with a grid layout
- *
- * @since 3.3
- */
- public static Composite createComposite(Composite parent, int columns, int hspan, int fill) {
- Composite g = new Composite(parent, SWT.NONE);
- g.setLayout(new GridLayout(columns, false));
- g.setFont(parent.getFont());
- GridData gd = new GridData(fill);
- gd.horizontalSpan = hspan;
- g.setLayoutData(gd);
- return g;
- }
-
- /**
- * Creates a vertical spacer for separating components. If applied to a
- * <code>GridLayout</code>, this method will automatically span all of the columns of the parent
- * to make vertical space
- *
- * @param parent the parent composite to add this spacer to
- * @param numlines the number of vertical lines to make as space
- * @since 3.3
- */
- public static void createVerticalSpacer(Composite parent, int numlines) {
- Label lbl = new Label(parent, SWT.NONE);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- Layout layout = parent.getLayout();
- if(layout instanceof GridLayout) {
- gd.horizontalSpan = ((GridLayout)parent.getLayout()).numColumns;
- }
- gd.heightHint = numlines;
- lbl.setLayoutData(gd);
- }
-
- /**
- * creates a horizontal spacer for separating components
- * @param comp
- * @param numlines
- * @since 3.3
- */
- public static void createHorizontalSpacer(Composite comp, int numlines) {
- Label lbl = new Label(comp, SWT.NONE);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = numlines;
- lbl.setLayoutData(gd);
- }
-
- /**
- * Creates a Composite widget
- * @param parent the parent composite to add this composite to
- * @param font the font to set on the control
- * @param columns the number of columns within the composite
- * @param hspan the horizontal span the composite should take up on the parent
- * @param fill the style for how this composite should fill into its parent
- * @param marginwidth the width of the margin to place on the sides of the composite (default is 5, specified by GridLayout)
- * @param marginheight the height of the margin to place o the top and bottom of the composite
- * @return the new composite
- * @since 3.3
- */
- public static Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill, int marginwidth, int marginheight) {
- Composite g = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(columns, false);
- layout.marginWidth = marginwidth;
- layout.marginHeight = marginheight;
- g.setLayout(layout);
- g.setFont(font);
- GridData gd = new GridData(fill);
- gd.horizontalSpan = hspan;
- g.setLayoutData(gd);
- return g;
- }
-
- /**
- * This method is used to make a combo box
- * @param parent the parent composite to add the new combo to
- * @param style the style for the Combo
- * @param hspan the horizontal span to take up on the parent composite
- * @param fill how the combo will fill into the composite
- * Can be one of <code>GridData.FILL_HORIZONAL</code>, <code>GridData.FILL_BOTH</code> or <code>GridData.FILL_VERTICAL</code>
- * @param items the item to put into the combo
- * @return a new Combo instance
- * @since 3.3
- */
- public static Combo createCombo(Composite parent, int style, int hspan, int fill, String[] items) {
- Combo c = new Combo(parent, style);
- c.setFont(parent.getFont());
- GridData gd = new GridData(fill);
- gd.horizontalSpan = hspan;
- c.setLayoutData(gd);
- if (items != null){
- c.setItems(items);
- }
- // Some platforms open up combos in bad sizes without this, see bug 245569
- c.setVisibleItemCount(30);
- c.select(0);
- return c;
- }
-
- /**
- * This method is used to make a combo box with a default fill style of GridData.FILL_HORIZONTAL
- * @param parent the parent composite to add the new combo to
- * @param style the style for the Combo
- * @param hspan the horizontal span to take up on the parent composite
- * @param items the item to put into the combo
- * @return a new Combo instance
- * @since 3.3
- */
- public static Combo createCombo(Composite parent, int style, int hspan, String[] items) {
- Combo c = new Combo(parent, style);
- c.setFont(parent.getFont());
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = hspan;
- c.setLayoutData(gd);
- if (items != null){
- c.setItems(items);
- }
- // Some platforms open up combos in bad sizes without this, see bug 245569
- c.setVisibleItemCount(30);
- c.select(0);
- return c;
- }
-
- /**
- * This method allows us to open the preference dialog on the specific page, in this case the perspective page
- * @param id the id of preference page to show
- * @param page the actual page to show
- * @since 3.2
- */
- public static void showPreferencePage(String id) {
- PreferencesUtil.createPreferenceDialogOn(DebugUIPlugin.getShell(), id, new String[] {id}, null).open();
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariableValueEditorManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariableValueEditorManager.java
deleted file mode 100644
index c02ac4d..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariableValueEditorManager.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.IVariableValueEditor;
-
-/**
- * Manager which provides the variable value editors contributed
- * via the org.eclipse.debug.ui.variableValueEditors extension
- * point.
- *
- * @see org.eclipse.debug.ui.actions.IVariableValueEditor
- * @since 3.1
- */
-public class VariableValueEditorManager {
-
- /**
- * Mapping of debug model identifiers to variable value editors.
- * The keys in this map are always Strings (model ids).
- * The values in the map are IConfigurationElements at startup,
- * which are replaced by IVariableValueEditors as the editors
- * are instantiated (editors are loaded lazily, then cached).
- */
- private Map fEditorMap= new HashMap();
-
- /**
- * The singleton instance of this manager.
- */
- private static VariableValueEditorManager fgManager;
-
- /**
- * Creates a new variable value editor manager. Clients
- * should access the singleton instance of this manager
- * by calling getDefault()
- */
- private VariableValueEditorManager() {
- loadVariableEditors();
- }
-
- /**
- * Returns the singleton instance of this manager.
- * @return the singleton instance of this manager
- */
- public static VariableValueEditorManager getDefault() {
- if (fgManager == null) {
- fgManager= new VariableValueEditorManager();
- }
- return fgManager;
- }
-
- /**
- * Returns the variable value editor associated with the given debug
- * model identifier or <code>null</code> if no editor has been supplied
- * for the given debug model.
- * @param modelIdentifier the debug model identifier
- * @return the variable value editor associated with the given debug model
- * identifier or <code>null</code>
- */
- public IVariableValueEditor getVariableValueEditor(String modelIdentifier) {
- Object object = fEditorMap.get(modelIdentifier);
- IVariableValueEditor editor= null;
- if (object instanceof IVariableValueEditor) {
- editor= (IVariableValueEditor) object;
- } else if (object instanceof IConfigurationElement) {
- try {
- editor = (IVariableValueEditor) ((IConfigurationElement) object).createExecutableExtension("class"); //$NON-NLS-1$
- fEditorMap.put(modelIdentifier, editor);
- } catch (CoreException e) {
- // If an exception occurs, loading the extension, just log it and
- // return null.
- DebugUIPlugin.log(e);
- }
- }
- return editor;
- }
-
- /**
- * Loads contributors to the org.eclipse.debug.ui.variableValueEditors extension point,
- * for use when the user runs this action.
- */
- private void loadVariableEditors() {
- IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_VARIABLE_VALUE_EDITORS);
- IConfigurationElement[] elements = ep.getConfigurationElements();
- for (int i = 0; i < elements.length; i++) {
- IConfigurationElement element = elements[i];
- String modelId = element.getAttribute("modelId"); //$NON-NLS-1$
- if (modelId != null) {
- fEditorMap.put(modelId, element);
- }
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariablesViewModelPresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariablesViewModelPresentation.java
deleted file mode 100644
index 2084afc..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariablesViewModelPresentation.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-import java.util.StringTokenizer;
-
-public class VariablesViewModelPresentation extends DelegatingModelPresentation {
-
- /**
- * @see DelegatingModelPresentation#getText(Object)
- *
- * Strips out control characters and replaces them with string representations
- */
- public String getText(Object element) {
- StringBuffer string= new StringBuffer();
- StringTokenizer tokenizer= new StringTokenizer(super.getText(element), "\b\f\n\r\t\\", true); //$NON-NLS-1$
- String token;
- while (tokenizer.hasMoreTokens()) {
- token= tokenizer.nextToken();
- if (token.length() > 1) {
- string.append(token);
- } else {
- switch (token.charAt(0)) {
- case '\b':
- string.append("\\b"); //$NON-NLS-1$
- break;
- case '\f':
- string.append("\\f"); //$NON-NLS-1$
- break;
- case '\n':
- string.append("\\n"); //$NON-NLS-1$
- break;
- case '\r':
- string.append("\\r"); //$NON-NLS-1$
- break;
- case '\t':
- string.append("\\t"); //$NON-NLS-1$
- break;
- case '\\':
- string.append("\\\\"); //$NON-NLS-1$
- break;
- default:
- string.append(token);
- }
- }
- }
- return string.toString();
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/WorkingDirectoryStatusHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/WorkingDirectoryStatusHandler.java
deleted file mode 100644
index 8b25758..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/WorkingDirectoryStatusHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui;
-
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.core.IStatusHandler;
-import org.eclipse.jface.dialogs.MessageDialog;
-
-/**
- * Prompts the user to re-launch when a working directory
- * is not supported by the Eclipse runtime.
- */
-public class WorkingDirectoryStatusHandler implements IStatusHandler {
-
- /**
- * @see IStatusHandler#handleStatus(IStatus, Object)
- */
- public Object handleStatus(IStatus status, Object source) {
- final boolean[] result = new boolean[1];
- DebugUIPlugin.getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- String title= DebugUIMessages.WorkingDirectoryStatusHandler_Eclipse_Runtime_1;
- String message= DebugUIMessages.WorkingDirectoryStatusHandler_0;
- result[0]= (MessageDialog.openQuestion(DebugUIPlugin.getShell(), title, message));
- }
- });
- return Boolean.valueOf(result[0]);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java
deleted file mode 100644
index a9ff6c2..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * This class is an abstract implementation of common features for a debug <code>IViewActionDelegate</code>
- *
- * This class is intended to be extended by clients
- * @see {@link IViewActionDelegate}
- * @see {@link IActionDelegate2}
- */
-public abstract class AbstractDebugActionDelegate implements IViewActionDelegate, IActionDelegate2 {
-
- /**
- * The underlying action for this delegate
- */
- private IAction fAction;
- /**
- * This action's view part, or <code>null</code>
- * if not installed in a view.
- */
- private IViewPart fViewPart;
-
- /**
- * Cache of the most recent selection
- */
- private IStructuredSelection fSelection = StructuredSelection.EMPTY;
-
- /**
- * Whether this delegate has been initialized
- */
- private boolean fInitialized = false;
-
- /**
- * It's crucial that delegate actions have a zero-argument constructor so that
- * they can be reflected into existence when referenced in an action set
- * in the plugin's plugin.xml file.
- */
- public AbstractDebugActionDelegate() {}
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
- */
- public void dispose(){
- fSelection= null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action){
- if (action.isEnabled()) {
- IStructuredSelection selection = getSelection();
- // disable the action so it cannot be run again until an event or selection change
- // updates the enablement
- action.setEnabled(false);
- runInForeground(selection);
- }
- }
-
- /**
- * Runs this action in the UI thread.
- */
- private void runInForeground(final IStructuredSelection selection) {
- final MultiStatus status=
- new MultiStatus(DebugUIPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, getStatusMessage(), null);
- BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
- public void run() {
- Iterator selectionIter = selection.iterator();
- while (selectionIter.hasNext()) {
- Object element= selectionIter.next();
- try {
- // Action's enablement could have been changed since
- // it was last enabled. Check that the action is still
- // enabled before running the action.
- if (isEnabledFor(element))
- doAction(element);
- } catch (DebugException e) {
- status.merge(e.getStatus());
- }
- }
- }
- });
- reportErrors(status);
- }
-
- /**
- * Reports the specified <code>MultiStatus</code> in an error dialog
- * @param ms the specified <code>MultiStatus</code>
- */
- private void reportErrors(final MultiStatus ms) {
- if (!ms.isOK()) {
- IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
- if (window != null) {
- DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.AbstractDebugActionDelegate_0, getErrorDialogMessage(), ms);
- } else {
- DebugUIPlugin.log(ms);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection s) {
- boolean wasInitialized= initialize(action, s);
- if (!wasInitialized) {
- if (getView() != null) {
- update(action, s);
- }
- }
- }
-
- /**
- * Updates the specified selection based on the selection, as well as setting the selection
- * for this action
- * @param action the action to update
- * @param s the selection
- */
- protected void update(IAction action, ISelection s) {
- if (s instanceof IStructuredSelection) {
- IStructuredSelection ss = getTargetSelection((IStructuredSelection)s);
- action.setEnabled(getEnableStateForSelection(ss));
- setSelection(ss);
- } else {
- action.setEnabled(false);
- setSelection(StructuredSelection.EMPTY);
- }
- }
-
- /**
- * Returns a selection this operation should act on based on the given selection.
- * Provides an opportunity for actions to translate the selection/targets of the
- * operation.
- * <p>
- * By default, the original selection is returned. Subclasses may override.
- * </p>
- * @param s selection
- * @return selection to operate on
- * @since 3.6
- */
- protected IStructuredSelection getTargetSelection(IStructuredSelection s) {
- return s;
- }
-
- /**
- * Performs the specific action on this element.
- */
- protected abstract void doAction(Object element) throws DebugException;
-
- /**
- * Returns the String to use as an error dialog message for
- * a failed action. This message appears as the "Message:" in
- * the error dialog for this action.
- * Default is to return null.
- */
- protected String getErrorDialogMessage(){
- return null;
- }
- /**
- * Returns the String to use as a status message for
- * a failed action. This message appears as the "Reason:"
- * in the error dialog for this action.
- * Default is to return the empty String.
- */
- protected String getStatusMessage(){
- return IInternalDebugCoreConstants.EMPTY_STRING;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- fViewPart = view;
- }
-
- /**
- * Returns this action's view part, or <code>null</code>
- * if not installed in a view.
- *
- * @return view part or <code>null</code>
- */
- protected IViewPart getView() {
- return fViewPart;
- }
-
- /**
- * Initialize this delegate, updating this delegate's
- * presentation.
- * As well, all of the flavors of AbstractDebugActionDelegates need to
- * have the initial enabled state set with a call to update(IAction, ISelection).
- *
- * @param action the presentation for this action
- * @return whether the action was initialized
- */
- protected boolean initialize(IAction action, ISelection selection) {
- if (!isInitialized()) {
- setAction(action);
- update(action, selection);
- setInitialized(true);
- return true;
- }
- return false;
- }
-
- /**
- * Returns the most recent selection
- *
- * @return structured selection
- */
- protected IStructuredSelection getSelection() {
- return fSelection;
- }
-
- /**
- * Sets the most recent selection
- *
- * @parm selection structured selection
- */
- private void setSelection(IStructuredSelection selection) {
- fSelection = selection;
- }
-
- /**
- * Allows the underlying <code>IAction</code> to be set to the specified <code>IAction</code>
- * @param action the action to set
- */
- protected void setAction(IAction action) {
- fAction = action;
- }
-
- /**
- * Allows access to the underlying <code>IAction</code>
- * @return the underlying <code>IAction</code>
- */
- protected IAction getAction() {
- return fAction;
- }
-
- /**
- * Returns if this action has been initialized or not
- * @return if this action has been initialized or not
- */
- protected boolean isInitialized() {
- return fInitialized;
- }
-
- /**
- * Sets the initialized state of this action to the specified boolean value
- * @param initialized the value to set the initialized state to
- */
- protected void setInitialized(boolean initialized) {
- fInitialized = initialized;
- }
-
- /**
- * Return whether the action should be enabled or not based on the given selection.
- */
- protected boolean getEnableStateForSelection(IStructuredSelection selection) {
- if (selection.size() == 0) {
- return false;
- }
- Iterator itr= selection.iterator();
- while (itr.hasNext()) {
- Object element= itr.next();
- if (!isEnabledFor(element)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Returns if this action is enabled for the specified object context
- * @param element the context
- * @return true if it is, false otherwise
- */
- protected boolean isEnabledFor(Object element) {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- fAction = action;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveActionDelegate.java
deleted file mode 100644
index f804e9b..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveActionDelegate.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.ui.IDebugView;
-import org.eclipse.ui.IViewPart;
-
-/**
- * Base implementation of the 'remove' action for a debug view
- *
- * This class is intended to be extended by clients
- * @see {@link AbstractSelectionActionDelegate}
- * @see {@link org.eclipse.ui.IViewActionDelegate}
- * @see {@link org.eclipse.ui.IActionDelegate2}
- *
- */
-public abstract class AbstractRemoveActionDelegate extends AbstractSelectionActionDelegate {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.AbstractSelectionActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- super.init(view);
- IDebugView debugView= (IDebugView)getView().getAdapter(IDebugView.class);
- if (debugView != null) {
- debugView.setAction(IDebugView.REMOVE_ACTION, getAction());
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveAllActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveAllActionDelegate.java
deleted file mode 100644
index 62f8019..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractRemoveAllActionDelegate.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-/**
- * This class is a base implementation of a 'remove all' debug action
- *
- * This class is intended to be extended by clients
- * @see {@link IViewActionDelegate}
- * @see {@link IActionDelegate2}}
- * @see {@link IWorkbenchWindowActionDelegate}
- */
-public abstract class AbstractRemoveAllActionDelegate implements IViewActionDelegate, IActionDelegate2, IWorkbenchWindowActionDelegate {
-
- /**
- * The underlying <code>IAction</code>
- */
- private IAction fAction;
-
- /**
- * Needed for reflective creation
- */
- public AbstractRemoveAllActionDelegate() {}
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#dispose()
- */
- public void dispose() {
- fAction = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- fAction = action;
- }
-
- /**
- * Returns this delegate's action.
- *
- * @return the underlying <code>IAction</code>
- */
- protected IAction getAction() {
- return fAction;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- initialize();
- update();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window) {
- initialize();
- update();
- }
-
- /**
- * Initializes any listeners, etc.
- */
- protected abstract void initialize();
-
- /**
- * Update enablement.
- */
- protected void update() {
- IAction action = getAction();
- if (action != null) {
- action.setEnabled(isEnabled());
- }
- }
-
- /**
- * Returns whether this action is enabled
- *
- * @return true if this action is enabled, false otherwise
- */
- protected abstract boolean isEnabled();
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection s) {
- // do nothing
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractSelectionActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractSelectionActionDelegate.java
deleted file mode 100644
index e77dca8..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractSelectionActionDelegate.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-
-/**
- * This class provides a base implementation of a selection action delegate, more specifically a delegate
- * that uses a selection context to update its underlying <code>IAction</code>.
- *
- * This class is intended to be extended by clients
- *
- * @see {@link IViewActionDelegate}
- * @see {@link IActionDelegate2}
- *
- */
-public abstract class AbstractSelectionActionDelegate implements IViewActionDelegate, IActionDelegate2 {
-
- /**
- * The underlying action for this delegate
- */
- private IAction fAction;
-
- /**
- * This action's view part, or <code>null</code> if not installed in a
- * view.
- */
- private IViewPart fViewPart;
-
- /**
- * Cache of the most recent selection
- */
- private IStructuredSelection fSelection = StructuredSelection.EMPTY;
-
- /**
- * Used to schedule jobs, or <code>null</code> if none
- */
- private IWorkbenchSiteProgressService fProgressService = null;
-
- /**
- * 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 AbstractSelectionActionDelegate() {}
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
- */
- public void dispose() {
- fSelection = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection s) {
- if (s instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) s;
- action.setEnabled(getEnableStateForSelection(ss));
- setSelection(ss);
- } else {
- action.setEnabled(false);
- setSelection(StructuredSelection.EMPTY);
- }
- }
-
- /**
- * Returns the String to use as an error dialog message for a failed action.
- * This message appears as the "Message:" in the error dialog for this
- * action. Default is to return null.
- *
- * @return the message for the error dialog
- */
- protected String getErrorDialogMessage() {
- return null;
- }
-
- /**
- * Returns the String to use as a status message for a failed action. This
- * message appears as the "Reason:" in the error dialog for this action.
- * Default is to return the empty String.
- *
- * @return the status message
- */
- protected String getStatusMessage() {
- return IInternalDebugCoreConstants.EMPTY_STRING;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- setView(view);
- fProgressService = (IWorkbenchSiteProgressService) view.getAdapter(IWorkbenchSiteProgressService.class);
- }
-
- /**
- * Returns this action's view part, or <code>null</code> if not installed
- * in a view.
- *
- * @return the underlying <code>IViewPart</code> or <code>null</code>
- */
- protected IViewPart getView() {
- return fViewPart;
- }
-
- /**
- * Returns the most recent selection
- *
- * @return structured selection
- */
- protected IStructuredSelection getSelection() {
- return fSelection;
- }
-
- /**
- * Sets the most recent selection
- *
- * @parm selection structured selection
- */
- private void setSelection(IStructuredSelection context) {
- fSelection = context;
- }
-
- /**
- * Allows the underlying <code>IAction</code> to be set to the specified one
- * @param action the action to set
- */
- protected void setAction(IAction action) {
- fAction = action;
- }
-
- /**
- * Allows access to the underlying <code>IAction</code>
- * @return the underlying <code>IAction</code>
- */
- protected IAction getAction() {
- return fAction;
- }
-
- /**
- * Allows the underlying <code>IViewPart</code> to be set
- * @param viewPart the <code>IViewPart</code> to set
- */
- protected void setView(IViewPart viewPart) {
- fViewPart = viewPart;
- }
-
- /**
- * Return whether the action should be enabled or not based on the given
- * selection.
- *
- * @return true if the action should be enabled for the specified selection context
- * false otherwise
- */
- protected boolean getEnableStateForSelection(IStructuredSelection selection) {
- if (selection.size() == 0) {
- return false;
- }
- Iterator itr = selection.iterator();
- while (itr.hasNext()) {
- Object element = itr.next();
- if (!isEnabledFor(element)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Returns if the action should be enabled for the specified object context
- * @param element the object context
- * @return true if the action should be enabled for the specified object context
- * false otherwise
- */
- protected boolean isEnabledFor(Object element) {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- setAction(action);
- }
-
- /**
- * Schedules the given job with this action's progress service
- *
- * @param job
- */
- protected void schedule(Job job) {
- if (fProgressService == null) {
- job.schedule();
- } else {
- fProgressService.schedule(job);
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java
deleted file mode 100644
index 56b9aa6..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ActionMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.debug.internal.ui.actions.ActionMessages";//$NON-NLS-1$
-
- public static String AbstractLaunchHistoryAction_0;
- public static String AbstractLaunchHistoryAction_1;
- public static String AbstractLaunchHistoryAction_2;
- public static String AbstractLaunchHistoryAction_3;
- public static String AbstractLaunchHistoryAction_4;
-
- public static String AbstractLaunchHistoryAction_5;
-
- public static String AbstractLaunchHistoryAction_6;
-
- public static String AddToFavoritesAction_1;
- public static String AddToFavoritesAction_2;
- public static String AddToFavoritesAction_3;
-
- public static String ChangeVariableValue_errorDialogMessage;
- public static String ChangeVariableValue_errorDialogTitle;
- public static String ChangeVariableValue_title;
- public static String ChangeVariableValue_toolTipText;
- public static String ChangeVariableValue_1;
- public static String ChangeVariableValue_2;
- public static String ChangeVariableValue_3;
- public static String ChangeVariableValue_4;
-
- public static String CollapseAllAction_0;
-
- public static String ConfigureColumnsAction_0;
- public static String ConfigureColumnsAction_1;
- public static String ConfigureColumnsAction_2;
-
- public static String CopyToClipboardActionDelegate_Problem_Copying_to_Clipboard_1;
- public static String CopyToClipboardActionDelegate_There_was_a_problem_when_accessing_the_system_clipboard__Retry__2;
-
- public static String DebugLastAction_0;
-
- public static String DebugLastAction_1;
- public static String DebugLastAction_2;
- public static String DebugLastAction_3;
-
- public static String DetailPaneAssignValueAction_0;
- public static String DetailPaneAssignValueAction_1;
- public static String DetailPaneAssignValueAction_2;
- public static String DetailPaneAssignValueAction_3;
- public static String DetailPaneAssignValueAction_4;
- public static String DetailPaneWordWrapAction_0;
- public static String DetailPaneMaxLengthAction_0;
-
- public static String EditLaunchConfigurationAction_1;
-
- public static String EnableBreakpointAction_Enable_breakpoint_s__failed_2;
- public static String EnableBreakpointAction_Enabling_breakpoints_3;
- public static String EnableBreakpointAction_Exceptions_occurred_enabling_the_breakpoint_s___4;
-
- public static String LaunchConfigurationAction_0;
-
- public static String OpenBreakpointMarkerAction__Go_to_File_1;
- public static String OpenBreakpointMarkerAction_Exceptions_occurred_attempting_to_open_the_editor_for_the_breakpoint_resource_2;
- public static String OpenBreakpointMarkerAction_Go_to_Breakpoint_1;
- public static String OpenBreakpointMarkerAction_Go_to_File_for_Breakpoint_2;
-
- public static String OpenLaunchDialogAction_1;
-
- public static String PasteWatchExpressionsAction_0;
-
- public static String ProfileLastAction_0;
-
- public static String ProfileLastAction_1;
- public static String ProfileLastAction_2;
- public static String ProfileLastAction_3;
-
- public static String RelaunchActionDelegate_An_exception_occurred_while_launching_2;
- public static String RelaunchActionDelegate_Launch_Failed_1;
- public static String RelaunchLastAction_Cannot_relaunch_1;
- public static String RelaunchLastAction_Cannot_relaunch___0___because_it_does_not_support__2__mode_2;
- public static String RelaunchLastAction_Error_relaunching_3;
- public static String RelaunchLastAction_Error_encountered_attempting_to_relaunch_4;
-
- public static String RemoveAllBreakpointsAction_0;
- public static String RemoveAllBreakpointsAction_1;
- public static String RemoveAllBreakpointsAction_2;
- public static String RemoveAllBreakpointsAction_3;
- public static String RemoveBreakpointAction_0;
- public static String RemoveBreakpointAction_1;
- public static String RemoveBreakpointAction_2;
- public static String RemoveBreakpointAction_3;
- public static String RemoveBreakpointAction_4;
- public static String RemoveBreakpointAction_5;
- public static String RemoveBreakpointAction_6;
- public static String RemoveBreakpointAction_Exceptions_occurred_attempting_to_remove_a_breakpoint__5;
- public static String RemoveBreakpointAction_Removing_a_breakpoint_4;
-
- public static String RetargetRunToLineAction_0;
-
- public static String RunLastAction_0;
-
- public static String RunLastAction_1;
- public static String RunLastAction_2;
- public static String RunLastAction_3;
-
- public static String ShowSupportedBreakpointsAction_Show_For_Selected;
- public static String ShowSupportedBreakpointsAction_tooltip;
-
- public static String ShowTypesAction_Show__Type_Names_1;
- public static String ShowTypesAction_Show_Type_Names;
-
- public static String SkipAllBreakpointsAction_0;
- public static String SkipAllBreakpointsAction_2;
-
- public static String TerminateAndRelaunchAction_0;
- public static String TerminateAndRelaunchAction_3;
- public static String TerminateAndRelaunchAction_4;
- public static String TerminateAndRemoveAction_0;
- public static String TerminateAndRemoveAction_3;
-
- public static String ToggleDetailPaneAction_1;
- public static String ToggleDetailPaneAction_2;
- public static String ToggleDetailPaneAction_3;
- public static String ToggleDetailPaneAction_4;
- public static String ToggleDetailPaneAction_5;
- public static String ToggleDetailPaneAction_6;
- public static String ToggleDetailPaneAction_8;
- public static String ToggleDetailPaneAction_9;
- public static String ToggleBreakpointAction_0;
- public static String ToggleBreakpointAction_1;
- public static String ToggleBreakpointAction_2;
- public static String ToggleStepFiltersAction_0;
- public static String ToggleStepFiltersAction_1;
-
- public static String WatchExpressionDialog_0;
- public static String WatchExpressionDialog_1;
- public static String WatchExpressionDialog_2;
- public static String WatchExpressionDialog_3;
- public static String WatchExpressionDialog_4;
- public static String WatchExpressionDialogMenu_0;
- public static String WatchExpressionDialogMenu_1;
- public static String WatchExpressionDialogMenu_2;
- public static String WatchAction_0;
- public static String WatchAction_1;
-
- public static String RunToLineAction_0;
- public static String RunToLineAction_1;
- public static String RunToLineHandler_0;
- public static String RunToLineActionDelegate_4;
-
- public static String RetargetAction_2;
- public static String RetargetAction_3;
- public static String ModifyWatchpointAction_0;
- public static String ModifyWatchpointAction_1;
- public static String RemoveAllExpressionsAction_0;
- public static String RemoveAllExpressionsAction_1;
- public static String LaunchShortcutsAction_1;
- public static String FindDialog_1;
- public static String FindDialog_3;
- public static String FindAction_0;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ActionMessages.class);
- }
-
- public static String AbstractDebugActionDelegate_0;
-
- public static String RetargetAddMemoryBlockAction_0;
- public static String RetargetAddMemoryBlockAction_1;
- public static String AddMemoryRenderingActionDelegate_0;
- public static String AddMemoryRenderingActionDelegate_1;
- public static String AddMemoryRenderingActionDelegate_2;
-
- public static String RulerEnableDisableBreakpointAction_0;
- public static String RulerEnableDisableBreakpointAction_1;
- public static String RulerEnableDisableBreakpointAction_2;
- public static String RulerEnableDisableBreakpointAction_3;
-
- public static String DisconnectAction_0;
- public static String DisconnectAction_3;
- public static String DropToFrameAction_0;
- public static String DropToFrameAction_3;
- public static String LaunchAction_0;
-
- public static String LaunchAction_1;
-
- public static String LaunchAction_2;
-
- public static String RestartCommandAction__text;
-
- public static String RestartCommandAction_tooltip;
-
- public static String ResumeAction_0;
- public static String ResumeAction_3;
- public static String StepIntoAction_0;
- public static String StepIntoAction_3;
- public static String StepOverAction_0;
- public static String StepOverAction_3;
- public static String StepReturnAction_2;
- public static String StepReturnAction_3;
- public static String SuspendAction_0;
- public static String SuspendAction_3;
- public static String TerminateAction_0;
- public static String TerminateAction_3;
- public static String TerminateAllAction_2;
- public static String TerminateAllAction_3;
-
- public static String DeleteWorkingsetsMessageDialog_0;
- public static String DeleteWorkingsetsMessageDialog_1;
-
- public static String ShowTypesAction_0;
-
- public static String VirtualFindAction_0;
-
- public static String VirtualFindAction_1;
-
- public static String ToggleBreakpointsTargetManager_defaultToggleTarget_name;
- public static String ToggleBreakpointsTargetManager_defaultToggleTarget_description;
-
- public static String NextThreadNavAction_name;
- public static String PreviousThreadNavAction_name;
-}
\ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties
deleted file mode 100644
index 827e59d..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties
+++ /dev/null
@@ -1,215 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-AddToFavoritesAction_1=Add to {0} &Favorites
-AddToFavoritesAction_2=Error
-AddToFavoritesAction_3=Unable to add to favorites.
-
-ChangeVariableValue_errorDialogMessage=Setting the value failed.
-ChangeVariableValue_errorDialogTitle=Setting Value
-ChangeVariableValue_title=&Change Value...
-ChangeVariableValue_toolTipText=Change the Value of the Selected Variable or Register
-ChangeVariableValue_1=Set Value
-ChangeVariableValue_2=Enter a new value for {0}:
-ChangeVariableValue_3=An exception occurred
-ChangeVariableValue_4=Invalid value
-
-
-CollapseAllAction_0=Collapse All
-
-CopyToClipboardActionDelegate_Problem_Copying_to_Clipboard_1=Problem Copying to Clipboard
-CopyToClipboardActionDelegate_There_was_a_problem_when_accessing_the_system_clipboard__Retry__2=There was a problem when accessing the system clipboard. Retry?
-
-EditLaunchConfigurationAction_1=Edit {0}...
-
-EnableBreakpointAction_Enable_breakpoint_s__failed_2=Enable/Disable breakpoint(s) failed
-EnableBreakpointAction_Enabling_breakpoints_3=Enabling/disabling breakpoints
-EnableBreakpointAction_Exceptions_occurred_enabling_the_breakpoint_s___4=Exceptions occurred enabling/disabling the breakpoint(s).
-
-OpenBreakpointMarkerAction__Go_to_File_1=&Go to File
-OpenBreakpointMarkerAction_Exceptions_occurred_attempting_to_open_the_editor_for_the_breakpoint_resource_2=Exceptions occurred attempting to open the editor for the breakpoint resource
-OpenBreakpointMarkerAction_Go_to_Breakpoint_1=Go to File
-OpenBreakpointMarkerAction_Go_to_File_for_Breakpoint_2=Go to File for Breakpoint
-
-RelaunchActionDelegate_An_exception_occurred_while_launching_2=An exception occurred while launching
-RelaunchActionDelegate_Launch_Failed_1=Launch Failed
-
-RemoveAllBreakpointsAction_0=Remove All Breakpoints
-RemoveAllBreakpointsAction_1=Are you sure you want to remove all breakpoints?
-RemoveAllBreakpointsAction_2=Remove Breakpoints
-RemoveAllBreakpointsAction_3=&Do not ask me again.
-RemoveAllExpressionsAction_0=Remove All Expressions
-RemoveAllExpressionsAction_1=Are you sure you want to remove all expressions?
-
-RemoveBreakpointAction_0=Delete Breakpoints
-RemoveBreakpointAction_1=Delete all breakpoints in the selected group(s)?
-RemoveBreakpointAction_2=Remove Breakpoints
-RemoveBreakpointAction_3=Remove Items
-RemoveBreakpointAction_4=Which item(s) would you like to remove?
-RemoveBreakpointAction_5=OK
-RemoveBreakpointAction_6=Cancel
-RemoveBreakpointAction_Exceptions_occurred_attempting_to_remove_a_breakpoint__5=An exception occurred attempting to remove breakpoint(s).
-RemoveBreakpointAction_Removing_a_breakpoint_4=Removing a breakpoint
-DeleteWorkingsetsMessageDialog_0=&Selected working set(s).
-DeleteWorkingsetsMessageDialog_1=&All breakpoints contained in selected working set(s).
-
-ShowSupportedBreakpointsAction_Show_For_Selected=Show Supported &Breakpoints
-ShowSupportedBreakpointsAction_tooltip=Show Breakpoints Supported by Selected Target
-
-ShowTypesAction_Show__Type_Names_1=Show &Type Names
-ShowTypesAction_Show_Type_Names=Show Type Names
-ShowTypesAction_0='Show Type Names' unavailable when columns are displayed.\nConfigure columns to display type names.
-
-RelaunchLastAction_Cannot_relaunch_1=Cannot relaunch
-RelaunchLastAction_Cannot_relaunch___0___because_it_does_not_support__2__mode_2=Cannot relaunch [{0}] because it does not support {1} mode
-RelaunchLastAction_Error_relaunching_3=Error relaunching
-RelaunchLastAction_Error_encountered_attempting_to_relaunch_4=Error encountered attempting to relaunch
-
-##
-# @see Bug 105733 TVT 3.1 - TCT 531 - Poor grammar in "Run Eclipse Application" and "Profile Eclipse Application"
-# - the following string is used to display the tooltip for run/debug/profile buttons and is
-# the concatenation of "{mode} {configuration name}", for example "Run HelloWorld". In some languages
-# this may need to be reversed to be translated properly.
-##
-AbstractLaunchHistoryAction_0={0} {1}
-AbstractLaunchHistoryAction_1=Run
-AbstractLaunchHistoryAction_2=Debug
-AbstractLaunchHistoryAction_3=Profile
-AbstractLaunchHistoryAction_4=Launch
-##
-# The following string is used to display the tooltip for run/debug/profile buttons in the
-# event there is no configuration name to concatenate (as mentioned for AbstractLaunchHistoryAction_0)
-# For example "Run" or "External Tools".
-##
-AbstractLaunchHistoryAction_5={0}
-AbstractLaunchHistoryAction_6=(no launch history)
-AbstractDebugActionDelegate_0=Error
-
-ToggleDetailPaneAction_1=Vertical
-ToggleDetailPaneAction_2=Place the Detail Pane Underneath the Main Tree View
-ToggleDetailPaneAction_3=Place the Detail Pane Underneath the Main Tree View
-ToggleDetailPaneAction_4=Horizontal
-ToggleDetailPaneAction_5=Place the Detail Pane on the Right of the Main Tree View
-ToggleDetailPaneAction_6=Place the Detail Pane on the Right of the Main Tree View
-ToggleDetailPaneAction_8=Hide the Detail Pane so that only the Main Tree View is Visible
-ToggleDetailPaneAction_9=Hide the Detail Pane so that only the Main Tree View is Visible
-ToggleBreakpointAction_0=Toggle Brea&kpoint
-ToggleBreakpointAction_1=Error
-ToggleBreakpointAction_2=Unable to toggle breakpoint
-
-ToggleStepFiltersAction_0=Use Step Filters
-ToggleStepFiltersAction_1=&Use Step Filters
-
-WatchExpressionDialog_0=Edit Watch Expression
-WatchExpressionDialog_1=Add Watch Expression
-WatchExpressionDialog_2=E&xpression:
-WatchExpressionDialog_3=&Enable
-WatchExpressionDialog_4=Expression must not be empty
-WatchExpressionDialogMenu_0=Cut
-WatchExpressionDialogMenu_1=Copy
-WatchExpressionDialogMenu_2=Paste
-WatchAction_0=Error creating watch
-WatchAction_1=An exception occurred while attempting to create watch item.
-SkipAllBreakpointsAction_0=Skip All Breakpoints
-SkipAllBreakpointsAction_2=Skip all breakpoints, whether they are enabled or not
-DetailPaneAssignValueAction_1=Assign Value
-DetailPaneAssignValueAction_2=Invalid Value
-DetailPaneAssignValueAction_3=The value {0} cannot be assigned to {1}
-DetailPaneAssignValueAction_4=Invalid Value
-DetailPaneAssignValueAction_0=Error Setting Value
-DetailPaneWordWrapAction_0=&Wrap Text
-DetailPaneMaxLengthAction_0=&Max Length...
-
-RunToLineAction_0=Error
-RunToLineAction_1=Run to line failed
-RunToLineHandler_0=Run To Line
-RunToLineActionDelegate_4=Run to &Line
-
-RetargetAction_2=Error
-RetargetAction_3=Operation failed
-ModifyWatchpointAction_0=Error
-ModifyWatchpointAction_1=Failed to modify watchpoint
-LaunchShortcutsAction_1=(none applicable)
-##
-# The following string is used to display launch histories using an integer mnemonic - i.e.
-# "{number} {configuration name}". For example "1 HelloWorld".
-##
-LaunchConfigurationAction_0=&{0} {1}
-FindDialog_1=&Specify an element to select (? = any character, * = any String):
-FindDialog_3=Find
-FindAction_0=&Find...
-RetargetAddMemoryBlockAction_0=Add Memory Monitor Failed.
-RetargetAddMemoryBlockAction_1=Unable to add memory monitor.
-RetargetRunToLineAction_0=The operation is unavailable on the current selection. Please place the cursor on valid line to run to.
-AddMemoryRenderingActionDelegate_0=Add Memory Rendering Failed
-AddMemoryRenderingActionDelegate_1=Unable to add the selected rendering.
-AddMemoryRenderingActionDelegate_2=Add Memory Rendering
-RulerEnableDisableBreakpointAction_0=Error
-RulerEnableDisableBreakpointAction_1=Failed to toggle breakpoint enablement
-RulerEnableDisableBreakpointAction_2=&Disable Breakpoint
-RulerEnableDisableBreakpointAction_3=&Enable Breakpoint
-TerminateAndRelaunchAction_0=org.eclipse.debug.ui.commands.TerminateAndRelaunch
-TerminateAndRelaunchAction_3=Terminate and Relaunch
-TerminateAndRelaunchAction_4=Terminate and Relaunch
-TerminateAndRemoveAction_0=Terminate and Remo&ve
-TerminateAndRemoveAction_3=Terminate and Remove
-TerminateAllAction_2=Termi&nate/Disconnect All
-TerminateAllAction_3=Terminate/Disconnect All
-TerminateAction_0=&Terminate
-TerminateAction_3=Terminate
-StepReturnAction_2=Step Return
-StepReturnAction_3=Step Ret&urn
-StepIntoAction_0=Step &Into
-StepIntoAction_3=Step Into
-StepOverAction_0=Step &Over
-StepOverAction_3=Step Over
-LaunchAction_0=Remove Configuration
-LaunchAction_1=Are you sure you want to remove {0} from the launch history?
-LaunchAction_2=&Do not ask me again.
-RestartCommandAction__text=Restart
-RestartCommandAction_tooltip=Restart
-ResumeAction_0=Resu&me
-ResumeAction_3=Resume
-DisconnectAction_0=Disconn&ect
-DisconnectAction_3=Disconnect
-DropToFrameAction_0=Drop To Frame
-DropToFrameAction_3=Drop To Frame
-SuspendAction_0=&Suspend
-SuspendAction_3=Suspend
-ConfigureColumnsAction_0=Select &Columns...
-ConfigureColumnsAction_1=Select the &columns to display:
-ConfigureColumnsAction_2=Select Columns
-PasteWatchExpressionsAction_0=&Paste
-ProfileLastAction_0=Profi&le Last Launched
-ProfileLastAction_1=Profi&le
-ProfileLastAction_2=Profile the selected resource or active editor
-ProfileLastAction_3=Profile the previously launched application
-DebugLastAction_0=&Debug Last Launched
-DebugLastAction_1=&Debug
-DebugLastAction_2=Debug the selected resource or active editor
-DebugLastAction_3=Debug the previously launched application
-RunLastAction_0=&Run Last Launched
-RunLastAction_1=&Run
-RunLastAction_2=Run the selected resource or active editor
-RunLastAction_3=Run the previously launched application
-##
-# The following string is used to display actions to open the launch dialog for
-# a specific mode - for example "Debug Configurations..."
-##
-OpenLaunchDialogAction_1={0} Configurations...
-VirtualFindAction_0=Error
-VirtualFindAction_1=Unable to locate {0} in viewer
-
-ToggleBreakpointsTargetManager_defaultToggleTarget_name = Default
-ToggleBreakpointsTargetManager_defaultToggleTarget_description = Default
-
-NextThreadNavAction_name=Ne&xt Thread
-PreviousThreadNavAction_name=Pre&vious Thread
\ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AddToFavoritesAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AddToFavoritesAction.java
deleted file mode 100644
index df87bd4..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AddToFavoritesAction.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import com.ibm.icu.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.ILaunchGroup;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.SelectionListenerAction;
-
-/**
- * Adds the selected launch configuration to the launch favorites.
- */
-public class AddToFavoritesAction extends SelectionListenerAction {
-
- private ILaunchConfiguration fConfiguration = null;
- private String fMode =null;
- private ILaunchGroup fGroup = null;
-
- /**
- * Constructs a new action.
- */
- public AddToFavoritesAction() {
- super(IInternalDebugCoreConstants.EMPTY_STRING);
- setEnabled(false);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.EDIT_LAUNCH_CONFIGURATION_ACTION);
- }
-
- /**
- * @see org.eclipse.ui.actions.SelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected boolean updateSelection(IStructuredSelection selection) {
- setLaunchConfiguration(null);
- setMode(null);
- setGroup(null);
- if (selection.size() == 1) {
- Object object = selection.getFirstElement();
- ILaunch launch = null;
- if (object instanceof IAdaptable) {
- launch = (ILaunch)((IAdaptable)object).getAdapter(ILaunch.class);
- }
- if (launch == null) {
- if (object instanceof ILaunch) {
- launch = (ILaunch)object;
- } else if (object instanceof IDebugElement) {
- launch = ((IDebugElement)object).getLaunch();
- } else if (object instanceof IProcess) {
- launch = ((IProcess)object).getLaunch();
- }
- }
- if (launch != null) {
- ILaunchConfiguration configuration = launch.getLaunchConfiguration();
- if (configuration != null) {
- ILaunchGroup group= DebugUITools.getLaunchGroup(configuration, getMode());
- if (group == null) {
- return false;
- }
- setGroup(group);
- setLaunchConfiguration(configuration);
- setMode(launch.getLaunchMode());
- setText(MessageFormat.format(ActionMessages.AddToFavoritesAction_1, new String[]{DebugUIPlugin.removeAccelerators(getGroup().getLabel())}));
- }
- }
- }
-
- // Disable the action if the launch config is private
- ILaunchConfiguration config = getLaunchConfiguration();
- if (config == null) {
- return false;
- }
- if (DebugUITools.isPrivate(config)) {
- return false;
- }
-
- if (getGroup() != null) {
- try {
- List groups = config.getAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, (List)null);
- if (groups != null) {
- return !groups.contains(getGroup().getIdentifier());
- }
- return true;
- } catch (CoreException e) {
- }
-
- }
-
- return false;
- }
-
- /**
- * Allows the underlying <code>ILaunchConfiguration</code> to be set
- * @param configuration the new configuration to set
- */
- protected void setLaunchConfiguration(ILaunchConfiguration configuration) {
- fConfiguration = configuration;
- }
-
- /**
- * Returns the underlying <code>ILaunchConfiguration</code>
- * @return the underlying <code>ILaunchConfiguration</code>
- */
- protected ILaunchConfiguration getLaunchConfiguration() {
- return fConfiguration;
- }
-
- /**
- * Sets the mode this action applies to
- * @param mode the modes to set
- */
- protected void setMode(String mode) {
- fMode = mode;
- }
-
- /**
- * Returns the mode this action applies to
- * @return
- */
- protected String getMode() {
- return fMode;
- }
-
- /**
- * Sets the <code>ILaunchGroup</code> this action applies to
- * @param group the new <code>ILaunchGroup</code>
- */
- protected void setGroup(ILaunchGroup group) {
- fGroup = group;
- }
-
- /**
- * Returns the underlying <code>ILaunchGroup</code>
- * @return the underlying <code>ILaunchGroup</code>
- */
- protected ILaunchGroup getGroup() {
- return fGroup;
- }
-
- /**
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- final CoreException[] ex = new CoreException[1];
- BusyIndicator.showWhile(DebugUIPlugin.getStandardDisplay(), new Runnable() {
- public void run() {
- try {
- List list = getLaunchConfiguration().getAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, (List)null);
- if (list == null) {
- list = new ArrayList();
- }
- list.add(getGroup().getIdentifier());
- ILaunchConfigurationWorkingCopy copy = getLaunchConfiguration().getWorkingCopy();
- copy.setAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, list);
- copy.doSave();
- setEnabled(false);
- } catch (CoreException e) {
- ex[0] = e;
- }
- }
- });
- if (ex[0] != null) {
- DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), ActionMessages.AddToFavoritesAction_2, ActionMessages.AddToFavoritesAction_3, ex[0].getStatus()); //
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CollapseAllAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CollapseAllAction.java
deleted file mode 100644
index 8e90c65..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/CollapseAllAction.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.ui.handlers.CollapseAllHandler;
-
-/**
- * CollapseAllAction
- */
-public class CollapseAllAction extends Action {
-
- private TreeViewer fViewer;
-
- public CollapseAllAction(TreeViewer viewer) {
- super(ActionMessages.CollapseAllAction_0, DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_COLLAPSE_ALL));
- setToolTipText(ActionMessages.CollapseAllAction_0);
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_COLLAPSE_ALL));
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_LCL_COLLAPSE_ALL));
- setActionDefinitionId(CollapseAllHandler.COMMAND_ID);
- fViewer = viewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- fViewer.collapseAll();
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConfigureColumnsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConfigureColumnsAction.java
deleted file mode 100644
index 6116173..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConfigureColumnsAction.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.ListSelectionDialog;
-import org.eclipse.ui.texteditor.IUpdate;
-
-/**
- * Configures visible columns in an asynch tree viewer/
- *
- * @since 3.2
- */
-public class ConfigureColumnsAction extends Action implements IUpdate {
-
- private TreeModelViewer fViewer;
-
- class ColumnContentProvider implements IStructuredContentProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object inputElement) {
- return ((IColumnPresentation)inputElement).getAvailableColumns();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- public void dispose() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- }
-
- class ColumnLabelProvider extends LabelProvider {
-
- private Map fImages = new HashMap();
-
- public Image getImage(Object element) {
- ImageDescriptor imageDescriptor = fViewer.getColumnPresentation().getImageDescriptor((String)element);
- if (imageDescriptor != null) {
- Image image = (Image) fImages.get(imageDescriptor);
- if (image == null) {
- image = imageDescriptor.createImage();
- fImages.put(imageDescriptor, image);
- }
- return image;
- }
- return null;
- }
-
- public String getText(Object element) {
- return fViewer.getColumnPresentation().getHeader((String)element);
- }
-
- public void dispose() {
- super.dispose();
- Iterator iterator = fImages.values().iterator();
- while (iterator.hasNext()) {
- Image image = (Image) iterator.next();
- image.dispose();
- }
- fImages.clear();
- }
-
-
-
- }
-
- public ConfigureColumnsAction(TreeModelViewer viewer) {
- setText(ActionMessages.ConfigureColumnsAction_0);
- setId(DebugUIPlugin.getUniqueIdentifier() + ".ConfigureColumnsAction"); //$NON-NLS-1$
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.CONFIGURE_COLUMNS_ACTION);
- fViewer = viewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.IUpdate#update()
- */
- public void update() {
- setEnabled(fViewer.isShowColumns());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run() {
- ListSelectionDialog dialog = new ListSelectionDialog(
- fViewer.getControl().getShell(),
- fViewer.getColumnPresentation(),
- new ColumnContentProvider(),
- new ColumnLabelProvider(),
- ActionMessages.ConfigureColumnsAction_1);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.CONFIGURE_COLUMNS_DIALOG);
- String[] visibleColumns = fViewer.getVisibleColumns();
- List initialSelection = new ArrayList(visibleColumns.length);
- for (int i = 0; i < visibleColumns.length; i++) {
- initialSelection.add(visibleColumns[i]);
- }
- dialog.setTitle(ActionMessages.ConfigureColumnsAction_2);
- dialog.setInitialElementSelections(initialSelection);
- if (dialog.open() == Window.OK) {
- Object[] result = dialog.getResult();
- if (result.length == 0) {
- fViewer.setShowColumns(false);
- } else {
- String[] ids = new String[result.length];
- System.arraycopy(result, 0, ids, 0, result.length);
- fViewer.resetColumnSizes(ids);
- fViewer.setVisibleColumns(ids);
- }
- }
-
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugAsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugAsAction.java
deleted file mode 100644
index 9a870f6..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugAsAction.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.LaunchShortcutsAction;
-
-/**
- * "Debug As" action in the top level "Run" menu.
- */
-public class DebugAsAction extends LaunchShortcutsAction {
-
- public DebugAsAction() {
- super(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugContextualLaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugContextualLaunchAction.java
deleted file mode 100644
index d114aab..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugContextualLaunchAction.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.ui.actions.ContextualLaunchAction;
-
-/**
- * Specialization of <code>ContextualLaunchAction</code> for the debug mode
- *
- * @see {@link ContextualLaunchAction}
- */
-public class DebugContextualLaunchAction extends ContextualLaunchAction {
-
- /**
- * Constructor
- */
- public DebugContextualLaunchAction() {
- super(ILaunchManager.DEBUG_MODE);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugHistoryMenuAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugHistoryMenuAction.java
deleted file mode 100644
index 496a5e3..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugHistoryMenuAction.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction;
-
-/**
- * Debug history menu in the top-level "Run" menu.
- */
-public class DebugHistoryMenuAction extends AbstractLaunchHistoryAction {
-
- public DebugHistoryMenuAction() {
- super(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugLastAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugLastAction.java
deleted file mode 100644
index 0dbd235..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugLastAction.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-/**
- * Relaunches the last debug-mode launch
- *
- * This menu item appears in the main 'Run' menu
- *
- * @see RelaunchLastAction
- * @see RunLastAction
- * @see ProfileLastAction
- */
-public class DebugLastAction extends RelaunchLastAction {
-
- /**
- * @see RelaunchLastAction#getMode()
- */
- public String getMode() {
- return ILaunchManager.DEBUG_MODE;
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.actions.LaunchDropDownAction#getLaunchGroupId()
- */
- public String getLaunchGroupId() {
- return IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP;
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getText()
- */
- protected String getText() {
- if(LaunchingResourceManager.isContextLaunchEnabled()) {
- return ActionMessages.DebugLastAction_1;
- }
- else {
- return ActionMessages.DebugLastAction_0;
- }
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getTooltipText()
- */
- protected String getTooltipText() {
- return IInternalDebugCoreConstants.EMPTY_STRING;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getCommandId()
- */
- protected String getCommandId() {
- return "org.eclipse.debug.ui.commands.DebugLast"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getDescription()
- */
- protected String getDescription() {
- if(LaunchingResourceManager.isContextLaunchEnabled()) {
- return ActionMessages.DebugLastAction_2;
- }
- else {
- return ActionMessages.DebugLastAction_3;
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugToolbarAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugToolbarAction.java
deleted file mode 100644
index 6e8152f..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/DebugToolbarAction.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.AbstractLaunchToolbarAction;
-
-/**
- * Debug drop-down history/favorites action.
- */
-public class DebugToolbarAction extends AbstractLaunchToolbarAction {
-
- public DebugToolbarAction() {
- super(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/EditLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/EditLaunchConfigurationAction.java
deleted file mode 100644
index 8edf58c..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/EditLaunchConfigurationAction.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import com.ibm.icu.text.MessageFormat;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.ILaunchGroup;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.SelectionListenerAction;
-
-/**
- * Opens the launch configuration dialog on a single launch configuration, based
- * on the the launch associated with the selected element.
- */
-public class EditLaunchConfigurationAction extends SelectionListenerAction {
-
- private ILaunchConfiguration fConfiguration = null;
- private String fMode = null;
- private boolean fTerminated = false;
-
- /**
- * Constructs a new action.
- */
- public EditLaunchConfigurationAction() {
- super(IInternalDebugCoreConstants.EMPTY_STRING);
- setEnabled(false);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.EDIT_LAUNCH_CONFIGURATION_ACTION);
- }
-
- /**
- * @see org.eclipse.ui.actions.SelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected boolean updateSelection(IStructuredSelection selection) {
- setLaunchConfiguration(null);
- setMode(null);
- if (selection.size() == 1) {
- Object object = selection.getFirstElement();
- ILaunch launch = null;
- if (object instanceof IAdaptable) {
- launch = (ILaunch)((IAdaptable)object).getAdapter(ILaunch.class);
- }
- if (launch == null) {
- if (object instanceof ILaunch) {
- launch = (ILaunch)object;
- } else if (object instanceof IDebugElement) {
- launch = ((IDebugElement)object).getLaunch();
- } else if (object instanceof IProcess) {
- launch = ((IProcess)object).getLaunch();
- }
- }
- if (launch != null) {
- ILaunchConfiguration configuration = launch.getLaunchConfiguration();
- if (configuration != null) {
- try {
- // The DebugUIPlugin creates stand-in launches with copied configurations
- // while a launch is waiting for a build. These copied configurations
- // have an attribute that points to the config that the user is really
- // launching.
- String underlyingHandle = configuration.getAttribute(DebugUIPlugin.ATTR_LAUNCHING_CONFIG_HANDLE, IInternalDebugCoreConstants.EMPTY_STRING);
- if (underlyingHandle.length() > 0) {
- ILaunchConfiguration underlyingConfig = DebugPlugin.getDefault().getLaunchManager().getLaunchConfiguration(underlyingHandle);
- if (underlyingConfig != null) {
- configuration = underlyingConfig;
- }
- }
- } catch (CoreException e1) {
- }
- setLaunchConfiguration(configuration);
- setMode(launch.getLaunchMode());
- setIsTerminated(launch.isTerminated());
- setText(MessageFormat.format(ActionMessages.EditLaunchConfigurationAction_1, new String[]{configuration.getName()}));
- ImageDescriptor descriptor = null;
- try {
- descriptor = DebugPluginImages.getImageDescriptor(configuration.getType().getIdentifier());
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- }
- setImageDescriptor(descriptor);
- }
- }
- }
-
- // Disable the action if the launch config is private
- ILaunchConfiguration config = getLaunchConfiguration();
- if (config == null) {
- return false;
- }
- return !DebugUITools.isPrivate(config);
- }
-
- protected void setLaunchConfiguration(ILaunchConfiguration configuration) {
- fConfiguration = configuration;
- }
-
- protected ILaunchConfiguration getLaunchConfiguration() {
- return fConfiguration;
- }
-
- protected void setMode(String mode) {
- fMode = mode;
- }
-
- protected String getMode() {
- return fMode;
- }
-
- protected boolean isTerminated() {
- return fTerminated;
- }
-
- protected void setIsTerminated(boolean terminated) {
- fTerminated = terminated;
- }
-
- /**
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- ILaunchGroup group = DebugUITools.getLaunchGroup(getLaunchConfiguration(), getMode());
- if (group != null) {
- if(isTerminated()) {
- DebugUITools.openLaunchConfigurationDialog(
- DebugUIPlugin.getShell(), getLaunchConfiguration(),
- group.getIdentifier(), null);
- }
- else {
- DebugUIPlugin.openLaunchConfigurationEditDialog(
- DebugUIPlugin.getShell(), getLaunchConfiguration(),
- group.getIdentifier(), null, false);
- }
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ExecutionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ExecutionAction.java
deleted file mode 100644
index 8ffc08d..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ExecutionAction.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * This is the super class of the Run & Debug actions which appears in the desktop menu and toolbar.
- */
-public abstract class ExecutionAction implements IActionDelegate2 {
-
- private String fLaunchGroupIdentifier;
-
- public ExecutionAction(String launchGroupIdentifier) {
- fLaunchGroupIdentifier = launchGroupIdentifier;
- }
-
- /**
- * @see IActionDelegate2#runWithEvent(IAction, Event)
- */
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-
- /**
- * Open the launch configuration dialog, passing in the current workbench selection.
- */
- private void openLaunchConfigurationDialog() {
- IWorkbenchWindow dwindow= DebugUIPlugin.getActiveWorkbenchWindow();
- if (dwindow == null) {
- return;
- }
- DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUIPlugin.getShell(), new StructuredSelection(), fLaunchGroupIdentifier);
- }
-
- protected LaunchConfigurationManager getLaunchConfigurationManager() {
- return DebugUIPlugin.getDefault().getLaunchConfigurationManager();
- }
-
- /**
- * Returns the mode of a launcher to use for this action
- */
- protected abstract String getMode();
-
- /**
- * @see org.eclipse.ui.IActionDelegate2#dispose()
- */
- public void dispose() {
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- ILaunchConfiguration configuration = getLaunchConfigurationManager().getLastLaunch(fLaunchGroupIdentifier);
- if (configuration == null) {
- openLaunchConfigurationDialog();
- } else {
- DebugUITools.launch(configuration, getMode());
- }
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/IToggleBreakpointsTargetManagerListener.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/IToggleBreakpointsTargetManagerListener.java
deleted file mode 100644
index ba0ca5f..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/IToggleBreakpointsTargetManagerListener.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-/**
- * Listener for changes in the preferred toggle targets in the toggle
- * breakpoints target manager. This interface allows toggle breakpoint
- * actions to update their enablement when the user changes the preferred
- * toggle target settings.
- *
- * @see ToggleBreakpointsTargetManager
- * @see IToggleBreakpointsTargetFactory
- * @since 3.5
- */
-public interface IToggleBreakpointsTargetManagerListener {
-
- /**
- * Called when the preferred toggle targets have changed.
- */
- public void preferredTargetsChanged();
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchConfigurationAction.java
deleted file mode 100644
index 2eb957e..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchConfigurationAction.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.ILaunchGroup;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Event;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * This class provides an action wrapper for adding launch configuration actions to the context menu
- * of the Run->... menu item
- *
- * @since 3.3
- */
-public class LaunchConfigurationAction extends Action {
-
- private ILaunchConfiguration fConfig;
- private String fMode;
-
- /**
- * Constructor
- * @param mode
- * @param text the text for the action
- * @param image the image for the action
- */
- public LaunchConfigurationAction(ILaunchConfiguration config, String mode, String text, ImageDescriptor image, int accelerator) {
- super(MessageFormat.format(ActionMessages.LaunchConfigurationAction_0, new String[] {Integer.toString(accelerator), text}), image);
- fConfig = config;
- fMode = mode;
- }
-
- /**
- * Allows access to the launch configuration associated with the action
- * @return the associated launch configuration
- */
- public ILaunchConfiguration getLaunchConfiguration() {
- return fConfig;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run() {
- DebugUITools.launch(fConfig, fMode);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#runWithEvent(org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(Event event) {
- if ((event.stateMask & SWT.MOD1) > 0) {
- try {
- ILaunchGroup group = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(fConfig.getType(), fMode);
- if(group != null) {
- DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUIPlugin.getShell(), new StructuredSelection(fConfig), group.getIdentifier());
- }
- else {
- run();
- }
- }
- catch(CoreException ce) {}
- }
- else {
- run();
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java
deleted file mode 100644
index 77946cf..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.expressions.EvaluationContext;
-import org.eclipse.core.expressions.Expression;
-import org.eclipse.core.expressions.IEvaluationContext;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension;
-import org.eclipse.debug.internal.ui.stringsubstitution.SelectedResourceManager;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.ILaunchGroup;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IEditorPart;
-
-/**
- * Launch shortcut action (proxy to a launch shortcut extension)
- */
-public class LaunchShortcutAction extends Action {
-
- private String fMode;
- private LaunchShortcutExtension fShortcut;
-
- /**
- * Constructor
- * @param groupid the id of the launch group
- * @param mode the mode to launch in
- * @param shortcut the underlying shortcut
- */
- public LaunchShortcutAction(String mode, LaunchShortcutExtension shortcut) {
- super(shortcut.getLabel(), shortcut.getImageDescriptor());
- fShortcut = shortcut;
- fMode = mode;
- updateEnablement();
- }
-
- /**
- * Runs with either the active editor or workbench selection.
- *
- * @see IAction#run()
- */
- public void run() {
- IStructuredSelection ss = SelectedResourceManager.getDefault().getCurrentSelection();
- Object o = ss.getFirstElement();
- if(o instanceof IEditorPart) {
- fShortcut.launch((IEditorPart) o, fMode);
- }
- else {
- fShortcut.launch(ss, fMode);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#runWithEvent(org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(Event event) {
- if ((event.stateMask & SWT.MOD1) > 0) {
- Set types = fShortcut.getAssociatedConfigurationTypes();
- if(!types.isEmpty()) {
- LaunchingResourceManager lrm = DebugUIPlugin.getDefault().getLaunchingResourceManager();
- IStructuredSelection selection = SelectedResourceManager.getDefault().getCurrentSelection();
- ArrayList shortcuts = new ArrayList();
- shortcuts.add(fShortcut);
- IResource resource = SelectedResourceManager.getDefault().getSelectedResource();
- if(resource == null) {
- resource = lrm.getLaunchableResource(shortcuts, selection);
- }
- List configs = lrm.getParticipatingLaunchConfigurations(selection, resource, shortcuts, fMode);
- LaunchConfigurationManager lcm = DebugUIPlugin.getDefault().getLaunchConfigurationManager();
- ILaunchConfigurationType type = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType((String) types.toArray()[0]);
- String groupid = null;
- ILaunchGroup group = lcm.getLaunchGroup(type, fMode);
- if(group != null) {
- groupid = group.getIdentifier();
- }
- ILaunchConfiguration config = lcm.getMRUConfiguration(configs, group, resource);
- if(config == null) {
- if(configs.size() > 0) {
- config = (ILaunchConfiguration) configs.get(0);
- }
- }
- if(config != null) {
- selection = new StructuredSelection(config);
- }
- else {
- if(type != null) {
- selection = new StructuredSelection(type);
- }
- }
- DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUIPlugin.getShell(), selection, groupid);
- }
- else {
- run();
- }
- }
- else {
- run();
- }
- }
-
- /**
- * Since these actions are re-created each time the run/debug as menu is
- * filled, the enablement of this action is static.
- */
- private void updateEnablement() {
- boolean enabled = false;
- IStructuredSelection ss = SelectedResourceManager.getDefault().getCurrentSelection();
- Object o = ss.getFirstElement();
- if(o instanceof IEditorPart) {
- enabled = true;
- }
- else {
- try {
- // check enablement logic, if any
- Expression expression = fShortcut.getShortcutEnablementExpression();
- if (expression == null) {
- enabled = !ss.isEmpty();
- } else {
- List list = ss.toList();
- IEvaluationContext context = new EvaluationContext(null, list);
- context.addVariable("selection", list); //$NON-NLS-1$
- enabled = fShortcut.evalEnablementExpression(context, expression);
- }
- } catch (CoreException e) {}
- }
- setEnabled(enabled);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchablePropertyTester.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchablePropertyTester.java
deleted file mode 100644
index 6a28f7d..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchablePropertyTester.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
-import org.eclipse.debug.ui.actions.ILaunchable;
-
-/**
- * Tests if an object is launchable.
- */
-public class LaunchablePropertyTester extends PropertyTester {
-
- /**
- * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
- */
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- if ("launchable".equals(property)) { //$NON-NLS-1$
- if (DebugUIPlugin.getDefault().getLaunchConfigurationManager().launchModeAvailable((String)expectedValue)) {
- return Platform.getAdapterManager().hasAdapter(receiver, ILaunchable.class.getName());
- }
- }
- if("contextlaunch".equals(property)) { //$NON-NLS-1$
- if(DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_USE_CONTEXTUAL_LAUNCH)) {
- IResource res = getResource(receiver);
- if(res != null) {
- return res.isAccessible() && getLaunchConfigurationManager().getLaunchShortcuts(getResource(receiver)).size() > 0 && getLaunchConfigurationManager().isSharedConfig(receiver) == null;
- }
- return false;
- }
- }
- return false;
- }
-
- /**
- * Returns the launch configuration manager
- * @return the launch configuration manager
- */
- protected LaunchConfigurationManager getLaunchConfigurationManager() {
- return DebugUIPlugin.getDefault().getLaunchConfigurationManager();
- }
-
- /**
- * Returns the resource this property page is open on.
- *
- * @return resource
- */
- protected IResource getResource(Object element) {
- IResource resource = null;
- if (element instanceof IResource) {
- resource = (IResource) element;
- } else if (element instanceof IAdaptable) {
- resource = (IResource) ((IAdaptable)element).getAdapter(IResource.class);
- }
- return resource;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenDebugConfigurations.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenDebugConfigurations.java
deleted file mode 100644
index 4445eee..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenDebugConfigurations.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.OpenLaunchDialogAction;
-
-/**
- * Opens the launch config dialog on the debug launch group.
- */
-public class OpenDebugConfigurations extends OpenLaunchDialogAction {
-
- public OpenDebugConfigurations() {
- super(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenProfileConfigurations.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenProfileConfigurations.java
deleted file mode 100644
index 51e62ee..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenProfileConfigurations.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.OpenLaunchDialogAction;
-
-/**
- * Opens the launch config dialog on the run launch group.
- */
-public class OpenProfileConfigurations extends OpenLaunchDialogAction {
-
- public OpenProfileConfigurations() {
- super(IDebugUIConstants.ID_PROFILE_LAUNCH_GROUP);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenRunConfigurations.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenRunConfigurations.java
deleted file mode 100644
index b84d912..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/OpenRunConfigurations.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.OpenLaunchDialogAction;
-
-/**
- * Opens the launch config dialog on the run launch group.
- */
-public class OpenRunConfigurations extends OpenLaunchDialogAction {
-
- public OpenRunConfigurations() {
- super(IDebugUIConstants.ID_RUN_LAUNCH_GROUP);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileAsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileAsAction.java
deleted file mode 100644
index 321d03c..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileAsAction.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.LaunchShortcutsAction;
-
-/**
- * "Profile As" action in the top level "Run" menu.
- */
-public class ProfileAsAction extends LaunchShortcutsAction {
-
- public ProfileAsAction() {
- super(IDebugUIConstants.ID_PROFILE_LAUNCH_GROUP);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileContextualLaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileContextualLaunchAction.java
deleted file mode 100644
index 257eee5..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileContextualLaunchAction.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.ui.actions.ContextualLaunchAction;
-
-/**
- * Specialization of <code>ContextualLaunchAction</code> for the profile mode
- *
- * @see {@link ContextualLaunchAction}
- */
-public class ProfileContextualLaunchAction extends ContextualLaunchAction {
-
- /**
- * Constructor
- */
- public ProfileContextualLaunchAction() {
- super(ILaunchManager.PROFILE_MODE);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileHistoryMenuAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileHistoryMenuAction.java
deleted file mode 100644
index 317ae7a..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileHistoryMenuAction.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction;
-
-/**
- * Profile history menu in the top-level "Run" menu.
- */
-public class ProfileHistoryMenuAction extends AbstractLaunchHistoryAction {
-
- public ProfileHistoryMenuAction() {
- super(IDebugUIConstants.ID_PROFILE_LAUNCH_GROUP);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileLastAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileLastAction.java
deleted file mode 100644
index 66f14d8..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileLastAction.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-/**
- * Relaunches the last profile-mode launch
- *
- * This menu item appears in the main 'Run' menu
- *
- * @see RelaunchLastAction
- * @see RunLastAction
- * @see DebugLastAction
- *
- */
-public class ProfileLastAction extends RelaunchLastAction {
-
- /**
- * @see RelaunchLastAction#getMode()
- */
- public String getMode() {
- return ILaunchManager.PROFILE_MODE;
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.actions.LaunchDropDownAction#getLaunchGroupId()
- */
- public String getLaunchGroupId() {
- return IDebugUIConstants.ID_PROFILE_LAUNCH_GROUP;
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getText()
- */
- protected String getText() {
- if(LaunchingResourceManager.isContextLaunchEnabled()) {
- return ActionMessages.ProfileLastAction_1;
- }
- else {
- return ActionMessages.ProfileLastAction_0;
- }
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getTooltipText()
- */
- protected String getTooltipText() {
- return IInternalDebugCoreConstants.EMPTY_STRING;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getCommandId()
- */
- protected String getCommandId() {
- return "org.eclipse.debug.ui.commands.ProfileLast"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getDescription()
- */
- protected String getDescription() {
- if(LaunchingResourceManager.isContextLaunchEnabled()) {
- return ActionMessages.ProfileLastAction_2;
- }
- else {
- return ActionMessages.ProfileLastAction_3;
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileToolbarAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileToolbarAction.java
deleted file mode 100644
index 469f8fd..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ProfileToolbarAction.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.AbstractLaunchToolbarAction;
-
-/**
- * Profile drop-down history/favorites action.
- */
-public class ProfileToolbarAction extends AbstractLaunchToolbarAction {
-
- public ProfileToolbarAction() {
- super(IDebugUIConstants.ID_PROFILE_LAUNCH_GROUP);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java
deleted file mode 100644
index ca18fc0..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-
-public class RelaunchActionDelegate extends AbstractDebugActionDelegate {
-
- /**
- * @see AbstractDebugActionDelegate#doAction(Object)
- */
- protected void doAction(Object object) {
- ILaunch launch= DebugUIPlugin.getLaunch(object);
- if (launch != null) {
- relaunch(launch.getLaunchConfiguration(), launch.getLaunchMode());
- }
- }
-
- /**
- * Re-launches the given configuration in the specified mode.
- */
- public static void relaunch(ILaunchConfiguration config, String mode) {
- DebugUITools.launch(config, mode);
- }
-
- /**
- * @see AbstractDebugActionDelegate#isEnabledFor(Object)
- */
- protected boolean isEnabledFor(Object element) {
- ILaunch launch= DebugUIPlugin.getLaunch(element);
- return launch != null && launch.getLaunchConfiguration() != null && LaunchConfigurationManager.isVisible(launch.getLaunchConfiguration());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate#getTargetSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected IStructuredSelection getTargetSelection(IStructuredSelection s) {
- if (s.isEmpty()) {
- return s;
- }
- Set dups = new LinkedHashSet();
- Iterator iterator = s.iterator();
- while (iterator.hasNext()) {
- Object object = iterator.next();
- ILaunch launch = DebugUIPlugin.getLaunch(object);
- if (launch == null) {
- return s;
- }
- dups.add(launch);
- }
- return new StructuredSelection(dups.toArray());
- }
-
- /**
- * @see AbstractDebugActionDelegate#getErrorDialogMessage()
- */
- protected String getErrorDialogMessage() {
- return ActionMessages.RelaunchActionDelegate_Launch_Failed_1;
- }
-
- /**
- * @see AbstractDebugActionDelegate#getStatusMessage()
- */
- protected String getStatusMessage() {
- return ActionMessages.RelaunchActionDelegate_An_exception_occurred_while_launching_2;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java
deleted file mode 100644
index e257f49..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchLastAction.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.core.commands.Command;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
-import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.contextlaunching.ContextRunner;
-import org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.ILaunchGroup;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.commands.ICommandService;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * Relaunches the last launch.
- *
- * @see ContextRunner
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager
- * @see ILaunchConfiguration
- * @see RunLastAction
- * @see DebugLastAction
- * @see ProfileLastAction
- *
- */
-public abstract class RelaunchLastAction implements IWorkbenchWindowActionDelegate, IPropertyChangeListener {
-
- private IWorkbenchWindow fWorkbenchWindow;
-
- private IAction fAction;
-
- /**
- * @see IWorkbenchWindowActionDelegate
- */
- public void dispose(){
- DebugUIPlugin.getDefault().getPluginPreferences().removePropertyChangeListener(this);
- }
-
- /**
- * @see IWorkbenchWindowActionDelegate
- */
- public void init(IWorkbenchWindow window){
- fWorkbenchWindow = window;
- DebugUIPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(this);
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action){
- if(LaunchingResourceManager.isContextLaunchEnabled()) {
- ILaunchGroup group = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(getLaunchGroupId());
- ContextRunner.getDefault().launch(group);
- return;
- }
- try {
- final ILaunchConfiguration configuration = getLastLaunch();
- if (configuration != null) {
- if (configuration.supportsMode(getMode())) {
- DebugUITools.launch(configuration, getMode());
- } else {
- String configName = configuration.getName();
- String title = ActionMessages.RelaunchLastAction_Cannot_relaunch_1;
- String message = MessageFormat.format(ActionMessages.RelaunchLastAction_Cannot_relaunch___0___because_it_does_not_support__2__mode_2, new String[] {configName, getMode()});
- MessageDialog.openError(getShell(), title, message);
- }
- } else {
- // If the history is empty, just open the launch config dialog
- openLaunchConfigurationDialog();
- }
- } catch (CoreException ce) {
- DebugUIPlugin.errorDialog(getShell(), ActionMessages.RelaunchLastAction_Error_relaunching_3, ActionMessages.RelaunchLastAction_Error_encountered_attempting_to_relaunch_4, ce); //
- }
- }
-
- /**
- * Open the launch configuration dialog, passing in the current workbench selection.
- */
- private void openLaunchConfigurationDialog() {
- IWorkbenchWindow dwindow= DebugUIPlugin.getActiveWorkbenchWindow();
- if (dwindow == null) {
- return;
- }
- LaunchConfigurationsDialog dialog = new LaunchConfigurationsDialog(DebugUIPlugin.getShell(), DebugUIPlugin.getDefault().getLaunchConfigurationManager().getDefaultLaunchGroup(getMode()));
- dialog.setOpenMode(LaunchConfigurationsDialog.LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_LAST_LAUNCHED);
- dialog.open();
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection){
- if (fAction == null) {
- initialize(action);
- }
- }
-
- /**
- * Set the enabled state of the underlying action based on whether there are any
- * registered launch configuration types that understand how to launch in the
- * mode of this action.
- */
- private void initialize(IAction action) {
- fAction = action;
- if(fAction != null) {
- fAction.setEnabled(existsConfigTypesForMode());
- fAction.setText(getText());
- fAction.setToolTipText(getTooltipText());
- String commandId = getCommandId();
- ICommandService service = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
- if (service != null) {
- Command command = service.getCommand(commandId);
- command.undefine();
- command = service.getCommand(commandId);
- command.define(DebugUIPlugin.removeAccelerators(getText()), getDescription(), service.getCategory("org.eclipse.debug.ui.category.run")); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Return whether there are any registered launch configuration types for
- * the mode of this action.
- *
- * @return whether there are any registered launch configuration types for
- * the mode of this action
- */
- private boolean existsConfigTypesForMode() {
- ILaunchConfigurationType[] configTypes = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes();
- for (int i = 0; i < configTypes.length; i++) {
- ILaunchConfigurationType configType = configTypes[i];
- if (configType.supportsMode(getMode())) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Return the last launch that occurred in the workspace.
- */
- protected ILaunchConfiguration getLastLaunch() {
- return DebugUIPlugin.getDefault().getLaunchConfigurationManager().getFilteredLastLaunch(getLaunchGroupId());
- }
-
- /**
- * Returns the parent shell for this menu item
- * @return the parent shell
- */
- protected Shell getShell() {
- return fWorkbenchWindow.getShell();
- }
-
- /**
- * @see org.eclipse.core.runtime.Preferences$IPropertyChangeListener#propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if(event.getProperty().equals(IInternalDebugUIConstants.PREF_USE_CONTEXTUAL_LAUNCH)) {
- initialize(fAction);
- }
- }
-
- /**
- * Returns the mode (run or debug) of this action.
- */
- public abstract String getMode();
-
- /**
- * Returns the launch group id of this action.
- */
- public abstract String getLaunchGroupId();
-
- /**
- * Returns the text to display on the menu item.
- * @return the text for the menu item
- *
- * @since 3.3
- */
- protected abstract String getText();
-
- /**
- * Returns the text to display in the menu item tooltip
- * @return the text for the tooltip
- *
- * @since 3.3
- */
- protected abstract String getTooltipText();
-
- /**
- * Returns the command id this action is associated with.
- *
- * @return command id
- * @since 3.3
- */
- protected abstract String getCommandId();
-
- /**
- * Returns a description for this action (to associate with command).
- *
- * @return command description
- * @since 3.3
- */
- protected abstract String getDescription();
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java
deleted file mode 100644
index 70a3493..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.ILaunchesListener2;
-import org.eclipse.jface.action.IAction;
-
-/**
- * Removes all terminated/detached launches from the
- * active debug view.
- */
-public class RemoveAllTerminatedAction extends AbstractRemoveAllActionDelegate implements ILaunchesListener2 {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#isEnabled()
- */
- protected boolean isEnabled() {
- ILaunch[] launches = DebugPlugin.getDefault().getLaunchManager().getLaunches();
- if (launches != null) {
- for (int i= 0; i < launches.length; i++) {
- if (launches[i].isTerminated()) {
- return true;
- }
- }
- }
- return false;
- }
-
- public static void removeTerminatedLaunches(ILaunch[] elements) {
- List removed = new ArrayList();
- for (int i = 0; i < elements.length; i++) {
- ILaunch launch = elements[i];
- if (launch.isTerminated()) {
- removed.add(launch);
- }
- }
- if (!removed.isEmpty()) {
- ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
- manager.removeLaunches((ILaunch[])removed.toArray(new ILaunch[removed.size()]));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#initialize()
- */
- protected void initialize() {
- DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#dispose()
- */
- public void dispose() {
- super.dispose();
- DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchesListener#launchesAdded(org.eclipse.debug.core.ILaunch[])
- */
- public void launchesAdded(ILaunch[] launches) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchesListener#launchesChanged(org.eclipse.debug.core.ILaunch[])
- */
- public void launchesChanged(ILaunch[] launches) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchesListener#launchesRemoved(org.eclipse.debug.core.ILaunch[])
- */
- public void launchesRemoved(ILaunch[] launches) {
- IAction action = getAction();
- if (action != null) {
- if (action.isEnabled()) {
- update();
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchesListener2#launchesTerminated(org.eclipse.debug.core.ILaunch[])
- */
- public void launchesTerminated(ILaunch[] launches) {
- update();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- ILaunch[] launches = DebugPlugin.getDefault().getLaunchManager().getLaunches();
- removeTerminatedLaunches(launches);
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetAction.java
deleted file mode 100644
index 2c79569..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetAction.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Wind River Systems - added support for IToggleBreakpointsTargetFactory
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.IPartService;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-/**
- * Global retargettable debug action.
- *
- * @since 3.0
- */
-public abstract class RetargetAction implements IWorkbenchWindowActionDelegate, IPartListener, IActionDelegate2 {
-
- protected IWorkbenchWindow fWindow = null;
- private IWorkbenchPart fActivePart = null;
- private Object fTargetAdapter = null;
- private IAction fAction = null;
- private static final ISelection EMPTY_SELECTION = new EmptySelection();
-
- static class EmptySelection implements ISelection {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelection#isEmpty()
- */
- public boolean isEmpty() {
- return true;
- }
- }
-
- /**
- * Returns the current selection in the active part, possibly
- * and empty selection, but never <code>null</code>.
- *
- * @return the selection in the active part, possibly empty
- */
- protected ISelection getTargetSelection() {
- if (fActivePart != null) {
- ISelectionProvider selectionProvider = fActivePart.getSite().getSelectionProvider();
- if (selectionProvider != null) {
- return selectionProvider.getSelection();
- }
- }
- return EMPTY_SELECTION;
- }
-
- protected IWorkbenchPart getActivePart() {
- return fActivePart;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
- */
- public void dispose() {
- fWindow.getPartService().removePartListener(this);
- fActivePart = null;
- fTargetAdapter = null;
-
- }
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window) {
- this.fWindow = window;
- IPartService partService = window.getPartService();
- partService.addPartListener(this);
- IWorkbenchPart part = partService.getActivePart();
- if (part != null) {
- partActivated(part);
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- if (fTargetAdapter != null) {
- try {
- if (isTargetEnabled()) {
- performAction(fTargetAdapter, getTargetSelection(), fActivePart);
- } else {
- String message = getOperationUnavailableMessage();
- IStatus status = new Status(IStatus.INFO, DebugUIPlugin.getUniqueIdentifier(), message);
- DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), DebugUIPlugin.removeAccelerators(action.getText()), message, status);
- }
- } catch (CoreException e) {
- DebugUIPlugin.errorDialog(fWindow.getShell(), ActionMessages.RetargetAction_2, ActionMessages.RetargetAction_3, e.getStatus()); //
- }
- }
- }
-
- /**
- * Returns a message to display when we find that the operation is not enabled
- * when invoked in an editor (we check enabled state before running in this case,
- * rather than updating on each selection change - see bug 180441).
- *
- * @return information message when unavailable
- */
- protected abstract String getOperationUnavailableMessage();
-
- /**
- * Performs the specific breakpoint toggling.
- *
- * @param selection selection in the active part
- * @param part active part
- * @throws CoreException if an exception occurs
- */
- protected abstract void performAction(Object target, ISelection selection, IWorkbenchPart part) throws CoreException;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- // if the active part did not provide an adapter, see if the selection does
- if (fTargetAdapter == null && selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) selection;
- if (!ss.isEmpty()) {
- Object object = ss.getFirstElement();
- if (object instanceof IAdaptable) {
- fTargetAdapter = getAdapter((IAdaptable) object);
- }
- }
- }
- boolean enabled = fTargetAdapter != null;
- if (selection instanceof IStructuredSelection) {
- enabled = isTargetEnabled();
- }
- action.setEnabled(enabled);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener#partActivated(org.eclipse.ui.IWorkbenchPart)
- */
- public void partActivated(IWorkbenchPart part) {
- fActivePart = part;
- IResource resource = (IResource) part.getAdapter(IResource.class);
- if (resource == null && part instanceof IEditorPart) {
- resource = (IResource) ((IEditorPart)part).getEditorInput().getAdapter(IResource.class);
- }
- if (resource != null) {
- fTargetAdapter = getAdapter(resource);
- }
- if (fTargetAdapter == null) {
- fTargetAdapter = getAdapter(part);
- }
- if (fAction != null) {
- fAction.setEnabled(fTargetAdapter != null);
- }
- }
-
- protected Object getAdapter(IAdaptable adaptable) {
- Object adapter = adaptable.getAdapter(getAdapterClass());
- if (adapter == null) {
- IAdapterManager adapterManager = Platform.getAdapterManager();
- if (adapterManager.hasAdapter(adaptable, getAdapterClass().getName())) {
- adapter = adapterManager.loadAdapter(adaptable, getAdapterClass().getName());
- }
- }
- return adapter;
- }
-
- /**
- * Returns the type of adapter (target) this action works on.
- *
- * @return the type of adapter this action works on
- */
- protected abstract Class getAdapterClass();
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener#partBroughtToTop(org.eclipse.ui.IWorkbenchPart)
- */
- public void partBroughtToTop(IWorkbenchPart part) {
- }
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener#partClosed(org.eclipse.ui.IWorkbenchPart)
- */
- public void partClosed(IWorkbenchPart part) {
- clearPart(part);
- }
-
- /**
- * Clears reference to active part and adapter when a relevant part
- * is closed or no longer active.
- *
- * @param part workbench part that has been closed or no longer active
- */
- protected void clearPart(IWorkbenchPart part) {
- if (part.equals(fActivePart)) {
- fActivePart = null;
- fTargetAdapter = null;
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener#partDeactivated(org.eclipse.ui.IWorkbenchPart)
- */
- public void partDeactivated(IWorkbenchPart part) {
- clearPart(part);
- }
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener#partOpened(org.eclipse.ui.IWorkbenchPart)
- */
- public void partOpened(IWorkbenchPart part) {
- }
-
- /**
- * Returns whether the target adapter is enabled
- *
- * @return whether target adapter is enabled
- */
- protected boolean isTargetEnabled() {
- if (fTargetAdapter != null) {
- if (fActivePart != null) {
- return canPerformAction(fTargetAdapter, getTargetSelection(), fActivePart);
- }
- }
- return false;
- }
-
- /**
- * Returns whether the specific operation is supported.
- *
- * @param target the target adapter
- * @param selection the selection to verify the operation on
- * @param part the part the operation has been requested on
- * @return whether the operation can be performed
- */
- protected abstract boolean canPerformAction(Object target, ISelection selection, IWorkbenchPart part);
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- fAction = action;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-
- /**
- * Returns the proxy to this action delegate or <code>null</code>
- *
- * @return action proxy or <code>null</code>
- */
- protected IAction getAction() {
- return fAction;
- }
-
- /**
- * Returns whether there is currently a target adapter for this action.
- *
- * @return whether the action has a target adapter.
- */
- protected boolean hasTargetAdapter() {
- return fTargetAdapter != null;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetRunToLineAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetRunToLineAction.java
deleted file mode 100644
index d624598..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetRunToLineAction.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Wind River - Pawel Piech - Added use of adapters to support non-standard models (bug 213074)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.ISuspendResume;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.actions.IRunToLineTarget;
-import org.eclipse.debug.ui.contexts.DebugContextEvent;
-import org.eclipse.debug.ui.contexts.IDebugContextListener;
-import org.eclipse.debug.ui.contexts.IDebugContextService;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * Global retargettable run to line action.
- *
- * @since 3.0
- */
-public class RetargetRunToLineAction extends RetargetAction {
-
- private DebugContextListener fContextListener = new DebugContextListener();
- private ISuspendResume fTargetElement = null;
-
- class DebugContextListener implements IDebugContextListener {
-
- protected void contextActivated(ISelection selection) {
- fTargetElement = null;
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) selection;
- if (ss.size() == 1) {
- fTargetElement = (ISuspendResume)
- DebugPlugin.getAdapter(ss.getFirstElement(), ISuspendResume.class);
- }
- }
- IAction action = getAction();
- if (action != null) {
- action.setEnabled(fTargetElement != null && hasTargetAdapter());
- }
- }
-
- public void debugContextChanged(DebugContextEvent event) {
- contextActivated(event.getContext());
- }
-
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
- */
- public void dispose() {
- DebugUITools.getDebugContextManager().getContextService(fWindow).removeDebugContextListener(fContextListener);
- super.dispose();
- }
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window) {
- super.init(window);
- IDebugContextService service = DebugUITools.getDebugContextManager().getContextService(window);
- service.addDebugContextListener(fContextListener);
- ISelection activeContext = service.getActiveContext();
- fContextListener.contextActivated(activeContext);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetAction#canPerformAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart)
- */
- protected boolean canPerformAction(Object target, ISelection selection, IWorkbenchPart part) {
- return fTargetElement != null &&
- ((IRunToLineTarget)target).canRunToLine(part, selection, fTargetElement);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetAction#getAdapterClass()
- */
- protected Class getAdapterClass() {
- return IRunToLineTarget.class;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetAction#performAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart)
- */
- protected void performAction(Object target, ISelection selection, IWorkbenchPart part) throws CoreException {
- ((IRunToLineTarget)target).runToLine(part, selection, fTargetElement);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetAction#getOperationUnavailableMessage()
- */
- protected String getOperationUnavailableMessage() {
- return ActionMessages.RetargetRunToLineAction_0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if (fTargetElement == null) {
- action.setEnabled(false);
- } else {
- super.selectionChanged(action, selection);
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunAsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunAsAction.java
deleted file mode 100644
index efbd375..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunAsAction.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.LaunchShortcutsAction;
-
-/**
- * "Run As" action in the top level "Run" menu.
- */
-public class RunAsAction extends LaunchShortcutsAction {
-
- public RunAsAction() {
- super(IDebugUIConstants.ID_RUN_LAUNCH_GROUP);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunContextualLaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunContextualLaunchAction.java
deleted file mode 100644
index 25b9964..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunContextualLaunchAction.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.ui.actions.ContextualLaunchAction;
-
-/**
- * Specialization of <code>ContextualLaunchAction</code> for the run mode
- *
- * @see {@link ContextualLaunchAction}
- */
-public class RunContextualLaunchAction extends ContextualLaunchAction {
-
- /**
- * Constructor
- */
- public RunContextualLaunchAction() {
- super(ILaunchManager.RUN_MODE);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunHistoryMenuAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunHistoryMenuAction.java
deleted file mode 100644
index fedfecc..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunHistoryMenuAction.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction;
-
-/**
- * Run history menu in the top-level "Run" menu.
- */
-public class RunHistoryMenuAction extends AbstractLaunchHistoryAction {
-
- public RunHistoryMenuAction() {
- super(IDebugUIConstants.ID_RUN_LAUNCH_GROUP);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunLastAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunLastAction.java
deleted file mode 100644
index 17fa319..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunLastAction.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-/**
- * Relaunches the last run-mode launch
- *
- * This menu item appears in the main 'Run' menu
- *
- * @see RelaunchLastAction
- * @see DebugLastAction
- * @see ProfileLastAction
- */
-public class RunLastAction extends RelaunchLastAction {
-
- /**
- * @see RelaunchLastAction#getMode()
- */
- public String getMode() {
- return ILaunchManager.RUN_MODE;
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.actions.LaunchDropDownAction#getLaunchGroupId()
- */
- public String getLaunchGroupId() {
- return IDebugUIConstants.ID_RUN_LAUNCH_GROUP;
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getText()
- */
- protected String getText() {
- if(LaunchingResourceManager.isContextLaunchEnabled()) {
- return ActionMessages.RunLastAction_1;
- }
- else {
- return ActionMessages.RunLastAction_0;
- }
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getTooltipText()
- */
- protected String getTooltipText() {
- return IInternalDebugCoreConstants.EMPTY_STRING;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getCommandId()
- */
- protected String getCommandId() {
- return "org.eclipse.debug.ui.commands.RunLast"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RelaunchLastAction#getDescription()
- */
- protected String getDescription() {
- if(LaunchingResourceManager.isContextLaunchEnabled()) {
- return ActionMessages.RunLastAction_2;
- }
- else {
- return ActionMessages.RunLastAction_3;
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunToolbarAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunToolbarAction.java
deleted file mode 100644
index 353cc19..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RunToolbarAction.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.AbstractLaunchToolbarAction;
-
-/**
- * Run drop-down history/favorites action.
- */
-public class RunToolbarAction extends AbstractLaunchToolbarAction {
-
- public RunToolbarAction() {
- super(IDebugUIConstants.ID_RUN_LAUNCH_GROUP);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SelectAllAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SelectAllAction.java
deleted file mode 100644
index 466aa55..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SelectAllAction.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.debug.ui.IDebugView;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.IViewPart;
-
-public abstract class SelectAllAction extends AbstractRemoveAllActionDelegate {
-
- private IViewPart fView;
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.AbstractSelectionActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- fView = view;
- IDebugView debugView = (IDebugView) getView().getAdapter(IDebugView.class);
- if (debugView != null) {
- debugView.setAction(getActionId(), getAction());
- }
- super.init(view);
- }
-
- protected IViewPart getView() {
- return fView;
- }
-
- protected abstract String getActionId();
-
- private void collectExpandedAndVisible(TreeItem[] items, List result) {
- for (int i= 0; i < items.length; i++) {
- TreeItem item= items[i];
- result.add(item);
- if (item.getExpanded()) {
- collectExpandedAndVisible(item.getItems(), result);
- }
- }
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action){
- if (!(getView() instanceof IDebugView)) {
- return;
- }
- Viewer viewer = ((IDebugView) getView()).getViewer();
- if (viewer instanceof TreeViewer) {
- ArrayList allVisible= new ArrayList();
- Tree tree= ((TreeViewer) viewer).getTree();
- collectExpandedAndVisible(tree.getItems(), allVisible);
- tree.setSelection((TreeItem[]) allVisible.toArray(new TreeItem[allVisible.size()]));
- // force viewer selection change
- viewer.setSelection(viewer.getSelection());
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StatusInfo.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StatusInfo.java
deleted file mode 100644
index 6263e6d..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/StatusInfo.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-
-/**
- * A settable IStatus.
- * Can be an error, warning, info or ok. For error, info and warning states,
- * a message describes the problem.
- */
-public class StatusInfo implements IStatus {
-
- private String fStatusMessage;
- private int fSeverity;
-
- /**
- * Creates a status set to OK (no message)
- */
- public StatusInfo() {
- this(OK, null);
- }
-
- /**
- * Creates a status .
- * @param severity The status severity: ERROR, WARNING, INFO and OK.
- * @param message The message of the status. Applies only for ERROR,
- * WARNING and INFO.
- */
- public StatusInfo(int severity, String message) {
- fStatusMessage= message;
- fSeverity= severity;
- }
-
- /**
- * Returns if the status' severity is OK.
- */
- public boolean isOK() {
- return fSeverity == IStatus.OK;
- }
-
- /**
- * Returns if the status' severity is WARNING.
- */
- public boolean isWarning() {
- return fSeverity == IStatus.WARNING;
- }
-
- /**
- * Returns if the status' severity is INFO.
- */
- public boolean isInfo() {
- return fSeverity == IStatus.INFO;
- }
-
- /**
- * Returns if the status' severity is ERROR.
- */
- public boolean isError() {
- return fSeverity == IStatus.ERROR;
- }
-
- /**
- * @see IStatus#getMessage
- */
- public String getMessage() {
- return fStatusMessage;
- }
-
- /**
- * Sets the status to ERROR.
- * @param The error message (can be empty, but not null)
- */
- public void setError(String errorMessage) {
- Assert.isNotNull(errorMessage);
- fStatusMessage= errorMessage;
- fSeverity= IStatus.ERROR;
- }
-
- /**
- * Sets the status to WARNING.
- * @param The warning message (can be empty, but not null)
- */
- public void setWarning(String warningMessage) {
- Assert.isNotNull(warningMessage);
- fStatusMessage= warningMessage;
- fSeverity= IStatus.WARNING;
- }
-
- /**
- * Sets the status to INFO.
- * @param The info message (can be empty, but not null)
- */
- public void setInfo(String infoMessage) {
- Assert.isNotNull(infoMessage);
- fStatusMessage= infoMessage;
- fSeverity= IStatus.INFO;
- }
-
- /**
- * Sets the status to OK.
- */
- public void setOK() {
- fStatusMessage= null;
- fSeverity= IStatus.OK;
- }
-
- /*
- * @see IStatus#matches(int)
- */
- public boolean matches(int severityMask) {
- return (fSeverity & severityMask) != 0;
- }
-
- /**
- * Returns always <code>false</code>.
- * @see IStatus#isMultiStatus()
- */
- public boolean isMultiStatus() {
- return false;
- }
-
- /*
- * @see IStatus#getSeverity()
- */
- public int getSeverity() {
- return fSeverity;
- }
-
- /*
- * @see IStatus#getPlugin()
- */
- public String getPlugin() {
- return DebugUIPlugin.getUniqueIdentifier();
- }
-
- /**
- * Returns always <code>null</code>.
- * @see IStatus#getException()
- */
- public Throwable getException() {
- return null;
- }
-
- /**
- * Returns always the error severity.
- * @see IStatus#getCode()
- */
- public int getCode() {
- return fSeverity;
- }
-
- /**
- * Returns always <code>null</code>.
- * @see IStatus#getChildren()
- */
- public IStatus[] getChildren() {
- return new IStatus[0];
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.java
deleted file mode 100644
index 8bd624f..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.java
+++ /dev/null
@@ -1,724 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Wind River Systems - adapted to use with IToggleBreakpiontsTargetFactory extension
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.Map.Entry;
-
-import org.eclipse.core.expressions.EvaluationContext;
-import org.eclipse.core.expressions.EvaluationResult;
-import org.eclipse.core.expressions.Expression;
-import org.eclipse.core.expressions.ExpressionConverter;
-import org.eclipse.core.expressions.ExpressionTagNames;
-import org.eclipse.core.expressions.IEvaluationContext;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.internal.core.IConfigurationElementConstants;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTargetFactory;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.services.IEvaluationService;
-
-/**
- * Organizes the toggle breakpoints target factories contributed through the
- * extension point and keeps track of the toggle breakpoints target that
- * the factories produce. The manager is accessed as a singleton through
- * the <code>getDefault()</code> method.
- * <p>
- * The adapter mechanism for obtaining a toggle breakpoints target is
- * still supported through a specialized toggle target factory. Targets
- * contributed through this mechanism are labeled as "Default" in the UI.
- * </p>
- *
- * @see IToggleBreakpointsTargetFactory
- * @see IToggleBreakpointsTarget
- * @see IToggleBreakpointsTargetExtension
- * @since 3.5
- */
-public class ToggleBreakpointsTargetManager {
-
- /**
- * Toggle breakpoints target ID which refers to a target contributed
- * through the legacy adapter mechanism.
- */
- public static String DEFAULT_TOGGLE_TARGET_ID = "default"; //$NON-NLS-1$
-
- private static Set DEFAULT_TOGGLE_TARGET_ID_SET = new HashSet();
- static {
- DEFAULT_TOGGLE_TARGET_ID_SET.add(DEFAULT_TOGGLE_TARGET_ID);
- }
-
- /**
- * Acts as a proxy between the toggle breakpoints target manager and the factories
- * contributed to the extension point. Only loads information from the plug-in xml
- * and only instantiates the specified factory if required (lazy loading).
- */
- private static class ToggleTargetFactory implements IToggleBreakpointsTargetFactory {
-
- private IConfigurationElement fConfigElement;
- private IToggleBreakpointsTargetFactory fFactory;
- private Expression fEnablementExpression;
-
- public ToggleTargetFactory(IConfigurationElement configElement){
- fConfigElement = configElement;
- }
-
- /**
- * Returns the instantiated factory specified by the class property.
- */
- private IToggleBreakpointsTargetFactory getFactory() {
- if (fFactory != null) return fFactory;
- try{
- Object obj = fConfigElement.createExecutableExtension(IConfigurationElementConstants.CLASS);
- if(obj instanceof IToggleBreakpointsTargetFactory) {
- fFactory = (IToggleBreakpointsTargetFactory)obj;
- } else {
- throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, "org.eclipse.debug.ui.toggleBreakpointsTargetFactories extension failed to load breakpoint toggle target because the specified class does not implement org.eclipse.debug.ui.actions.IToggleBreakpointsTargetFactory. Class specified was: " + obj, null)); //$NON-NLS-1$
- }
- } catch (CoreException e){
- DebugUIPlugin.log(e.getStatus());
- fFactory = null;
- }
- return fFactory;
- }
-
- /**
- * Checks if the enablement expression for the factory evaluates to true for the
- * given part and selection.
- */
- public boolean isEnabled(IWorkbenchPart part, ISelection selection) {
- boolean enabled = false;
- Expression expression = getEnablementExpression();
- if (expression != null) {
- enabled = evalEnablementExpression(part, selection, expression);
- } else {
- enabled = true;
- }
- return enabled;
- }
-
- /**
- * Returns the active debug context given the active part. It is used
- * in creating the evaluation context for the factories' enablement expression.
- * @param part active part
- * @return current active debug context
- */
- private IStructuredSelection getDebugContext(IWorkbenchPart part) {
- ISelection selection = DebugUITools.getDebugContextManager().
- getContextService(part.getSite().getWorkbenchWindow()).getActiveContext();
- if (selection instanceof IStructuredSelection) {
- return (IStructuredSelection)selection;
- }
- return StructuredSelection.EMPTY;
- }
-
- /**
- * Evaluate the given expression within the given context and return
- * the result. Returns <code>true</code> iff result is either TRUE.
- *
- * @param exp the enablement expression to evaluate or <code>null</code>
- * @param context the context of the evaluation. Usually, the
- * user's selection.
- * @return the result of evaluating the expression
- */
- private boolean evalEnablementExpression(IWorkbenchPart part, ISelection selection, Expression exp) {
- if (exp != null){
- IEvaluationContext parentContext = null;
- IEvaluationService evaluationService = (IEvaluationService)PlatformUI.getWorkbench().getService(IEvaluationService.class);
- if (evaluationService != null) {
- parentContext = evaluationService.getCurrentState();
- }
- IEvaluationContext context = new EvaluationContext(parentContext, part);
-
- List debugContextList = getDebugContext(part).toList();
- context.addVariable(IConfigurationElementConstants.DEBUG_CONTEXT, debugContextList);
-
- if (selection instanceof IStructuredSelection) {
- List selectionList = ((IStructuredSelection)selection).toList();
- context.addVariable(IConfigurationElementConstants.SELECTION, selectionList);
- }
-
- if (part instanceof IEditorPart) {
- context.addVariable(IConfigurationElementConstants.EDITOR_INPUT, ((IEditorPart)part).getEditorInput());
- }
-
- try{
- EvaluationResult result = exp.evaluate(context);
- if (result == EvaluationResult.TRUE){
- return true;
- }
- } catch (CoreException e){
- // Evaluation failed
- }
- }
- return false;
- }
-
- /**
- * Returns an expression that represents the enablement logic for the
- * breakpiont toggle target.
- */
- private Expression getEnablementExpression(){
- if (fEnablementExpression == null) {
- try{
- IConfigurationElement[] elements = fConfigElement.getChildren(ExpressionTagNames.ENABLEMENT);
- IConfigurationElement enablement = elements.length > 0 ? elements[0] : null;
- if (enablement != null) {
- fEnablementExpression = ExpressionConverter.getDefault().perform(enablement);
- }
- } catch (CoreException e){
- DebugUIPlugin.log(e.getStatus());
- fEnablementExpression = null;
- }
- }
- return fEnablementExpression;
- }
-
- /**
- * Instantiates the factory and asks it to produce the IToggleBreakpointsTarget
- * for the given ID
- */
- public IToggleBreakpointsTarget createToggleTarget(String targetID) {
- IToggleBreakpointsTargetFactory factory = getFactory();
- if (factory != null) {
- return factory.createToggleTarget(targetID);
- }
- return null;
- }
-
- /**
- * Instantiates the factory and asks it for the set of toggle target
- * IDs that the factory can produce for the given part and selection.
- */
- public Set getToggleTargets(IWorkbenchPart part, ISelection selection) {
- IToggleBreakpointsTargetFactory factory = getFactory();
- if (factory != null) {
- return factory.getToggleTargets(part, selection);
- }
- return Collections.EMPTY_SET;
- }
-
- /**
- * Instantiates the factory and asks it to produce the name of the toggle target
- * for the given ID.
- */
- public String getToggleTargetName(String targetID) {
- IToggleBreakpointsTargetFactory factory = getFactory();
- if (factory != null) {
- return factory.getToggleTargetName(targetID);
- }
- return null;
- }
-
- /**
- * Instantiates the factory and asks it to produce the description of the toggle
- * target for the given ID.
- */
- public String getToggleTargetDescription(String targetID) {
- IToggleBreakpointsTargetFactory factory = getFactory();
- if (factory != null) {
- return factory.getToggleTargetDescription(targetID);
- }
- return null;
- }
-
- /**
- * Instantiates the factory and asks it for the toggle tareget ID that
- * the factory considers the default for the given part and selection.
- */
- public String getDefaultToggleTarget(IWorkbenchPart part, ISelection selection) {
- IToggleBreakpointsTargetFactory factory = getFactory();
- if (factory != null) {
- return factory.getDefaultToggleTarget(part, selection);
- }
- return null;
- }
- }
-
-
- /**
- * Factory for toggle breakpoints targets contributed through the
- * adapter mechanism.
- */
- private static class ToggleBreakpointsTargetAdapterFactory implements IToggleBreakpointsTargetFactory {
-
- private IAdaptable getAdaptable(IWorkbenchPart part, ISelection selection) {
- IAdaptable adaptable = null;
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection)selection;
- if (ss.getFirstElement() instanceof IAdaptable) {
- adaptable = (IAdaptable) ss.getFirstElement();
- }
- } else {
- adaptable = part;
- }
- return adaptable;
- }
-
- private boolean canGetToggleBreakpointsTarget(IAdaptable adaptable) {
- if (adaptable != null) {
- IToggleBreakpointsTarget adapter = (IToggleBreakpointsTarget)
- adaptable.getAdapter(IToggleBreakpointsTarget.class);
- if (adapter == null) {
- IAdapterManager adapterManager = Platform.getAdapterManager();
- if (adapterManager.hasAdapter(adaptable, IToggleBreakpointsTarget.class.getName())) {
- return true;
- }
- } else {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Finds the toggle breakpoints target for the active part and selection.
- * It first looks for the target using the factories registered using an
- * extension point. If not found it uses the <code>IAdaptable</code>
- * mechanism.
- * @param part active part
- * @param selection active selection in part
- * @return The toggle breakpoints target, or <code>null</code> if not found.
- */
- private IToggleBreakpointsTarget getToggleBreakpointsTarget(IAdaptable adaptable) {
- if (adaptable != null) {
- IToggleBreakpointsTarget adapter = (IToggleBreakpointsTarget)
- adaptable.getAdapter(IToggleBreakpointsTarget.class);
- if (adapter == null) {
- // attempt to force load adapter
- IAdapterManager adapterManager = Platform.getAdapterManager();
- if (adapterManager.hasAdapter(adaptable, IToggleBreakpointsTarget.class.getName())) {
- adapter = (IToggleBreakpointsTarget)
- adapterManager.loadAdapter(adaptable, IToggleBreakpointsTarget.class.getName());
- }
- }
- return adapter;
- }
- return null;
- }
-
- /**
- * Checks if there is an adaptable object for the given part and
- * selection, and if there is, it checks whether an
- * <code>IToggleBreakpointsTarget</code> can be obtained as an adapter.
- */
- public boolean isEnabled(IWorkbenchPart part, ISelection selection) {
- IAdaptable adaptable = getAdaptable(part, selection);
- return adaptable != null && canGetToggleBreakpointsTarget(adaptable);
- }
-
- /**
- * Not implemented use {@link #createDefaultToggleTarget(IWorkbenchPart, ISelection)}
- * instead.
- */
- public IToggleBreakpointsTarget createToggleTarget(String targetID) {
- return null;
- }
-
- /**
- * Returns a toggle target for the given part and selection, obtained
- * through the adapter mechanism.
- */
- public IToggleBreakpointsTarget createDefaultToggleTarget(IWorkbenchPart part, ISelection selection) {
- IAdaptable adaptable = getAdaptable(part, selection);
- return getToggleBreakpointsTarget(adaptable);
- }
-
- public Set getToggleTargets(IWorkbenchPart part, ISelection selection) {
- IAdaptable adaptable = getAdaptable(part, selection);
- if (canGetToggleBreakpointsTarget(adaptable)) {
- return DEFAULT_TOGGLE_TARGET_ID_SET;
- }
- return Collections.EMPTY_SET;
- }
-
- public String getToggleTargetName(String targetID) {
- return ActionMessages.ToggleBreakpointsTargetManager_defaultToggleTarget_name;
- }
-
- public String getToggleTargetDescription(String targetID) {
- return ActionMessages.ToggleBreakpointsTargetManager_defaultToggleTarget_description;
- }
-
- public String getDefaultToggleTarget(IWorkbenchPart part, ISelection selection) {
- return DEFAULT_TOGGLE_TARGET_ID;
- }
- }
-
-
- /**
- * Preference key for storing the preferred targets map.
- * @see {@link #storePreferredTargets()}
- * @see {@link #loadPreferredTargets()}
- */
- public static final String PREF_TARGETS = "preferredTargets"; //$NON-NLS-1$
-
-
- /**
- * There should only ever be once instance of this manager for the workbench.
- */
- private static ToggleBreakpointsTargetManager fgSingleton;
-
- public static ToggleBreakpointsTargetManager getDefault(){
- if (fgSingleton == null) fgSingleton = new ToggleBreakpointsTargetManager();
- return fgSingleton;
- }
-
- /**
- * Maps the IDs of toggle breakpoint targets to their instances. The target
- * IDs must be unique.
- */
- private Map fKnownFactories;
-
- /**
- * Maps a Set of target id's to the one target id that is preferred.
- */
- private Map fPreferredTargets;
-
- /**
- * Maps the IDs of toggle targets to the factory that can create them.
- * There can currently only be one factory for a given toggle target.
- */
- private Map fFactoriesByTargetID = new HashMap();
-
- /**
- * List of listeners to changes in the preferred toggle targets list.
- */
- private ListenerList fChangedListners = new ListenerList();
-
- /**
- * Initializes the collection of known factories from extension point contributions.
- */
- private void initializeFactories() {
- fKnownFactories = new LinkedHashMap();
- fKnownFactories.put(DEFAULT_TOGGLE_TARGET_ID, new ToggleBreakpointsTargetAdapterFactory());
- IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_TOGGLE_BREAKPOINTS_TARGET_FACTORIES);
- IConfigurationElement[] elements = ep.getConfigurationElements();
- for (int i= 0; i < elements.length; i++) {
- String id = elements[i].getAttribute(IConfigurationElementConstants.ID);
- if (id != null && id.length() != 0) {
- if (fKnownFactories.containsKey(id)) {
- DebugUIPlugin.log(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, "org.eclipse.debug.ui.toggleBreakpointsTargetFactory extension failed to load breakpoint toggle target because the specified id is already registered. Specified ID is: " + id, null)); //$NON-NLS-1$
- } else {
- fKnownFactories.put(id, new ToggleTargetFactory(elements[i]));
- }
- } else {
- DebugUIPlugin.log(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.INTERNAL_ERROR, "org.eclipse.debug.ui.toggleBreakpointsTargetFactory extension failed to load breakpoint toggle target because the specified id is empty.", null)); //$NON-NLS-1$
- }
- }
-
- // If there are any factories contributed through the extension point,
- // set a system property for use in enabling actions.
- System.setProperty(IDebugUIConstants.SYS_PROP_BREAKPOINT_TOGGLE_FACTORIES_USED,
- fKnownFactories.size() > 1 ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Returns the set of IToggleBreakpointsTargetFactory objects (they will be
- * ToggleTargetFactory) that were contributed to the extension point and
- * are enabled for the given part and selection (enabled if the factory
- * does not have an enablement expression or if the enablement expression
- * evaluates to true).
- *
- * @param part active part
- * @param selection active selection in part
- * @return The factories enabled for the part and selection or an empty
- * collection.
- */
- private Set getEnabledFactories(IWorkbenchPart part, ISelection selection) {
- if (fKnownFactories == null) initializeFactories();
-
- Set set = new LinkedHashSet();
- for (Iterator itr = fKnownFactories.keySet().iterator(); itr.hasNext(); ) {
- String id = (String)itr.next();
- IToggleBreakpointsTargetFactory factory = (IToggleBreakpointsTargetFactory)fKnownFactories.get(id);
- if (factory instanceof ToggleTargetFactory &&
- ((ToggleTargetFactory)factory).isEnabled(part, selection)) {
- set.add(factory);
- } else if (factory instanceof ToggleBreakpointsTargetAdapterFactory &&
- ((ToggleBreakpointsTargetAdapterFactory)factory).isEnabled(part, selection)) {
- set.add(factory);
- }
- }
- return set;
- }
-
- /**
- * Produces the set of IDs for all possible toggle targets that can be used for
- * the given part and selection.
- *
- * @param factoriesToQuery The collection of factories to check
- * @param part active part
- * @param selection active selection in part
- * @return Set of toggle target IDs or an empty set
- */
- private Set getEnabledTargetIDs(Collection factoriesToQuery, IWorkbenchPart part, ISelection selection){
- Set idsForSelection = new LinkedHashSet();
- Iterator factoriesItr = factoriesToQuery.iterator();
- while (factoriesItr.hasNext()) {
- IToggleBreakpointsTargetFactory factory = (IToggleBreakpointsTargetFactory) factoriesItr.next();
- Iterator targetIDsItr = factory.getToggleTargets(part, selection).iterator();
- while (targetIDsItr.hasNext()) {
- String targetID = (String) targetIDsItr.next();
- fFactoriesByTargetID.put(targetID, factory);
- idsForSelection.add(targetID);
- }
- }
- return idsForSelection;
- }
-
- /**
- * Returns the set of <code>String</code> IDs of toggle breakpoint targets,
- * which are enabled for the given active part and selection. The IDs can be used
- * to create the {@link IToggleBreakpointsTarget} instance.
- * @param part active part
- * @param selection active selection in part
- * @return Set of toggle target IDs or an empty set
- */
- public Set getEnabledToggleBreakpointsTargetIDs(IWorkbenchPart part, ISelection selection) {
- return getEnabledTargetIDs(getEnabledFactories(part, selection), part, selection);
- }
-
- /**
- * Returns the ID of the calculated preferred toggle breakpoints target for the
- * given active part and selection. The returned ID is chosen based on factory
- * enablement, whether the target is a default one, and on user choice.
- * @param part active part
- * @param selection active selection in part
- * @return The toggle target IDs or null if none.
- */
- public String getPreferredToggleBreakpointsTargetID(IWorkbenchPart part, ISelection selection) {
- Set factories = getEnabledFactories(part, selection);
- Set possibleIDs = getEnabledTargetIDs(factories, part, selection);
- return chooseToggleTargetIDInSet(possibleIDs, factories, part, selection);
- }
-
- /**
- * Given the ID of toggle breakpoint target, this method will try to find the factory
- * that creates it and return an instance of it.
- *
- * @param ID The ID of the requested toggle breakpoint target.
- * @return The instantiated target or null
- */
- public IToggleBreakpointsTarget getToggleBreakpointsTarget(IWorkbenchPart part, ISelection selection) {
- String id = getPreferredToggleBreakpointsTargetID(part, selection);
- IToggleBreakpointsTargetFactory factory = (IToggleBreakpointsTargetFactory)fFactoriesByTargetID.get(id);
- if (factory != null) {
- if (DEFAULT_TOGGLE_TARGET_ID.equals(id)) {
- return ((ToggleBreakpointsTargetAdapterFactory)factory).createDefaultToggleTarget(part, selection);
- } else {
- return factory.createToggleTarget(id);
- }
- }
- return null;
- }
-
- /**
- * Given the ID of a toggle breakpoints target, this method will try
- * to find the factory that creates it and ask it for the name of it.
- *
- * @param ID The ID of the requested toggle breakpoint target.
- * @return The name of the target.
- */
- public String getToggleBreakpointsTargetName(String id) {
- IToggleBreakpointsTargetFactory factory = (IToggleBreakpointsTargetFactory)fFactoriesByTargetID.get(id);
- if (factory != null) {
- return factory.getToggleTargetName(id);
- }
- return null;
- }
-
- /**
- * Given the ID of a toggle breakpoints target, this method will try
- * to find the factory that creates it and ask it for the description of it.
- *
- * @param ID The ID of the requested toggle breakpoint target.
- * @return The description of the target or null.
- */
- public String getToggleBreakpointsTargetDescription(String id) {
- IToggleBreakpointsTargetFactory factory = (IToggleBreakpointsTargetFactory)fFactoriesByTargetID.get(id);
- if (factory != null) {
- return factory.getToggleTargetDescription(id);
- }
- return null;
- }
-
- /**
- * Adds the given listener to the list of listeners notified when the preferred
- * toggle breakpoints targets change.
- * @param listener The listener to add.
- */
- public void addChangedListener(IToggleBreakpointsTargetManagerListener listener) {
- fChangedListners.add(listener);
- }
-
- /**
- * Removes the given listener from the list of listeners notified when the preferred
- * toggle breakpoints targets change.
- * @param listener The listener to add.
- */
- public void removeChangedListener(IToggleBreakpointsTargetManagerListener listener) {
- fChangedListners.remove(listener);
- }
-
- /**
- * Stores the map of preferred target IDs to the preference store in the format:
- *
- * Key1A,Key1B:Value1|Key2A,Key2B,Key2C:Value2|
- *
- * Where the sub keys (Key1A, Key1B, etc.) are the elements of the set used at the
- * key in the mapping and the values are the associated String value in the mapping.
- */
- private void storePreferredTargets() {
- StringBuffer buffer= new StringBuffer();
- Iterator iter = fPreferredTargets.entrySet().iterator();
- while (iter.hasNext()) {
- Entry entry = (Entry) iter.next();
- Iterator setIter = ((Set)entry.getKey()).iterator();
- while (setIter.hasNext()) {
- String currentID = (String) setIter.next();
- buffer.append(currentID);
- buffer.append(',');
- }
- buffer.deleteCharAt(buffer.length()-1);
- buffer.append(':');
- buffer.append(entry.getValue());
- buffer.append('|');
- }
- DebugUIPlugin.getDefault().getPluginPreferences().setValue(PREF_TARGETS, buffer.toString());
- }
-
- /**
- * Loads the map of preferred target IDs from the preference store.
- *
- * @see #storePreferredTargets()
- */
- private void loadPreferredTargets() {
- fPreferredTargets = new HashMap();
- String preferenceValue = DebugUIPlugin.getDefault().getPluginPreferences().getString(PREF_TARGETS);
- StringTokenizer entryTokenizer = new StringTokenizer(preferenceValue,"|"); //$NON-NLS-1$
- while (entryTokenizer.hasMoreTokens()){
- String token = entryTokenizer.nextToken();
- int valueStart = token.indexOf(':');
- StringTokenizer keyTokenizer = new StringTokenizer(token.substring(0,valueStart),","); //$NON-NLS-1$
- Set keys = new LinkedHashSet();
- while (keyTokenizer.hasMoreTokens()){
- keys.add(keyTokenizer.nextToken());
- }
- fPreferredTargets.put(keys, token.substring(valueStart+1));
- }
- }
-
- /**
- * Adds or updates the mapping to set which target ID is preferred for a certain
- * set of possible IDs.
- *
- * @param possibleIDs The set of possible IDs
- * @param preferredID The preferred ID in the set.
- */
- public void setPreferredTarget(Set possibleIDs, String preferredID) {
- if (possibleIDs == null) return;
-
- if (fKnownFactories == null) initializeFactories();
-
- if (fPreferredTargets == null){
- loadPreferredTargets();
- }
- String currentKey = (String)fPreferredTargets.get(possibleIDs);
- if (currentKey == null || !currentKey.equals(preferredID)){
- fPreferredTargets.put(possibleIDs, preferredID);
- storePreferredTargets();
- firePreferredTargetsChanged();
- }
- }
-
- /**
- * Returns the preferred pane ID from the given set if the mapping has been set.
- *
- * @param possibleDetailsAreaIDs Set of possible pane IDs
- * @return The preferred ID or null
- */
- private String getUserPreferredTarget(Set possibleTargetIDs){
- if (fPreferredTargets == null){
- loadPreferredTargets();
- }
- return (String)fPreferredTargets.get(possibleTargetIDs);
- }
-
- /**
- * Given a set of possible detail pane IDs, this method will determine which pane is
- * preferred and should be used to display the selection. This method chooses a pane
- * by storing previous choices and can be set using a context menu.
- *
- * @param possiblePaneIDs The set of possible detail pane IDs
- * @return The preferred detail pane ID or null
- */
- private String chooseToggleTargetIDInSet(Set possibleTargetIDs, Collection enabledFactories, IWorkbenchPart part, ISelection selection){
- if (possibleTargetIDs == null || possibleTargetIDs.isEmpty()){
- return null;
- }
-
- String preferredID = getUserPreferredTarget(possibleTargetIDs);
-
- if (preferredID == null){
- // If there is no preferred pane already set, check the factories to see there is a default target
- Iterator factoryIterator = enabledFactories.iterator();
- while (preferredID == null && factoryIterator.hasNext()) {
- IToggleBreakpointsTargetFactory currentFactory = (IToggleBreakpointsTargetFactory) factoryIterator.next();
- preferredID = currentFactory.getDefaultToggleTarget(part, selection);
- }
- // If the factories don't have a default, just pick the first one.
- if (preferredID == null) {
- preferredID= (String)possibleTargetIDs.iterator().next();
- }
- setPreferredTarget(possibleTargetIDs, preferredID);
- }
-
- return preferredID;
- }
-
- /**
- * Notifies the change listeners that the preferred targets changed.
- */
- private void firePreferredTargetsChanged() {
- Object[] listeners = fChangedListners.getListeners();
- for (int i = 0; i < listeners.length; i++) {
- ((IToggleBreakpointsTargetManagerListener)listeners[i]).preferredTargetsChanged();
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleFilterAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleFilterAction.java
deleted file mode 100644
index b2ba81c..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleFilterAction.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.swt.custom.BusyIndicator;
-
-/**
- * A generic Toggle filter action, meant to be subclassed to provide
- * a specific filter.
- */
-public abstract class ToggleFilterAction extends Action {
-
- /**
- * The viewer that this action works for
- */
- private StructuredViewer fViewer;
-
- /**
- * The filter this action applies to the viewer
- */
- private ViewerFilter fViewerFilter;
-
- public void run() {
- valueChanged(isChecked());
- }
- /**
- * Adds or removes the viewer filter depending
- * on the value of the parameter.
- */
- protected void valueChanged(final boolean on) {
- if (getViewer().getControl().isDisposed()) {
- return;
- }
- BusyIndicator.showWhile(getViewer().getControl().getDisplay(), new Runnable() {
- public void run() {
- if (on) {
- ViewerFilter filter= getViewerFilter();
- ViewerFilter[] filters= getViewer().getFilters();
- boolean alreadyAdded= false;
- for (int i= 0; i < filters.length; i++) {
- ViewerFilter addedFilter= filters[i];
- if (addedFilter.equals(filter)) {
- alreadyAdded= true;
- break;
- }
- }
- if (!alreadyAdded) {
- getViewer().addFilter(filter);
- }
-
- } else {
- getViewer().removeFilter(getViewerFilter());
- }
- }
- });
- }
-
- /**
- * Returns the <code>ViewerFilter</code> that this action
- * will add/remove from the viewer, or <code>null</code>
- * if no filter is involved.
- */
- protected ViewerFilter getViewerFilter() {
- return fViewerFilter;
- }
-
- protected void setViewerFilter(ViewerFilter filter) {
- fViewerFilter= filter;
- }
-
- protected StructuredViewer getViewer() {
- return fViewer;
- }
-
- protected void setViewer(StructuredViewer viewer) {
- fViewer = viewer;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ViewManagementAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ViewManagementAction.java
deleted file mode 100644
index 7bd91d6..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ViewManagementAction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions;
-
-import org.eclipse.debug.internal.ui.SWTFactory;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.actions.ActionDelegate;
-
-/**
- * An action which opens the view management preference page.
- */
-public class ViewManagementAction extends ActionDelegate implements IViewActionDelegate {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- SWTFactory.showPreferencePage("org.eclipse.debug.ui.ViewManagementPreferencePage"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/AbstractBreakpointsViewAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/AbstractBreakpointsViewAction.java
deleted file mode 100644
index b396f79..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/AbstractBreakpointsViewAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
-/**
- * Abstract implementation of an action contributed to the breakpoints view.
- */
-public abstract class AbstractBreakpointsViewAction implements IViewActionDelegate, IActionDelegate2 {
-
- /**
- * The breakpoints view that this action has been contributed to.
- */
- protected BreakpointsView fView;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- fView= (BreakpointsView) view;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#dispose()
- */
- public void dispose() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/AdvancedGroupBreakpointsByAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/AdvancedGroupBreakpointsByAction.java
deleted file mode 100644
index 243c140..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/AdvancedGroupBreakpointsByAction.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.window.Window;
-
-/**
- * Action that opens a dialog to select which breakpoint
- * container factories should be applies to the breakpoints
- * view.
- */
-public class AdvancedGroupBreakpointsByAction extends Action {
-
- private BreakpointsView fView;
-
- public AdvancedGroupBreakpointsByAction(BreakpointsView view) {
- super(IInternalDebugCoreConstants.EMPTY_STRING, IAction.AS_RADIO_BUTTON);
- fView= view;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- if (isChecked()) {
- GroupBreakpointsByDialog dialog = new GroupBreakpointsByDialog(fView);
- if (dialog.open() == Window.OK) {
- fView.setBreakpointOrganizers(dialog.getOrganizers());
- }
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.java
deleted file mode 100644
index a9e8955..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import org.eclipse.osgi.util.NLS;
-
-public class BreakpointGroupMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.debug.internal.ui.actions.breakpointGroups.BreakpointGroupMessages";//$NON-NLS-1$
- //
- // Copyright (c) 2004, 2005 IBM Corporation and others.
- // All rights reserved. This program and the accompanying materials
- // are made available under the terms of the Eclipse Public License v1.0
- // which accompanies this distribution, and is available at
- // http://www.eclipse.org/legal/epl-v10.html
- //
- // Contributors:
- // IBM Corporation - initial API and implementation
- //
-
- public static String GroupBreakpointsByAction_0;
- public static String GroupBreakpointsByAction_1;
- public static String GroupBreakpointsByDialog_0;
- public static String GroupBreakpointsByDialog_1;
- public static String GroupBreakpointsByDialog_2;
- public static String GroupBreakpointsByDialog_3;
- public static String GroupBreakpointsByDialog_4;
- public static String GroupBreakpointsByDialog_5;
- public static String GroupBreakpointsByDialog_6;
- public static String GroupBreakpointsByDialog_7;
- public static String CopyBreakpointsAction_0;
- public static String CopyBreakpointsAction_1;
- public static String CopyBreakpointsAction_2;
- public static String CopyBreakpointsAction_3;
- public static String PasteBreakpointsAction_0;
- public static String PasteBreakpointsAction_1;
- public static String RemoveFromWorkingSetAction_0;
-
- public static String SelectBreakpointWorkingsetDialog_0;
-
- public static String SetDefaultBreakpointGroupAction_0;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, BreakpointGroupMessages.class);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.properties
deleted file mode 100644
index 4fa9d6c..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-GroupBreakpointsByAction_0=Breakpoints
-GroupBreakpointsByAction_1=Advanced...
-GroupBreakpointsByDialog_0=Specify nested groupings for the Breakpoints view.
-GroupBreakpointsByDialog_1=A&vailable Groups:
-GroupBreakpointsByDialog_2=&Add -->
-GroupBreakpointsByDialog_3=&Selected Groups:
-GroupBreakpointsByDialog_4=<-- &Remove
-GroupBreakpointsByDialog_5=Move &Up
-GroupBreakpointsByDialog_6=Move &Down
-GroupBreakpointsByDialog_7=Group Breakpoints
-CopyBreakpointsAction_0=&Copy
-CopyBreakpointsAction_1=Copy Breakpoints
-CopyBreakpointsAction_2=Problem Copying to Clipboard
-CopyBreakpointsAction_3=There was a problem when accessing the system clipboard. Retry?
-PasteBreakpointsAction_0=&Paste
-PasteBreakpointsAction_1=Paste Breakpoints
-RemoveFromWorkingSetAction_0=Remove from &Working Set
-SetDefaultBreakpointGroupAction_0=Select Default Working Set
-SelectBreakpointWorkingsetDialog_0=Select &default working set:
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointSelectionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointSelectionAction.java
deleted file mode 100644
index a1c90fb..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointSelectionAction.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.ui.actions.SelectionListenerAction;
-
-/**
- * A selection listener action for the breakpoints view.
- */
-public abstract class BreakpointSelectionAction extends SelectionListenerAction {
-
- private BreakpointsView fView;
-
- /**
- * Constructs an action for the breakpoints view.
- *
- * @param text action name
- * @param view breakpoints view
- */
- public BreakpointSelectionAction(String text, BreakpointsView view) {
- super(text);
- fView = view;
- }
-
- /**
- * Returns the breakpoints view.
- *
- * @return breakpoints view
- */
- protected BreakpointsView getBreakpointsView() {
- return fView;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointWorkingSetAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointWorkingSetAction.java
deleted file mode 100644
index 1ed2fff..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointWorkingSetAction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IViewPart;
-
-/**
- * An action which clears (sets the null) the default breakpoint group.
- * @see org.eclipse.debug.core.IBreakpointManager#setAutoGroup(String)
- */
-public abstract class BreakpointWorkingSetAction extends AbstractBreakpointsViewAction implements IPropertyChangeListener {
-
- protected IAction fAction;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- update();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- super.init(view);
- DebugUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#dispose()
- */
- public void dispose() {
- DebugUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
- super.dispose();
- }
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- fAction = action;
- super.init(action);
- update();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(IInternalDebugUIConstants.MEMENTO_BREAKPOINT_WORKING_SET_NAME)) {
- update();
- }
-
- }
- protected abstract void update();
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ClearDefaultBreakpointGroupAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ClearDefaultBreakpointGroupAction.java
deleted file mode 100644
index f6d50a8..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ClearDefaultBreakpointGroupAction.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointSetOrganizer;
-import org.eclipse.jface.action.IAction;
-
-/**
- * An action which clears (sets the null) the default breakpoint group.
- * @see org.eclipse.debug.core.IBreakpointManager#setAutoGroup(String)
- */
-public class ClearDefaultBreakpointGroupAction extends BreakpointWorkingSetAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- BreakpointSetOrganizer.setDefaultWorkingSet(null);
- }
-
- protected void update() {
- fAction.setEnabled(BreakpointSetOrganizer.getDefaultWorkingSet() != null);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsAction.java
deleted file mode 100644
index 3ee9a64..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsAction.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.SWTError;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.navigator.LocalSelectionTransfer;
-
-/**
- * Action for copying the currently selected breakpoints to the clipboard.
- */
-public class CopyBreakpointsAction extends BreakpointSelectionAction {
-
- /**
- * System clipboard
- */
- private Clipboard clipboard;
-
- /**
- * Associated paste action. May be <code>null</code>
- */
- private PasteBreakpointsAction pasteAction;
-
- /**
- * Creates a new action.
- *
- * @param shell the shell for any dialogs
- * @param clipboard a platform clipboard
- */
- public CopyBreakpointsAction(BreakpointsView view, Clipboard clipboard) {
- super(BreakpointGroupMessages.CopyBreakpointsAction_0, view);
- Assert.isNotNull(clipboard);
- this.clipboard = clipboard;
- setToolTipText(BreakpointGroupMessages.CopyBreakpointsAction_1);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.COPY_BREAKPOINTS_ACTION);
- }
-
- /**
- * Creates a new action.
- *
- * @param shell the shell for any dialogs
- * @param clipboard a platform clipboard
- * @param pasteAction a paste action
- */
- public CopyBreakpointsAction(BreakpointsView view, Clipboard clipboard, PasteBreakpointsAction pasteAction) {
- this(view, clipboard);
- this.pasteAction = pasteAction;
- }
-
- /**
- * The <code>CopyAction</code> implementation of this method defined
- * on <code>IAction</code> copies the selected resources to the
- * clipboard.
- */
- public void run() {
- IStructuredSelection selection = getStructuredSelection();
- Object[] objects = selection.toArray();
- StringBuffer buffer = new StringBuffer();
- ILabelProvider labelProvider = (ILabelProvider) ((StructuredViewer)getBreakpointsView().getViewer()).getLabelProvider();
- for (int i = 0; i < objects.length; i++) {
- Object object = objects[i];
- if (i > 0) {
- buffer.append("\n"); //$NON-NLS-1$
- }
- buffer.append(labelProvider.getText(object));
- }
- setClipboard(selection, buffer.toString());
-
- // update the enablement of the paste action
- // workaround since the clipboard does not suppot callbacks
- if (pasteAction != null && pasteAction.getStructuredSelection() != null)
- pasteAction.selectionChanged(pasteAction.getStructuredSelection());
- }
-
- /**
- * Set the clipboard contents. Prompt to retry if clipboard is busy.
- *
- * @param selection the selection to copy to the clipboard
- */
- private void setClipboard(ISelection selection, String text) {
- try {
- LocalSelectionTransfer.getInstance().setSelection(selection);
- LocalSelectionTransfer.getInstance().setSelectionSetTime(System.currentTimeMillis());
- clipboard.setContents(new Object[] {selection, text}, new Transfer[] {LocalSelectionTransfer.getInstance(), TextTransfer.getInstance()});
- } catch (SWTError e) {
- if (e.code != DND.ERROR_CANNOT_SET_CLIPBOARD)
- throw e;
- if (MessageDialog.openQuestion(
- getBreakpointsView().getSite().getShell(), BreakpointGroupMessages.CopyBreakpointsAction_2,
- BreakpointGroupMessages.CopyBreakpointsAction_3)) {
- setClipboard(selection, text);
- }
- }
- }
-
- /**
- * Enables if one or more breakpoints are selected.
- */
- protected boolean updateSelection(IStructuredSelection selection) {
- if (selection.isEmpty()) {
- return false;
- }
- Iterator iterator = selection.iterator();
- while (iterator.hasNext()) {
- if (!(iterator.next() instanceof IBreakpoint)) {
- return false;
- }
- }
- return true;
- }
-
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/EditBreakpointGroupAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/EditBreakpointGroupAction.java
deleted file mode 100644
index d8225fc..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/EditBreakpointGroupAction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
-import org.eclipse.debug.internal.ui.views.breakpoints.WorkingSetCategory;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.IWorkingSetEditWizard;
-
-/**
- * An action to edit a breakpoint working set.
- */
-public class EditBreakpointGroupAction extends AbstractBreakpointsViewAction {
-
- /**
- * The currently selected breakpoints
- */
- private IWorkingSet fSet = null;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- IWorkingSetEditWizard editWizard = PlatformUI.getWorkbench().getWorkingSetManager().createWorkingSetEditWizard(fSet);
- WizardDialog dialog = new WizardDialog(DebugUIPlugin.getShell(), editWizard);
- dialog.open();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection sel) {
- IStructuredSelection selection= (IStructuredSelection) sel;
- fSet = null;
- if (selection.size() == 1) {
- Object element = selection.getFirstElement();
- if (element instanceof BreakpointContainer) {
- BreakpointContainer container = (BreakpointContainer)element;
- IAdaptable category = container.getCategory();
- if (category instanceof WorkingSetCategory) {
- IWorkingSet set = ((WorkingSetCategory)category).getWorkingSet();
- action.setEnabled(true);
- fSet = set;
- return;
- }
- }
- }
- action.setEnabled(false);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsAction.java
deleted file mode 100644
index c53ab9a..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsAction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.debug.internal.ui.views.breakpoints.IBreakpointOrganizer;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-
-/**
- * An action which sets the breakpoint factory on a breakpoint view,
- * effectively telling the view to group breakpoints according to
- * some criteria (as determined by the factory).
- */
-public class GroupBreakpointsAction extends Action {
-
- private IBreakpointOrganizer fOrganzier;
- private BreakpointsView fView;
-
- /**
- * Creates a new action which will group breakpoints in the given
- * breakpoint view using the given breakpoint container factory
- * @param factory the factory that will be applied to the given view
- * when this action is run
- * @param view the breakpoints view
- */
- public GroupBreakpointsAction(IBreakpointOrganizer organizer, BreakpointsView view) {
- super(IInternalDebugCoreConstants.EMPTY_STRING, IAction.AS_RADIO_BUTTON);
- fOrganzier= organizer;
- fView= view;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- if (isChecked()) {
- if (fOrganzier == null) {
- fView.setBreakpointOrganizers(null);
- } else {
- fView.setBreakpointOrganizers(new IBreakpointOrganizer[]{fOrganzier});
- }
- }
- }
-
- /**
- * Returns this action's organizer.
- *
- * @return breakpoint organizer
- */
- public IBreakpointOrganizer getOrganizer() {
- return fOrganzier;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java
deleted file mode 100644
index 4ebf6be..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointOrganizerManager;
-import org.eclipse.debug.internal.ui.views.breakpoints.IBreakpointOrganizer;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.events.MenuAdapter;
-import org.eclipse.swt.events.MenuEvent;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-
-/**
- *
- */
-public class GroupBreakpointsByAction extends AbstractBreakpointsViewAction implements IMenuCreator {
-
- private IAction fAction= null;
-
- public GroupBreakpointsByAction() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#dispose()
- */
- public void dispose() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)
- */
- public Menu getMenu(Control parent) {
- // Never called
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)
- */
- public Menu getMenu(Menu parent) {
- Menu menu = new Menu(parent);
- menu.addMenuListener(new MenuAdapter() {
- public void menuShown(MenuEvent e) {
- Menu m = (Menu)e.widget;
- MenuItem[] items = m.getItems();
- for (int i=0; i < items.length; i++) {
- items[i].dispose();
- }
- fillMenu(m);
- }
- });
- return menu;
- }
-
- /**
- * Fill pull down menu with the "group by" options
- */
- private void fillMenu(Menu menu) {
- // determine which item should be checked
- IBreakpointOrganizer[] organizers = fView.getBreakpointOrganizers();
- boolean none = false;
- boolean advanced = false;
- IBreakpointOrganizer organizer = null;
- if (organizers == null || organizers.length == 0) {
- none = true;
- } else if (organizers.length > 1) {
- advanced = true;
- } else {
- organizer = organizers[0];
- }
-
- int accel = 1;
- // Add hard-coded action for flat breakpoints list
- IAction action = new GroupBreakpointsAction(null, fView);
- addAccel(accel, action, BreakpointGroupMessages.GroupBreakpointsByAction_0);
- accel++;
- action.setImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_VIEW_BREAKPOINTS));
- action.setChecked(none);
- ActionContributionItem item= new ActionContributionItem(action);
- item.fill(menu, -1);
-
- // Add actions for each contributed organizer
- List actions = getActions(accel);
- accel = accel + actions.size();
- Iterator actionIter = actions.iterator();
- while (actionIter.hasNext()) {
- GroupBreakpointsAction bpAction = (GroupBreakpointsAction) actionIter.next();
- bpAction.setChecked(bpAction.getOrganizer().equals(organizer));
- item= new ActionContributionItem(bpAction);
- item.fill(menu, -1);
- }
-
- // advanced action
- AdvancedGroupBreakpointsByAction advancedAction = new AdvancedGroupBreakpointsByAction(fView);
- addAccel(accel, advancedAction,BreakpointGroupMessages.GroupBreakpointsByAction_1);
- advancedAction.setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_HIERARCHICAL));
- advancedAction.setChecked(advanced);
- item= new ActionContributionItem(advancedAction);
- item.fill(menu, -1);
- }
-
- public List getActions(int accel) {
- List actions= new ArrayList();
- IBreakpointOrganizer[] organizers = BreakpointOrganizerManager.getDefault().getOrganizers();
- for (int i = 0; i < organizers.length; i++) {
- IBreakpointOrganizer organizer = organizers[i];
- IAction action = new GroupBreakpointsAction(organizer, fView);
- addAccel(accel, action, organizer.getLabel());
- accel++;
- action.setImageDescriptor(organizer.getImageDescriptor());
- actions.add(action);
- }
- return actions;
- }
-
- private void addAccel(int accel, IAction action, String label) {
- StringBuffer actionLabel= new StringBuffer();
- if (accel != 10) {
- if (accel < 10) {
- // add the numerical accelerators 1 through 9
- actionLabel.append('&');
- }
- actionLabel.append(accel);
- } else {
- actionLabel.append("1&0"); //$NON-NLS-1$
- }
- accel++;
- actionLabel.append(' ');
- actionLabel.append(label);
- action.setText(actionLabel.toString());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if (action != fAction) {
- action.setMenuCreator(this);
- fAction= action;
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java
deleted file mode 100644
index a261c78..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java
+++ /dev/null
@@ -1,534 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.SWTFactory;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointOrganizerManager;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.debug.internal.ui.views.breakpoints.IBreakpointOrganizer;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-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.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Dialog which presents available breakpoint groupings to
- * the user and allows them to specify which they'd like
- * to use and in what order they should be applied.
- */
-public class GroupBreakpointsByDialog extends TrayDialog {
-
- private BreakpointsView fView;
-
- // Table viewer that presents available containers
- private TableViewer fAvailableViewer;
- private AvailableOrganizersProvider fAvailableOrganizersProvider= new AvailableOrganizersProvider();
-
- // Tree viewer that presents selected containers
- private TreeViewer fSelectedViewer;
- private SelectedOrganizerProvider fSelectedOrganizersProvider= new SelectedOrganizerProvider();
-
- private List fResult= new ArrayList();
-
- private Button fAddButton;
- private Button fRemoveButton;
- private Button fMoveUpButton;
- private Button fMoveDownButton;
-
- /**
- * Selection listener that listens to selection from all buttons in this
- * dialog.
- */
- private SelectionAdapter fSelectionListener= new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Object source= e.getSource();
- if (source == fAddButton) {
- handleAddPressed();
- } else if (source == fRemoveButton) {
- handleRemovePressed();
- } else if (source == fMoveUpButton) {
- handleMoveUpPressed();
- } else if (source == fMoveDownButton) {
- handleMoveDownPressed();
- }
- }
- };
-
- protected GroupBreakpointsByDialog(BreakpointsView view) {
- super(view.getSite().getShell());
- fView= view;
- setShellStyle(getShellStyle() | SWT.RESIZE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Control createDialogArea(Composite parent) {
- ILabelProvider labelProvider= new BreakpointOrganzierLabelProvider();
-
- Composite parentComposite= (Composite) super.createDialogArea(parent);
- parentComposite.setFont(parent.getFont());
- Composite composite= new Composite(parentComposite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- composite.setLayout(layout);
- GridData data= new GridData(GridData.FILL_BOTH);
- data.heightHint= 400;
- composite.setLayoutData(data);
- composite.setFont(parent.getFont());
-
- Label label= new Label(composite, SWT.WRAP);
- label.setText(BreakpointGroupMessages.GroupBreakpointsByDialog_0);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalSpan = 3;
- label.setLayoutData(gridData);
-
- createAvailableViewer(composite, labelProvider);
- createButtons(composite);
- createSelectedViewer(composite, labelProvider);
-
- initializeContent();
- updateViewers();
- Dialog.applyDialogFont(parentComposite);
- return parentComposite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
- Control contents = super.createContents(parent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getDialogArea(), IDebugHelpContextIds.GROUP_BREAKPOINTS_DIALOG);
- return contents;
- }
-
- /**
- * Divides the available breakpoint container factories into the
- * appropriate viewers ("available" or "selected").
- */
- private void initializeContent() {
- IBreakpointOrganizer[] organizers= BreakpointOrganizerManager.getDefault().getOrganizers();
- for (int i = 0; i < organizers.length; i++) {
- fAvailableOrganizersProvider.addAvailable(organizers[i]);
- }
- organizers = fView.getBreakpointOrganizers();
- if (organizers != null) {
- for (int i = 0; i < organizers.length; i++) {
- fSelectedOrganizersProvider.addSelected(organizers[i]);
- }
- }
- }
-
- /**
- * Creates and configured the viewer that shows the available (not currently selected)
- * breakpoint container factories.
- */
- private void createAvailableViewer(Composite parent, ILabelProvider labelProvider) {
- Composite availableComposite= new Composite(parent, SWT.NONE);
- availableComposite.setFont(parent.getFont());
- GridLayout layout = new GridLayout();
- layout.marginHeight=0;
- layout.marginWidth=0;
- availableComposite.setLayout(layout);
- GridData gridData= new GridData(GridData.FILL_BOTH);
- gridData.widthHint= 225;
- availableComposite.setLayoutData(gridData);
-
- Label label= new Label(availableComposite, SWT.WRAP);
- label.setText(BreakpointGroupMessages.GroupBreakpointsByDialog_1);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- label.setLayoutData(gridData);
-
- fAvailableViewer= new TableViewer(availableComposite);
- fAvailableViewer.setContentProvider(fAvailableOrganizersProvider);
- fAvailableViewer.setLabelProvider(labelProvider);
- fAvailableViewer.setInput(new Object());
- Table table = fAvailableViewer.getTable();
- table.setLayoutData(new GridData(GridData.FILL_BOTH));
- table.setFont(parent.getFont());
- fAvailableViewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- handleAddPressed();
- }
- });
- fAvailableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateAddButton();
- }
- });
- }
-
- /**
- * Creates and configures the viewer that shows the currently selected
- * breakpoint container factories.
- */
- private void createSelectedViewer(Composite parent, ILabelProvider labelProvider) {
- Composite selectedComposite= new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight=0;
- layout.marginWidth=0;
- layout.numColumns= 2;
- selectedComposite.setLayout(layout);
- GridData gridData= new GridData(GridData.FILL_BOTH);
- gridData.widthHint= 225;
- selectedComposite.setLayoutData(gridData);
- selectedComposite.setFont(parent.getFont());
-
- Label label= new Label(selectedComposite, SWT.WRAP);
- label.setText(BreakpointGroupMessages.GroupBreakpointsByDialog_3);
- gridData = new GridData();
- gridData.horizontalSpan = 2;
- label.setLayoutData(gridData);
-
- fSelectedViewer= new TreeViewer(selectedComposite);
- fSelectedViewer.setContentProvider(fSelectedOrganizersProvider);
- fSelectedViewer.setLabelProvider(labelProvider);
- fSelectedViewer.setInput(new Object());
- Tree tree = fSelectedViewer.getTree();
- tree.setLayoutData(new GridData(GridData.FILL_BOTH));
- tree.setFont(parent.getFont());
- fSelectedViewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- handleRemovePressed();
- }
- });
- fSelectedViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateSelectedButtons();
- }
- });
- }
-
- public void createButtons(Composite parent) {
- Composite buttonComposite= new Composite(parent, SWT.NONE);
- buttonComposite.setLayout(new GridLayout());
- buttonComposite.setLayoutData(new GridData());
- buttonComposite.setFont(parent.getFont());
-
- fAddButton= SWTFactory.createPushButton(buttonComposite, BreakpointGroupMessages.GroupBreakpointsByDialog_2, null);
- fAddButton.addSelectionListener(fSelectionListener);
-
- fRemoveButton= SWTFactory.createPushButton(buttonComposite, BreakpointGroupMessages.GroupBreakpointsByDialog_4, null);
- fRemoveButton.addSelectionListener(fSelectionListener);
-
- fMoveUpButton= SWTFactory.createPushButton(buttonComposite, BreakpointGroupMessages.GroupBreakpointsByDialog_5, null);
- fMoveUpButton.addSelectionListener(fSelectionListener);
-
- fMoveDownButton= SWTFactory.createPushButton(buttonComposite, BreakpointGroupMessages.GroupBreakpointsByDialog_6, null);
- fMoveDownButton.addSelectionListener(fSelectionListener);
-
- }
-
- /**
- * Returns the organizers chosen by the user. The order
- * of the list is the order that the organizers should be displayed
- * in the breakpoints view.
- * @return the breakpoint organizers chosen by the user
- */
- public IBreakpointOrganizer[] getOrganizers() {
- return (IBreakpointOrganizer[]) fResult.toArray(new IBreakpointOrganizer[fResult.size()]);
- }
-
- /**
- * When the user presses OK, convert the tree selection into a list.
- */
- protected void okPressed() {
- Object[] factories= fSelectedOrganizersProvider.getElements(null);
- while (factories.length > 0) {
- Object factory= factories[0];
- fResult.add(factory);
- factories= fSelectedOrganizersProvider.getChildren(factory);
- }
- super.okPressed();
- }
-
- /**
- * Moves the selected item from the list of "available" factories
- * to the tree of "selected" factories.
- */
- public void handleAddPressed() {
- IStructuredSelection selection= (IStructuredSelection) fAvailableViewer.getSelection();
- if (selection.size() < 1) {
- return;
- }
- Iterator iter= selection.iterator();
- while (iter.hasNext()) {
- fSelectedOrganizersProvider.addSelected((IBreakpointOrganizer) iter.next());
- }
- updateViewers();
- }
-
- /**
- * Moves the selected item from the tree of "selected" factories
- * to the list of "available" factories.
- */
- public void handleRemovePressed() {
- IStructuredSelection selection= (IStructuredSelection) fSelectedViewer.getSelection();
- if (selection.size() < 1) {
- return;
- }
- Iterator iter= selection.iterator();
- while (iter.hasNext()) {
- fAvailableOrganizersProvider.addAvailable((IBreakpointOrganizer) iter.next());
- }
- updateViewers();
- }
-
- /**
- * Moves each selected item up in the tree of selected containers
- */
- public void handleMoveUpPressed() {
- IStructuredSelection selection = (IStructuredSelection) fSelectedViewer.getSelection();
- Iterator iter = selection.iterator();
- while (iter.hasNext()) {
- fSelectedOrganizersProvider.moveUp(iter.next());
- }
- updateViewers();
- }
-
- /**
- * Moves each selected item down in the tree of selected containers
- */
- public void handleMoveDownPressed() {
- IStructuredSelection selection = (IStructuredSelection) fSelectedViewer.getSelection();
- Object[] elements= selection.toArray();
- for (int i= elements.length - 1; i >= 0; i--) {
- fSelectedOrganizersProvider.moveDown(elements[i]);
- }
- updateViewers();
- }
-
- /**
- * Fully refreshes and updates all viewers and buttons.
- */
- public void updateViewers() {
- fAvailableViewer.refresh();
- fSelectedViewer.refresh();
- fSelectedViewer.expandAll();
- updateAddButton();
- updateSelectedButtons();
- }
-
- /**
- * Updates all buttons associated with the tree of selected containers.
- */
- public void updateSelectedButtons() {
- updateRemoveButton();
- updateMoveUpButton();
- updateMoveDownButton();
- }
-
- public void updateAddButton() {
- IStructuredSelection selection = (IStructuredSelection) fAvailableViewer.getSelection();
- fAddButton.setEnabled(selection.size() > 0);
- }
-
- public void updateRemoveButton() {
- IStructuredSelection selection = (IStructuredSelection) fSelectedViewer.getSelection();
- fRemoveButton.setEnabled(selection.size() > 0);
- }
-
- public void updateMoveUpButton() {
- boolean enabled= true;
- IStructuredSelection selection = (IStructuredSelection) fSelectedViewer.getSelection();
- if (selection.size() == 0) {
- enabled= false;
- } else {
- Object firstSelected= selection.getFirstElement();
- Object parent= fSelectedOrganizersProvider.getParent(firstSelected);
- if (!(parent instanceof IBreakpointOrganizer)) {
- enabled= false;
- }
- }
- fMoveUpButton.setEnabled(enabled);
- }
-
- public void updateMoveDownButton() {
- boolean enabled= true;
- IStructuredSelection selection = (IStructuredSelection) fSelectedViewer.getSelection();
- if (selection.size() == 0) {
- enabled= false;
- } else {
- Object lastSelected= selection.toList().get(selection.size() - 1);
- Object[] children= fSelectedOrganizersProvider.getChildren(lastSelected);
- if (children.length < 1) {
- enabled= false;
- }
- }
- fMoveDownButton.setEnabled(enabled);
- }
-
- /**
- * Content provider that provides the list of breakpoint organaisers
- * that are available but not currently selected.
- */
- private class AvailableOrganizersProvider implements IStructuredContentProvider {
- protected List availableOrganziers= new ArrayList();
-
- public void addAvailable(IBreakpointOrganizer organizer) {
- availableOrganziers.add(organizer);
- fSelectedOrganizersProvider.selectedOrganizers.remove(organizer);
- }
-
- public Object[] getElements(Object inputElement) {
- return availableOrganziers.toArray();
- }
-
- public void dispose() {
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- }
-
- /**
- * Content provider that returns the selected breakpoint organizers
- * as a tree. This tree shows the list of organzizers as they will
- * appear in the breakpoints view.
- */
- private class SelectedOrganizerProvider implements ITreeContentProvider {
- protected List selectedOrganizers= new ArrayList();
-
- public void addSelected(IBreakpointOrganizer organizer) {
- selectedOrganizers.add(organizer);
- fAvailableOrganizersProvider.availableOrganziers.remove(organizer);
- }
-
- public void moveUp(Object object) {
- int index = selectedOrganizers.indexOf(object);
- if (index > 0) {
- selectedOrganizers.remove(object);
- selectedOrganizers.add(index - 1, object);
- }
- }
-
- public void moveDown(Object object) {
- int index = selectedOrganizers.indexOf(object);
- if (index < selectedOrganizers.size() - 1) {
- selectedOrganizers.remove(object);
- selectedOrganizers.add(index + 1, object);
- }
- }
-
- public Object[] getChildren(Object parentElement) {
- // A factory's "child" is the next factory in the list
- int index = selectedOrganizers.indexOf(parentElement);
- if (index < selectedOrganizers.size() - 1) {
- return new Object[] { selectedOrganizers.get(index + 1) };
- }
- return new Object[0];
- }
-
- public Object getParent(Object element) {
- // A factory's "parent" is the factory before it
- int index = selectedOrganizers.indexOf(element);
- if (index <= 0 || selectedOrganizers.size() <= 1) {
- return null;
- }
- return selectedOrganizers.get(index - 1);
- }
-
- public boolean hasChildren(Object element) {
- // A factory has "children" if there are more
- // factories after it.
- int index = selectedOrganizers.indexOf(element);
- return index != -1 && index < selectedOrganizers.size() - 1;
- }
-
- public Object[] getElements(Object inputElement) {
- if (selectedOrganizers.size() > 0) {
- return new Object[] { selectedOrganizers.get(0) };
- }
- return new Object[0];
- }
- public void dispose() {
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- }
-
- /**
- * Label provider which provides text and images for breakpoint container factories
- */
- private class BreakpointOrganzierLabelProvider extends LabelProvider {
- private HashMap fImageCache= new HashMap();
-
- public String getText(Object element) {
- if (element instanceof IBreakpointOrganizer) {
- return ((IBreakpointOrganizer) element).getLabel();
- }
- return super.getText(element);
- }
- public Image getImage(Object element) {
- if (element instanceof IBreakpointOrganizer) {
- ImageDescriptor imageDescriptor = ((IBreakpointOrganizer) element).getImageDescriptor();
- if (imageDescriptor != null) {
- Image image = (Image) fImageCache.get(imageDescriptor);
- if (image == null) {
- image= imageDescriptor.createImage();
- if (image != null) {
- fImageCache.put(imageDescriptor, image);
- }
- }
- return image;
- }
- }
- return super.getImage(element);
- }
- public void dispose() {
- Iterator imageIter = fImageCache.values().iterator();
- while (imageIter.hasNext()) {
- ((Image) imageIter.next()).dispose();
- }
- super.dispose();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
- */
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(BreakpointGroupMessages.GroupBreakpointsByDialog_7);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/PasteBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/PasteBreakpointsAction.java
deleted file mode 100644
index db5fca6..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/PasteBreakpointsAction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import java.util.List;
-
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.debug.internal.ui.views.breakpoints.OtherBreakpointCategory;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.navigator.LocalSelectionTransfer;
-
-/**
- * Standard action for pasting resources on the clipboard to the selected resource's location.
- * <p>
- * This class may be instantiated; it is not intended to be subclassed.
- * </p>
- *
- * @since 2.0
- */
-public class PasteBreakpointsAction extends BreakpointSelectionAction {
-
- /**
- * Creates a new action.
- *
- * @param view the view of this action
- */
- public PasteBreakpointsAction(BreakpointsView view) {
- super(BreakpointGroupMessages.PasteBreakpointsAction_0, view);
- setToolTipText(BreakpointGroupMessages.PasteBreakpointsAction_1);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.PASTE_BREAKPOINTS_ACTION);
- }
-
- /**
- * Returns the actual target of the paste action. Returns null
- * if no valid target is selected.
- *
- * @return the actual target of the paste action
- */
- private Object getTarget() {
- List selectedNonResources = getSelectedNonResources();
- if (selectedNonResources.size() == 1) {
- Object target = selectedNonResources.get(0);
- if (target instanceof BreakpointContainer) {
- return target;
- }
- }
- return null;
- }
-
- /**
- * Implementation of method defined on <code>IAction</code>.
- */
- public void run() {
- if (getBreakpointsView().canPaste(getTarget(), LocalSelectionTransfer.getInstance().getSelection())) {
- getBreakpointsView().performPaste(getTarget(), LocalSelectionTransfer.getInstance().getSelection());
- }
- }
-
- /**
- * Returns whether this action should be enabled based on the selection
- * in the clipboard. Only updates when the breakpoints view has focus.
- */
- protected boolean updateSelection(IStructuredSelection selection) {
- // can't paste into "Others" (only move)
- Object target = getTarget();
- if (target instanceof BreakpointContainer) {
- BreakpointContainer container = (BreakpointContainer) target;
- if (container.getCategory() instanceof OtherBreakpointCategory) {
- return false;
- }
- return true;
- }
- // don't access clipboard - causes Hang -see bug 84870
- return false;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java
deleted file mode 100644
index 9835ba0..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsViewer;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Item;
-
-/**
- * Removes a breakpoint from a breakpoint working set.
- */
-public class RemoveFromWorkingSetAction extends BreakpointSelectionAction {
-
- /**
- * Constructs action to remove breakpoints from a category.
- *
- * @param view
- */
- public RemoveFromWorkingSetAction(BreakpointsView view) {
- super(BreakpointGroupMessages.RemoveFromWorkingSetAction_0, view);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- BreakpointsViewer viewer = (BreakpointsViewer) getBreakpointsView().getViewer();
- Item[] items = viewer.getSelectedItems();
- IBreakpoint breakpoint = null;
- BreakpointContainer container = null;
- for(int i = 0; i < items.length; i++) {
- if(items[i].getData() instanceof IBreakpoint) {
- breakpoint = (IBreakpoint) items[i].getData();
- container = viewer.getRemovableContainer(items[i]);
- if(container != null) {
- container.getOrganizer().removeBreakpoint(breakpoint, container.getCategory());
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.BaseSelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected boolean updateSelection(IStructuredSelection selection) {
- Object element = selection.getFirstElement();
- if(element instanceof BreakpointContainer) {
- return ((BreakpointContainer) element).getCategory().equals(IDebugUIConstants.BREAKPOINT_WORKINGSET_ID);
- }
- return false;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SelectBreakpointWorkingsetDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SelectBreakpointWorkingsetDialog.java
deleted file mode 100644
index a0ea4f2..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SelectBreakpointWorkingsetDialog.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import java.util.ArrayList;
-
-import org.eclipse.debug.internal.ui.AbstractDebugCheckboxSelectionDialog;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Dialog to allow the selection of working sets without all of the overhead of the
- * platform UI working set dialog
- *
- * @since 3.3
- */
-public class SelectBreakpointWorkingsetDialog extends AbstractDebugCheckboxSelectionDialog {
-
- private static final String SETTINGS_ID = DebugUIPlugin.getUniqueIdentifier() + ".DELETE_ASSOCIATED_CONFIGS_DIALOG"; //$NON-NLS-1$
- private IWorkingSet[] fWorkingSetList = null;
-
- /**
- * Constructor
- * @param parentShell the parent to open this dialog on
- */
- protected SelectBreakpointWorkingsetDialog(Shell parentShell) {
- super(parentShell);
- fWorkingSetList = getBreakpointWorkingSets();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugCheckboxSelectionDialog#addViewerListeners(org.eclipse.jface.viewers.StructuredViewer)
- */
- protected void addViewerListeners(StructuredViewer viewer) {
- CheckboxTableViewer checkViewer = getCheckBoxTableViewer();
- if (checkViewer != null){
- checkViewer.addCheckStateListener(new ICheckStateListener(){
- public void checkStateChanged(CheckStateChangedEvent event) {
- getCheckBoxTableViewer().setCheckedElements(new Object[] {event.getElement()});
- getButton(IDialogConstants.OK_ID).setEnabled(true);
- }
- });
- }
- }
-
- /**
- * Returns the current listing of breakpoint <code>IWorkingSet</code>s
- * @return an array of the current breakpoint <code>IWorkingSet</code>s
- */
- private IWorkingSet[] getBreakpointWorkingSets() {
- IWorkingSet[] ws = PlatformUI.getWorkbench().getWorkingSetManager().getAllWorkingSets();
- ArrayList list = new ArrayList();
- for(int i = 0; i < ws.length; i++) {
- if(IDebugUIConstants.BREAKPOINT_WORKINGSET_ID.equals(ws[i].getId())) {
- list.add(ws[i]);
- }
- }
- return (IWorkingSet[]) list.toArray(new IWorkingSet[list.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerInput()
- */
- protected Object getViewerInput() {
- return fWorkingSetList;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getDialogSettingsId()
- */
- protected String getDialogSettingsId() {
- return SETTINGS_ID;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getHelpContextId()
- */
- protected String getHelpContextId() {
- return IDebugHelpContextIds.SELECT_DEFAULT_WORKINGSET_DIALOG;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerLabel()
- */
- protected String getViewerLabel() {
- return BreakpointGroupMessages.SelectBreakpointWorkingsetDialog_0;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SetDefaultBreakpointGroupAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SetDefaultBreakpointGroupAction.java
deleted file mode 100644
index f30a8ce..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SetDefaultBreakpointGroupAction.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointSetOrganizer;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.ui.IWorkingSet;
-
-/**
- * Action which prompts the user to set a default breakpoint group.
- */
-public class SetDefaultBreakpointGroupAction extends AbstractBreakpointsViewAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- SelectBreakpointWorkingsetDialog sbwsd = new SelectBreakpointWorkingsetDialog(DebugUIPlugin.getShell());
- sbwsd.setTitle(BreakpointGroupMessages.SetDefaultBreakpointGroupAction_0);
- IWorkingSet workingSet = BreakpointSetOrganizer.getDefaultWorkingSet();
- if (workingSet != null){
- sbwsd.setInitialSelections(new Object[]{workingSet});
- }
- if(sbwsd.open() == Window.OK) {
- BreakpointSetOrganizer.setDefaultWorkingSet((IWorkingSet) sbwsd.getResult()[0]);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {}
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ToggleDefaultGroupAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ToggleDefaultGroupAction.java
deleted file mode 100644
index 7b777f2..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ToggleDefaultGroupAction.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointSetOrganizer;
-import org.eclipse.debug.internal.ui.views.breakpoints.WorkingSetCategory;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IWorkingSet;
-
-/**
- * Toggles the default breakpoint group based on selection.
- */
-public class ToggleDefaultGroupAction extends AbstractBreakpointsViewAction {
-
- private IWorkingSet fSelectedSet;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- IWorkingSet defaultWorkingSet = BreakpointSetOrganizer.getDefaultWorkingSet();
- IWorkingSet set = null;
- if (!fSelectedSet.equals(defaultWorkingSet)) {
- set = fSelectedSet;
- }
- BreakpointSetOrganizer.setDefaultWorkingSet(set);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection sel) {
- fSelectedSet = null;
- if (sel instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection) sel;
- if (selection.size() == 1) {
- Object firstElement = selection.getFirstElement();
- if (firstElement instanceof BreakpointContainer) {
- BreakpointContainer container = (BreakpointContainer) firstElement;
- if (container.getCategory() instanceof WorkingSetCategory) {
- WorkingSetCategory category = (WorkingSetCategory)container.getCategory();
- if (IDebugUIConstants.BREAKPOINT_WORKINGSET_ID.equals(category.getWorkingSet().getId())) {
- IWorkingSet set = category.getWorkingSet();
- action.setEnabled(true);
- boolean isDefault = set == BreakpointSetOrganizer.getDefaultWorkingSet();
- action.setChecked(isDefault);
- fSelectedSet = set;
- return;
- }
- }
- }
- }
- }
- action.setEnabled(false);
- action.setChecked(false);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/WorkingSetsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/WorkingSetsAction.java
deleted file mode 100644
index 3417705..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/WorkingSetsAction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.IWorkingSetSelectionDialog;
-
-/**
- * Allows the user to manage working sets.
- */
-public class WorkingSetsAction extends AbstractBreakpointsViewAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- IWorkingSetSelectionDialog selectionDialog = PlatformUI.getWorkbench().getWorkingSetManager().createWorkingSetSelectionDialog(
- DebugUIPlugin.getShell(),
- false,
- new String[] {IDebugUIConstants.BREAKPOINT_WORKINGSET_ID});
- selectionDialog.open();
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/AccessWatchpointToggleAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/AccessWatchpointToggleAction.java
deleted file mode 100644
index 64b98f9..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/AccessWatchpointToggleAction.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.model.IWatchpoint;
-
-/**
- * Toggles access attribute of a watchpoint.
- */
-public class AccessWatchpointToggleAction extends ModifyWatchpointAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.ModifyWatchpointAction#isEnabled(org.eclipse.debug.core.model.IWatchpoint)
- */
- protected boolean isEnabled(IWatchpoint watchpoint) {
- return watchpoint.supportsAccess();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.ModifyWatchpointAction#toggleWatchpoint(org.eclipse.debug.core.model.IWatchpoint, boolean)
- */
- protected void toggleWatchpoint(IWatchpoint watchpoint, boolean b) throws CoreException {
- watchpoint.setAccess(b);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.ModifyWatchpointAction#isChecked(org.eclipse.debug.core.model.IWatchpoint)
- */
- protected boolean isChecked(IWatchpoint watchpoint) {
- try {
- return watchpoint.isAccess();
- } catch (CoreException e) {
- }
- return false;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointTypesContribution.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointTypesContribution.java
deleted file mode 100644
index 4fa2d56..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointTypesContribution.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.debug.internal.ui.actions.ToggleBreakpointsTargetManager;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.ContributionItem;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.ui.IPartService;
-import org.eclipse.ui.ISelectionService;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.actions.CompoundContributionItem;
-import org.eclipse.ui.menus.IWorkbenchContribution;
-import org.eclipse.ui.services.IServiceLocator;
-
-/**
- * Dynamic menu contribution that shows available breakpoint types from
- * toggleBreakpointsTargetFactories extension point.
- *
- * @since 3.5
- */
-public class BreakpointTypesContribution extends CompoundContributionItem implements IWorkbenchContribution {
-
- private class SelectTargetAction extends Action {
- private final Set fPossibleIDs;
- private final String fID;
- SelectTargetAction(String name, Set possibleIDs, String ID) {
- super(name, AS_RADIO_BUTTON);
- fID = ID;
- fPossibleIDs = possibleIDs;
- }
-
- public void run() {
- if (isChecked()) {
- ToggleBreakpointsTargetManager.getDefault().setPreferredTarget(fPossibleIDs, fID);
- }
- }
- }
-
- private IServiceLocator fServiceLocator;
-
- private static IContributionItem[] NO_BREAKPOINT_TYPES_CONTRIBUTION_ITEMS = new IContributionItem[] {
- new ContributionItem() {
- public void fill(Menu menu, int index) {
- MenuItem item = new MenuItem(menu, SWT.NONE);
- item.setEnabled(false);
- item.setText(Messages.BreakpointTypesContribution_0);
- }
-
- public boolean isEnabled() {
- return false;
- }
- }
- };
-
- protected IContributionItem[] getContributionItems() {
- IWorkbenchPart part = null;
- ISelection selection = null;
-
- ISelectionService selectionService =
- (ISelectionService)fServiceLocator.getService(ISelectionService.class);
- if (selectionService != null) {
- selection = selectionService.getSelection();
- }
- IPartService partService = (IPartService)fServiceLocator.getService(IPartService.class);
- if (partService != null) {
- part = partService.getActivePart();
- }
-
- // If no part or selection, disable all.
- if (part == null || selection == null) {
- return NO_BREAKPOINT_TYPES_CONTRIBUTION_ITEMS;
- }
-
- // Get breakpoint toggle target IDs.
- ToggleBreakpointsTargetManager manager = ToggleBreakpointsTargetManager.getDefault();
- Set enabledIDs = manager.getEnabledToggleBreakpointsTargetIDs(part, selection);
- String preferredId = manager.getPreferredToggleBreakpointsTargetID(part, selection);
-
- List actions = new ArrayList(enabledIDs.size());
- for (Iterator i = enabledIDs.iterator(); i.hasNext();) {
- String id = (String) i.next();
- Action action = new SelectTargetAction(manager.getToggleBreakpointsTargetName(id), enabledIDs, id);
- if (id.equals(preferredId)) {
- action.setChecked(true);
- }
- actions.add(action);
- }
-
- if ( enabledIDs.isEmpty() ) {
- return NO_BREAKPOINT_TYPES_CONTRIBUTION_ITEMS;
- }
-
- IContributionItem[] items = new IContributionItem[enabledIDs.size()];
- for (int i = 0; i < actions.size(); i++) {
- items[i] = new ActionContributionItem((Action) actions.get(i));
- }
- return items;
- }
-
- public void initialize(IServiceLocator serviceLocator) {
- fServiceLocator = serviceLocator;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsCollapseAllAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsCollapseAllAction.java
deleted file mode 100644
index 03e9c96..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsCollapseAllAction.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.commands.ActionHandler;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.handlers.CollapseAllHandler;
-import org.eclipse.ui.handlers.IHandlerService;
-
-/**
- *
- */
-public class BreakpointsCollapseAllAction implements IViewActionDelegate, IActionDelegate2 {
-
- private BreakpointsView fView;
-
- private IAction fAction;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- fView= (BreakpointsView) view;
- IHandlerService hs = (IHandlerService) view.getSite().getService(IHandlerService.class);
- if (hs != null) {
- hs.activateHandler(CollapseAllHandler.COMMAND_ID, new ActionHandler(fAction));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- fView.getCheckboxViewer().collapseAll();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#dispose()
- */
- public void dispose() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- fAction = action;
- action.setActionDefinitionId(CollapseAllHandler.COMMAND_ID);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsExpandAllAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsExpandAllAction.java
deleted file mode 100644
index e3c91aa..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsExpandAllAction.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
-/**
- * Action which fully expands the tree in the breakpoints view.
- */
-public class BreakpointsExpandAllAction implements IViewActionDelegate {
-
- private BreakpointsView fView;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- fView= (BreakpointsView) view;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- fView.getCheckboxViewer().expandAll();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DeleteWorkingsetsMessageDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DeleteWorkingsetsMessageDialog.java
deleted file mode 100644
index 90b1748..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DeleteWorkingsetsMessageDialog.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Allows the user to specify if they want to delete the working set, all the breakpoints in the working
- * set or both
- * @since 3.2
- */
-public class DeleteWorkingsetsMessageDialog extends MessageDialog {
-
- /**
- * to determine if we should delete the working set as well
- */
- private boolean fDeleteWorkingsets = false;
-
- /**
- * to determine if we should delete all the breakpoints in the set.
- * to maintain backward compatibility this is by default true
- */
- private boolean fDeleteBreakpoints = true;
-
- //widgets
- private Button fDeleteWS;
- private Button fDeleteBPS;
-
- // dialog settings
- private final static String DIALOG_SETTINGS = "DeleteBreakpointsDialogSettings"; //$NON-NLS-1$
- private static final String DELETE_BREAKPOINTS = "DeleteBreakpoints"; //$NON-NLS-1$
- private static final String DELETE_WORKINGSETS = "DeleteWorkingSets"; //$NON-NLS-1$
-
- public DeleteWorkingsetsMessageDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage, int dialogImageType, String[] dialogButtonLabels, int defaultIndex) {
- super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
- IDialogSettings section = getDialogSettings();
- fDeleteBreakpoints = section.getBoolean(DELETE_BREAKPOINTS);
- fDeleteWorkingsets = section.getBoolean(DELETE_WORKINGSETS);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.MessageDialog#createCustomArea(org.eclipse.swt.widgets.Composite)
- */
- protected Control createCustomArea(Composite parent) {
- Composite comp = new Composite(parent, SWT.NONE);
- comp.setLayout(new GridLayout());
- Font font = parent.getFont();
- fDeleteWS = new Button(comp, SWT.CHECK);
- fDeleteWS.setText(ActionMessages.DeleteWorkingsetsMessageDialog_0);
- fDeleteWS.setFont(font);
- fDeleteWS.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {}
- public void widgetSelected(SelectionEvent e) {
- getButton(0).setEnabled(fDeleteWS.getSelection() || fDeleteBPS.getSelection());
- }
- });
-
- fDeleteBPS = new Button(comp, SWT.CHECK);
- fDeleteBPS.setText(ActionMessages.DeleteWorkingsetsMessageDialog_1);
- fDeleteBPS.setFont(font);
- fDeleteBPS.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {}
- public void widgetSelected(SelectionEvent e) {
- getButton(0).setEnabled(fDeleteWS.getSelection() || fDeleteBPS.getSelection());
- }
- });
-
- fDeleteWS.setSelection(fDeleteWorkingsets);
- fDeleteBPS.setSelection(fDeleteBreakpoints);
- return comp;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.MessageDialog#buttonPressed(int)
- */
- protected void buttonPressed(int buttonId) {
- if(buttonId == OK) {
- fDeleteBreakpoints = fDeleteBPS.getSelection();
- fDeleteWorkingsets = fDeleteWS.getSelection();
- IDialogSettings dialogSettings = getDialogSettings();
- dialogSettings.put(DELETE_BREAKPOINTS, fDeleteBreakpoints);
- dialogSettings.put(DELETE_WORKINGSETS, fDeleteWorkingsets);
- }
- super.buttonPressed(buttonId);
- }
-
- /**
- * return the checked value of the delete working set check box
- * @return the checked state of the delete working set check box
- */
- public boolean deleteWorkingset() {
- return fDeleteWorkingsets;
- }
-
- /**
- * returns the checked state of the delete all breakpoints in working set check box
- * @return the checked state of the delete all breakpoints... check box
- */
- public boolean deleteAllBreakpoints() {
- return fDeleteBreakpoints;
- }
-
- /**
- * Returns the dialog settings for this dialog.
- *
- * @return dialog settings
- */
- protected IDialogSettings getDialogSettings() {
- DebugUIPlugin plugin = DebugUIPlugin.getDefault();
- IDialogSettings workbenchSettings = plugin.getDialogSettings();
- IDialogSettings section = workbenchSettings.getSection(DIALOG_SETTINGS);
- if (section == null) {
- section = workbenchSettings.addNewSection(DIALOG_SETTINGS);
- section.put(DELETE_BREAKPOINTS, true);
- section.put(DELETE_WORKINGSETS, false);
- }
- return section;
- }
-
-
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DisableBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DisableBreakpointsAction.java
deleted file mode 100644
index 0af9112..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/DisableBreakpointsAction.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-
-public class DisableBreakpointsAction extends EnableBreakpointsAction {
-
- /**
- * This action disables breakpoints.
- */
- protected boolean isEnableAction() {
- return false;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/EnableBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/EnableBreakpointsAction.java
deleted file mode 100644
index 35cd2a1..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/EnableBreakpointsAction.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IBreakpointsListener;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-
-public class EnableBreakpointsAction implements IViewActionDelegate, IPartListener, IBreakpointsListener {
-
- private IViewPart fView;
- private IAction fAction;
-
- public EnableBreakpointsAction() {
- }
-
- protected IViewPart getView() {
- return fView;
- }
-
- protected void setView(IViewPart view) {
- fView = view;
- }
-
- /**
- * @see IViewActionDelegate#init(IViewPart)
- */
- public void init(IViewPart view) {
- setView(view);
- DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this);
- view.getViewSite().getPage().addPartListener(this);
- }
-
- protected void update() {
- selectionChanged(getAction(), getView().getViewSite().getSelectionProvider().getSelection());
- }
-
- /**
- * This action enables breakpoints.
- */
- protected boolean isEnableAction() {
- return true;
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- IStructuredSelection selection= getSelection();
- final int size= selection.size();
- if (size == 0) {
- return;
- }
-
- final Iterator itr= selection.iterator();
- final MultiStatus ms= new MultiStatus(DebugUIPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, ActionMessages.EnableBreakpointAction_Enable_breakpoint_s__failed_2, null);
- IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
- while (itr.hasNext()) {
- Object element= itr.next();
- try {
- IBreakpoint[] breakpoints= null;
- if (element instanceof IBreakpoint) {
- breakpoints= new IBreakpoint[] { (IBreakpoint) element };
- } else if (element instanceof BreakpointContainer) {
- breakpoints= ((BreakpointContainer) element).getBreakpoints();
- }
- if (breakpoints != null) {
- setEnabled(breakpoints);
- }
- } catch (CoreException e) {
- ms.merge(e.getStatus());
- }
- }
- }
- public void setEnabled(IBreakpoint[] breakpoints) throws CoreException {
- boolean enable= isEnableAction();
- for (int i = 0; i < breakpoints.length; i++) {
- breakpoints[i].setEnabled(enable);
- }
- }
- };
-
- try {
- ResourcesPlugin.getWorkspace().run(runnable, null, 0, new NullProgressMonitor());
- } catch (CoreException e) {
- // Exceptions are handled by runnable
- }
-
- if (!ms.isOK()) {
- IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
- if (window != null) {
- DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.EnableBreakpointAction_Enabling_breakpoints_3, ActionMessages.EnableBreakpointAction_Exceptions_occurred_enabling_the_breakpoint_s___4, ms); //
- } else {
- DebugUIPlugin.log(ms);
- }
- }
- }
-
- private IStructuredSelection getSelection() {
- return (IStructuredSelection)getView().getViewSite().getSelectionProvider().getSelection();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- setAction(action);
- if (!(selection instanceof IStructuredSelection)) {
- return;
- }
- IStructuredSelection sel= (IStructuredSelection)selection;
-
- Iterator itr= sel.iterator();
- boolean allEnabled= true;
- boolean allDisabled= true;
- while (itr.hasNext()) {
- Object selected= itr.next();
- if (selected instanceof BreakpointContainer) {
- IBreakpoint[] breakpoints = ((BreakpointContainer) selected).getBreakpoints();
- for (int i = 0; i < breakpoints.length; i++) {
- try {
- if (breakpoints[i].isEnabled()) {
- allDisabled= false;
- } else {
- allEnabled= false;
- }
- } catch (CoreException ce) {
- handleException(ce);
- }
- }
- } else if (selected instanceof IBreakpoint) {
- IBreakpoint bp= (IBreakpoint)selected;
- try {
- if (bp.isEnabled()) {
- allDisabled= false;
- } else {
- allEnabled= false;
- }
- } catch (CoreException ce) {
- handleException(ce);
- }
- } else {
- return;
- }
-
- }
-
- if (isEnableAction()) {
- action.setEnabled(!allEnabled);
- } else {
- action.setEnabled(!allDisabled);
- }
- }
-
- private void handleException(CoreException ce) {
- IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
- if (window != null) {
- DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.EnableBreakpointAction_Enabling_breakpoints_3, ActionMessages.EnableBreakpointAction_Exceptions_occurred_enabling_the_breakpoint_s___4, ce); //
- } else {
- DebugUIPlugin.log(ce);
- }
- }
-
-
- /**
- * Removes this action as a breakpoint and part listener.
- */
- public void dispose() {
- DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);
- getView().getViewSite().getPage().removePartListener(this);
- }
-
- /**
- * @see IBreakpointsListener#breakpointsAdded(IBreakpoint[])
- */
- public void breakpointsAdded(IBreakpoint[] breakpoints) {
- }
-
- /**
- * @see IBreakpointsListener#breakpointsRemoved(IBreakpoint[], IMarkerDelta[])
- */
- public void breakpointsRemoved(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
- asynchUpdate();
- }
-
- /**
- * @see IBreakpointsListener#breakpointsChanged(IBreakpoint[], IMarkerDelta[])
- */
- public void breakpointsChanged(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
- asynchUpdate();
- }
-
- protected void asynchUpdate() {
- if (getAction() == null) {
- return;
- }
- IWorkbenchWindow window= getView().getViewSite().getPage().getWorkbenchWindow();
- if (window == null) {
- return;
- }
- Shell shell= window.getShell();
- if (shell == null || shell.isDisposed()) {
- return;
- }
- Runnable r= new Runnable() {
- public void run() {
- IWorkbenchWindow ww= getView().getViewSite().getPage().getWorkbenchWindow();
- if (ww == null) {
- return;
- }
- Shell s= ww.getShell();
- if (s == null || s.isDisposed()) {
- return;
- }
- update();
- }
- };
-
- shell.getDisplay().asyncExec(r);
- }
-
- protected IAction getAction() {
- return fAction;
- }
-
- protected void setAction(IAction action) {
- fAction = action;
- }
- /**
- * @see IPartListener#partActivated(IWorkbenchPart)
- */
- public void partActivated(IWorkbenchPart part) {
- }
-
- /**
- * @see IPartListener#partBroughtToTop(IWorkbenchPart)
- */
- public void partBroughtToTop(IWorkbenchPart part) {
- }
-
- /**
- * @see IPartListener#partClosed(IWorkbenchPart)
- */
- public void partClosed(IWorkbenchPart part) {
- if (part.equals(getView())) {
- dispose();
- }
- }
-
- /**
- * @see IPartListener#partDeactivated(IWorkbenchPart)
- */
- public void partDeactivated(IWorkbenchPart part) {
- }
-
- /**
- * @see IPartListener#partOpened(IWorkbenchPart)
- */
- public void partOpened(IWorkbenchPart part) {
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/LinkBreakpointsWithDebugViewAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/LinkBreakpointsWithDebugViewAction.java
deleted file mode 100644
index e7b5454..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/LinkBreakpointsWithDebugViewAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
-/**
- * An action which toggles the "Link with Debug View" preference on a
- * breakpoints view.
- */
-public class LinkBreakpointsWithDebugViewAction implements IViewActionDelegate {
-
- private BreakpointsView fView;
- private IAction fAction= null;
-
- public LinkBreakpointsWithDebugViewAction() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- fView= (BreakpointsView) view;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- fView.setTrackSelection(action.isChecked());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if (fAction == null) {
- action.setChecked(fView.isTrackingSelection());
- fAction= action;
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/Messages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/Messages.java
deleted file mode 100644
index aae6250..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/Messages.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.debug.internal.ui.actions.breakpoints.Messages"; //$NON-NLS-1$
- public static String RetargetMethodBreakpointAction_0;
- public static String RetargetToggleBreakpointAction_0;
- public static String RetargetToggleLineBreakpointAction_0;
- public static String RetargetWatchpointAction_0;
- public static String BreakpointTypesContribution_0;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/Messages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/Messages.properties
deleted file mode 100644
index 2316854..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/Messages.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-RetargetMethodBreakpointAction_0=The operation is unavailable on the current selection. Please place the cursor inside a method.
-RetargetToggleBreakpointAction_0=The operation is unavailable on the current selection. Please place the cursor in a valid location for a breakpoint.
-RetargetWatchpointAction_0=The operation is unavailable on the current selection. Please select or place the cursor on a field.
-RetargetToggleLineBreakpointAction_0=The operation is unavailable on the current selection. Please place the cursor on a valid line.
-BreakpointTypesContribution_0=None Available
\ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ModificationWatchpointToggleAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ModificationWatchpointToggleAction.java
deleted file mode 100644
index 632590e..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ModificationWatchpointToggleAction.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.model.IWatchpoint;
-
-/**
- * Toggles access attribute of a watchpoint.
- */
-public class ModificationWatchpointToggleAction extends ModifyWatchpointAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.ModifyWatchpointAction#isEnabled(org.eclipse.debug.core.model.IWatchpoint)
- */
- protected boolean isEnabled(IWatchpoint watchpoint) {
- return watchpoint.supportsModification();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.ModifyWatchpointAction#toggleWatchpoint(org.eclipse.debug.core.model.IWatchpoint, boolean)
- */
- protected void toggleWatchpoint(IWatchpoint watchpoint, boolean b) throws CoreException {
- watchpoint.setModification(b);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.ModifyWatchpointAction#isChecked(org.eclipse.debug.core.model.IWatchpoint)
- */
- protected boolean isChecked(IWatchpoint watchpoint) {
- try {
- return watchpoint.isModification();
- } catch (CoreException e) {
- }
- return false;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ModifyWatchpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ModifyWatchpointAction.java
deleted file mode 100644
index c7ea345..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ModifyWatchpointAction.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.model.IWatchpoint;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Action that modifies a watchpoint's access/modification attributes
- */
-public abstract class ModifyWatchpointAction implements IObjectActionDelegate, IActionDelegate2 {
-
- private IStructuredSelection fWatchpoints = null;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- try {
- if (fWatchpoints != null) {
- Iterator iterator = fWatchpoints.iterator();
- while (iterator.hasNext()) {
- IWatchpoint watchpoint = (IWatchpoint)iterator.next();
- toggleWatchpoint(watchpoint, action.isChecked());
- }
- }
- } catch (CoreException e) {
- DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), ActionMessages.ModifyWatchpointAction_0, ActionMessages.ModifyWatchpointAction_1, e.getStatus()); //
- }
-
- }
-
- /**
- * Toggles the watch point attribute to the given value.
- *
- * @param watchpoint
- * @param b on or off
- */
- protected abstract void toggleWatchpoint(IWatchpoint watchpoint, boolean b) throws CoreException;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- fWatchpoints = (IStructuredSelection) selection;
- if (!selection.isEmpty()) {
- Iterator iterator = fWatchpoints.iterator();
- while (iterator.hasNext()) {
- Object next = iterator.next();
- if (next instanceof IWatchpoint) {
- IWatchpoint watchpoint = (IWatchpoint) next;
- action.setChecked(isChecked(watchpoint));
- if (!isEnabled(watchpoint)) {
- action.setEnabled(false);
- return;
- }
- }
- }
- action.setEnabled(true);
- return;
- }
- }
- action.setEnabled(false);
- }
-
- /**
- * Returns whether the action should be checke for the current selection
- *
- * @param watchpoint selected watchpoint
- * @return whether the action should be checke for the current selection
- */
- protected abstract boolean isChecked(IWatchpoint watchpoint);
-
- /**
- * Returns whether this action is enabled for the given watchpoint.
- *
- * @param watchpoint
- * @return whether this action is enabled for the given watchpoint
- */
- protected abstract boolean isEnabled(IWatchpoint watchpoint);
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#dispose()
- */
- public void dispose() {
- fWatchpoints = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java
deleted file mode 100644
index b292f4c..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.SelectionProviderAction;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-public class OpenBreakpointMarkerAction extends SelectionProviderAction {
-
- protected static DelegatingModelPresentation fgPresentation = new DelegatingModelPresentation();
- private IBreakpoint breakpoint;
- private IEditorInput input;
-
- public OpenBreakpointMarkerAction(ISelectionProvider selectionProvider) {
- super(selectionProvider, ActionMessages.OpenBreakpointMarkerAction__Go_to_File_1);
- setToolTipText(ActionMessages.OpenBreakpointMarkerAction_Go_to_File_for_Breakpoint_2);
- setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.ui.ide", "icons/full/elcl16/gotoobj_tsk.gif")); //$NON-NLS-1$ //$NON-NLS-2$
- setDisabledImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.ui.ide", "icons/full/dlcl16/gotoobj_tsk.gif")); //$NON-NLS-1$ //$NON-NLS-2$
- PlatformUI.getWorkbench().getHelpSystem().setHelp(
- this,
- IDebugHelpContextIds.OPEN_BREAKPOINT_ACTION);
- setEnabled(false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- IWorkbenchWindow dwindow= DebugUIPlugin.getActiveWorkbenchWindow();
- if (dwindow == null) {
- return;
- }
- IWorkbenchPage page= dwindow.getActivePage();
- if (page == null) {
- return;
- }
-
- IStructuredSelection selection= getStructuredSelection();
- if (selection.isEmpty()) {
- setEnabled(false);
- return;
- }
-
- IEditorPart part= null;
- if (input != null) {
- String editorId = fgPresentation.getEditorId(input, breakpoint);
- if (editorId != null) {
- try {
- part= page.openEditor(input, editorId);
- } catch (PartInitException e) {
- DebugUIPlugin.errorDialog(dwindow.getShell(), ActionMessages.OpenBreakpointMarkerAction_Go_to_Breakpoint_1, ActionMessages.OpenBreakpointMarkerAction_Exceptions_occurred_attempting_to_open_the_editor_for_the_breakpoint_resource_2, e); //
- }
- }
- }
- if (part != null) {
- part.setFocus();
- IDE.gotoMarker(part, breakpoint.getMarker());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.SelectionProviderAction#selectionChanged(org.eclipse.jface.viewers.IStructuredSelection)
- */
- public void selectionChanged(IStructuredSelection sel) {
- if (sel.size() == 1) {
- Object element = sel.getFirstElement();
- if (element instanceof IBreakpoint) {
- breakpoint= (IBreakpoint) element;
- input= fgPresentation.getEditorInput(breakpoint);
- if (input != null) {
- setEnabled(true);
- return;
- }
- }
- } else {
- breakpoint = null;
- input = null;
- }
- setEnabled(false);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllBreakpointsAction.java
deleted file mode 100644
index dec17fb..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveAllBreakpointsAction.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-
-import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IBreakpointManager;
-import org.eclipse.debug.core.IBreakpointsListener;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.actions.AbstractRemoveAllActionDelegate;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * Removes all breakpoints from the source (markers) and remove all
- * breakpoints from processes
- */
-public class RemoveAllBreakpointsAction extends AbstractRemoveAllActionDelegate implements IBreakpointsListener {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#isEnabled()
- */
- protected boolean isEnabled() {
- return DebugPlugin.getDefault().getBreakpointManager().hasBreakpoints();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsAdded(org.eclipse.debug.core.model.IBreakpoint[])
- */
- public void breakpointsAdded(IBreakpoint[] breakpoints) {
- update();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsChanged(org.eclipse.debug.core.model.IBreakpoint[], org.eclipse.core.resources.IMarkerDelta[])
- */
- public void breakpointsChanged(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsRemoved(org.eclipse.debug.core.model.IBreakpoint[], org.eclipse.core.resources.IMarkerDelta[])
- */
- public void breakpointsRemoved(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
- if (getAction() != null) {
- update();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#initialize()
- */
- protected void initialize() {
- DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
- */
- public void dispose() {
- DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- final IBreakpointManager breakpointManager= DebugPlugin.getDefault().getBreakpointManager();
- final IBreakpoint[] breakpoints = breakpointManager.getBreakpoints();
- if (breakpoints.length < 1) {
- return;
- }
- IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
- if (window == null) {
- return;
- }
- IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
- boolean prompt = store.getBoolean(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_ALL_BREAKPOINTS);
- boolean proceed = true;
- if(prompt) {
- MessageDialogWithToggle mdwt = MessageDialogWithToggle.openYesNoQuestion(window.getShell(), ActionMessages.RemoveAllBreakpointsAction_0,
- ActionMessages.RemoveAllBreakpointsAction_1, ActionMessages.RemoveAllBreakpointsAction_3, !prompt, null, null);
- if(mdwt.getReturnCode() != IDialogConstants.YES_ID){
- proceed = false;
- }
- else {
- store.setValue(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_ALL_BREAKPOINTS, !mdwt.getToggleState());
- }
- }
- if (proceed) {
- new Job(ActionMessages.RemoveAllBreakpointsAction_2) {
- protected IStatus run(IProgressMonitor monitor) {
- try {
- breakpointManager.removeBreakpoints(breakpoints, true);
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- return Status.CANCEL_STATUS;
- }
- return Status.OK_STATUS;
- }
- }.schedule();
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.java
deleted file mode 100644
index 6d9aa09..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.actions.AbstractRemoveActionDelegate;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.debug.internal.ui.views.breakpoints.WorkingSetCategory;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.PlatformUI;
-
-public class RemoveBreakpointAction extends AbstractRemoveActionDelegate {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- IStructuredSelection selection = getSelection();
- if (selection.isEmpty()) {
- return;
- }
- final Iterator itr= selection.iterator();
- final CoreException[] exception= new CoreException[1];
- IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) {
- ArrayList breakpointsToDelete = new ArrayList();
- ArrayList groupsToDelete = new ArrayList();
- boolean deleteAll = false;
- boolean deleteContainer = false;
- boolean prompted = false;
- while (itr.hasNext()) {
- Object next= itr.next();
- if (next instanceof IBreakpoint) {
- breakpointsToDelete.add(next);
- } else if (next instanceof BreakpointContainer) {
- //the the container is a workingset, ask if they want to delete it as well
- BreakpointContainer bpc = (BreakpointContainer) next;
- if(bpc.getCategory() instanceof WorkingSetCategory) {
- IWorkingSet set = ((WorkingSetCategory)bpc.getCategory()).getWorkingSet();
- if(!prompted) {
- prompted = true;
- DeleteWorkingsetsMessageDialog dialog = new DeleteWorkingsetsMessageDialog(getView().getSite().getShell(),
- ActionMessages.RemoveBreakpointAction_3,
- null,
- ActionMessages.RemoveBreakpointAction_4,
- MessageDialog.QUESTION,
- new String[] {ActionMessages.RemoveBreakpointAction_5, ActionMessages.RemoveBreakpointAction_6},
- 0);
- if(dialog.open() == 0) {
- deleteAll = dialog.deleteAllBreakpoints();
- deleteContainer = dialog.deleteWorkingset();
- }
- }
- if(deleteContainer) {
- groupsToDelete.add(set);
- }
- }
- else {
- if(!prompted) {
- IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
- prompted = store.getBoolean(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_BREAKPOINTS_FROM_CONTAINER);
- if(prompted) {
- MessageDialogWithToggle mdwt = MessageDialogWithToggle.openYesNoQuestion(getView().getSite().getShell(), ActionMessages.RemoveBreakpointAction_0,
- ActionMessages.RemoveBreakpointAction_1, ActionMessages.RemoveAllBreakpointsAction_3, !prompted, null, null);
- if(mdwt.getReturnCode() == IDialogConstants.YES_ID) {
- store.setValue(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_BREAKPOINTS_FROM_CONTAINER, !mdwt.getToggleState());
- deleteAll = true;
- }
- else {
- deleteAll = false;
- }
- }
- else {
- deleteAll = !prompted;
- }
- }
- }
- if(deleteAll) {
- IBreakpoint[] breakpoints = bpc.getBreakpoints();
- for (int i = 0; i < breakpoints.length; i++) {
- breakpointsToDelete.add(breakpoints[i]);
- }
- }
- }
- }
- final IBreakpoint[] breakpoints = (IBreakpoint[]) breakpointsToDelete.toArray(new IBreakpoint[0]);
- final IWorkingSet[] sets = (IWorkingSet[])groupsToDelete.toArray(new IWorkingSet[groupsToDelete.size()]);
- if(breakpoints.length > 0) {
- ((BreakpointsView)getView()).preserveSelection(getSelection());
- }
- new Job(ActionMessages.RemoveBreakpointAction_2) {
- protected IStatus run(IProgressMonitor pmonitor) {
- try {
- DebugPlugin.getDefault().getBreakpointManager().removeBreakpoints(breakpoints, true);
- for (int i = 0; i < sets.length; i++) {
- PlatformUI.getWorkbench().getWorkingSetManager().removeWorkingSet(sets[i]);
- }
- return Status.OK_STATUS;
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- }
- return Status.CANCEL_STATUS;
- }
- }.schedule();
- }
- };
- try {
- ResourcesPlugin.getWorkspace().run(runnable, null, 0, null);
- } catch (CoreException ce) {
- exception[0]= ce;
- }
- if (exception[0] != null) {
- IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
- if (window != null) {
- DebugUIPlugin.errorDialog(window.getShell(), ActionMessages.RemoveBreakpointAction_Removing_a_breakpoint_4,ActionMessages.RemoveBreakpointAction_Exceptions_occurred_attempting_to_remove_a_breakpoint__5 , exception[0]);
- } else {
- DebugUIPlugin.log(exception[0]);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.AbstractSelectionActionDelegate#isEnabledFor(java.lang.Object)
- */
- protected boolean isEnabledFor(Object element) {
- if (element instanceof BreakpointContainer) {
- if(((BreakpointContainer)element).getCategory() instanceof WorkingSetCategory) {
- return true;
- }
- return ((BreakpointContainer)element).getChildren().length > 0;
- }
- return super.isEnabledFor(element);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetBreakpointAction.java
deleted file mode 100644
index ba626f8..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetBreakpointAction.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Wind River Systems - added support for IToggleBreakpointsTargetFactory
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.internal.ui.actions.IToggleBreakpointsTargetManagerListener;
-import org.eclipse.debug.internal.ui.actions.RetargetAction;
-import org.eclipse.debug.internal.ui.actions.ToggleBreakpointsTargetManager;
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-/**
- * Retargettable breakpoint action.
- *
- * @since 3.0
- */
-public abstract class RetargetBreakpointAction extends RetargetAction implements IToggleBreakpointsTargetManagerListener {
-
- private IAction fAction;
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetAction#getAdapterClass()
- */
- protected Class getAdapterClass() {
- return IToggleBreakpointsTarget.class;
- }
-
- protected Object getAdapter(IAdaptable adaptable) {
- ToggleBreakpointsTargetManager manager = ToggleBreakpointsTargetManager.getDefault();
- return manager.getToggleBreakpointsTarget(getActivePart(), getTargetSelection());
- }
-
- public void init(IWorkbenchWindow window) {
- super.init(window);
- ToggleBreakpointsTargetManager.getDefault().addChangedListener(this);
- }
-
- public void init(IAction action) {
- super.init(action);
- ToggleBreakpointsTargetManager.getDefault().addChangedListener(this);
- }
-
- public void dispose() {
- ToggleBreakpointsTargetManager.getDefault().removeChangedListener(this);
- super.dispose();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- fAction = action;
- super.selectionChanged(action, selection);
- }
-
- public void preferredTargetsChanged() {
- if (fAction != null) {
- IWorkbenchPart activePart = getActivePart();
- if (activePart != null) {
- ISelectionProvider provider = activePart.getSite().getSelectionProvider();
- if (provider != null) {
- ISelection selection = provider.getSelection();
- // Force the toggle target to be refreshed.
- super.clearPart(activePart);
- super.partActivated(activePart);
- super.selectionChanged(fAction, selection);
- }
- }
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetMethodBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetMethodBreakpointAction.java
deleted file mode 100644
index 9c2e6ce..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetMethodBreakpointAction.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchPart;
-
-
-/**
- * Global retargettable toggle method breakpoint action.
- *
- * @since 3.0
- */
-public class RetargetMethodBreakpointAction extends RetargetBreakpointAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetBreakpointAction#performAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart)
- */
- protected void performAction(Object target, ISelection selection, IWorkbenchPart part) throws CoreException {
- ((IToggleBreakpointsTarget)target).toggleMethodBreakpoints(part, selection);
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetBreakpointAction#canPerformAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart)
- */
- protected boolean canPerformAction(Object target, ISelection selection, IWorkbenchPart part) {
- return ((IToggleBreakpointsTarget)target).canToggleMethodBreakpoints(part, selection);
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetAction#getOperationUnavailableMessage()
- */
- protected String getOperationUnavailableMessage() {
- return Messages.RetargetMethodBreakpointAction_0;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetToggleBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetToggleBreakpointAction.java
deleted file mode 100644
index 201b1c8..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetToggleBreakpointAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchPart;
-
-
-/**
- * Global retargettable toggle breakpoint action.
- *
- * @since 3.3
- */
-public class RetargetToggleBreakpointAction extends RetargetBreakpointAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetBreakpointAction#performAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart)
- */
- protected void performAction(Object target, ISelection selection, IWorkbenchPart part) throws CoreException {
- if (target instanceof IToggleBreakpointsTargetExtension) {
- IToggleBreakpointsTargetExtension ext = (IToggleBreakpointsTargetExtension) target;
- ext.toggleBreakpoints(part, selection);
- } else {
- ((IToggleBreakpointsTarget)target).toggleLineBreakpoints(part, selection);
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetBreakpointAction#canPerformAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart)
- */
- protected boolean canPerformAction(Object target, ISelection selection, IWorkbenchPart part) {
- if (target instanceof IToggleBreakpointsTargetExtension) {
- IToggleBreakpointsTargetExtension ext = (IToggleBreakpointsTargetExtension) target;
- return ext.canToggleBreakpoints(part, selection);
- } else {
- return ((IToggleBreakpointsTarget)target).canToggleLineBreakpoints(part, selection);
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetAction#getOperationUnavailableMessage()
- */
- protected String getOperationUnavailableMessage() {
- return Messages.RetargetToggleBreakpointAction_0;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetToggleLineBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetToggleLineBreakpointAction.java
deleted file mode 100644
index a117419..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetToggleLineBreakpointAction.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchPart;
-
-
-/**
- * Global retargettable toggle line breakpoint action.
- *
- * @since 3.0
- */
-public class RetargetToggleLineBreakpointAction extends RetargetBreakpointAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetBreakpointAction#performAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart)
- */
- protected void performAction(Object target, ISelection selection, IWorkbenchPart part) throws CoreException {
- ((IToggleBreakpointsTarget)target).toggleLineBreakpoints(part, selection);
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetBreakpointAction#canPerformAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart)
- */
- protected boolean canPerformAction(Object target, ISelection selection, IWorkbenchPart part) {
- return ((IToggleBreakpointsTarget)target).canToggleLineBreakpoints(part, selection);
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetAction#getOperationUnavailableMessage()
- */
- protected String getOperationUnavailableMessage() {
- return Messages.RetargetToggleLineBreakpointAction_0;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetWatchpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetWatchpointAction.java
deleted file mode 100644
index 38466f4..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RetargetWatchpointAction.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchPart;
-
-
-/**
- * Global retargettable toggle watchpoint action.
- *
- * @since 3.0
- */
-public class RetargetWatchpointAction extends RetargetBreakpointAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetBreakpointAction#performAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart)
- */
- protected void performAction(Object target, ISelection selection, IWorkbenchPart part) throws CoreException {
- ((IToggleBreakpointsTarget)target).toggleWatchpoints(part, selection);
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetBreakpointAction#canPerformAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart)
- */
- protected boolean canPerformAction(Object target, ISelection selection, IWorkbenchPart part) {
- return ((IToggleBreakpointsTarget)target).canToggleWatchpoints(part, selection);
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.RetargetAction#getOperationUnavailableMessage()
- */
- protected String getOperationUnavailableMessage() {
- return Messages.RetargetWatchpointAction_0;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RulerEnableDisableBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RulerEnableDisableBreakpointAction.java
deleted file mode 100644
index ff37aa4..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RulerEnableDisableBreakpointAction.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.ui.actions.RulerBreakpointAction;
-import org.eclipse.jface.text.source.IVerticalRulerInfo;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.ui.texteditor.IUpdate;
-
-/**
- * @since 3.2
- *
- */
-public class RulerEnableDisableBreakpointAction extends RulerBreakpointAction implements IUpdate {
-
- private IBreakpoint fBreakpoint;
-
- public RulerEnableDisableBreakpointAction(ITextEditor editor, IVerticalRulerInfo info) {
- super(editor, info);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run() {
- if (fBreakpoint != null) {
- try {
- fBreakpoint.setEnabled(!fBreakpoint.isEnabled());
- } catch (CoreException e) {
- DebugUIPlugin.errorDialog(getEditor().getSite().getShell(), ActionMessages.RulerEnableDisableBreakpointAction_0, ActionMessages.RulerEnableDisableBreakpointAction_1, e.getStatus());
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.IUpdate#update()
- */
- public void update() {
- fBreakpoint = getBreakpoint();
- setEnabled(fBreakpoint != null);
- if (fBreakpoint != null) {
- try {
- if (fBreakpoint.isEnabled()) {
- setText(ActionMessages.RulerEnableDisableBreakpointAction_2);
- } else {
- setText(ActionMessages.RulerEnableDisableBreakpointAction_3);
- }
- } catch (CoreException e) {
- }
- } else {
- setText(ActionMessages.RulerEnableDisableBreakpointAction_2);
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SelectAllBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SelectAllBreakpointsAction.java
deleted file mode 100644
index 5f1e29f..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SelectAllBreakpointsAction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IBreakpointsListener;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.actions.SelectAllAction;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.debug.ui.IDebugView;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.CheckboxTreeViewer;
-
-public class SelectAllBreakpointsAction extends SelectAllAction implements IBreakpointsListener {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#isEnabled()
- */
- protected boolean isEnabled() {
- return DebugPlugin.getDefault().getBreakpointManager().hasBreakpoints();
- }
-
- public void run(IAction action) {
- if (!(getView() instanceof BreakpointsView)) {
- return;
- }
- CheckboxTreeViewer viewer = ((BreakpointsView) getView()).getCheckboxViewer();
- viewer.getTree().selectAll();
- // ensure that the selection change callback is fired
- viewer.setSelection(viewer.getSelection());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsAdded(org.eclipse.debug.core.model.IBreakpoint[])
- */
- public void breakpointsAdded(IBreakpoint[] breakpoints) {
- if (getAction() != null && !getAction().isEnabled()) {
- update();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsChanged(org.eclipse.debug.core.model.IBreakpoint[], org.eclipse.core.resources.IMarkerDelta[])
- */
- public void breakpointsChanged(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsRemoved(org.eclipse.debug.core.model.IBreakpoint[], org.eclipse.core.resources.IMarkerDelta[])
- */
- public void breakpointsRemoved(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
- if (getAction() != null) {
- update();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#initialize()
- */
- protected void initialize() {
- DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#dispose()
- */
- public void dispose() {
- DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.SelectAllAction#getActionId()
- */
- protected String getActionId() {
- return IDebugView.SELECT_ALL_ACTION;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.java
deleted file mode 100644
index 280986f..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.internal.ui.actions.ToggleFilterAction;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * An view filter action that filters showing breakpoints based on whether
- * the IDebugTarget of the selected debug element in the launch view supports
- * the breakpoints.
- *
- * @see org.eclipse.debug.core.model.IDebugTarget#supportsBreakpoint(IBreakpoint)
- *
- */
-public class ShowSupportedBreakpointsAction extends ToggleFilterAction implements ISelectionListener {
-
- /**
- * The view associated with this action
- */
- private BreakpointsView fView;
-
- /**
- * The list of identifiers for the current state
- */
- private List fDebugTargets= new ArrayList(2);
-
- /**
- * A viewer filter that selects breakpoints that have
- * the same model identifier as the selected debug element
- */
- class BreakpointFilter extends ViewerFilter {
-
- /**
- * @see ViewerFilter#select(Viewer, Object, Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (element instanceof BreakpointContainer) {
- // Breakpoint containers are visible if any of their children are visible.
- IBreakpoint[] breakpoints = ((BreakpointContainer) element).getBreakpoints();
- for (int i = 0; i < breakpoints.length; i++) {
- if (select(viewer, element, breakpoints[i])) {
- return true;
- }
- }
- return false;
- }
- IBreakpoint breakpoint= (IBreakpoint)element;
- if (fDebugTargets.isEmpty()) {
- return true;
- }
- Iterator iterator= fDebugTargets.iterator();
- while (iterator.hasNext()) {
- IDebugTarget target = (IDebugTarget) iterator.next();
- if (target.supportsBreakpoint(breakpoint)) {
- return true;
- }
-
- }
- return false;
- }
-
- }
-
- public ShowSupportedBreakpointsAction(StructuredViewer viewer, IViewPart view) {
- super();
- setText(ActionMessages.ShowSupportedBreakpointsAction_Show_For_Selected);
- setToolTipText(ActionMessages.ShowSupportedBreakpointsAction_tooltip);
- setViewerFilter(new BreakpointFilter());
- setViewer(viewer);
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET));
- setChecked(false);
- setId(DebugUIPlugin.getUniqueIdentifier() + ".ShowSupportedBreakpointsAction"); //$NON-NLS-1$
-
- setView(view);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(
- this,
- IDebugHelpContextIds.SHOW_BREAKPOINTS_FOR_MODEL_ACTION);
-
- }
-
-
-
- public void dispose() {
- if (isChecked()) {
- getView().getSite().getPage().removeSelectionListener(IDebugUIConstants.ID_DEBUG_VIEW, this);
- }
- }
-
- /**
- * @see ISelectionListener#selectionChanged(IWorkbenchPart, ISelection)
- */
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss= (IStructuredSelection)selection;
- List debugTargets= getDebugTargets(ss);
- if (!isChecked()) {
- fDebugTargets= debugTargets;
- return;
- }
- if (debugTargets.isEmpty()) {
- if(fDebugTargets.isEmpty()) {
- return;
- }
- reapplyFilters(debugTargets);
- return;
- }
- if (fDebugTargets.isEmpty()) {
- reapplyFilters(debugTargets);
- return;
- }
-
- if (debugTargets.size() == fDebugTargets.size()) {
- List copy= new ArrayList(debugTargets.size());
- Iterator iter= fDebugTargets.iterator();
- while (iter.hasNext()) {
- IDebugTarget target = (IDebugTarget) iter.next();
- Iterator newDebugTargets= debugTargets.iterator();
- while (newDebugTargets.hasNext()) {
- IDebugTarget newTarget= (IDebugTarget)newDebugTargets.next();
- copy.add(newTarget);
- if (target.equals(newTarget)) {
- newDebugTargets.remove();
- }
- }
- }
- //check for real change
- if (debugTargets.isEmpty()) {
- return;
- }
- reapplyFilters(copy);
- }
- }
- }
-
-
- /**
- * Selection has changed in the debug view
- * need to reapply the filters.
- */
- protected void reapplyFilters(List debugTargets) {
- fDebugTargets= debugTargets;
- getViewer().refresh();
- }
-
- protected IViewPart getView() {
- return fView;
- }
-
- protected void setView(IViewPart view) {
- fView = (BreakpointsView) view;
- }
-
- protected List getDebugTargets(IStructuredSelection ss) {
- List debugTargets= new ArrayList(2);
- Iterator i= ss.iterator();
- while (i.hasNext()) {
- Object next= i.next();
- if (next instanceof IDebugElement) {
- debugTargets.add(((IDebugElement)next).getDebugTarget());
- } else if (next instanceof ILaunch) {
- IDebugTarget[] targets= ((ILaunch)next).getDebugTargets();
- for (int j = 0; j < targets.length; j++) {
- debugTargets.add(targets[j]);
- }
- } else if (next instanceof IProcess) {
- IDebugTarget target= (IDebugTarget)((IProcess)next).getAdapter(IDebugTarget.class);
- if (target != null) {
- debugTargets.add(target);
- }
- }
- }
- return debugTargets;
- }
-
- /**
- * Adds or removes the viewer filter depending
- * on the value of the parameter.
- */
- protected void valueChanged(boolean on) {
- if (getViewer().getControl().isDisposed()) {
- return;
- }
- if (on) {
- getView().getSite().getPage().addSelectionListener(IDebugUIConstants.ID_DEBUG_VIEW, this);
- ISelection selection= getView().getSite().getPage().getSelection(IDebugUIConstants.ID_DEBUG_VIEW);
- selectionChanged(null, selection);
- } else {
- getView().getSite().getPage().removeSelectionListener(IDebugUIConstants.ID_DEBUG_VIEW, this);
- }
- super.valueChanged(on);
- fView.getViewer().refresh();
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SkipAllBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SkipAllBreakpointsAction.java
deleted file mode 100644
index fe246ae..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SkipAllBreakpointsAction.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IBreakpointManager;
-import org.eclipse.debug.core.IBreakpointManagerListener;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-
-/**
- * An action which toggles the breakpoint manager's enablement.
- * This causes debug targets which honor the manager's enablement
- * to skip (not suspend for) all breakpoints.
- *
- * This class also implements the window action delegate for the action presented as
- * part of the "Breakpoints" group for the "Run" menu.
- */
-public class SkipAllBreakpointsAction extends Action implements IWorkbenchWindowActionDelegate, IBreakpointManagerListener {
-
- //The real action if this is an action delegate
- private IAction fAction;
-
- /**
- * Workbench part or <code>null</code> if not installed in a part
- */
- private IWorkbenchPart fPart = null;
-
- public SkipAllBreakpointsAction() {
- super(ActionMessages.SkipAllBreakpointsAction_0);
- setToolTipText(ActionMessages.SkipAllBreakpointsAction_0);
- setDescription(ActionMessages.SkipAllBreakpointsAction_2);
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_SKIP_BREAKPOINTS));
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.SKIP_ALL_BREAKPOINT_ACTION);
- updateActionCheckedState();
- }
-
- /**
- * Constructs an action in the given part.
- *
- * @param part
- */
- public SkipAllBreakpointsAction(IWorkbenchPart part) {
- this();
- fPart = part;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run(){
- IWorkbenchSiteProgressService progressService = null;
- if (fPart != null) {
- progressService = (IWorkbenchSiteProgressService)fPart.getSite().
- getAdapter(IWorkbenchSiteProgressService.class);
- }
- Job job = new Job(getText()) {
- protected IStatus run(IProgressMonitor monitor) {
- if (!monitor.isCanceled()) {
- IBreakpointManager bm = getBreakpointManager();
- bm.setEnabled(!bm.isEnabled());
- }
- return Status.OK_STATUS;
- }
- };
- if (progressService != null) {
- progressService.schedule(job);
- } else {
- job.schedule();
- }
- }
-
- /**
- * Updates the action's checked state to be opposite the enabled
- * state of the breakpoint manager.
- */
- public void updateActionCheckedState() {
- if (fAction != null) {
- fAction.setChecked(!getBreakpointManager().isEnabled());
- } else {
- setChecked(!getBreakpointManager().isEnabled());
- }
- }
-
- /**
- * Returns the global breakpoint manager.
- *
- * @return the global breakpoint manager
- */
- public static IBreakpointManager getBreakpointManager() {
- return DebugPlugin.getDefault().getBreakpointManager();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
- */
- public void dispose() {
- getBreakpointManager().removeBreakpointManagerListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window) {
- updateActionCheckedState();
- getBreakpointManager().addBreakpointManagerListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- run();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- fAction = action;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IBreakpointManagerListener#breakpointManagerEnablementChanged(boolean)
- */
- public void breakpointManagerEnablementChanged(boolean enabled) {
- if (fAction != null) {
- fAction.setChecked(!enabled);
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ToggleBreakpointObjectActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ToggleBreakpointObjectActionDelegate.java
deleted file mode 100644
index e60c65e..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ToggleBreakpointObjectActionDelegate.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Wind River Systems - added support for IToggleBreakpointsTargetFactory
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.internal.ui.actions.ToggleBreakpointsTargetManager;
-import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * A toggle breakpoint action that can be contributed to an object. The action
- * will perform a toggle breakpoint operation for a selected object.
- *
- * <p>Clients may subclass this class.</p>
- *
- * @since 3.0
- */
-public abstract class ToggleBreakpointObjectActionDelegate implements IObjectActionDelegate, IActionDelegate2 {
-
- private IWorkbenchPart fPart;
- private IStructuredSelection fSelection;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- fPart = targetPart;
- }
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- IToggleBreakpointsTarget target =
- ToggleBreakpointsTargetManager.getDefault().getToggleBreakpointsTarget(fPart, fSelection);
- if (target != null) {
- try {
- performAction(target, fPart, fSelection);
- } catch (CoreException e) {
- DebugPlugin.log(e);
- }
- }
- }
-
- /**
- * Performs the operation specific to this action.
- *
- * @param target adapter to toggle breakpoints
- * @param part the active part
- * @param selection the seleciton in the active part
- * @exception CoreException if an exception occurrs
- */
- protected abstract void performAction(IToggleBreakpointsTarget target, IWorkbenchPart part, ISelection selection) throws CoreException;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- boolean enabled = false;
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) selection;
- this.fSelection = ss;
- // selectionChagned() can sometimes be called before setActivePart().
- // Guard here against that possibility.
- if (fPart != null) {
- IToggleBreakpointsTarget target =
- ToggleBreakpointsTargetManager.getDefault().getToggleBreakpointsTarget(fPart, fSelection);
- enabled = target != null;
- }
- }
- action.setEnabled(enabled);
- }
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#dispose()
- */
- public void dispose() {
- fSelection = null;
- fPart = null;
- }
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/AddWatchExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/AddWatchExpressionAction.java
deleted file mode 100644
index a458d9e..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/AddWatchExpressionAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.expressions;
-
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IWatchExpression;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
-/**
- * Open a watch expression dialog and add the created watch expression to the
- * expression view.
- */
-public class AddWatchExpressionAction extends WatchExpressionAction implements IViewActionDelegate {
-
- /**
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- // create a watch expression
- IWatchExpression watchExpression= DebugPlugin.getDefault().getExpressionManager().newWatchExpression(IInternalDebugCoreConstants.EMPTY_STRING);
- // open the watch expression dialog
- if (new WatchExpressionDialog(DebugUIPlugin.getShell(), watchExpression, false).open() == Window.OK) {
- // if OK is selected, add the expression to the expression view and try to evaluate the expression.
- DebugPlugin.getDefault().getExpressionManager().addExpression(watchExpression);
- watchExpression.setExpressionContext(getContext());
- }
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ConvertToWatchExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ConvertToWatchExpressionAction.java
deleted file mode 100644
index bfa6c94..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ConvertToWatchExpressionAction.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.expressions;
-
-
-import java.util.Iterator;
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IExpressionManager;
-import org.eclipse.debug.core.model.IExpression;
-import org.eclipse.debug.core.model.IWatchExpression;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.IStructuredSelection;
-
-/**
- * Convert one or more expressions to the equivalent watch expressions.
- * Refresh and re-evaluate the expressions if possible.
- */
-public class ConvertToWatchExpressionAction extends WatchExpressionAction {
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- IStructuredSelection selection= getCurrentSelection();
- IExpressionManager expressionManager= DebugPlugin.getDefault().getExpressionManager();
- for (Iterator iter= selection.iterator(); iter.hasNext();) {
- IExpression expression= (IExpression) iter.next();
- // create the new watch expression
- IWatchExpression watchExpression= expressionManager.newWatchExpression(expression.getExpressionText());
- expressionManager.removeExpression(expression);
- expressionManager.addExpression(watchExpression);
- // refresh and re-evaluate
- watchExpression.setExpressionContext(getContext());
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/DisableWatchExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/DisableWatchExpressionAction.java
deleted file mode 100644
index 0f0a291..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/DisableWatchExpressionAction.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.expressions;
-
-
-/**
- *
- */
-public class DisableWatchExpressionAction extends EnableWatchExpressionAction {
-
- public DisableWatchExpressionAction() {
- fEnable= false;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EditWatchExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EditWatchExpressionAction.java
deleted file mode 100644
index c858ca3..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EditWatchExpressionAction.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Wind River Systems - integration with non-standard debug models (Bug 209883)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.expressions;
-
-
-import org.eclipse.debug.core.model.IWatchExpression;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-
-/**
- * Open the watch expression dialog for the select watch expression.
- * Re-evaluate and refresh the watch expression is necessary.
- */
-public class EditWatchExpressionAction extends WatchExpressionAction {
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- IWatchExpression watchExpression= getSelectedExpressions()[0];
- // display the watch expression dialog for the currently selected watch expression
- new WatchExpressionDialog(DebugUIPlugin.getShell(), watchExpression, true).open();
- }
-
- public void selectionChanged(IAction action, ISelection sel) {
- action.setEnabled(getSelectedExpressions().length == 1);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EnableWatchExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EnableWatchExpressionAction.java
deleted file mode 100644
index d398287..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/EnableWatchExpressionAction.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Wind River Systems - integration with non-standard debug models (Bug 209883)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.expressions;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IDebugEventSetListener;
-import org.eclipse.debug.core.model.IWatchExpression;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-
-/**
- *
- */
-public class EnableWatchExpressionAction implements IViewActionDelegate, IActionDelegate2, IDebugEventSetListener {
-
- private ISelection fSelection;
- private IAction fAction;
- protected boolean fEnable= true;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- DebugPlugin.getDefault().addDebugEventListener(this);
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- if (fSelection instanceof IStructuredSelection) {
- Iterator iter= ((IStructuredSelection) fSelection).iterator();
- IWatchExpression expression;
- while (iter.hasNext()) {
- expression= getWatchExpression(iter.next());
- if (expression != null) {
- expression.setEnabled(fEnable);
- fireWatchExpressionChanged(expression);
- }
- }
- } else if (fSelection instanceof IWatchExpression) {
- IWatchExpression expression= ((IWatchExpression) fSelection);
- expression.setEnabled(fEnable);
- fireWatchExpressionChanged(expression);
- }
- }
-
- /**
- * @param expression
- */
- private void fireWatchExpressionChanged(IWatchExpression expression) {
- DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[] {new DebugEvent(expression, DebugEvent.CHANGE)});
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- fSelection= selection;
- if (fSelection instanceof IStructuredSelection) {
- boolean enabled= false;
- Iterator iter= ((IStructuredSelection) selection).iterator();
- while (iter.hasNext()) {
- IWatchExpression expression = getWatchExpression(iter.next());
- if (expression != null && expression.isEnabled() != fEnable) {
- enabled= true;
- break;
- }
- }
- action.setEnabled(enabled);
- } else if (fSelection instanceof IWatchExpression) {
- action.setEnabled(((IWatchExpression) fSelection).isEnabled() != fEnable);
- } else {
- action.setEnabled(false);
- }
- }
-
- private IWatchExpression getWatchExpression(Object element) {
- if (element instanceof IWatchExpression) {
- return (IWatchExpression)element;
- } else if (element instanceof IAdaptable) {
- return (IWatchExpression)((IAdaptable)element).getAdapter(IWatchExpression.class);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#dispose()
- */
- public void dispose() {
- DebugPlugin.getDefault().removeDebugEventListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- fAction = action;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent[])
- */
- public void handleDebugEvents(DebugEvent[] events) {
- for (int i = 0; i < events.length; i++) {
- DebugEvent event = events[i];
- if (event.getSource() instanceof IWatchExpression) {
- if (event.getKind() == DebugEvent.CHANGE) {
- selectionChanged(fAction, fSelection);
- }
- }
- }
-
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/PasteWatchExpressionsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/PasteWatchExpressionsAction.java
deleted file mode 100644
index 36e8ad6..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/PasteWatchExpressionsAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Adobe Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Adobe Systems, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.expressions;
-
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.internal.ui.views.expression.ExpressionView;
-import org.eclipse.ui.actions.SelectionListenerAction;
-
-/**
- * Paste a watch expression into the expressions view.
- */
-public class PasteWatchExpressionsAction extends SelectionListenerAction {
-
- private final ExpressionView fExpressionView;
-
- public PasteWatchExpressionsAction(ExpressionView expressionView) {
- super(ActionMessages.PasteWatchExpressionsAction_0);
- fExpressionView = expressionView;
-// setToolTipText(BreakpointGroupMessages.PasteWatchExpressionsAction_1);
-// PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.PASTE_WATCH_EXPRESSIONS_ACTION);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run() {
- if (fExpressionView.canPaste()) {
- fExpressionView.performPaste();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#isEnabled()
- */
- public boolean isEnabled() {
- return fExpressionView.canPaste();
- }
-
-
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ReevaluateWatchExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ReevaluateWatchExpressionAction.java
deleted file mode 100644
index c768367..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ReevaluateWatchExpressionAction.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Wind River Systems - integration with non-standard debug models (Bug 209883)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.expressions;
-
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IWatchExpression;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Ask to re-evaluate one or more watch expressions in the context of the
- * currently selected thread.
- */
-public class ReevaluateWatchExpressionAction implements IObjectActionDelegate {
-
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- // TODO Auto-generated method stub
-
- }
-
- /**
- * Finds the currently selected context in the UI.
- */
- protected IDebugElement getContext() {
- IAdaptable object = DebugUITools.getDebugContext();
- IDebugElement context = null;
- if (object instanceof IDebugElement) {
- context = (IDebugElement) object;
- } else if (object instanceof ILaunch) {
- context = ((ILaunch) object).getDebugTarget();
- }
- return context;
- }
-
- protected IStructuredSelection getCurrentSelection() {
- IWorkbenchPage page = DebugUIPlugin.getActiveWorkbenchWindow().getActivePage();
- if (page != null) {
- ISelection selection = page.getSelection();
- if (selection instanceof IStructuredSelection) {
- return (IStructuredSelection) selection;
- }
- }
- return null;
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- IDebugElement context = getContext();
- for (Iterator iter= getCurrentSelection().iterator(); iter.hasNext();) {
- IWatchExpression expression= (IWatchExpression) iter.next();
- expression.setExpressionContext(context);
- if (!expression.isEnabled()) {
- // Force a reevaluation
- expression.evaluate();
- }
- }
- }
-
- /**
- * @see IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- IDebugElement debugElement = getContext();
- if (debugElement == null) {
- action.setEnabled(false);
- } else {
- action.setEnabled(true);
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveAllExpressionsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveAllExpressionsAction.java
deleted file mode 100644
index 209de9d..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveAllExpressionsAction.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.expressions;
-
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IExpressionManager;
-import org.eclipse.debug.core.IExpressionsListener;
-import org.eclipse.debug.core.model.IExpression;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.actions.AbstractRemoveAllActionDelegate;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * Removes all expressions from the expressions view.
- */
-public class RemoveAllExpressionsAction extends AbstractRemoveAllActionDelegate implements IExpressionsListener {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- IWorkbenchWindow window = DebugUIPlugin.getActiveWorkbenchWindow();
- if (window != null) {
- IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
- boolean prompt = store.getBoolean(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_ALL_EXPRESSIONS);
- boolean proceed = true;
- if (prompt) {
- MessageDialogWithToggle mdwt = MessageDialogWithToggle.openYesNoQuestion(window.getShell(), ActionMessages.RemoveAllExpressionsAction_0,
- ActionMessages.RemoveAllExpressionsAction_1, ActionMessages.RemoveAllBreakpointsAction_3, !prompt, null, null);
- if(mdwt.getReturnCode() != IDialogConstants.YES_ID){
- proceed = false;
- }
- else {
- store.setValue(IDebugPreferenceConstants.PREF_PROMPT_REMOVE_ALL_EXPRESSIONS, !mdwt.getToggleState());
- }
- }
- if (proceed) {
- IExpressionManager manager = DebugPlugin.getDefault().getExpressionManager();
- IExpression[] expressions= manager.getExpressions();
- manager.removeExpressions(expressions);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#isEnabled()
- */
- protected boolean isEnabled() {
- return DebugPlugin.getDefault().getExpressionManager().hasExpressions();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#initialize()
- */
- protected void initialize() {
- DebugPlugin.getDefault().getExpressionManager().addExpressionListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#dispose()
- */
- public void dispose() {
- DebugPlugin.getDefault().getExpressionManager().removeExpressionListener(this);
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IExpressionsListener#expressionsAdded(org.eclipse.debug.core.model.IExpression[])
- */
- public void expressionsAdded(IExpression[] expressions) {
- update();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IExpressionsListener#expressionsRemoved(org.eclipse.debug.core.model.IExpression[])
- */
- public void expressionsRemoved(IExpression[] expressions) {
- update();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IExpressionsListener#expressionsChanged(org.eclipse.debug.core.model.IExpression[])
- */
- public void expressionsChanged(IExpression[] expressions) {}
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveExpressionAction.java
deleted file mode 100644
index 8ea98ab..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveExpressionAction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Wind River Systems - integration with non-standard debug models (Bug 209883)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.expressions;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IExpressionManager;
-import org.eclipse.debug.core.model.IExpression;
-import org.eclipse.debug.internal.ui.actions.AbstractRemoveActionDelegate;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.ui.progress.WorkbenchJob;
-
-public class RemoveExpressionAction extends AbstractRemoveActionDelegate {
-
- protected IExpression[] getExpressions() {
- TreeSelection selection = (TreeSelection) getSelection();
- TreePath[] paths = selection.getPaths();
- List expressions = new ArrayList();
- for (int i = paths.length-1; i >=0; i--) {
- TreePath path = paths[i];
- Object segment = path.getFirstSegment();
- if (segment instanceof IExpression) {
- expressions.add(segment);
- } else if (segment instanceof IAdaptable) {
- IExpression expression = (IExpression)((IAdaptable)segment).getAdapter(IExpression.class);
- if (expression != null) {
- expressions.add(expression);
- }
- }
- }
- return (IExpression[]) expressions.toArray(new IExpression[expressions.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- WorkbenchJob job = new WorkbenchJob("remove expression") { //$NON-NLS-1$
- public IStatus runInUIThread(IProgressMonitor monitor) {
- IExpressionManager expManager = DebugPlugin.getDefault().getExpressionManager();
- IExpression[] exp = getExpressions();
- if (exp != null) {
- expManager.removeExpressions(exp);
- }
- return Status.OK_STATUS;
- }
- };
- job.setSystem(true);
- schedule(job);
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/SelectAllExpressionsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/SelectAllExpressionsAction.java
deleted file mode 100644
index 2e9da1b..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/SelectAllExpressionsAction.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.expressions;
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IExpressionsListener;
-import org.eclipse.debug.core.model.IExpression;
-import org.eclipse.debug.internal.ui.actions.SelectAllAction;
-import org.eclipse.debug.ui.IDebugView;
-
-public class SelectAllExpressionsAction extends SelectAllAction implements IExpressionsListener {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#isEnabled()
- */
- protected boolean isEnabled() {
- return DebugPlugin.getDefault().getExpressionManager().hasExpressions();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.SelectAllAction#getActionId()
- */
- protected String getActionId() {
- return IDebugView.SELECT_ALL_ACTION + ".Variables"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.AbstractRemoveAllActionDelegate#initialize()
- */
- protected void initialize() {
- DebugPlugin.getDefault().getExpressionManager().addExpressionListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IExpressionsListener#expressionsAdded(org.eclipse.debug.core.model.IExpression[])
- */
- public void expressionsAdded(IExpression[] expressions) {
- update();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IExpressionsListener#expressionsRemoved(org.eclipse.debug.core.model.IExpression[])
- */
- public void expressionsRemoved(IExpression[] expressions) {
- update();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IExpressionsListener#expressionsChanged(org.eclipse.debug.core.model.IExpression[])
- */
- public void expressionsChanged(IExpression[] expressions) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.AbstractRemoveAllActionDelegate#dispose()
- */
- public void dispose() {
- super.dispose();
- DebugPlugin.getDefault().getExpressionManager().removeExpressionListener(this);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionAction.java
deleted file mode 100644
index d835bfb..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionAction.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Wind River Systems - integration with non-standard debug models (Bug 209883)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.expressions;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IWatchExpression;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Generic abstract class for the actions associated to the java watch
- * expressions.
- */
-public abstract class WatchExpressionAction implements IViewActionDelegate {
- IWorkbenchPart fPart = null;
-
- private static IWatchExpression[] EMPTY_EXPRESSION_ARRAY = new IWatchExpression[0];
-
- public void init(IViewPart view) {
- fPart = view;
- }
-
- /**
- * Finds the currently selected context in the UI.
- */
- protected IDebugElement getContext() {
- IAdaptable object = DebugUITools.getDebugContext();
- IDebugElement context = null;
- if (object instanceof IDebugElement) {
- context = (IDebugElement) object;
- } else if (object instanceof ILaunch) {
- context = ((ILaunch) object).getDebugTarget();
- }
- return context;
- }
-
- protected IWatchExpression[] getSelectedExpressions() {
- List list = new LinkedList();
- IStructuredSelection currentSelection = getCurrentSelection();
- if (currentSelection == null) {
- return EMPTY_EXPRESSION_ARRAY;
- }
-
- for (Iterator iter= currentSelection.iterator(); iter.hasNext();) {
- Object element = iter.next();
- if (element instanceof IWatchExpression) {
- list.add(element);
- } else if (element instanceof IAdaptable) {
- IWatchExpression expr = (IWatchExpression)((IAdaptable)element).getAdapter(IWatchExpression.class);
- if (expr != null) {
- list.add(expr);
- } else {
- return EMPTY_EXPRESSION_ARRAY;
- }
- } else {
- return EMPTY_EXPRESSION_ARRAY;
- }
- }
-
- return (IWatchExpression[])list.toArray(new IWatchExpression[list.size()]);
- }
-
- /**
- * @see IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection sel) {
- }
-
- protected IStructuredSelection getCurrentSelection() {
- IWorkbenchPage page = DebugUIPlugin.getActiveWorkbenchWindow().getActivePage();
- if (page != null) {
- ISelection selection = page.getSelection();
- if (selection instanceof IStructuredSelection) {
- return (IStructuredSelection) selection;
- }
- }
- return null;
- }
-
- /**
- * Displays the given error message in the status line.
- *
- * @param message
- */
- protected void showErrorMessage(String message) {
- if (fPart instanceof IViewPart) {
- IViewSite viewSite = ((IViewPart) fPart).getViewSite();
- IStatusLineManager manager = viewSite.getActionBars().getStatusLineManager();
- manager.setErrorMessage(message);
- Display.getCurrent().beep();
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionDialog.java
deleted file mode 100644
index bf994e5..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionDialog.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.expressions;
-
-
-import org.eclipse.debug.core.model.IWatchExpression;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.internal.ui.actions.StatusInfo;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.dialogs.StatusDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentListener;
-import org.eclipse.jface.text.ITextOperationTarget;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.console.actions.TextViewerAction;
-
-/**
- * Dialog for edit watch expression.
- */
-public class WatchExpressionDialog extends StatusDialog {
-
- /**
- * The detail formatter to edit.
- */
- private IWatchExpression fWatchExpression;
-
- // widgets
- private SourceViewer fSnippetViewer;
- private Button fCheckBox;
-
- public WatchExpressionDialog(Shell parent, IWatchExpression watchExpression, boolean editDialog) {
- super(parent);
- fWatchExpression= watchExpression;
- setShellStyle(getShellStyle() | SWT.MAX | SWT.RESIZE);
- String helpContextId = null;
- if (editDialog) {
- setTitle(ActionMessages.WatchExpressionDialog_0);
- helpContextId = IDebugHelpContextIds.EDIT_WATCH_EXPRESSION_DIALOG;
- } else {
- setTitle(ActionMessages.WatchExpressionDialog_1);
- helpContextId = IDebugHelpContextIds.ADD_WATCH_EXPRESSION_DIALOG;
- }
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, helpContextId);
- }
-
- /**
- * Create the dialog area.
- *
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(Composite)
- */
- protected Control createDialogArea(Composite parent) {
- Font font = parent.getFont();
-
- Composite container = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- GridData gd= new GridData(GridData.FILL_BOTH);
- container.setLayoutData(gd);
-
- // snippet label
- Label label = new Label(container, SWT.NONE);
- label.setText(ActionMessages.WatchExpressionDialog_2);
- gd= new GridData(GridData.BEGINNING);
- label.setLayoutData(gd);
- label.setFont(font);
-
- fSnippetViewer = new SourceViewer(container, null, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.LEFT_TO_RIGHT);
- fSnippetViewer.setInput(this);
-
- IDocument document = new Document();
- fSnippetViewer.configure(new SourceViewerConfiguration());
- fSnippetViewer.setEditable(true);
- fSnippetViewer.setDocument(document);
- document.addDocumentListener(new IDocumentListener() {
- public void documentAboutToBeChanged(DocumentEvent event) {
- }
- public void documentChanged(DocumentEvent event) {
- checkValues();
- }
- });
-
- fSnippetViewer.getTextWidget().setFont(JFaceResources.getTextFont());
-
- Control control= fSnippetViewer.getControl();
- gd= new GridData(GridData.FILL_BOTH);
- gd.heightHint= convertHeightInCharsToPixels(10);
- gd.widthHint= convertWidthInCharsToPixels(80);
- control.setLayoutData(gd);
- fSnippetViewer.getDocument().set(fWatchExpression.getExpressionText());
-
- // actions
- final TextViewerAction cutAction = new TextViewerAction(fSnippetViewer, ITextOperationTarget.CUT);
- cutAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_CUT));
- cutAction.setDisabledImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_CUT_DISABLED));
- cutAction.setText(ActionMessages.WatchExpressionDialogMenu_0);
- final TextViewerAction copyAction = new TextViewerAction(fSnippetViewer, ITextOperationTarget.COPY);
- copyAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
- copyAction.setDisabledImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
- copyAction.setText(ActionMessages.WatchExpressionDialogMenu_1);
- final TextViewerAction pasteAction = new TextViewerAction(fSnippetViewer, ITextOperationTarget.PASTE);
- pasteAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
- pasteAction.setDisabledImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED));
- pasteAction.setText(ActionMessages.WatchExpressionDialogMenu_2);
-
- // context menu
- MenuManager menuManager = new MenuManager();
- menuManager.add(cutAction);
- menuManager.add(copyAction);
- menuManager.add(pasteAction);
- menuManager.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- cutAction.update();
- copyAction.update();
- pasteAction.update();
- }
- });
- Menu menu = menuManager.createContextMenu(fSnippetViewer.getTextWidget());
- fSnippetViewer.getTextWidget().setMenu(menu);
-
- // enable checkbox
- fCheckBox= new Button(container, SWT.CHECK | SWT.LEFT);
- fCheckBox.setText(ActionMessages.WatchExpressionDialog_3);
- fCheckBox.setSelection(fWatchExpression.isEnabled());
- fCheckBox.setFont(font);
-
- applyDialogFont(container);
- fSnippetViewer.getControl().setFocus();
- return container;
- }
-
- /**
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
- protected void okPressed() {
- fWatchExpression.setEnabled(fCheckBox.getSelection());
- fWatchExpression.setExpressionText(fSnippetViewer.getDocument().get());
- super.okPressed();
- }
-
- /**
- * Check the field values and display a message in the status if needed.
- */
- private void checkValues() {
- StatusInfo status= new StatusInfo();
- if (fSnippetViewer.getDocument().get().trim().length() == 0) {
- status.setError(ActionMessages.WatchExpressionDialog_4);
- }
- updateStatus(status);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionFactoryTester.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionFactoryTester.java
deleted file mode 100644
index 6f300f4..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionFactoryTester.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.expressions;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.debug.ui.actions.IWatchExpressionFactoryAdapter;
-import org.eclipse.debug.ui.actions.IWatchExpressionFactoryAdapter2;
-import org.eclipse.debug.ui.actions.IWatchExpressionFactoryAdapterExtension;
-
-/**
- * This class is used to check whether a given element can be used to create
- * a watch expression. A single property can be tested
- * "canCreateWatchExpression". Test for this property ignores the value and
- * always returns a boolean.
- *
- * @since 3.4
- */
-public class WatchExpressionFactoryTester extends PropertyTester {
-
- public static final String CAN_CREATE_WATCH_EXPRESSION_PROPERTY = "canCreateWatchExpression"; //$NON-NLS-1$
-
- /* (non-Javadoc)
- * @see org.eclipse.core.expressions.PropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
- */
- public boolean test(Object element, String property, Object[] args, Object expectedValue) {
- if (CAN_CREATE_WATCH_EXPRESSION_PROPERTY.equals(property)){
- if (element instanceof IVariable) {
- IVariable variable = (IVariable)element;
- if (DebugPlugin.getDefault().getExpressionManager().hasWatchExpressionDelegate(variable.getModelIdentifier())) {
- IWatchExpressionFactoryAdapter factory = WatchHandler.getFactory(variable);
- if (factory instanceof IWatchExpressionFactoryAdapterExtension) {
- IWatchExpressionFactoryAdapterExtension ext = (IWatchExpressionFactoryAdapterExtension) factory;
- return ext.canCreateWatchExpression(variable);
- }
- return true;
- }
- } else {
- IWatchExpressionFactoryAdapter2 factory2 = WatchHandler.getFactory2(element);
- if (factory2 != null) {
- return factory2.canCreateWatchExpression(element);
- }
- }
- }
- return false;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java
deleted file mode 100644
index 8fbd74b..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchHandler.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.expressions;
-
-import java.util.Iterator;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.debug.core.model.IWatchExpression;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.IWatchExpressionFactoryAdapter;
-import org.eclipse.debug.ui.actions.IWatchExpressionFactoryAdapter2;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * Handler for creating a watch expression.
- *
- * @since 3.4
- */
-public class WatchHandler extends AbstractHandler {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- public Object execute(ExecutionEvent event) throws ExecutionException {
- ISelection selection = HandlerUtil.getCurrentSelection(event);
- if (selection instanceof IStructuredSelection) {
- Iterator iter = ((IStructuredSelection)selection).iterator();
- while (iter.hasNext()) {
- Object element = iter.next();
- createExpression(element);
- }
- }
- return null;
- }
-
-
- private void showExpressionsView() {
- IWorkbenchPage page = DebugUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IViewPart part = page.findView(IDebugUIConstants.ID_EXPRESSION_VIEW);
- if (part == null) {
- try {
- page.showView(IDebugUIConstants.ID_EXPRESSION_VIEW);
- } catch (PartInitException e) {
- }
- } else {
- page.bringToTop(part);
- }
-
- }
-
- private void createExpression(Object element) {
- String expressionString;
- try {
- if (element instanceof IVariable) {
- IVariable variable = (IVariable)element;
- IWatchExpressionFactoryAdapter factory = getFactory(variable);
- expressionString = variable.getName();
- if (factory != null) {
- expressionString = factory.createWatchExpression(variable);
- }
- } else {
- IWatchExpressionFactoryAdapter2 factory2 = getFactory2(element);
- if (factory2 != null) {
- expressionString = factory2.createWatchExpression(element);
- } else {
- // Action should not have been enabled
- return;
- }
- }
- } catch (CoreException e) {
- DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), ActionMessages.WatchAction_0, ActionMessages.WatchAction_1, e); //
- return;
- }
-
- IWatchExpression expression;
- expression = DebugPlugin.getDefault().getExpressionManager().newWatchExpression(expressionString);
- DebugPlugin.getDefault().getExpressionManager().addExpression(expression);
- IAdaptable object = DebugUITools.getDebugContext();
- IDebugElement context = null;
- if (object instanceof IDebugElement) {
- context = (IDebugElement) object;
- } else if (object instanceof ILaunch) {
- context = ((ILaunch) object).getDebugTarget();
- }
- expression.setExpressionContext(context);
- showExpressionsView();
- }
-
-
- /**
- * Returns the factory adapter for the given variable or <code>null</code> if none.
- *
- * @param variable
- * @return factory or <code>null</code>
- */
- static IWatchExpressionFactoryAdapter getFactory(IVariable variable) {
- return (IWatchExpressionFactoryAdapter) variable.getAdapter(IWatchExpressionFactoryAdapter.class);
- }
-
- /**
- * Returns the factory adapter for the given variable or <code>null</code> if none.
- *
- * @param variable
- * @return factory or <code>null</code>
- */
- static IWatchExpressionFactoryAdapter2 getFactory2(Object element) {
- if (element instanceof IAdaptable) {
- return (IWatchExpressionFactoryAdapter2)((IAdaptable)element).getAdapter(IWatchExpressionFactoryAdapter2.class);
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueAction.java
deleted file mode 100644
index c1a5fab..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueAction.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.variables;
-
-
-import com.ibm.icu.text.MessageFormat;
-import java.util.Iterator;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IValueModification;
-import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.VariableValueEditorManager;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.internal.ui.views.variables.VariablesView;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.IVariableValueEditor;
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.SelectionProviderAction;
-
-/**
- * Action for changing the value of primitives and <code>String</code> variables.
- * This action will attempt to delegate the editing operation to a registered
- * variable value editor, if any is provided for the variable's debug model.
- * @see org.eclipse.debug.ui.actions.VariableValueEditorManager
- */
-public class ChangeVariableValueAction extends SelectionProviderAction {
-
- protected IVariable fVariable;
- private VariablesView fView;
- private boolean fEditing= false;
-
- /**
- * Creates a new ChangeVariableValueAction for the given variables view
- * @param view the variables view in which this action will appear
- */
- public ChangeVariableValueAction(VariablesView view) {
- super(view.getViewer(), ActionMessages.ChangeVariableValue_title);
- setDescription(ActionMessages.ChangeVariableValue_toolTipText);
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_CHANGE_VARIABLE_VALUE));
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_CHANGE_VARIABLE_VALUE));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_CHANGE_VARIABLE_VALUE));
- PlatformUI.getWorkbench().getHelpSystem().setHelp(
- this,
- IDebugHelpContextIds.CHANGE_VALUE_ACTION);
- fView= view;
- }
-
- /**
- * Edit the variable value with an in-line text editor.
- */
- protected void doActionPerformed(final IVariable variable) {
- Shell shell = fView.getViewSite().getShell();
- // If a previous edit is still in progress, don't start another
- if (fEditing) {
- return;
- }
- fEditing= true;
- fVariable = variable;
- if (!delegateEdit(shell)) {
- doDefaultEdit(shell);
- }
- fEditing= false;
- }
-
- /**
- * Attempts to edit the variable by delegating to anyone who's
- * contributed a variable value editor via extension. Returns
- * <code>true</code> if a delegate handled the edit, <code>false</code>
- * if the variable still needs to be edited.
- *
- * @param shell a shell for prompting the user
- * @return whether or not a delegate attempted to edit the variable
- */
- private boolean delegateEdit(Shell shell) {
- String modelIdentifier = fVariable.getModelIdentifier();
- IVariableValueEditor editor= VariableValueEditorManager.getDefault().getVariableValueEditor(modelIdentifier);
- if (editor != null) {
- return editor.editVariable(fVariable, shell);
- }
- return false;
- }
-
- /**
- * Edits the variable using the default variable editor
- * @param shell a shell for prompting the user
- */
- protected void doDefaultEdit(Shell shell) {
- String name= IInternalDebugCoreConstants.EMPTY_STRING;
- String value= IInternalDebugCoreConstants.EMPTY_STRING;
- try {
- name= fVariable.getName();
- value= fVariable.getValue().getValueString();
- } catch (DebugException exception) {
- DebugUIPlugin.errorDialog(shell, ActionMessages.ChangeVariableValue_errorDialogTitle,ActionMessages.ChangeVariableValue_errorDialogMessage, exception); //
- return;
- }
- ChangeVariableValueInputDialog inputDialog= new ChangeVariableValueInputDialog(shell, ActionMessages.ChangeVariableValue_1, MessageFormat.format(ActionMessages.ChangeVariableValue_2, new String[] {name}), value, new IInputValidator() { //
- /**
- * Returns an error string if the input is invalid
- */
- public String isValid(String input) {
- try {
- if (fVariable.verifyValue(input)) {
- return null; // null means valid
- }
- } catch (DebugException exception) {
- return ActionMessages.ChangeVariableValue_3;
- }
- return ActionMessages.ChangeVariableValue_4;
- }
- });
-
- inputDialog.open();
- String newValue= inputDialog.getValue();
- if (newValue != null) {
- // null value means cancel was pressed
- try {
- fVariable.setValue(newValue);
- getSelectionProvider().setSelection(new StructuredSelection(fVariable));
- } catch (DebugException de) {
- DebugUIPlugin.errorDialog(shell, ActionMessages.ChangeVariableValue_errorDialogTitle,ActionMessages.ChangeVariableValue_errorDialogMessage, de); //
- }
- }
- }
-
- /**
- * Updates the enabled state of this action based
- * on the selection
- */
- protected void update(IStructuredSelection sel) {
- Iterator iter= sel.iterator();
- if (iter.hasNext()) {
- Object object= iter.next();
- if (object instanceof IValueModification) {
- IValueModification varMod= (IValueModification)object;
- if (!varMod.supportsValueModification()) {
- setEnabled(false);
- return;
- }
- setEnabled(!iter.hasNext());
- return;
- }
- }
- setEnabled(false);
- }
-
- /**
- * @see IAction#run()
- */
- public void run() {
- Iterator iterator= getStructuredSelection().iterator();
- doActionPerformed((IVariable)iterator.next());
- }
-
- /**
- * @see SelectionProviderAction#selectionChanged(org.eclipse.jface.viewers.IStructuredSelection)
- */
- public void selectionChanged(IStructuredSelection sel) {
- update(sel);
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueInputDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueInputDialog.java
deleted file mode 100644
index a5aeb71..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueInputDialog.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.variables;
-
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * A simple input dialog for soliciting an input string
- * from the user.
- * <p>
- * This concrete dialog class can be instantiated as is,
- * or further subclassed as required.
- * </p>
- */
-public class ChangeVariableValueInputDialog extends TrayDialog {
-
-
- /**
- * The title of the dialog.
- */
- private String title;
-
- /**
- * The message to display, or <code>null</code> if none.
- */
- private String message;
-
- /**
- * The input value; the empty string by default.
- */
- private String value= IInternalDebugCoreConstants.EMPTY_STRING;
-
- /**
- * The input validator, or <code>null</code> if none.
- */
- private IInputValidator validator;
-
- /**
- * Ok button widget.
- */
- private Button okButton;
-
- /**
- * Input text widget.
- */
- private Text text;
-
- /**
- * Error message label widget.
- */
- private Label errorMessageLabel;
- /**
- * Creates an input dialog with OK and Cancel buttons.
- * Note that the dialog will have no visual representation (no widgets)
- * until it is told to open.
- * <p>
- * Note that the <code>open</code> method blocks for input dialogs.
- * </p>
- *
- * @param parentShell the parent shell
- * @param dialogTitle the dialog title, or <code>null</code> if none
- * @param dialogMessage the dialog message, or <code>null</code> if none
- * @param initialValue the initial input value, or <code>null</code> if none
- * (equivalent to the empty string)
- * @param validator an input validator, or <code>null</code> if none
- */
- public ChangeVariableValueInputDialog(Shell parentShell, String dialogTitle, String dialogMessage, String initialValue, IInputValidator validator) {
- super(parentShell);
- this.title = dialogTitle;
- message = dialogMessage;
- if (initialValue == null)
- value = IInternalDebugCoreConstants.EMPTY_STRING;
- else
- value = initialValue;
- this.validator = validator;
-
- setShellStyle(getShellStyle() | SWT.RESIZE);
- }
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void buttonPressed(int buttonId) {
- if (buttonId == IDialogConstants.OK_ID) {
- value= text.getText();
- } else {
- value= null;
- }
- super.buttonPressed(buttonId);
- }
- /* (non-Javadoc)
- * Method declared in Window.
- */
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- if (title != null)
- shell.setText(title);
- }
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- // create OK and Cancel buttons by default
- okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
-
- //do this here because setting the text will set enablement on the ok button
- text.setFocus();
- if (value != null) {
- text.setText(value);
- text.selectAll();
- }
- }
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected Control createDialogArea(Composite parent) {
- Font font = parent.getFont();
- // create composite
- Composite composite = (Composite)super.createDialogArea(parent);
-
- // create message
- if (message != null) {
- Label label = new Label(composite, SWT.WRAP);
- label.setText(message);
- GridData data = new GridData(
- GridData.GRAB_HORIZONTAL |
- GridData.HORIZONTAL_ALIGN_FILL |
- GridData.VERTICAL_ALIGN_CENTER);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
- label.setLayoutData(data);
- label.setFont(font);
- }
-
- text= new Text(composite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL| SWT.H_SCROLL);
-
- GridData gridData= new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_VERTICAL | GridData.VERTICAL_ALIGN_FILL);
- gridData.heightHint = 50;
- gridData.widthHint = 100;
- text.setLayoutData(gridData);
- text.setFont(font);
- text.addModifyListener(
- new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- if (okButton.isEnabled()) {
- return;
- }
- errorMessageLabel.setText(IInternalDebugCoreConstants.EMPTY_STRING);
- errorMessageLabel.getParent().update();
- okButton.setEnabled(true);
- }
- }
- );
-
- errorMessageLabel = new Label(composite, SWT.NONE);
- errorMessageLabel.setLayoutData(new GridData(
- GridData.GRAB_HORIZONTAL |
- GridData.HORIZONTAL_ALIGN_FILL));
- errorMessageLabel.setFont(font);
- return composite;
- }
- /**
- * Returns the error message label.
- *
- * @return the error message label
- */
- protected Label getErrorMessageLabel() {
- return errorMessageLabel;
- }
- /**
- * Returns the ok button.
- *
- * @return the ok button
- */
- protected Button getOkButton() {
- return okButton;
- }
- /**
- * Returns the text area.
- *
- * @return the text area
- */
- protected Text getText() {
- return text;
- }
- /**
- * Returns the validator.
- *
- * @return the validator
- */
- protected IInputValidator getValidator() {
- return validator;
- }
- /**
- * Returns the string typed into this input dialog.
- *
- * @return the input string
- */
- public String getValue() {
- return value;
- }
- /**
- * Validates the input.
- * <p>
- * The default implementation of this framework method
- * delegates the request to the supplied input validator object;
- * if it finds the input invalid, the error message is displayed
- * in the dialog's message line.
- * This hook method is called whenever the text changes in the
- * input field.
- * </p>
- */
- protected void validateInput() {
-
- String errorMessage = null;
-
- if (validator != null) {
- errorMessage = validator.isValid(text.getText());
- }
-
- // Bug 16256: important not to treat empty string (blank error) the same as null (no error)
- errorMessageLabel.setText(errorMessage == null ? IInternalDebugCoreConstants.EMPTY_STRING : errorMessage);
- okButton.setEnabled(errorMessage == null);
-
- errorMessageLabel.getParent().update();
- }
- protected void okPressed() {
- validateInput();
- if (okButton.isEnabled()) {
- super.okPressed();
- }
- }
-
- /**
- * Returns the name of the section that this dialog stores its settings in
- *
- * @return String
- */
- protected String getDialogSettingsSectionName() {
- return IDebugUIConstants.PLUGIN_ID + ".CHANGE_VARIABLE_VALUE_DIALOG_SECTION"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings()
- */
- protected IDialogSettings getDialogBoundsSettings() {
- IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(getDialogSettingsSectionName());
- if (section == null) {
- section = settings.addNewSection(getDialogSettingsSectionName());
- }
- return section;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#handleShellCloseEvent()
- */
- protected void handleShellCloseEvent() {
- value= null;
- super.handleShellCloseEvent();
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/SelectAllVariablesAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/SelectAllVariablesAction.java
deleted file mode 100644
index dc228a6..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/SelectAllVariablesAction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.variables;
-
-import org.eclipse.debug.internal.ui.actions.SelectAllAction;
-import org.eclipse.debug.ui.IDebugView;
-
-public class SelectAllVariablesAction extends SelectAllAction {
-
-
- protected String getActionId() {
- return IDebugView.SELECT_ALL_ACTION + ".Variables"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#initialize()
- */
- protected void initialize() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.selection.AbstractRemoveAllActionDelegate#isEnabled()
- */
- protected boolean isEnabled() {
- // TODO: only enable when stuff present
- return true;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ShowTypesAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ShowTypesAction.java
deleted file mode 100644
index b62df10..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ShowTypesAction.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * WindRiver - Bug 272367: "Show Type Names" attribute is not available in the IPresentationContext properties
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.variables;
-
-
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.IDebugView;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * 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 IDebugView fView;
-
- public ShowTypesAction(IDebugView view) {
- super(ActionMessages.ShowTypesAction_Show__Type_Names_1, IAction.AS_CHECK_BOX);
- setView(view);
- setToolTipText(ActionMessages.ShowTypesAction_Show_Type_Names);
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_TYPE_NAMES));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_TYPE_NAMES));
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_TYPE_NAMES));
- setId(DebugUIPlugin.getUniqueIdentifier() + ".ShowTypesAction"); //$NON-NLS-1$
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.SHOW_TYPES_ACTION);
- }
-
- /**
- * @see Action#run()
- */
- public void run() {
- valueChanged(isChecked());
- }
-
- private void valueChanged(boolean on) {
- final Viewer viewer = getView().getViewer();
- if (viewer.getControl().isDisposed()) {
- return;
- }
-
- IDebugModelPresentation debugLabelProvider= (IDebugModelPresentation)getView().getAdapter(IDebugModelPresentation.class);
- if (debugLabelProvider != null) {
- Boolean typesStatus = on ? Boolean.TRUE : Boolean.FALSE;
- debugLabelProvider.setAttribute(IDebugModelPresentation.DISPLAY_VARIABLE_TYPE_NAMES, typesStatus);
- if (viewer instanceof TreeModelViewer) {
- TreeModelViewer treeViewer = (TreeModelViewer) viewer;
- treeViewer.getPresentationContext().setProperty(IDebugModelPresentation.DISPLAY_VARIABLE_TYPE_NAMES, typesStatus);
- }
- BusyIndicator.showWhile(viewer.getControl().getDisplay(), new Runnable() {
- public void run() {
- viewer.refresh();
- }
- });
- }
- }
-
- protected IDebugView getView() {
- return fView;
- }
-
- protected void setView(IDebugView view) {
- fView = view;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#setEnabled(boolean)
- */
- public void setEnabled(boolean enabled) {
- super.setEnabled(enabled);
- if (enabled) {
- setToolTipText(ActionMessages.ShowTypesAction_Show_Type_Names);
- } else {
- setToolTipText(ActionMessages.ShowTypesAction_0);
- }
- }
-
-
-}
-
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ToggleDetailPaneAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ToggleDetailPaneAction.java
deleted file mode 100644
index ccbf5d0..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ToggleDetailPaneAction.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.variables;
-
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
-import org.eclipse.debug.internal.ui.views.variables.VariablesView;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Action that controls the appearance of the details pane in debug views such
- * as the VariablesView and the ExpressionsView. Instances of this class can be
- * created to show the detail pane underneath the main tree, to the right of the
- * main tree, or not shown at all.
- *
- * @since 3.0
- */
-public class ToggleDetailPaneAction extends Action {
-
- private VariablesView fVariablesView;
-
- private String fOrientation;
-
- public ToggleDetailPaneAction(VariablesView view, String orientation, String hiddenLabel) {
- super(IInternalDebugCoreConstants.EMPTY_STRING, AS_RADIO_BUTTON);
- setVariablesView(view);
- setOrientation(orientation);
-
- if (orientation == IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_UNDERNEATH) {
- setText(ActionMessages.ToggleDetailPaneAction_1);
- setToolTipText(ActionMessages.ToggleDetailPaneAction_2);
- setDescription(ActionMessages.ToggleDetailPaneAction_3);
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_UNDER));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_UNDER));
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_DETAIL_PANE_UNDER));
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.VERTICAL_DETAIL_PANE_LAYOUT_ACTION);
- } else if (orientation == IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_RIGHT) {
- setText(ActionMessages.ToggleDetailPaneAction_4);
- setToolTipText(ActionMessages.ToggleDetailPaneAction_5);
- setDescription(ActionMessages.ToggleDetailPaneAction_6);
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_RIGHT));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_RIGHT));
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_DETAIL_PANE_RIGHT));
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.HORIZONTAL_DETAIL_PANE_LAYOUT_ACTION);
- } else {
- setText(hiddenLabel);
- setToolTipText(ActionMessages.ToggleDetailPaneAction_8);
- setDescription(ActionMessages.ToggleDetailPaneAction_9);
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_HIDE));
- setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_HIDE));
- setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_DETAIL_PANE_HIDE));
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.DETAIL_PANE_HIDDEN_LAYOUT_ACTION);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- getVariablesView().setDetailPaneOrientation(getOrientation());
- }
-
- private VariablesView getVariablesView() {
- return fVariablesView;
- }
-
- private void setVariablesView(VariablesView variablesView) {
- fVariablesView = variablesView;
- }
-
- private void setOrientation(String orientation) {
- fOrientation = orientation;
- }
-
- public String getOrientation() {
- return fOrientation;
- }
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneAssignValueAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneAssignValueAction.java
deleted file mode 100644
index 81eff77..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneAssignValueAction.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.variables.details;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IValueModification;
-import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.VariableValueEditorManager;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.internal.ui.actions.StatusInfo;
-import org.eclipse.debug.ui.actions.IVariableValueEditor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.commands.ActionHandler;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbenchCommandConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.IHandlerActivation;
-import org.eclipse.ui.handlers.IHandlerService;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * Action which assigns a value to a variable from the detail pane
- * of the variables view.
- */
-public class DetailPaneAssignValueAction extends Action{
-
- private IHandlerActivation fHandlerActivation;
- private IViewSite fViewSite;
- private ITextViewer fTextViewer;
- private IStructuredSelection fCurrentSelection;
-
- /**
- * Attempts to evaluate the given string expression and assign the resulting value to the
- * specified variable. Displays error dialogs to the user if a problem is encountered.
- *
- * @see DetailPaneAssignValueAction
- * @see org.eclipse.debug.internal.ui.elements.adapters.DefaultVariableCellModifier
- *
- * @param shell the shell to use to open dialogs
- * @param variable the variable that is getting a new value
- * @param newValueExpression the expression to evaluate and set as the new value
- * @since 3.3.0
- */
- public static void assignValue(Shell shell, IVariable variable, String newValueExpression){
- String modelIdentifier = variable.getModelIdentifier();
- IVariableValueEditor editor = VariableValueEditorManager.getDefault().getVariableValueEditor(modelIdentifier);
- if (editor != null) {
- if (editor.saveVariable(variable, newValueExpression, shell)) {
- // If we successfully delegate to an editor which performs the save,
- // don't do any more work.
- return;
- }
- }
-
- try {
- // If we failed to delegate to anyone, perform the default assignment.
- if (variable.verifyValue(newValueExpression)) {
- variable.setValue(newValueExpression);
- } else {
- if (shell != null) {
- DebugUIPlugin.errorDialog(shell, ActionMessages.DetailPaneAssignValueAction_2, MessageFormat.format(ActionMessages.DetailPaneAssignValueAction_3, new String[] {newValueExpression, variable.getName()}), new StatusInfo(IStatus.ERROR, ActionMessages.DetailPaneAssignValueAction_4)); //
- }
- }
- } catch (DebugException e) {
- MessageDialog.openError(shell, ActionMessages.DetailPaneAssignValueAction_0, e.getStatus().getMessage());
- }
- }
-
- public DetailPaneAssignValueAction(ITextViewer textViewer, IViewSite viewSite) {
- super(ActionMessages.DetailPaneAssignValueAction_1);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.DETAIL_PANE_ASSIGN_VALUE_ACTION);
-
- fTextViewer = textViewer;
- fViewSite = viewSite;
-
- setEnabled(false);
- IHandlerService service = (IHandlerService) fViewSite.getService(IHandlerService.class);
- ActionHandler handler = new ActionHandler(this);
- fHandlerActivation = service.activateHandler(getActionDefinitionId(), handler);
- }
-
- public void dispose() {
- IHandlerService service = (IHandlerService) fViewSite.getService(IHandlerService.class);
- service.deactivateHandler(fHandlerActivation);
- }
-
- public void updateCurrentVariable(IStructuredSelection selection) {
- boolean enabled = false;
- if ((selection.size() == 1) && (selection.getFirstElement() instanceof IValueModification)) {
- IValueModification valMod = (IValueModification) selection.getFirstElement();
- if (valMod.supportsValueModification()) {
- fCurrentSelection = selection;
- enabled = true;
- }
- }
- setEnabled(enabled);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- IVariable variable = (IVariable) fCurrentSelection.getFirstElement();
-
- Point selection = fTextViewer.getSelectedRange();
- String value = null;
- if (selection.y == 0) {
- value = fTextViewer.getDocument().get();
- } else {
- try {
- value = fTextViewer.getDocument().get(selection.x, selection.y);
- } catch (BadLocationException e1) {
- }
- }
- IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
- Shell activeShell= null;
- if (window != null) {
- activeShell= window.getShell();
- }
-
- assignValue(activeShell, variable, value);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#getActionDefinitionId()
- */
- public String getActionDefinitionId() {
- return IWorkbenchCommandConstants.FILE_SAVE;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneMaxLengthAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneMaxLengthAction.java
deleted file mode 100644
index 032958b..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneMaxLengthAction.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.variables.details;
-
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.jface.action.Action;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Opens a dialog so that the user can enter the maximum length in characters that
- * the detail pane should display.
- *
- * @see DetailPaneMaxLengthDialog
- * @since 3.0
- */
-public class DetailPaneMaxLengthAction extends Action {
-
- private Shell fDialogShell;
-
- public DetailPaneMaxLengthAction(Shell dialogShell){
- super(ActionMessages.DetailPaneMaxLengthAction_0);
- fDialogShell = dialogShell;
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.DETAIL_PANE_MAX_LENGTH_ACTION);
-
- }
-
- public void run() {
- DetailPaneMaxLengthDialog dialog = new DetailPaneMaxLengthDialog(fDialogShell);
- dialog.open();
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneMaxLengthDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneMaxLengthDialog.java
deleted file mode 100644
index 0bcee1b..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneMaxLengthDialog.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.variables.details;
-
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.views.variables.VariablesViewMessages;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Provides a dialog for changing the maximum length allowed in the detail pane
- *
- * @since 3.0
- */
-public class DetailPaneMaxLengthDialog extends TrayDialog {
-
- private static final String SETTINGS_ID = DebugUIPlugin.getUniqueIdentifier() + ".MAX_DETAILS_LENGTH_DIALOG"; //$NON-NLS-1$
-
- private Text fTextWidget;
- private Text fErrorTextWidget;
- private String fErrorMessage;
- private String fValue;
- private IInputValidator fValidator;
-
- /**
- * Constructs a new dialog on the given shell.
- *
- * @param parent shell
- */
- public DetailPaneMaxLengthDialog(Shell parent) {
- super(parent);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- fValue = Integer.toString(DebugUIPlugin.getDefault().getPreferenceStore().getInt(IDebugUIConstants.PREF_MAX_DETAIL_LENGTH));
- fValidator = new IInputValidator() {
- public String isValid(String newText) {
- try {
- int num = Integer.parseInt(newText);
- if (num < 0) {
- return VariablesViewMessages.DetailPaneMaxLengthDialog_2;
- }
- } catch (NumberFormatException e) {
- return VariablesViewMessages.DetailPaneMaxLengthDialog_3;
- }
- return null;
- }
-
- };
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.SelectionDialog#getDialogBoundsSettings()
- */
- protected IDialogSettings getDialogBoundsSettings() {
- IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(SETTINGS_ID);
- if (section == null) {
- section = settings.addNewSection(SETTINGS_ID);
- }
- return section;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
- getShell().setText(VariablesViewMessages.DetailPaneMaxLengthDialog_0);
- Control contents = super.createContents(parent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getDialogArea(), IDebugHelpContextIds.DETAIL_PANE_MAX_LENGTH_ACTION);
- return contents;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite) super.createDialogArea(parent);
- Label label = new Label(composite, SWT.WRAP);
- label.setText(VariablesViewMessages.DetailPaneMaxLengthDialog_1);
- GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
- label.setLayoutData(data);
- label.setFont(parent.getFont());
- fTextWidget = new Text(composite, SWT.SINGLE | SWT.BORDER);
- fTextWidget.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
- fTextWidget.setText(fValue);
- fTextWidget.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateInput();
- fValue = fTextWidget.getText();
- }
- });
- fErrorTextWidget = new Text(composite, SWT.READ_ONLY);
- fErrorTextWidget.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
- | GridData.HORIZONTAL_ALIGN_FILL));
- fErrorTextWidget.setBackground(fErrorTextWidget.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
- setErrorMessage(fErrorMessage);
- applyDialogFont(composite);
- return composite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
- protected void okPressed() {
- String text = getValue();
- try {
- DebugUIPlugin.getDefault().getPreferenceStore().setValue(IDebugUIConstants.PREF_MAX_DETAIL_LENGTH, Integer.parseInt(text));
- }
- catch (NumberFormatException e) {
- DebugUIPlugin.log(e);
- }
- super.okPressed();
- }
-
- /**
- * Returns the string typed into this input dialog.
- *
- * @return the input string
- * @since 3.3
- */
- public String getValue() {
- return fValue;
- }
-
- /**
- * Validates the current input
- * @since 3.3
- */
- private void validateInput() {
- String errorMessage = null;
- if (fValidator != null) {
- errorMessage = fValidator.isValid(fTextWidget.getText());
- }
- setErrorMessage(errorMessage);
- }
-
- /**
- * Sets the current error message or none if null
- * @param errorMessage
- * @since 3.3
- */
- public void setErrorMessage(String errorMessage) {
- fErrorMessage = errorMessage;
- if (fErrorTextWidget != null && !fErrorTextWidget.isDisposed()) {
- fErrorTextWidget.setText(errorMessage == null ? IInternalDebugCoreConstants.EMPTY_STRING : errorMessage);
- fErrorTextWidget.getParent().update();
- // Access the ok button by id, in case clients have overridden button creation.
- // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=113643
- Control button = getButton(IDialogConstants.OK_ID);
- if (button != null) {
- button.setEnabled(errorMessage == null);
- }
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneWordWrapAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneWordWrapAction.java
deleted file mode 100644
index 107ca98..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneWordWrapAction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.variables.details;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * An check box action that allows the word wrap property to be set, determining if the detail pane
- * should wrap text.
- */
-public class DetailPaneWordWrapAction extends Action {
-
- ITextViewer fTextViewer;
-
- public DetailPaneWordWrapAction(ITextViewer textViewer) {
- super(ActionMessages.DetailPaneWordWrapAction_0,IAction.AS_CHECK_BOX);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.DETAIL_PANE_WORD_WRAP_ACTION);
-
- fTextViewer = textViewer;
- setEnabled(true);
-
- boolean prefSetting = DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IDebugPreferenceConstants.PREF_DETAIL_PANE_WORD_WRAP);
- fTextViewer.getTextWidget().setWordWrap(prefSetting);
- setChecked(prefSetting);
-
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- fTextViewer.getTextWidget().setWordWrap(isChecked());
- DebugUIPlugin.getDefault().getPreferenceStore().setValue(IDebugPreferenceConstants.PREF_DETAIL_PANE_WORD_WRAP,isChecked());
- DebugUIPlugin.getDefault().savePluginPreferences();
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/AbstractRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/AbstractRequestMonitor.java
deleted file mode 100644
index 2364d56..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/AbstractRequestMonitor.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IStatusMonitor;
-
-/**
- * Common function for request monitors
- *
- * @since 3.3
- *
- */
-public abstract class AbstractRequestMonitor implements IStatusMonitor {
-
- private IStatus fStatus;
- private boolean fCancelled = false;
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.provisional.IStatusMonitor#setStatus(org.eclipse.core.runtime.IStatus)
- */
- public void setStatus(IStatus status) {
- fStatus = status;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IProgressMonitor#beginTask(java.lang.String, int)
- */
- public void beginTask(String name, int totalWork) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IProgressMonitor#internalWorked(double)
- */
- public void internalWorked(double work) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IProgressMonitor#isCanceled()
- */
- public boolean isCanceled() {
- return fCancelled;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(boolean)
- */
- public void setCanceled(boolean value) {
- fCancelled = value;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IProgressMonitor#setTaskName(java.lang.String)
- */
- public void setTaskName(String name) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IProgressMonitor#subTask(java.lang.String)
- */
- public void subTask(String name) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IProgressMonitor#worked(int)
- */
- public void worked(int work) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.provisional.IStatusMonitor#getStatus()
- */
- public IStatus getStatus() {
- return fStatus;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ActionsUpdater.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ActionsUpdater.java
deleted file mode 100644
index fae69e0..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ActionsUpdater.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-
-/**
- * Collects votes from handler update requests.
- *
- * @since 3.3
- *
- */
-public class ActionsUpdater {
-
- private IEnabledTarget[] fActions;
- private int fNumVoters;
- private int fNumOfVotes = 0;
- private boolean fDone = false;
- private boolean fEnabled = true;
-
- public ActionsUpdater(IEnabledTarget[] actions, int numVoters) {
- fActions = actions;
- fNumVoters = numVoters;
- }
-
- public synchronized void setEnabled(boolean result) {
- fNumOfVotes++;
- if (fEnabled) {
- fEnabled = result;
- }
- done();
- }
-
- private synchronized void done() {
- if (!fDone) {
- if (!fEnabled || fNumOfVotes == fNumVoters) {
- fDone = true;
- for (int i = 0; i < fActions.length; i++) {
- fActions[i].setEnabled(fEnabled);
- }
- }
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java
deleted file mode 100644
index ce50c13..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.ui.actions.DebugCommandAction;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-/**
- * Abstract base class for debug action delegates performing debug commands.
- *
- * @since 3.3.
- */
-public abstract class DebugCommandActionDelegate implements IWorkbenchWindowActionDelegate, IActionDelegate2 {
-
- /**
- *The real action for this delegate
- */
- private DebugCommandAction fDebugAction;
-
- protected void setAction(DebugCommandAction action) {
- fDebugAction = action;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
- */
- public void dispose() {
- fDebugAction.dispose();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- fDebugAction.setActionProxy(action);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window) {
- fDebugAction.init(window);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- fDebugAction.run();
- }
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection s) {
- // do nothing
- }
-
- protected DebugCommandAction getAction() {
- return fDebugAction;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java
deleted file mode 100644
index ba69bd2..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.commands.IDebugCommandHandler;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.contexts.DebugContextEvent;
-import org.eclipse.debug.ui.contexts.IDebugContextListener;
-import org.eclipse.debug.ui.contexts.IDebugContextService;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IWindowListener;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Updates commands for a window. Coalesces update requests by command type.
- *
- * @since 3.3
- */
-public class DebugCommandService implements IDebugContextListener {
-
- /**
- * Maps command types to actions to update
- */
- private Map fCommandUpdates = new HashMap();
-
- /**
- * Window this service is for.
- */
- private IWorkbenchWindow fWindow = null;
-
- /**
- * The context service for this command service.
- */
- private IDebugContextService fContextService = null;
-
- /**
- * Service per window
- */
- private static Map fgServices = new HashMap();
-
- /**
- * Returns the service for a window.
- *
- * @param window
- * @return service
- */
- public synchronized static DebugCommandService getService(IWorkbenchWindow window) {
- DebugCommandService service = (DebugCommandService) fgServices.get(window);
- if (service == null) {
- service = new DebugCommandService(window);
- fgServices.put(window, service);
- }
- return service;
- }
-
- public DebugCommandService(IWorkbenchWindow window) {
- fWindow = window;
- fContextService = DebugUITools.getDebugContextManager().getContextService(window);
- fContextService.addPostDebugContextListener(this);
- PlatformUI.getWorkbench().addWindowListener(new IWindowListener() {
-
- public void windowOpened(IWorkbenchWindow w) {
- }
-
- public void windowDeactivated(IWorkbenchWindow w) {
- }
-
- public void windowClosed(IWorkbenchWindow w) {
- if (fWindow == w) {
- dispose();
- }
- }
-
- public void windowActivated(IWorkbenchWindow w) {
- }
-
- });
- }
-
- private void dispose() {
- fContextService.removeDebugContextListener(this);
- fgServices.remove(fWindow);
- fCommandUpdates.clear();
- fWindow = null;
- }
-
- /**
- * Updates the given command type after the next context change.
- *
- * @param commandType
- * @param monitor
- */
- public void postUpdateCommand(Class commandType, IEnabledTarget action) {
- synchronized (fCommandUpdates) {
- Job.getJobManager().cancel(commandType);
- List actions = (List) fCommandUpdates.get(commandType);
- if (actions == null) {
- actions = new ArrayList();
- fCommandUpdates.put(commandType, actions);
- }
- actions.add(action);
- }
- }
-
- /**
- * Updates the given command type based on the active context.
- *
- * @param commandType
- * @param requestMonitor
- */
- public void updateCommand(Class commandType, IEnabledTarget action) {
- ISelection context = fContextService.getActiveContext();
- if (context instanceof IStructuredSelection && !context.isEmpty()) {
- Object[] elements = ((IStructuredSelection)context).toArray();
- updateCommand(commandType, elements, new IEnabledTarget[]{action});
- } else {
- action.setEnabled(false);
- }
- }
-
- private void postUpdate(ISelection context) {
- Map commands = null;
- synchronized (fCommandUpdates) {
- commands = fCommandUpdates;
- fCommandUpdates = new HashMap(commands.size());
- }
- if (context instanceof IStructuredSelection && !context.isEmpty()) {
- Object[] elements = ((IStructuredSelection)context).toArray();
- Iterator iterator = commands.entrySet().iterator();
- while (iterator.hasNext()) {
- Entry entry = (Entry) iterator.next();
- Class commandType = (Class)entry.getKey();
- List actions = (List) entry.getValue();
- updateCommand(commandType, elements, (IEnabledTarget[]) actions.toArray(new IEnabledTarget[actions.size()]));
- }
- } else {
- Iterator iterator = commands.values().iterator();
- while (iterator.hasNext()) {
- List actionList = (List) iterator.next();
- Iterator actions = actionList.iterator();
- while (actions.hasNext()) {
- ((IEnabledTarget)actions.next()).setEnabled(false);
- }
- }
- }
- commands.clear();
- }
-
- /**
- * Updates the given command type for the specified elements.
- *
- * @param commandType command class to update
- * @param elements elements to update for
- * @param monitor status monitor
- */
- private void updateCommand(Class handlerType, Object[] elements, IEnabledTarget[] actions) {
- if (elements.length == 1) {
- // usual case - one element
- Object element = elements[0];
- IDebugCommandHandler handler = getHandler(element, handlerType);
- if (handler != null) {
- UpdateActionsRequest request = new UpdateActionsRequest(elements, actions);
- handler.canExecute(request);
- return;
- }
- } else {
- Map map = collate(elements, handlerType);
- if (map != null) {
- ActionsUpdater updater = new ActionsUpdater(actions, map.size());
- Iterator entries = map.entrySet().iterator();
- while (entries.hasNext()) {
- Entry entry = (Entry) entries.next();
- IDebugCommandHandler handler = (IDebugCommandHandler) entry.getKey();
- List list = (List) entry.getValue();
- UpdateHandlerRequest request = new UpdateHandlerRequest(list.toArray(), updater);
- handler.canExecute(request);
- }
- return;
- }
- }
- // ABORT - no command processors
- for (int i = 0; i < actions.length; i++) {
- actions[i].setEnabled(false);
- }
- }
-
- /**
- * Updates the given command type for the specified elements.
- *
- * @param commandType command class to update
- * @param elements elements to update for
- * @param monitor status monitor
- */
- public boolean executeCommand(Class handlerType, Object[] elements, ICommandParticipant participant) {
- if (elements.length == 1) {
- // usual case - one element
- Object element = elements[0];
- IDebugCommandHandler handler = getHandler(element, handlerType);
- if (handler != null) {
- ExecuteActionRequest request = new ExecuteActionRequest(elements);
- request.setCommandParticipant(participant);
- return handler.execute(request);
- }
- } else {
- Map map = collate(elements, handlerType);
- if (map != null) {
- boolean enabled = true;
- Iterator entries = map.entrySet().iterator();
- while (entries.hasNext()) {
- Entry entry = (Entry) entries.next();
- IDebugCommandHandler handler = (IDebugCommandHandler) entry.getKey();
- List list = (List) entry.getValue();
- ExecuteActionRequest request = new ExecuteActionRequest(list.toArray());
- request.setCommandParticipant(participant);
- // specifically use & so handler is executed
- enabled = enabled & handler.execute(request);
- }
- return enabled;
- }
- }
- // ABORT - no command processors
- return false;
- }
-
- public void debugContextChanged(DebugContextEvent event) {
- postUpdate(event.getContext());
- }
-
- /**
- * Returns a map of command handlers to associated elements, or <code>null</code> if
- * one is missing.
- *
- * @param elements
- * @return map of command handlers to associated elements or <code>null</code>
- */
- private Map collate(Object[] elements, Class handlerType) {
- Map map = new HashMap();
- for (int i = 0; i < elements.length; i++) {
- Object element = elements[i];
- IDebugCommandHandler handler = getHandler(element, handlerType);
- if (handler == null) {
- return null;
- } else {
- List list = (List) map.get(handler);
- if (list == null) {
- list = new ArrayList();
- map.put(handler, list);
- }
- list.add(element);
- }
- }
- return map;
- }
-
- private IDebugCommandHandler getHandler(Object element, Class handlerType) {
- return (IDebugCommandHandler)DebugPlugin.getAdapter(element, handlerType);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandAction.java
deleted file mode 100644
index 0333024..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandAction.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.core.commands.IDisconnectHandler;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.actions.DebugCommandAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-/**
- * Disconnect action.
- *
- * @since 3.3
- */
-public class DisconnectCommandAction extends DebugCommandAction{
-
- public String getText() {
- return ActionMessages.DisconnectAction_0;
- }
-
- public String getHelpContextId() {
- return "org.eclipse.debug.ui.disconnect_action_context"; //$NON-NLS-1$
- }
-
- public String getId() {
- return "org.eclipse.debug.ui.debugview.toolbar.disconnect"; //$NON-NLS-1$
- }
-
- public String getToolTipText() {
- return ActionMessages.DisconnectAction_3;
- }
-
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_DISCONNECT);
- }
-
- public ImageDescriptor getHoverImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_DISCONNECT);
- }
-
- public ImageDescriptor getImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_DISCONNECT);
- }
-
- protected Class getCommandType() {
- return IDisconnectHandler.class;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandAction.java
deleted file mode 100644
index 3693b0f..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandAction.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.core.commands.IDropToFrameHandler;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.ui.actions.DebugCommandAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * Drop to frame action.
- *
- * @since 3.3
- */
-public class DropToFrameCommandAction extends DebugCommandAction {
-
- public String getText() {
- return ActionMessages.DropToFrameAction_0;
- }
-
- public String getHelpContextId() {
- return "org.eclipse.debug.ui.drop_to_frame_action_context"; //$NON-NLS-1$
- }
-
- public String getId() {
- return "org.eclipse.debug.ui.debugview.toolbar.dropToFrame"; //$NON-NLS-1$
- }
-
- public String getToolTipText() {
- return ActionMessages.DropToFrameAction_3;
- }
-
- public ImageDescriptor getHoverImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DROP_TO_FRAME);
- }
-
- public ImageDescriptor getImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DROP_TO_FRAME);
- }
-
- public ImageDescriptor getDisabledImageDescriptor() {
- return null;
- }
-
- protected Class getCommandType() {
- return IDropToFrameHandler.class;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ExecuteActionRequest.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ExecuteActionRequest.java
deleted file mode 100644
index b47715b..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ExecuteActionRequest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.internal.core.commands.DebugCommandRequest;
-import org.eclipse.debug.internal.ui.DebugUIMessages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.dialogs.MessageDialog;
-
-/**
- * Plain status collector for actions. Has no result.
- *
- * @since 3.3
- *
- */
-public class ExecuteActionRequest extends DebugCommandRequest {
-
- private ICommandParticipant fParticipant = null;
-
- public ExecuteActionRequest(Object[] elements) {
- super(elements);
- }
-
- public void done() {
- if (fParticipant != null) {
- fParticipant.requestDone(this);
- fParticipant = null;
- }
- final IStatus status = getStatus();
- if (status != null) {
- switch (status.getSeverity()) {
- case IStatus.ERROR:
- DebugUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openError(DebugUIPlugin.getShell(), DebugUIMessages.DebugUITools_Error_1, status.getMessage());
- }
- });
- break;
- case IStatus.WARNING:
- DebugUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openWarning(DebugUIPlugin.getShell(), DebugUIMessages.DebugUITools_Error_1, status.getMessage());
- }
- });
- break;
- case IStatus.INFO:
- DebugUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openInformation(DebugUIPlugin.getShell(), DebugUIMessages.DebugUITools_Error_1, status.getMessage());
- }
- });
- break;
- }
- }
- }
-
- public void setCommandParticipant(ICommandParticipant participant) {
- fParticipant = participant;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ICommandParticipant.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ICommandParticipant.java
deleted file mode 100644
index 635396d..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ICommandParticipant.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.core.IRequest;
-
-/**
- * Adds function to a command on completion.
- *
- * @since 3.3.
- */
-public interface ICommandParticipant {
-
- public void requestDone(IRequest request);
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/IEnabledTarget.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/IEnabledTarget.java
deleted file mode 100644
index cb66423..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/IEnabledTarget.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-/**
- *
- */
-public interface IEnabledTarget {
- public void setEnabled(boolean enabled);
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandAction.java
deleted file mode 100644
index e03affc..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandAction.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.core.commands.IRestartHandler;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.ui.actions.DebugCommandAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * Handler for the
- *
- * @since 3.6
- */
-public class RestartCommandAction extends DebugCommandAction {
-
- protected Class getCommandType() {
- return IRestartHandler.class;
- }
-
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_RESTART);
- }
-
- public String getHelpContextId() {
- return "org.eclipse.debug.ui.restart_action_context"; //$NON-NLS-1$
- }
-
- public ImageDescriptor getHoverImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_RESTART);
- }
-
- public String getId() {
- return "org.eclipse.debug.ui.actions.Restart"; //$NON-NLS-1$
- }
-
- public ImageDescriptor getImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_RESTART);
- }
-
- public String getText() {
- return ActionMessages.RestartCommandAction__text;
- }
-
- public String getToolTipText() {
- return ActionMessages.RestartCommandAction_tooltip;
- }
-
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandActionDelegate.java
deleted file mode 100644
index 961b7cd..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandActionDelegate.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.ui.actions.DebugCommandAction;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-/**
- * Restart action delegate.
- *
- * @since 3.6
- */
-public class RestartCommandActionDelegate implements IWorkbenchWindowActionDelegate, IActionDelegate2 {
-
- private DebugCommandAction fDebugAction = new RestartCommandAction();
-
- public void dispose() {
- fDebugAction.dispose();
- }
-
- public void init(IWorkbenchWindow window) {
- fDebugAction.init(window);
- }
-
- public void run(IAction action) {
- fDebugAction.run();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- // do nothing
- }
-
- public void init(IAction action) {
- fDebugAction.setActionProxy(action);
-
- }
-
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandAction.java
deleted file mode 100644
index f7f28ab..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.core.commands.IResumeHandler;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.ui.actions.DebugCommandAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * Resume action.
- *
- * @since 3.3
- */
-public class ResumeCommandAction extends DebugCommandAction{
-
- public ResumeCommandAction() {
- setActionDefinitionId("org.eclipse.debug.ui.commands.Resume"); //$NON-NLS-1$
- }
-
- public String getText() {
- return ActionMessages.ResumeAction_0;
- }
-
- public String getHelpContextId() {
- return "org.eclipse.debug.ui.resume_action_context"; //$NON-NLS-1$
- }
-
- public String getId() {
- return "org.eclipse.debug.ui.debugview.toolbar.resume"; //$NON-NLS-1$
- }
-
- public String getToolTipText() {
- return ActionMessages.ResumeAction_3;
- }
-
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_RESUME);
- }
-
- public ImageDescriptor getHoverImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_RESUME);
- }
-
- public ImageDescriptor getImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_RESUME);
- }
-
- protected Class getCommandType() {
- return IResumeHandler.class;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandActionDelegate.java
deleted file mode 100644
index 3a770a6..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandActionDelegate.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.ui.actions.DebugCommandAction;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-/**
- * Resume action delegate.
- *
- * @since 3.3
- */
-public class ResumeCommandActionDelegate implements IWorkbenchWindowActionDelegate, IActionDelegate2 {
-
- private DebugCommandAction fDebugAction = new ResumeCommandAction();
-
- public void dispose() {
- fDebugAction.dispose();
- }
-
- public void init(IWorkbenchWindow window) {
- fDebugAction.init(window);
- }
-
- public void run(IAction action) {
- fDebugAction.run();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- // do nothing
- }
-
- public void init(IAction action) {
- fDebugAction.setActionProxy(action);
-
- }
-
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandAction.java
deleted file mode 100644
index f42a2dd..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.core.commands.IStepIntoHandler;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.ui.actions.DebugCommandAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * Step into action
- *
- * @since 3.3
- */
-public class StepIntoCommandAction extends DebugCommandAction {
-
- public StepIntoCommandAction() {
- setActionDefinitionId("org.eclipse.debug.ui.commands.StepInto"); //$NON-NLS-1$
- }
-
- public String getText() {
- return ActionMessages.StepIntoAction_0;
- }
-
- public String getHelpContextId() {
- return "org.eclipse.debug.ui.step_into_action_context"; //$NON-NLS-1$
- }
-
- public String getId() {
- return "org.eclipse.debug.ui.debugview.toolbar.stepInto"; //$NON-NLS-1$
- }
-
- public String getToolTipText() {
- return ActionMessages.StepIntoAction_3;
- }
-
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_STEP_INTO);
- }
-
- public ImageDescriptor getHoverImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_STEP_INTO);
- }
-
- public ImageDescriptor getImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_STEP_INTO);
- }
-
- protected Class getCommandType() {
- return IStepIntoHandler.class;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandActionDelegate.java
deleted file mode 100644
index 0364de6..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandActionDelegate.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.commands.actions;
-
-/**
- * Step into action delegate.
- *
- * @since 3.3
- */
-public class StepIntoCommandActionDelegate extends DebugCommandActionDelegate {
-
- public StepIntoCommandActionDelegate() {
- super();
- setAction(new StepIntoCommandAction());
- }
-
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandAction.java
deleted file mode 100644
index 020e34d..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandAction.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.core.commands.IStepOverHandler;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.ui.actions.DebugCommandAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * Step over action.
- *
- * @since 3.3
- */
-public class StepOverCommandAction extends DebugCommandAction {
-
- public StepOverCommandAction() {
- setActionDefinitionId("org.eclipse.debug.ui.commands.StepOver"); //$NON-NLS-1$
- }
-
- public String getText() {
- return ActionMessages.StepOverAction_0;
- }
-
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_STEP_OVER);
- }
-
- public String getHelpContextId() {
- return "org.eclipse.debug.ui.step_over_action_context"; //$NON-NLS-1$
- }
-
- public ImageDescriptor getHoverImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_STEP_OVER);
- }
-
- public String getId() {
- return "org.eclipse.debug.ui.debugview.toolbar.stepOver"; //$NON-NLS-1$
- }
-
- public ImageDescriptor getImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_STEP_OVER);
- }
-
- public String getToolTipText() {
- return ActionMessages.StepOverAction_3;
- }
-
- protected Class getCommandType() {
- return IStepOverHandler.class;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandActionDelegate.java
deleted file mode 100644
index 71a2040..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandActionDelegate.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.commands.actions;
-
-/**
- * Step over action delegate.
- *
- * @since 3.3
- */
-public class StepOverCommandActionDelegate extends DebugCommandActionDelegate {
-
- public StepOverCommandActionDelegate() {
- super();
- setAction(new StepOverCommandAction());
- }
-
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandAction.java
deleted file mode 100644
index 73aa935..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandAction.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.core.commands.IStepReturnHandler;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.ui.actions.DebugCommandAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * Step return action.
- *
- * @since 3.3
- */
-public class StepReturnCommandAction extends DebugCommandAction {
-
-
- public StepReturnCommandAction() {
- setActionDefinitionId("org.eclipse.debug.ui.commands.StepReturn"); //$NON-NLS-1$
- }
-
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_STEP_RETURN);
- }
-
- public String getHelpContextId() {
- return "org.eclipse.debug.ui.step_return_action_context"; //$NON-NLS-1$
- }
-
- public ImageDescriptor getHoverImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_STEP_RETURN);
- }
-
- public String getId() {
- return "org.eclipse.debug.ui.debugview.toolbar.stepReturn"; //$NON-NLS-1$
- }
-
- public ImageDescriptor getImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_STEP_RETURN);
- }
-
- public String getToolTipText() {
- return ActionMessages.StepReturnAction_2;
- }
-
- public String getText() {
- return ActionMessages.StepReturnAction_3;
- }
-
- protected Class getCommandType() {
- return IStepReturnHandler.class;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandActionDelegate.java
deleted file mode 100644
index 2f78cce..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandActionDelegate.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.commands.actions;
-
-/**
- * Step return action delegate.
- *
- * @since 3.3
- */
-public class StepReturnCommandActionDelegate extends DebugCommandActionDelegate {
-
- public StepReturnCommandActionDelegate() {
- super();
- setAction(new StepReturnCommandAction());
- }
-
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandAction.java
deleted file mode 100644
index f6a47bf..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.core.commands.ISuspendHandler;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.ui.actions.DebugCommandAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * Suspend action.
- *
- * @since 3.3
- */
-public class SuspendCommandAction extends DebugCommandAction {
-
-
- public String getText() {
- return ActionMessages.SuspendAction_0;
- }
-
- public String getHelpContextId() {
- return "org.eclipse.debug.ui.suspend_action_context"; //$NON-NLS-1$
- }
-
- public String getId() {
- return "org.eclipse.debug.ui.debugview.toolbar.suspend"; //$NON-NLS-1$
- }
-
- public String getToolTipText() {
- return ActionMessages.SuspendAction_3;
- }
-
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_SUSPEND);
- }
-
- public ImageDescriptor getHoverImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_SUSPEND);
- }
-
- public ImageDescriptor getImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_SUSPEND);
- }
-
- protected Class getCommandType() {
- return ISuspendHandler.class;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandActionDelegate.java
deleted file mode 100644
index 9747cdc..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandActionDelegate.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.commands.actions;
-
-/**
- * Suspend action delegate.
- *
- * @since 3.3
- */
-public class SuspendCommandActionDelegate extends DebugCommandActionDelegate {
-
- public SuspendCommandActionDelegate() {
- super();
- setAction(new SuspendCommandAction());
- }
-
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAllAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAllAction.java
deleted file mode 100644
index b6f8e6e..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAllAction.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.ILaunchesListener2;
-import org.eclipse.debug.core.commands.ITerminateHandler;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.ui.actions.DebugCommandAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Terminates all launches.
- *
- * @since 3.3
- */
-public class TerminateAllAction extends DebugCommandAction implements ILaunchesListener2 {
-
- protected ISelection getContext() {
- return new StructuredSelection(getLaunchManager().getLaunches());
- }
-
- public void contextActivated(ISelection context, IWorkbenchPart part) {
- // DO NOTHING
- }
-
- public void contextChanged(ISelection context, IWorkbenchPart part) {
- // DO NOTHING
- }
-
- public void dispose() {
- getLaunchManager().removeLaunchListener(this);
- super.dispose();
- }
-
- public void init(IWorkbenchPart part) {
- super.init(part);
- ILaunchManager launchManager = getLaunchManager();
- launchManager.addLaunchListener(this);
- // heuristic... rather than updating all the time, just assume there's
- // something that's not terminated.
- setEnabled(launchManager.getLaunches().length > 0);
- }
-
- private ILaunchManager getLaunchManager() {
- return DebugPlugin.getDefault().getLaunchManager();
- }
-
- public String getHelpContextId() {
- return "org.eclipse.debug.ui.terminate_all_action_context"; //$NON-NLS-1$
- }
-
- public String getId() {
- return "org.eclipse.debug.ui.debugview.popupMenu.terminateAll"; //$NON-NLS-1$
- }
-
- public String getText() {
- return ActionMessages.TerminateAllAction_2;
- }
-
- public String getToolTipText() {
- return ActionMessages.TerminateAllAction_3;
- }
-
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugPluginImages
- .getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_TERMINATE_ALL);
- }
-
- public ImageDescriptor getHoverImageDescriptor() {
- return DebugPluginImages
- .getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_TERMINATE_ALL);
- }
-
- public ImageDescriptor getImageDescriptor() {
- return DebugPluginImages
- .getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_TERMINATE_ALL);
- }
-
- protected Class getCommandType() {
- return ITerminateHandler.class;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchesListener2#launchesTerminated(org.eclipse.debug.core.ILaunch[])
- */
- public void launchesTerminated(ILaunch[] launches) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchesListener#launchesAdded(org.eclipse.debug.core.ILaunch[])
- */
- public void launchesAdded(ILaunch[] launches) {
- setEnabled(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchesListener#launchesChanged(org.eclipse.debug.core.ILaunch[])
- */
- public void launchesChanged(ILaunch[] launches) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchesListener#launchesRemoved(org.eclipse.debug.core.ILaunch[])
- */
- public void launchesRemoved(ILaunch[] launches) {
- setEnabled(getLaunchManager().getLaunches().length > 0);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java
deleted file mode 100644
index 9e3b340..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.IRequest;
-import org.eclipse.debug.core.commands.ITerminateHandler;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.internal.ui.actions.RelaunchActionDelegate;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
-import org.eclipse.debug.ui.actions.DebugCommandAction;
-import org.eclipse.debug.ui.contexts.DebugContextEvent;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-
-/**
- * Action which terminates a launch and then re-launches it.
- */
-public class TerminateAndRelaunchAction extends DebugCommandAction {
-
- public void postExecute(IRequest request, final Object[] targets) {
- if (request.getStatus() == null || request.getStatus().isOK()) {
- DebugUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- // Must be run in the UI thread since the launch can require
- // prompting to proceed
- for (int i = 0; i < targets.length; i++) {
- ILaunch launch = DebugUIPlugin.getLaunch(targets[i]);
- if (launch != null) {
- RelaunchActionDelegate.relaunch(launch.getLaunchConfiguration(), launch.getLaunchMode());
- }
- }
- }
- });
- }
- }
-
-
- protected Class getCommandType() {
- return ITerminateHandler.class;
- }
-
- public void debugContextChanged(DebugContextEvent event) {
- ISelection context = event.getContext();
- if (context instanceof IStructuredSelection) {
- Object[] elements = ((IStructuredSelection)context).toArray();
- for (int i = 0; i < elements.length; i++) {
- if (!canRelaunch(elements[i])) {
- setEnabled(false);
- return;
- }
- }
- }
- super.debugContextChanged(event);
- }
-
- protected boolean canRelaunch(Object element) {
- ILaunch launch = DebugUIPlugin.getLaunch(element);
- if (launch != null) {
- ILaunchConfiguration configuration = launch.getLaunchConfiguration();
- if (configuration != null) {
- return LaunchConfigurationManager.isVisible(configuration);
- }
- }
- return false;
- }
-
- public String getActionDefinitionId() {
- return ActionMessages.TerminateAndRelaunchAction_0;
- }
-
- public String getHelpContextId() {
- return "org.eclipse.debug.ui.terminate_and_relaunch_action_context"; //$NON-NLS-1$
- }
-
- public String getId() {
- return "org.eclipse.debug.ui.debugview.popupMenu.TerminateAndRelaunch"; //$NON-NLS-1$
- }
-
- public String getText() {
- return ActionMessages.TerminateAndRelaunchAction_3;
- }
-
- public String getToolTipText() {
- return ActionMessages.TerminateAndRelaunchAction_4;
- }
-
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_TERMINATE_AND_RELAUNCH);
- }
-
- public ImageDescriptor getHoverImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_TERMINATE_AND_RELAUNCH);
- }
-
- public ImageDescriptor getImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_TERMINATE_AND_RELAUNCH);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRemoveAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRemoveAction.java
deleted file mode 100644
index afcfebc..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRemoveAction.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.IRequest;
-import org.eclipse.debug.core.commands.ITerminateHandler;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.ui.actions.DebugCommandAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * Terminate and remove action.
- *
- * @since 3.3
- */
-public class TerminateAndRemoveAction extends DebugCommandAction {
-
- public String getText() {
- return ActionMessages.TerminateAndRemoveAction_0;
- }
-
- public String getHelpContextId() {
- return "org.eclipse.debug.ui.terminate_and_remove_action_context"; //$NON-NLS-1$
- }
-
- public String getId() {
- return "org.eclipse.debug.ui.debugview.popupMenu.terminateAndRemove"; //$NON-NLS-1$
- }
-
- public String getToolTipText() {
- return ActionMessages.TerminateAndRemoveAction_3;
- }
-
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_TERMINATE_AND_REMOVE);
- }
-
- public ImageDescriptor getHoverImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_TERMINATE_AND_REMOVE);
- }
-
- public ImageDescriptor getImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_TERMINATE_AND_REMOVE);
- }
-
- protected Class getCommandType() {
- return ITerminateHandler.class;
- }
-
- protected void postExecute(IRequest request, Object[] targets) {
- IStatus status = request.getStatus();
- if(status == null || status.isOK()) {
- for (int i = 0; i < targets.length; i++) {
- ILaunch launch = DebugUIPlugin.getLaunch(targets[i]);
- if (launch != null)
- DebugPlugin.getDefault().getLaunchManager().removeLaunch(launch);
- }
- }
- }
-
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandAction.java
deleted file mode 100644
index a8de94b..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.core.commands.ITerminateHandler;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.ui.actions.DebugCommandAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * Terminate action.
- *
- * @since 3.3
- */
-public class TerminateCommandAction extends DebugCommandAction {
-
- public TerminateCommandAction() {
- setActionDefinitionId("org.eclipse.debug.ui.commands.Terminate"); //$NON-NLS-1$
- }
-
- public String getText() {
- return ActionMessages.TerminateAction_0;
- }
-
- public String getHelpContextId() {
- return "org.eclipse.debug.ui.terminate_action_context"; //$NON-NLS-1$
- }
-
- public String getId() {
- return "org.eclipse.debug.ui.debugview.toolbar.terminate"; //$NON-NLS-1$
- }
-
- public String getToolTipText() {
- return ActionMessages.TerminateAction_3;
- }
-
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_TERMINATE);
- }
-
- public ImageDescriptor getHoverImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_LCL_TERMINATE);
- }
-
- public ImageDescriptor getImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_LCL_TERMINATE);
- }
-
- protected Class getCommandType() {
- return ITerminateHandler.class;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandActionDelegate.java
deleted file mode 100644
index a401b22..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandActionDelegate.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.commands.actions;
-
-/**
- * Terminate action delegate.
- *
- * @since 3.3
- */
-public class TerminateCommandActionDelegate extends DebugCommandActionDelegate {
-
- public TerminateCommandActionDelegate() {
- super();
- setAction(new TerminateCommandAction());
- }
-
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersAction.java
deleted file mode 100644
index 845733b..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersAction.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
-import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.commands.IStepFiltersHandler;
-import org.eclipse.debug.internal.core.StepFilterManager;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.actions.DebugCommandAction;
-import org.eclipse.debug.ui.contexts.DebugContextEvent;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-
-/**
- * This class provides the action for toggling step filters on or off for the debug view
- */
-public class ToggleStepFiltersAction extends DebugCommandAction implements IPropertyChangeListener {
-
- private boolean fInitialized = !DebugUITools.isUseStepFilters();
-
- /**
- * @see org.eclipse.debug.internal.ui.commands.actions.DebugCommandAction#getDisabledImageDescriptor()
- */
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_TOGGLE_STEP_FILTERS);
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.commands.actions.DebugCommandAction#getHelpContextId()
- */
- public String getHelpContextId() {
- return "org.eclipse.debug.ui.step_with_filters_action_context"; //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.commands.actions.DebugCommandAction#getHoverImageDescriptor()
- */
- public ImageDescriptor getHoverImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_TOGGLE_STEP_FILTERS);
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.commands.actions.DebugCommandAction#getId()
- */
- public String getId() {
- return "org.eclipse.debug.ui.actions.ToggleStepFilters"; //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.commands.actions.DebugCommandAction#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_TOGGLE_STEP_FILTERS);
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.commands.actions.DebugCommandAction#getText()
- */
- public String getText() {
- return ActionMessages.ToggleStepFiltersAction_1;
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.commands.actions.DebugCommandAction#getToolTipText()
- */
- public String getToolTipText() {
- return ActionMessages.ToggleStepFiltersAction_0;
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.commands.actions.DebugCommandAction#getInitialEnablement()
- */
- protected boolean getInitialEnablement() {
- return true;
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.commands.actions.DebugCommandAction#getCommandType()
- */
- protected Class getCommandType() {
- return IStepFiltersHandler.class;
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.commands.actions.DebugCommandAction#run()
- */
- public void run() {
- // ignore initial call to run from abstract debug view
- // that runs the action to initialize it's state when
- // the workbench persisted the action as "on"
- if (fInitialized) {
- DebugUITools.setUseStepFilters(!DebugUITools.isUseStepFilters());
- } else {
- fInitialized = true;
- }
- }
-
- /**
- * @see org.eclipse.jface.action.Action#getStyle()
- */
- public int getStyle() {
- return AS_CHECK_BOX;
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.commands.actions.DebugCommandAction#debugContextChanged(org.eclipse.debug.ui.contexts.DebugContextEvent)
- */
- public void debugContextChanged(DebugContextEvent event) {
- ISelection context = event.getContext();
- if (context.isEmpty()) {
- setEnabled(true);
- } else {
- super.debugContextChanged(event);
- }
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.commands.actions.DebugCommandAction#init(org.eclipse.ui.IWorkbenchPart)
- */
- public void init(IWorkbenchPart part) {
- super.init(part);
- initState();
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.commands.actions.DebugCommandAction#init(org.eclipse.ui.IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window) {
- super.init(window);
- initState();
- }
-
- /**
- * Initializes the state, by adding this action as a property listener
- */
- protected void initState() {
- DebugPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(this);
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.commands.actions.DebugCommandAction#dispose()
- */
- public void dispose() {
- super.dispose();
- DebugPlugin.getDefault().getPluginPreferences().removePropertyChangeListener(this);
- }
-
- /**
- * @see org.eclipse.core.runtime.Preferences$IPropertyChangeListener#propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(StepFilterManager.PREF_USE_STEP_FILTERS)) {
- boolean checked = DebugUITools.isUseStepFilters();
- setChecked(checked);
- IAction action = getActionProxy();
- if (action != null) {
- action.setChecked(checked);
- }
- }
- }
-
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersCommandActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersCommandActionDelegate.java
deleted file mode 100644
index 1639271..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersCommandActionDelegate.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.action.IAction;
-
-/**
- * Toggle step filters action delegate.
- *
- * @since 3.3
- */
-public class ToggleStepFiltersCommandActionDelegate extends DebugCommandActionDelegate {
-
- /**
- * Constructor
- */
- public ToggleStepFiltersCommandActionDelegate() {
- super();
- setAction(new ToggleStepFiltersAction());
- }
-
- public void init(IAction action) {
- super.init(action);
- action.setChecked(DebugUITools.isUseStepFilters());
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/UpdateActionsRequest.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/UpdateActionsRequest.java
deleted file mode 100644
index 142dbb2..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/UpdateActionsRequest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.core.commands.IEnabledStateRequest;
-import org.eclipse.debug.internal.core.commands.DebugCommandRequest;
-
-/**
- * Boolean collector that collects boolean results from a number of voters.
- * Request is cancelled when one voter votes false.
- *
- * @since 3.3
- *
- */
-public class UpdateActionsRequest extends DebugCommandRequest implements IEnabledStateRequest {
-
- private IEnabledTarget[] fActions;
- private boolean fEnabled = false;
-
- public UpdateActionsRequest(Object[] elements, IEnabledTarget[] actions) {
- super(elements);
- fActions = actions;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.provisional.IBooleanRequestMonitor#setResult(boolean)
- */
- public synchronized void setEnabled(boolean result) {
- fEnabled = result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IProgressMonitor#done()
- */
- public synchronized void done() {
- if (!isCanceled()) {
- for (int i = 0; i < fActions.length; i++) {
- fActions[i].setEnabled(fEnabled);
- }
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/UpdateHandlerRequest.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/UpdateHandlerRequest.java
deleted file mode 100644
index a0069ca..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/UpdateHandlerRequest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.core.commands.IEnabledStateRequest;
-import org.eclipse.debug.internal.core.commands.DebugCommandRequest;
-
-/**
- * Collects whether a handler is enabled for a set of elements and
- * reports its vote to an action updater collecting results from
- * other handlers.
- *
- * @since 3.3
- *
- */
-public class UpdateHandlerRequest extends DebugCommandRequest implements IEnabledStateRequest {
-
- private boolean fEnabled = false;
- private ActionsUpdater fUpdater;
-
- public UpdateHandlerRequest(Object[] elements, ActionsUpdater updater) {
- super(elements);
- fUpdater = updater;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.provisional.IBooleanRequestMonitor#setResult(boolean)
- */
- public synchronized void setEnabled(boolean result) {
- fEnabled = result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IProgressMonitor#done()
- */
- public synchronized void done() {
- fUpdater.setEnabled(fEnabled);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextMessages.java
deleted file mode 100644
index 68f4838..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextMessages.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.contextlaunching;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * NLS'd messages for context launching artifacts
- * @since 3.3
- * CONTEXTLAUNCHING
- */
-public class ContextMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.debug.internal.ui.contextlaunching.ContextMessages"; //$NON-NLS-1$
- public static String ContextRunner_0;
- public static String ContextRunner_1;
- public static String ContextRunner_13;
- public static String ContextRunner_14;
- public static String ContextRunner_15;
- public static String ContextRunner_2;
- public static String ContextRunner_3;
- public static String ContextRunner_7;
- public static String LaunchingResourceManager_0;
- public static String LaunchingResourceManager_1;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, ContextMessages.class);
- }
-
- private ContextMessages() {
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextMessages.properties
deleted file mode 100644
index ad1b9f9..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextMessages.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-ContextRunner_0=Unable To Launch
-ContextRunner_7=The selection cannot be launched, and there are no recent launches.
-ContextRunner_2=The selection does not support {0} mode.
-ContextRunner_3=Launch configuration ''{0}'' does not support {1} mode.
-ContextRunner_13=The resource ''{0}'' is not accessible for launching
-ContextRunner_14=As...
-ContextRunner_15=...
-ContextRunner_1={0} Not Supported
-
-#The possible values for {0} are the names of the launch configurations in the current workspace
-LaunchingResourceManager_0={0} (already running)
-#The possible values for {0} are the names of launch shortcuts such as "Java Application" or "Java Applet"
-LaunchingResourceManager_1=As {0}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextRunner.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextRunner.java
deleted file mode 100644
index 820f6bd..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextRunner.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Daniel Friederich (freescale) - Bug 293210 - Context launch launches shared launch configuration twice.
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.contextlaunching;
-
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchMode;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationSelectionDialog;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutSelectionDialog;
-import org.eclipse.debug.internal.ui.stringsubstitution.SelectedResourceManager;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.ILaunchGroup;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.ui.IEditorPart;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * Static runner for context launching to provide the base capability of context
- * launching to more than one form of action (drop down, toolbar, view, etc)
- *
- * @see org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction
- * @see org.eclipse.debug.ui.actions.LaunchShortcutsAction
- * @see org.eclipse.debug.ui.actions.ContextualLaunchAction
- *
- * @since 3.3
- * CONTEXTLAUNCHING
- */
-public final class ContextRunner {
-
- /**
- * The singleton instance of the context runner
- */
- private static ContextRunner fgInstance = null;
-
- /**
- * Returns the singleton instance of <code>ContextRunner</code>
- * @return the singleton instance of <code>ContextRunner</code>
- */
- public static ContextRunner getDefault() {
- if(fgInstance == null) {
- fgInstance = new ContextRunner();
- }
- return fgInstance;
- }
-
- /**
- * The one instance of <code>LaunchingResourceManager</code> we need
- * @since 3.4
- */
- private LaunchingResourceManager fLRM = DebugUIPlugin.getDefault().getLaunchingResourceManager();
-
- /**
- * Performs the context launching given the object context and the mode to launch in.
- * @param group
- */
- public void launch(ILaunchGroup group) {
- IStructuredSelection selection = SelectedResourceManager.getDefault().getCurrentSelection();
- IResource resource = SelectedResourceManager.getDefault().getSelectedResource();
- selectAndLaunch(resource, group, selection);
- }
-
-
-
- /**
- * This method launches the last configuration that was launched, if any.
- * @param group the launch group to launch with
- * @return true if there was a last launch and it was launched, false otherwise
- */
- protected boolean launchLast(ILaunchGroup group) {
- ILaunchConfiguration config = null;
- if(group != null) {
- config = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getFilteredLastLaunch(group.getIdentifier());
- if(config != null) {
- launch(config, group.getMode());
- return true;
- }
- }
- return false;
- }
-
- /**
- * Prompts the user to select a way of launching the current resource, where a 'way'
- * is defined as a launch shortcut.
- *
- * @param resource
- * @param group
- */
- protected void selectAndLaunch(IResource resource, ILaunchGroup group, IStructuredSelection selection) {
- if(group != null) {
- LaunchConfigurationManager lcm = DebugUIPlugin.getDefault().getLaunchConfigurationManager();
- String mode = group.getMode();
- List shortcuts = fLRM.getShortcutsForSelection(selection, mode);
- // allow the shortcut to translate/provide the resource for the launch
- IResource overrideResource = fLRM.getLaunchableResource(shortcuts, selection);
- if(overrideResource != null) {
- resource = overrideResource;
- }
- shortcuts = fLRM.pruneShortcuts(shortcuts, resource, mode);
- //see if the context is a shared configuration
- ILaunchConfiguration config = lcm.isSharedConfig(resource);
- if(config != null) {
- launch(config, mode);
- return;
- }
- //get the configurations from the resource and participants
- List configs = fLRM.getParticipatingLaunchConfigurations(selection, resource, shortcuts, mode);
- int csize = configs.size();
- if(csize == 1) {
- launch((ILaunchConfiguration) configs.get(0), mode);
- }
- else if(csize < 1) {
- int esize = shortcuts.size();
- if(esize == 1) {
- launchShortcut(selection, (LaunchShortcutExtension) shortcuts.get(0), mode);
- }
- else if(esize > 1) {
- showShortcutSelectionDialog(resource, shortcuts, mode, selection);
- }
- else if(esize < 1) {
- if(DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_LAUNCH_LAST_IF_NOT_LAUNCHABLE)) {
- if(!launchLast(group)) {
- MessageDialog.openInformation(DebugUIPlugin.getShell(), ContextMessages.ContextRunner_0, ContextMessages.ContextRunner_7);
- }
- }
- else if (shortcuts.size() > 0) {
- // there are shortcuts, but not applicable to the selected mode
- ILaunchMode launchMode = DebugPlugin.getDefault().getLaunchManager().getLaunchMode(mode);
- if (launchMode == null) {
- DebugUIPlugin.logErrorMessage("Unsupported launch mode: " + mode); //$NON-NLS-1$
- } else {
- String label = launchMode.getLabel();
- String modeLabel = DebugUIPlugin.removeAccelerators(label);
- MessageDialog.openInformation(DebugUIPlugin.getShell(),
- MessageFormat.format(ContextMessages.ContextRunner_1, new String[]{modeLabel}),
- MessageFormat.format(ContextMessages.ContextRunner_2, new String[]{modeLabel.toLowerCase()}));
- }
- } else {
- if(resource != null) {
- IProject project = resource.getProject();
- if(project != null && !project.equals(resource)) {
- selectAndLaunch(project, group, new StructuredSelection(project));
- }
- else {
- String msg = ContextMessages.ContextRunner_7;
- if(!resource.isAccessible()) {
- msg = MessageFormat.format(ContextMessages.ContextRunner_13, new String[] {resource.getName()});
- }
- MessageDialog.openInformation(DebugUIPlugin.getShell(), ContextMessages.ContextRunner_0, msg);
- }
- }
- else {
- if (!launchLast(group)) {
- MessageDialog.openInformation(DebugUIPlugin.getShell(), ContextMessages.ContextRunner_0, ContextMessages.ContextRunner_7);
- }
- }
- }
- }
- }
- else if(csize > 1){
- config = lcm.getMRUConfiguration(configs, group, resource);
- if(config != null) {
- launch(config, mode);
- } else {
- showConfigurationSelectionDialog(configs, mode);
- }
- }
- }
- }
-
- /**
- * Validates the given launch mode and launches.
- *
- * @param configuration configuration to launch
- * @param mode launch mode identifier
- */
- private void launch(ILaunchConfiguration configuration, String mode) {
- if (validateMode(configuration, mode)) {
- DebugUITools.launch(configuration, mode);
- }
- }
-
- /**
- * Delegate method that calls the appropriate launch method on a <code>LaunchShortcutExtension</code> given
- * the current resource and selection context
- * @param selection the current selection
- * @param shortcut the shortcut that wants to launch
- * @param mode the mode to launch in
- *
- * @since 3.4
- */
- private void launchShortcut(IStructuredSelection selection, LaunchShortcutExtension shortcut, String mode) {
- Object o = selection.getFirstElement();
- if(o instanceof IEditorPart) {
- shortcut.launch((IEditorPart) o, mode);
- }
- else {
- shortcut.launch(selection, mode);
- }
- }
-
- /**
- * Validates the given launch mode is supported, and returns whether to continue with
- * the launch.
- *
- * @param configuration launch configuration
- * @param mode launch mode
- * @return whether the mode is supported
- */
- private boolean validateMode(ILaunchConfiguration configuration, String mode) {
- try {
- // if this is a multi-mode launch, allow the launch dialog to be opened
- // to resolve a valid mode, if needed.
- if (configuration.getModes().isEmpty()) {
- if (!configuration.supportsMode(mode)) {
- ILaunchMode launchMode = DebugPlugin.getDefault().getLaunchManager().getLaunchMode(mode);
- if (launchMode == null) {
- DebugUIPlugin.logErrorMessage("Unsupported launch mode: " + mode); //$NON-NLS-1$
- } else {
- String label = launchMode.getLabel();
- String modeLabel = DebugUIPlugin.removeAccelerators(label);
- MessageDialog.openInformation(DebugUIPlugin.getShell(), MessageFormat.format(ContextMessages.ContextRunner_1, new String[]{modeLabel}),
- MessageFormat.format(ContextMessages.ContextRunner_3, new String[]{configuration.getName(), modeLabel.toLowerCase()}));
- }
- return false;
- }
- }
- } catch (CoreException e) {
- DebugUIPlugin.log(e.getStatus());
- return false;
- }
- return true;
- }
-
- /**
- * Presents the user with a dialog to pick the launch configuration to launch
- * and launches that configuration.
- *
- * @param configurations the listing of applicable configurations to present
- * @param mode the mode
- */
- protected void showConfigurationSelectionDialog(List configurations, String mode) {
- LaunchConfigurationSelectionDialog lsd = new LaunchConfigurationSelectionDialog(DebugUIPlugin.getShell(), configurations);
- if(lsd.open() == IDialogConstants.OK_ID) {
- ILaunchConfiguration config = (ILaunchConfiguration) lsd.getResult()[0];
- launch(config, mode);
- }
- }
-
- /**
- * Presents a selection dialog to the user to pick a launch shortcut and
- * launch using that shortcut.
- *
- * @param resource the resource context
- * @param mode the mode
- */
- protected void showShortcutSelectionDialog(IResource resource, List shortcuts, String mode, IStructuredSelection selection) {
- LaunchShortcutSelectionDialog dialog = new LaunchShortcutSelectionDialog(shortcuts, resource, mode);
- if (dialog.open() == Window.OK) {
- Object[] result = dialog.getResult();
- if(result.length > 0) {
- LaunchShortcutExtension method = (LaunchShortcutExtension) result[0];
- if(method != null) {
- launchShortcut(selection, method, mode);
- }
- }
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java
deleted file mode 100644
index ffa1840..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java
+++ /dev/null
@@ -1,699 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.contextlaunching;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Set;
-
-import org.eclipse.core.expressions.EvaluationContext;
-import org.eclipse.core.expressions.IEvaluationContext;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchesListener2;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.ILaunchHistoryChangedListener;
-import org.eclipse.debug.internal.ui.ILaunchLabelChangedListener;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension;
-import org.eclipse.debug.internal.ui.stringsubstitution.SelectedResourceManager;
-import org.eclipse.debug.ui.ILaunchGroup;
-import org.eclipse.jface.action.CoolBarManager;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.ToolBarContributionItem;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseTrackAdapter;
-import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.IWindowListener;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.activities.WorkbenchActivityHelper;
-import org.eclipse.ui.internal.WorkbenchWindow;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * This manager is used to calculate the labels for the current resource or for the current
- * state of the launch history, depending on the enabled status of contextual launching. More specifically
- * if contextual launching is enabled the calculated labels are for the current resource, otherwise
- * the calculated labels are for the current state of the launch history.
- *
- * Any actions interested in being notified of launch label updates need to register with this manager, and implement
- * the <code>ILaunchLabelChangedListener</code> interface.
- *
- * @see ILaunchLabelChangedListener
- * @see org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction
- *
- * @since 3.3
- */
-public class LaunchingResourceManager implements IPropertyChangeListener, IWindowListener, ISelectionListener, ILaunchHistoryChangedListener, ILaunchesListener2 {
-
- /**
- *The set of label update listeners
- */
- private ListenerList fLabelListeners = new ListenerList();
-
- /**
- * The map of ToolBars that have mouse tracker listeners associated with them:
- * stored as Map<IWorkbenchWindow, ToolBar>
- */
- private HashMap fToolbars = new HashMap();
-
- /**
- * the map of current labels
- */
- private HashMap fCurrentLabels = new HashMap();
-
- /**
- * The selection has changed and we need to update the labels
- */
- private boolean fUpdateLabel = true;
-
- /**
- * Set of windows that have been opened and that we have registered selection listeners with
- */
- private HashSet fWindows = new HashSet();
-
- /**
- * Cache of IResource -> ILaunchConfiguration[] used during a tooltip update job.
- * The cache is cleared after each tooltip update job is complete.
- */
- private HashMap fConfigCache = new HashMap();
-
- /**
- * Cache of IResource -> LaunchShortcutExtension used during a tooltip update job.
- * The cache is cleared after each tooltip update job is complete.
- */
- private HashMap fExtCache = new HashMap();
-
- /**
- * Constant denoting the empty string;
- */
- private static final String EMPTY_STRING = IInternalDebugCoreConstants.EMPTY_STRING;
-
- /**
- * Provides a mouse tracker listener for the launching main toolbar
- */
- private MouseTrackAdapter fMouseListener = new MouseTrackAdapter() {
- public void mouseEnter(MouseEvent e) {
- if(fUpdateLabel) {
- fUpdateLabel = false;
- fCurrentLabels.clear();
- Job job = new Job("Compute launch button tooltip") { //$NON-NLS-1$
- protected IStatus run(IProgressMonitor monitor) {
- computeLabels();
- fConfigCache.clear();
- fExtCache.clear();
- return Status.OK_STATUS;
- }
- };
- job.setSystem(true);
- job.schedule();
- }
- }
- };
-
- /**
- * Returns if context launching is enabled
- * @return if context launching is enabled
- */
- public static boolean isContextLaunchEnabled() {
- return DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_USE_CONTEXTUAL_LAUNCH);
- }
-
- /**
- * Allows an <code>AbstractLaunchHistoryAction</code> to register with this manager to be notified
- * of a context (<code>IResource</code>) change and have its updateToolTip(..) method called back to.
- * @param action the action to add
- * @param group the launch group
- * @return true if the <code>AbstractLaunchHistoryAction</code> was added as a listener, false otherwise
- */
- public void addLaunchLabelUpdateListener(ILaunchLabelChangedListener listener) {
- fLabelListeners.add(listener);
- }
-
- /**
- * Removes the specified <code>AbstractLaunchHistoryAction</code> from the listing of registered
- * listeners
- * @param action the action to remove
- * @param group the launch group
- * @return true if the action was removed from the listing of <code>AbstractLaunchHistoryAction</code> listeners,
- * false otherwise
- */
- public void removeLaunchLabelChangedListener(ILaunchLabelChangedListener listener) {
- fLabelListeners.remove(listener);
- }
-
- /**
- * Returns the current resource label to be displayed.
- *
- * @param group the launch group to get the label for
- * @return the current resource label;
- */
- public String getLaunchLabel(ILaunchGroup group) {
- return (String) fCurrentLabels.get(group);
- }
-
- /**
- * Returns if the parent project should be checked automatically
- * @return true if the parent project should checked automatically, false otherwise
- */
- protected boolean shouldCheckParent() {
- return DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_LAUNCH_PARENT_PROJECT);
- }
-
- /**
- * Returns if the the last launch configuration should be launched if the selected resource is not launchable and context launching is enabled
- * @return true if the last launched should be launched, false otherwise
- */
- protected boolean shouldLaunchLast() {
- return DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_LAUNCH_LAST_IF_NOT_LAUNCHABLE);
- }
-
- /**
- * Computes the current listing of labels for the given <code>IResource</code> context change or the
- * current launch history changed event
- */
- protected void computeLabels() {
- ILaunchGroup group = null;
- ILaunchConfiguration config = null;
- String label = null;
- Object[] listeners = fLabelListeners.getListeners();
- SelectedResourceManager srm = SelectedResourceManager.getDefault();
- IStructuredSelection selection = srm.getCurrentSelection();
- List shortcuts = null;
- IResource resource = srm.getSelectedResource();
- for(int i = 0; i < listeners.length; i++) {
- group = ((ILaunchLabelChangedListener)listeners[i]).getLaunchGroup();
- if(group != null) {
- if(isContextLaunchEnabled() && !group.getIdentifier().equals("org.eclipse.ui.externaltools.launchGroup")) { //$NON-NLS-1$
- shortcuts = getShortcutsForSelection(selection, group.getMode());
- if(resource == null) {
- resource = getLaunchableResource(shortcuts, selection);
- }
- label = getLabel(selection, resource, shortcuts, group);
- }
- else {
- config = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getFilteredLastLaunch(group.getIdentifier());
- if(config != null) {
- label = appendLaunched(config);
- }
- }
- fCurrentLabels.put(group, label);
- label = null;
- }
- }
- notifyLabelChanged();
- }
-
- /**
- * Notifies all registered listeners that the known labels have changed
- */
- protected void notifyLabelChanged() {
- Object[] listeners = fLabelListeners.getListeners();
- for(int i = 0; i < listeners.length; i++) {
- ((ILaunchLabelChangedListener)listeners[i]).labelChanged();
- }
- }
-
- /**
- * Appends the text '(already running)' to the tooltip label if there is a launch currently
- * running (not terminated) with the same backing launch configuration as the one specified
- * @param config
- * @return the appended string for the tooltip label or the configuration name (default)
- */
- private String appendLaunched(ILaunchConfiguration config) {
- ILaunch[] launches = DebugPlugin.getDefault().getLaunchManager().getLaunches();
- boolean launched = false;
- ILaunchConfiguration tmp = null;
- for(int i = 0; i < launches.length; i++) {
- tmp = launches[i].getLaunchConfiguration();
- if(tmp != null) {
- if(!launches[i].isTerminated() && tmp.equals(config)) {
- launched = true;
- break;
- }
- }
- }
- if(launched) {
- return MessageFormat.format(ContextMessages.LaunchingResourceManager_0, new String[] {config.getName()});
- }
- return config.getName();
- }
-
- /**
- * Returns the label for the last launched configuration or and empty string if there was no last launch.
- * @param group
- * @return the name of the last launched configuration, altered with '(running)' if needed, or the empty
- * string if there is no last launch.
- */
- protected String getlastLaunchedLabel(ILaunchGroup group) {
- ILaunchConfiguration config = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getFilteredLastLaunch(group.getIdentifier());
- if(config != null) {
- return appendLaunched(config);
- }
- return EMPTY_STRING;
- }
-
- /**
- * Returns the label for the specified resource or the empty string, never <code>null</code>
- * @param resource
- * @param group
- * @return the label for the resource or the empty string, never <code>null</code>
- */
- protected String getLabel(IStructuredSelection selection, IResource resource, List shortcuts, ILaunchGroup group) {
- List sc = pruneShortcuts(shortcuts, resource, group.getMode());
- LaunchConfigurationManager lcm = DebugUIPlugin.getDefault().getLaunchConfigurationManager();
- //see if the context is a shared configuration
- ILaunchConfiguration config = lcm.isSharedConfig(resource);
- if(config != null) {
- return appendLaunched(config);
- }
- //TODO cache the results ?
- List configs = getParticipatingLaunchConfigurations(selection, resource, sc, group.getMode());
- int csize = configs.size();
- if(csize == 1) {
- return appendLaunched((ILaunchConfiguration)configs.get(0));
- }
- else if(csize > 1) {
- config = lcm.getMRUConfiguration(configs, group, resource);
- if(config != null) {
- return appendLaunched(config);
- }
- else {
- return ContextMessages.ContextRunner_14;
- }
- }
- else {
- List exts = (List) fExtCache.get(resource);
- if(exts == null && resource != null) {
- fExtCache.put(resource, sc);
- }
- int esize = sc.size();
- if(esize == 0) {
- if(resource != null && shouldCheckParent()) {
- IProject project = resource.getProject();
- if(project != null && !project.equals(resource)) {
- return getLabel(selection, project, sc, group);
- }
- }
- else if(shouldLaunchLast() || resource == null) {
- return getlastLaunchedLabel(group);
- }
- else {
- return ContextMessages.ContextRunner_15;
- }
- }
- if(esize == 1) {
- if(resource != null) {
- return resource.getName();
- }
- else {
- return MessageFormat.format(ContextMessages.LaunchingResourceManager_1, new String[] {((LaunchShortcutExtension) sc.get(0)).getLabel()});
- }
- }
- else {
- return ContextMessages.ContextRunner_14;
- }
- }
- }
-
- /**
- * Prunes the original listing of shortcuts
- * @param shortcuts the original listing of <code>LaunchShortcutExtension</code>s
- * @param resource the derived resource
- *
- * @since 3.4
- */
- protected List pruneShortcuts(List shortcuts, IResource resource, String mode) {
- List list = new ArrayList(shortcuts);
- if(resource == null) {
- LaunchShortcutExtension ext = null;
- for(ListIterator iter = list.listIterator(); iter.hasNext();) {
- ext = (LaunchShortcutExtension) iter.next();
- if(!ext.isParticipant()) {
- iter.remove();
- }
- }
- }
- else {
- list = getShortcutsForSelection(new StructuredSelection(resource), mode);
- }
- return list;
- }
-
- /**
- * Computes the current resources context, given all of the launch shortcut participants
- * and the current selection
- * @param shortcuts
- * @param selection
- * @return The set of resources who care about this launch
- *
- * @since 3.4
- */
- public IResource getLaunchableResource(List shortcuts, IStructuredSelection selection) {
- if(selection != null && !selection.isEmpty()) {
- ArrayList resources = new ArrayList();
- IResource resource = null;
- Object o = selection.getFirstElement();
- LaunchShortcutExtension ext = null;
- for(Iterator iter = shortcuts.iterator(); iter.hasNext();) {
- ext = (LaunchShortcutExtension) iter.next();
- if(o instanceof IEditorPart) {
- resource = ext.getLaunchableResource((IEditorPart) o);
- }
- else {
- resource = ext.getLaunchableResource(selection);
- }
- if(resource != null && !resources.contains(resource)) {
- resources.add(resource);
- resource = null;
- }
- }
- if(resources.size() > 0) {
- return (IResource) resources.get(0);
- }
- }
- return null;
- }
-
- /**
- * Returns the launch shortcuts that apply to the current <code>IStructuredSelection</code>
- * @param selection the current selection
- * @param mode the mode
- * @return the list of shortcuts that apply to the given selection and mode or an empty listing, never <code>null</code>
- *
- * @since 3.4
- */
- public List getShortcutsForSelection(IStructuredSelection selection, String mode) {
- ArrayList list = new ArrayList();
- List sc = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchShortcuts();
- List ctxt = new ArrayList();
- // work around to bug in Structured Selection that returns actual underlying array in selection
- // @see bug 211646
- ctxt.addAll(selection.toList());
- Object o = selection.getFirstElement();
- if(o instanceof IEditorPart) {
- ctxt.set(0, ((IEditorPart)o).getEditorInput());
- }
- IEvaluationContext context = new EvaluationContext(null, ctxt);
- context.addVariable("selection", ctxt); //$NON-NLS-1$
- LaunchShortcutExtension ext = null;
- for(Iterator iter = sc.iterator(); iter.hasNext();) {
- ext = (LaunchShortcutExtension) iter.next();
- try {
- if(ext.evalEnablementExpression(context, ext.getContextualLaunchEnablementExpression()) &&
- ext.getModes().contains(mode) && !WorkbenchActivityHelper.filterItem(ext)) {
- if(!list.contains(ext)) {
- list.add(ext);
- }
- }
- }
- catch(CoreException ce) {}
- }
- return list;
- }
-
- /**
- * Returns a listing of all launch configurations that want to participate in the contextual
- * launch of the specified resource or specified selection
- * @param resource the underlying resource
- * @param selection the current selection in the workbench
- * @param shortcuts the listing of shortcut extensions that apply to the current context
- * @param mode the mode
- * @return a listing of all launch configurations wanting to participate in the current launching
- *
- * @since 3.4
- */
- public List getParticipatingLaunchConfigurations(IStructuredSelection selection, IResource resource, List shortcuts, String mode) {
- HashSet configs = new HashSet();
- boolean useDefault = false;
- if(selection != null) {
- Object o = selection.getFirstElement();
- LaunchShortcutExtension ext = null;
- ILaunchConfiguration[] cfgs = null;
- //TODO this falls victim to contributors code performance
- for(int i = 0; i < shortcuts.size(); i++) {
- ext = (LaunchShortcutExtension) shortcuts.get(i);
- if(o instanceof IEditorPart) {
- cfgs = ext.getLaunchConfigurations((IEditorPart)o);
- }
- else {
- cfgs = ext.getLaunchConfigurations(selection);
- }
- if (cfgs == null) {
- Set types = ext.getAssociatedConfigurationTypes();
- addAllToList(configs, DebugUIPlugin.getDefault().getLaunchConfigurationManager().getApplicableLaunchConfigurations((String[]) types.toArray(new String[types.size()]), resource));
- useDefault = true;
- } else if(cfgs.length > 0) {
- for(int j = 0; j < cfgs.length; j++) {
- configs.add(cfgs[j]);
- }
- useDefault = false;
- }
- }
- }
- if (useDefault) {
- // consider default configurations if the shortcuts did not contribute any
- addAllToList(configs, DebugUIPlugin.getDefault().getLaunchConfigurationManager().getApplicableLaunchConfigurations(null, resource));
- }
- Iterator iterator = configs.iterator();
- while (iterator.hasNext()) {
- ILaunchConfiguration config = (ILaunchConfiguration) iterator.next();
- try {
- Set modes = config.getModes();
- modes.add(mode);
- if (!config.getType().supportsModeCombination(modes)) {
- iterator.remove();
- }
- }
- catch (CoreException e) {}
- }
- return new ArrayList(configs);
- }
-
- /**
- * Adds all of the items in the given object array to the given collection.
- * Does nothing if either the collection or array is <code>null</code>.
- * @param list
- * @param values
- */
- private void addAllToList(Collection list, Object[] values) {
- if(list == null || values == null) {
- return;
- }
- for(int i = 0; i < values.length; i++) {
- list.add(values[i]);
- }
- }
-
- /**
- * Starts up the manager
- */
- public void startup() {
- IWorkbench workbench = PlatformUI.getWorkbench();
- if(workbench != null) {
- workbench.addWindowListener(this);
- // initialize for already open windows
- IWorkbenchWindow[] workbenchWindows = workbench.getWorkbenchWindows();
- for (int i = 0; i < workbenchWindows.length; i++) {
- windowOpened(workbenchWindows[i]);
- }
- }
- DebugUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
- DebugUIPlugin.getDefault().getLaunchConfigurationManager().addLaunchHistoryListener(this);
- DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
- }
-
- /**
- * Shutdown and clean up the manager
- */
- public void shutdown() {
- IWorkbench workbench = PlatformUI.getWorkbench();
- if(workbench != null) {
- workbench.removeWindowListener(this);
- }
- DebugUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
- DebugUIPlugin.getDefault().getLaunchConfigurationManager().removeLaunchHistoryListener(this);
- DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this);
- for(Iterator iter = fWindows.iterator(); iter.hasNext();) {
- ((IWorkbenchWindow)iter.next()).getSelectionService().removeSelectionListener(this);
- }
- IWorkbenchWindow window = null;
- // set fUpdateLabel to false so that mouse track listener will do nothing if called
- // before the asynchronous execution disposes them
- fUpdateLabel = false;
- for(Iterator iter = fToolbars.keySet().iterator(); iter.hasNext();) {
- window = (IWorkbenchWindow) iter.next();
- final ToolBar bar = (ToolBar) fToolbars.get(window);
- if(bar != null && !bar.isDisposed()) {
- final MouseTrackAdapter listener = fMouseListener;
- DebugUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- bar.removeMouseTrackListener(listener);
- }
- });
-
- }
- }
- fWindows.clear();
- fToolbars.clear();
- fLabelListeners.clear();
- fCurrentLabels.clear();
- }
-
- /**
- * @see org.eclipse.ui.IWindowListener#windowActivated(org.eclipse.ui.IWorkbenchWindow)
- */
- public void windowActivated(IWorkbenchWindow window) {
- if(!fToolbars.containsKey(window)) {
- addMouseListener(window);
- }
- }
-
- /**
- * @see org.eclipse.ui.IWindowListener#windowClosed(org.eclipse.ui.IWorkbenchWindow)
- */
- public void windowClosed(IWorkbenchWindow window) {
- ToolBar bar = (ToolBar) fToolbars.remove(window);
- if(bar != null && !bar.isDisposed()) {
- bar.removeMouseTrackListener(fMouseListener);
- }
- if(fWindows.remove(window)) {
- window.getSelectionService().removeSelectionListener(this);
- }
- }
-
- /**
- * @see org.eclipse.ui.IWindowListener#windowDeactivated(org.eclipse.ui.IWorkbenchWindow)
- */
- public void windowDeactivated(IWorkbenchWindow window) {}
-
- /**
- * @see org.eclipse.ui.IWindowListener#windowOpened(org.eclipse.ui.IWorkbenchWindow)
- */
- public void windowOpened(IWorkbenchWindow window) {
- if(fWindows.add(window)) {
- window.getSelectionService().addSelectionListener(this);
- }
- }
-
- /**
- * Adds a mouse listener to the launch toolbar
- *
- * @param window
- */
- private void addMouseListener(IWorkbenchWindow window) {
- CoolBarManager cmgr = ((WorkbenchWindow)window).getCoolBarManager();
- if(cmgr != null) {
- IContributionItem item = cmgr.find("org.eclipse.debug.ui.launchActionSet"); //$NON-NLS-1$
- if(item instanceof ToolBarContributionItem) {
- ToolBarManager tmgr = (ToolBarManager) ((ToolBarContributionItem)item).getToolBarManager();
- ToolBar bar = tmgr.getControl();
- if(bar != null && !bar.isDisposed()) {
- bar.addMouseTrackListener(fMouseListener);
- fToolbars.put(window, bar);
- }
- }
- }
- }
-
- /**
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if(event.getProperty().equals(IInternalDebugUIConstants.PREF_USE_CONTEXTUAL_LAUNCH) ||
- event.getProperty().equals(IInternalDebugUIConstants.PREF_LAUNCH_LAST_IF_NOT_LAUNCHABLE)) {
- if(isContextLaunchEnabled()) {
- windowActivated(DebugUIPlugin.getActiveWorkbenchWindow());
- }
- fUpdateLabel = true;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- if(isContextLaunchEnabled()) {
- fUpdateLabel = true;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.ILaunchHistoryChangedListener#launchHistoryChanged()
- */
- public void launchHistoryChanged() {
- //this always must be set to true, because as the history is loaded these events are fired, and we need to
- //update on workspace load.
- fUpdateLabel = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchesListener2#launchesTerminated(org.eclipse.debug.core.ILaunch[])
- */
- public void launchesTerminated(ILaunch[] launches) {
- fUpdateLabel = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchesListener#launchesAdded(org.eclipse.debug.core.ILaunch[])
- */
- public void launchesAdded(ILaunch[] launches) {
- fUpdateLabel = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchesListener#launchesChanged(org.eclipse.debug.core.ILaunch[])
- */
- public void launchesChanged(ILaunch[] launches) {}
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchesListener#launchesRemoved(org.eclipse.debug.core.ILaunch[])
- */
- public void launchesRemoved(ILaunch[] launches) {
- //we want to ensure that even if a launch is removed from the debug view
- //when it is not terminated we update the label just in case.
- //bug 195232
- for(int i = 0; i < launches.length; i++) {
- if(!launches[i].isTerminated()) {
- fUpdateLabel = true;
- return;
- }
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextManager.java
deleted file mode 100644
index 7ebc01b..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextManager.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.contexts;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.internal.ui.views.ViewContextManager;
-import org.eclipse.debug.ui.contexts.IDebugContextListener;
-import org.eclipse.debug.ui.contexts.IDebugContextManager;
-import org.eclipse.debug.ui.contexts.IDebugContextService;
-import org.eclipse.ui.IWindowListener;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * @since 3.2
- */
-public class DebugContextManager implements IDebugContextManager {
-
- private static DebugContextManager fgDefault;
- private Map fServices = new HashMap();
- private ListenerList fGlobalListeners = new ListenerList();
-
- private class WindowListener implements IWindowListener {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWindowListener#windowActivated(org.eclipse.ui.IWorkbenchWindow)
- */
- public void windowActivated(IWorkbenchWindow window) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWindowListener#windowDeactivated(org.eclipse.ui.IWorkbenchWindow)
- */
- public void windowDeactivated(IWorkbenchWindow window) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWindowListener#windowClosed(org.eclipse.ui.IWorkbenchWindow)
- */
- public void windowClosed(final IWorkbenchWindow window) {
- // Use an async exec to dispose the debug context service for the
- // closed window. This will allow other window closed listeners
- // to still use the context service before it is disposed.
- new UIJob(window.getShell().getDisplay(), "DebugContextManager windowClosed() handler") { //$NON-NLS-1$
- {
- setSystem(true);
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor) {
- DebugWindowContextService service = (DebugWindowContextService) fServices.remove(window);
- if (service != null) {
- service.dispose();
- }
- return Status.OK_STATUS;
- }
- }.schedule();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWindowListener#windowOpened(org.eclipse.ui.IWorkbenchWindow)
- */
- public void windowOpened(IWorkbenchWindow window) {
- }
-
- }
-
- private DebugContextManager() {
- PlatformUI.getWorkbench().addWindowListener(new WindowListener());
- }
-
- public static IDebugContextManager getDefault() {
- if (fgDefault == null) {
- fgDefault = new DebugContextManager();
- // create the model context bindigg manager at the same time
- DebugModelContextBindingManager.getDefault();
- // create view manager
- ViewContextManager.getDefault();
- }
- return fgDefault;
- }
-
- protected DebugWindowContextService createService(IWorkbenchWindow window) {
- DebugWindowContextService service = (DebugWindowContextService) fServices.get(window);
- if (service == null) {
- service = new DebugWindowContextService(window);
- fServices.put(window, service);
- // register global listeners
- Object[] listeners = fGlobalListeners.getListeners();
- for (int i = 0; i < listeners.length; i++) {
- IDebugContextListener listener = (IDebugContextListener) listeners[i];
- service.addDebugContextListener(listener);
- }
- }
- return service;
- }
-
- protected IDebugContextService getService(IWorkbenchWindow window) {
- return (DebugWindowContextService) fServices.get(window);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.contexts.IDebugContextManager#addDebugContextListener(org.eclipse.debug.internal.ui.contexts.IDebugContextListener)
- */
- public void addDebugContextListener(IDebugContextListener listener) {
- fGlobalListeners.add(listener);
- DebugWindowContextService[] services = getServices();
- for (int i = 0; i < services.length; i++) {
- DebugWindowContextService service = services[i];
- service.addDebugContextListener(listener);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.contexts.IDebugContextManager#removeDebugContextListener(org.eclipse.debug.internal.ui.contexts.IDebugContextListener)
- */
- public void removeDebugContextListener(IDebugContextListener listener) {
- fGlobalListeners.remove(listener);
- DebugWindowContextService[] services = getServices();
- for (int i = 0; i < services.length; i++) {
- DebugWindowContextService service = services[i];
- service.removeDebugContextListener(listener);
- }
- }
-
- /**
- * Returns the existing context services.
- *
- * @return existing context services
- */
- private DebugWindowContextService[] getServices() {
- Collection sevices = fServices.values();
- return (DebugWindowContextService[]) sevices.toArray(new DebugWindowContextService[sevices.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.contexts.provisional.IDebugContextManager#getContextService(org.eclipse.ui.IWorkbenchWindow)
- */
- public IDebugContextService getContextService(IWorkbenchWindow window) {
- return createService(window);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextSourceProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextSourceProvider.java
deleted file mode 100644
index 847f241..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextSourceProvider.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.contexts;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.contexts.DebugContextEvent;
-import org.eclipse.debug.ui.contexts.IDebugContextListener;
-import org.eclipse.debug.ui.contexts.IDebugContextService;
-import org.eclipse.ui.AbstractSourceProvider;
-import org.eclipse.ui.ISources;
-import org.eclipse.ui.services.IEvaluationService;
-
-/**
- * A source provider for the active debug context variable.
- *
- * @since 3.5
- */
-public class DebugContextSourceProvider extends AbstractSourceProvider implements IDebugContextListener {
-
- /**
- * The names of the sources supported by this source provider.
- */
- private static final String[] PROVIDED_SOURCE_NAMES = new String[] { IDebugUIConstants.DEBUG_CONTEXT_SOURCE_NAME };
-
- private final IDebugContextService fDebugContextService;
-
- private final IEvaluationService fEvaluationService;
-
- /**
- * Creates the source provider. It registers it as a listener to the
- * given debug context service, and as a provider with the given
- * evaluation service.
- */
- public DebugContextSourceProvider(IDebugContextService debugContextService, IEvaluationService evaluationService) {
- fDebugContextService = debugContextService;
- fDebugContextService.addDebugContextListener(this);
- fEvaluationService = evaluationService;
- fEvaluationService.addSourceProvider(this);
- }
-
- public void debugContextChanged(DebugContextEvent event) {
- Map values = new HashMap(1);
- values.put(IDebugUIConstants.DEBUG_CONTEXT_SOURCE_NAME, event.getContext());
- fireSourceChanged(ISources.ACTIVE_CURRENT_SELECTION, values);
- }
-
- public void dispose() {
- fDebugContextService.removeDebugContextListener(this);
- fEvaluationService.removeSourceProvider(this);
- }
-
- public String[] getProvidedSourceNames() {
- return PROVIDED_SOURCE_NAMES;
- }
-
- public Map getCurrentState() {
- Map currentState = new HashMap(1);
- currentState.put(IDebugUIConstants.DEBUG_CONTEXT_SOURCE_NAME, fDebugContextService.getActiveContext());
- return currentState;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java
deleted file mode 100644
index 07932fa..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java
+++ /dev/null
@@ -1,453 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Pawel Piech - Bug 154598: DebugModelContextBindingManager does not use IAdaptable.getAdapter() to retrieve IDebugModelProvider adapter
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.contexts;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.commands.common.NotDefinedException;
-import org.eclipse.core.commands.contexts.Context;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchesListener2;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IDebugModelProvider;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.contexts.DebugContextEvent;
-import org.eclipse.debug.ui.contexts.IDebugContextListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.activities.ActivityManagerEvent;
-import org.eclipse.ui.activities.IActivity;
-import org.eclipse.ui.activities.IActivityManager;
-import org.eclipse.ui.activities.IActivityManagerListener;
-import org.eclipse.ui.activities.IActivityPatternBinding;
-import org.eclipse.ui.activities.IWorkbenchActivitySupport;
-import org.eclipse.ui.contexts.IContextActivation;
-import org.eclipse.ui.contexts.IContextService;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * Manages <code>debugModelContextBindings</code> extensions.
- * <p>
- * As debug contexts are activated, associated <code>org.eclipse.ui.contexts</code>
- * are activated. When a debug session (launch) terminates, the associated contexts
- * are disabled. Debug model activation also triggers assocaited activities.
- * </p>
- * @since 3.2
- */
-public class DebugModelContextBindingManager implements IDebugContextListener, ILaunchesListener2, IActivityManagerListener {
-
- /**
- * Map of debug model identifier to associated contexts as defined
- * by <code>debugModelContextBindings</code> extensions.
- */
- private Map fModelToContextIds = new HashMap();
-
- /**
- * Map of launch objects to enabled model ids
- */
- private Map fLaunchToModelIds = new HashMap();
-
- /**
- * Map of launch objects to context activations
- */
- private Map fLanuchToContextActivations = new HashMap();
-
- /**
- * A list of activity pattern bindings for debug models.
- */
- private List fModelPatternBindings = new ArrayList();
-
- /**
- * Map of debug model ids to assocaited activity ids.
- */
- private Map fModelToActivities = new HashMap();
-
- /**
- * A set of debug model ids for which activities have been enabled.
- * Cleared when enabled activities change.
- */
- private Set fModelsEnabledForActivities = new HashSet();
-
- // extension point
- public static final String ID_DEBUG_MODEL_CONTEXT_BINDINGS= "debugModelContextBindings"; //$NON-NLS-1$
-
- // extension point attributes
- public static final String ATTR_CONTEXT_ID= "contextId"; //$NON-NLS-1$
- public static final String ATTR_DEBUG_MODEL_ID= "debugModelId"; //$NON-NLS-1$
-
- // base debug context
- public static final String DEBUG_CONTEXT= "org.eclipse.debug.ui.debugging"; //$NON-NLS-1$
-
- // suffix for debug activities triggered by debug model context binding activation
- private static final String DEBUG_MODEL_ACTIVITY_SUFFIX = "/debugModel"; //$NON-NLS-1$
-
- // singleton manager
- private static DebugModelContextBindingManager fgManager;
-
- private static IContextService fgContextService = (IContextService) PlatformUI.getWorkbench().getAdapter(IContextService.class);
-
- public static DebugModelContextBindingManager getDefault() {
- if (fgManager == null) {
- fgManager = new DebugModelContextBindingManager();
- }
- return fgManager;
- }
-
- private DebugModelContextBindingManager() {
- loadDebugModelContextBindings();
- loadDebugModelActivityExtensions();
- DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
- DebugUITools.getDebugContextManager().addDebugContextListener(this);
- IWorkbenchActivitySupport activitySupport = PlatformUI.getWorkbench().getActivitySupport();
- activitySupport.getActivityManager().addActivityManagerListener(this);
- }
-
- /**
- * Loads the extensions which map debug model identifiers
- * to context ids.
- */
- private void loadDebugModelContextBindings() {
- IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), ID_DEBUG_MODEL_CONTEXT_BINDINGS);
- IConfigurationElement[] configurationElements = extensionPoint.getConfigurationElements();
- for (int i = 0; i < configurationElements.length; i++) {
- IConfigurationElement element = configurationElements[i];
- String modelIdentifier = element.getAttribute(ATTR_DEBUG_MODEL_ID);
- String contextId = element.getAttribute(ATTR_CONTEXT_ID);
- if (modelIdentifier != null && contextId != null) {
- List contextIds = (List) fModelToContextIds.get(modelIdentifier);
- if (contextIds == null) {
- contextIds = new ArrayList();
- fModelToContextIds.put(modelIdentifier, contextIds);
- }
- contextIds.add(contextId);
- }
- }
- }
-
- /**
- * Loads the extensions which map debug model patterns
- * to activity ids. This information is used to activate the
- * appropriate activities when a debug element is selected.
- */
- private void loadDebugModelActivityExtensions() {
- IActivityManager activityManager = PlatformUI.getWorkbench().getActivitySupport().getActivityManager();
- Set activityIds = activityManager.getDefinedActivityIds();
- Iterator activityIterator = activityIds.iterator();
- while (activityIterator.hasNext()) {
- String activityId= (String) activityIterator.next();
- IActivity activity = activityManager.getActivity(activityId);
- if (activity != null) {
- Set patternBindings = activity.getActivityPatternBindings();
- Iterator patternIterator= patternBindings.iterator();
- while (patternIterator.hasNext()) {
- IActivityPatternBinding patternBinding= (IActivityPatternBinding) patternIterator.next();
- String pattern = patternBinding.getPattern().pattern();
- if (pattern.endsWith(DEBUG_MODEL_ACTIVITY_SUFFIX)) {
- fModelPatternBindings.add(patternBinding);
- }
- }
- }
- }
- }
-
- public void debugContextChanged(DebugContextEvent event) {
- if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0) {
- ISelection selection = event.getContext();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection) selection;
- Iterator iterator = ss.iterator();
- while (iterator.hasNext()) {
- activated(iterator.next());
- }
- }
- }
- }
-
- /**
- * The specified object has been activated. Activate contexts and activities as
- * required for the object.
- *
- * @param object object that has been activated
- */
- private void activated(Object object) {
- String[] modelIds = getDebugModelIds(object);
- if (modelIds == null) {
- return;
- }
- ILaunch launch = getLaunch(object);
- if (launch == null) {
- return;
- }
- Set alreadyEnabled = (Set) fLaunchToModelIds.get(launch);
- if (alreadyEnabled == null) {
- alreadyEnabled = new HashSet();
- fLaunchToModelIds.put(launch, alreadyEnabled);
- }
- for (int i = 0; i < modelIds.length; i++) {
- String id = modelIds[i];
- if (!alreadyEnabled.contains(id)) {
- alreadyEnabled.add(id);
- activateModel(id, launch);
- }
- }
- enableActivitiesFor(modelIds);
- }
-
- /**
- * Activates the given model identifier for the specified launch. This activates
- * associated contexts and all parent contexts for the model.
- *
- * @param modelId model to be enabled
- * @param launch the launch the model is being enabled for
- */
- private void activateModel(String modelId, ILaunch launch) {
- List contextIds = (List) fModelToContextIds.get(modelId);
- if (contextIds == null) {
- // if there are no contexts for a model, the base debug context should
- // be activated (i.e. a debug model with no org.eclipse.ui.contexts and
- // associated org.eclipse.debug.ui.modelContextBindings)
- contextIds = new ArrayList();
- contextIds.add(DEBUG_CONTEXT);
- fModelToContextIds.put(modelId, contextIds);
- }
- Iterator iterator = contextIds.iterator();
- while (iterator.hasNext()) {
- activateContext((String) iterator.next(), launch);
- }
- }
-
- /**
- * Activates the given context and all its parent contexts.
- *
- * @param contextId
- * @param launch
- */
- private void activateContext(String contextId, ILaunch launch) {
- while (contextId != null) {
- Context context = fgContextService.getContext(contextId);
- IContextActivation activation = fgContextService.activateContext(contextId);
- addActivation(launch, activation);
- try {
- if (contextId.equals(DEBUG_CONTEXT)) {
- // don't enable windows contexts and higher
- break;
- }
- contextId = context.getParentId();
- } catch (NotDefinedException e) {
- contextId = null;
- DebugUIPlugin.log(e);
- }
- }
- }
-
- /**
- * Notes the activation for a context and launch so we can de-activate later.
- *
- * @param launch
- * @param activation
- */
- private void addActivation(ILaunch launch, IContextActivation activation) {
- List activations = (List) fLanuchToContextActivations.get(launch);
- if (activations == null) {
- activations = new ArrayList();
- fLanuchToContextActivations.put(launch, activations);
- }
- activations.add(activation);
- }
-
- /**
- * Returns the debug model identifiers associated with the given object or <code>null</code>
- * if none.
- *
- * @param object
- * @return debug model identifiers associated with the given object or <code>null</code>
- */
- private String[] getDebugModelIds(Object object) {
- if (object instanceof IAdaptable) {
- IDebugModelProvider modelProvider= (IDebugModelProvider)((IAdaptable)object).getAdapter(IDebugModelProvider.class);
- if (modelProvider != null) {
- String[] modelIds= modelProvider.getModelIdentifiers();
- if (modelIds != null) {
- return modelIds;
- }
- }
- }
- if (object instanceof IStackFrame) {
- return new String[] { ((IStackFrame) object).getModelIdentifier() };
- }
- return null;
- }
-
- /**
- * Returns the ILaunch associated with the given object or
- * <code>null</code> if none.
- *
- * @param object object for which launch is required
- * @return the ILaunch associated with the given object or <code>null</code>
- */
- public static ILaunch getLaunch(Object object) {
- ILaunch launch = null;
- if (object instanceof IAdaptable) {
- launch = (ILaunch) ((IAdaptable)object).getAdapter(ILaunch.class);
- }
- if (launch == null && object instanceof IDebugElement) {
- launch = ((IDebugElement) object).getLaunch();
- }
- return launch;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchesListener2#launchesTerminated(org.eclipse.debug.core.ILaunch[])
- */
- public void launchesTerminated(ILaunch[] launches) {
- // disable activated contexts
- for (int i = 0; i < launches.length; i++) {
- ILaunch launch = launches[i];
- final List activations = (List) fLanuchToContextActivations.remove(launch);
- fLaunchToModelIds.remove(launch);
- if (activations != null) {
- UIJob job = new UIJob("Deactivate debug contexts") { //$NON-NLS-1$
- public IStatus runInUIThread(IProgressMonitor monitor) {
- Iterator iterator = activations.iterator();
- while (iterator.hasNext()) {
- IContextActivation activation = (IContextActivation) iterator.next();
- activation.getContextService().deactivateContext(activation);
- }
- return Status.OK_STATUS;
- }
- };
- job.setSystem(true);
- job.schedule();
- }
-
- }
- // TODO: Terminated notification
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchesListener#launchesRemoved(org.eclipse.debug.core.ILaunch[])
- */
- public void launchesRemoved(ILaunch[] launches) {}
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchesListener#launchesAdded(org.eclipse.debug.core.ILaunch[])
- */
- public void launchesAdded(ILaunch[] launches) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchesListener#launchesChanged(org.eclipse.debug.core.ILaunch[])
- */
- public void launchesChanged(ILaunch[] launches) {
- }
-
- /**
- * Returns the workbench contexts associated with a debug context
- *
- * @param target debug context
- * @return associated workbench contexts
- */
- public List getWorkbenchContextsForDebugContext(Object target) {
- List workbenchContexts = new ArrayList();
- String[] modelIds = getDebugModelIds(target);
- if (modelIds != null) {
- for (int i = 0; i < modelIds.length; i++) {
- String modelId = modelIds[i];
- List contextIds = (List) fModelToContextIds.get(modelId);
- if (contextIds != null) {
- Iterator contextIterator = contextIds.iterator();
- while (contextIterator.hasNext()) {
- String contextId = (String) contextIterator.next();
- if (!workbenchContexts.contains(contextId)) {
- workbenchContexts.add(contextId);
- }
- }
- }
- }
- }
- return workbenchContexts;
- }
-
- /**
- * Enables activities in the workbench associated with the given debug
- * model ids that have been activated.
- *
- * @param debug model ids for which to enable activities
- */
- private void enableActivitiesFor(String[] modelIds) {
- Set activities = null;
- for (int i = 0; i < modelIds.length; i++) {
- String id = modelIds[i];
- if (!fModelsEnabledForActivities.contains(id)) {
- Set ids= (Set) fModelToActivities.get(id);
- if (ids == null) {
- // first time the model has been seen, perform pattern matching
- ids = new HashSet();
- fModelToActivities.put(id, ids);
- Iterator bindings = fModelPatternBindings.iterator();
- while (bindings.hasNext()) {
- IActivityPatternBinding binding = (IActivityPatternBinding) bindings.next();
- String regex = binding.getPattern().pattern();
- regex = regex.substring(0, regex.length() - DEBUG_MODEL_ACTIVITY_SUFFIX.length());
- if (Pattern.matches(regex, id)) {
- ids.add(binding.getActivityId());
- }
- }
- }
- if (!ids.isEmpty()) {
- if (activities == null) {
- activities = new HashSet();
- }
- activities.addAll(ids);
- }
- fModelsEnabledForActivities.add(id);
- }
- }
- if (activities != null) {
- IWorkbenchActivitySupport activitySupport = PlatformUI.getWorkbench().getActivitySupport();
- Set enabledActivityIds = activitySupport.getActivityManager().getEnabledActivityIds();
- if (!enabledActivityIds.containsAll(activities)) {
- enabledActivityIds = new HashSet(enabledActivityIds);
- enabledActivityIds.addAll(activities);
- activitySupport.setEnabledActivityIds(activities);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.activities.IActivityManagerListener#activityManagerChanged(org.eclipse.ui.activities.ActivityManagerEvent)
- */
- public void activityManagerChanged(ActivityManagerEvent activityManagerEvent) {
- if (activityManagerEvent.haveEnabledActivityIdsChanged()) {
- fModelsEnabledForActivities.clear();
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java
deleted file mode 100644
index 596c2bc..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java
+++ /dev/null
@@ -1,329 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Wind River - Pawel Piech - added an evaluation context source provider (bug 229219)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.contexts;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.contexts.DebugContextEvent;
-import org.eclipse.debug.ui.contexts.IDebugContextListener;
-import org.eclipse.debug.ui.contexts.IDebugContextProvider;
-import org.eclipse.debug.ui.contexts.IDebugContextService;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.ui.IPartListener2;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchPartReference;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.services.IEvaluationService;
-
-/**
- * Context service for a specific window.
- *
- * @since 3.2
- */
-public class DebugWindowContextService implements IDebugContextService, IPartListener2, IDebugContextListener {
-
- private Map fListenersByPartId = new HashMap();
- private Map fProvidersByPartId = new HashMap();
- private Map fPostListenersByPartId = new HashMap();
-
- private IWorkbenchWindow fWindow;
- private List fProviders = new ArrayList();
-
- private DebugContextSourceProvider fSourceProvider;
-
- public DebugWindowContextService(IWorkbenchWindow window) {
- fWindow = window;
- fWindow.getPartService().addPartListener(this);
-
- IEvaluationService evaluationService = (IEvaluationService)window.getService(IEvaluationService.class);
- fSourceProvider = new DebugContextSourceProvider(this, evaluationService);
- }
-
- public void dispose() {
- fSourceProvider.dispose();
- fWindow.getPartService().removePartListener(this);
- fWindow = null;
- }
-
- public synchronized void addDebugContextProvider(IDebugContextProvider provider) {
- IWorkbenchPart part = provider.getPart();
- String id = null;
- if (part != null) {
- id = part.getSite().getId();
- }
- fProvidersByPartId.put(id, provider);
- fProviders.add(provider);
- IWorkbenchPart active = null;
- IWorkbenchPage activePage = fWindow.getActivePage();
- if (activePage != null) {
- active = activePage.getActivePart();
- }
- if (fProviders.size() == 1 && (part == null || part.equals(active))) {
- notify(provider);
- }
- provider.addDebugContextListener(this);
- }
-
- public synchronized void removeDebugContextProvider(IDebugContextProvider provider) {
- int index = fProviders.indexOf(provider);
- if (index >= 0) {
- IWorkbenchPart part = provider.getPart();
- String id = null;
- if (part != null) {
- id = part.getSite().getId();
- }
- fProvidersByPartId.remove(id);
- fProviders.remove(index);
- if (index == 0) {
- IDebugContextProvider activeProvider = getActiveProvider();
- if (activeProvider != null) {
- notify(activeProvider);
- } else {
- notify(new DebugContextEvent(provider, new StructuredSelection(), DebugContextEvent.ACTIVATED));
- }
- }
- }
- provider.removeDebugContextListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.contexts.IDebugContextService#addDebugContextListener(org.eclipse.debug.ui.contexts.IDebugContextListener)
- */
- public void addDebugContextListener(IDebugContextListener listener) {
- addDebugContextListener(listener, null);
- }
-
- public void addPostDebugContextListener(IDebugContextListener listener, String partId) {
- ListenerList list = (ListenerList) fPostListenersByPartId.get(partId);
- if (list == null) {
- list = new ListenerList();
- fPostListenersByPartId.put(partId, list);
- }
- list.add(listener);
- }
-
- public void addPostDebugContextListener(IDebugContextListener listener) {
- addPostDebugContextListener(listener, null);
- }
-
- public void removePostDebugContextListener(IDebugContextListener listener, String partId) {
- ListenerList list = (ListenerList) fPostListenersByPartId.get(partId);
- if (list != null) {
- list.remove(listener);
- }
- }
-
- public void removePostDebugContextListener(IDebugContextListener listener) {
- removePostDebugContextListener(listener, null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.contexts.IDebugContextService#removeDebugContextListener(org.eclipse.debug.ui.contexts.IDebugContextListener)
- */
- public void removeDebugContextListener(IDebugContextListener listener) {
- removeDebugContextListener(listener, null);
- }
-
- /**
- * Notifies listeners of the context in the specified provider.
- *
- * @param provdier context provider
- */
- protected void notify(IDebugContextProvider provdier) {
- ISelection activeContext = provdier.getActiveContext();
- if (activeContext == null) {
- activeContext = new StructuredSelection();
- }
- notify(new DebugContextEvent(provdier, activeContext, DebugContextEvent.ACTIVATED));
- }
-
- protected void notify(DebugContextEvent event) {
- notify(event, getListeners(null));
- IWorkbenchPart part = event.getDebugContextProvider().getPart();
- if (part != null) {
- notify(event, getListeners(part));
- }
- notify(event, getPostListeners(null));
- if (part != null) {
- notify(event, getPostListeners(part));
- }
- }
-
- protected void notify(final DebugContextEvent event, ListenerList list) {
- if (list != null) {
- Object[] listeners = list.getListeners();
- for (int i = 0; i < listeners.length; i++) {
- final IDebugContextListener listener = (IDebugContextListener) listeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void run() throws Exception {
- listener.debugContextChanged(event);
- }
- public void handleException(Throwable exception) {
- DebugUIPlugin.log(exception);
- }
- });
- }
- }
- }
-
- protected ListenerList getListeners(IWorkbenchPart part) {
- String id = null;
- if (part != null) {
- id = part.getSite().getId();
- }
- return (ListenerList) fListenersByPartId.get(id);
- }
-
- protected ListenerList getPostListeners(IWorkbenchPart part) {
- String id = null;
- if (part != null) {
- id = part.getSite().getId();
- }
- return (ListenerList) fPostListenersByPartId.get(id);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.contexts.IDebugContextService#addDebugContextListener(org.eclipse.debug.ui.contexts.IDebugContextListener, java.lang.String)
- */
- public synchronized void addDebugContextListener(IDebugContextListener listener, String partId) {
- ListenerList list = (ListenerList) fListenersByPartId.get(partId);
- if (list == null) {
- list = new ListenerList();
- fListenersByPartId.put(partId, list);
- }
- list.add(listener);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.contexts.IDebugContextService#removeDebugContextListener(org.eclipse.debug.ui.contexts.IDebugContextListener, java.lang.String)
- */
- public void removeDebugContextListener(IDebugContextListener listener, String partId) {
- ListenerList list = (ListenerList) fListenersByPartId.get(partId);
- if (list != null) {
- list.remove(listener);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.contexts.IDebugContextService#getActiveContext(java.lang.String)
- */
- public ISelection getActiveContext(String partId) {
- IDebugContextProvider provider = (IDebugContextProvider) fProvidersByPartId.get(partId);
- if (provider != null) {
- return provider.getActiveContext();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.contexts.IDebugContextService#getActiveContext()
- */
- public ISelection getActiveContext() {
- IDebugContextProvider activeProvider = getActiveProvider();
- if (activeProvider != null) {
- return activeProvider.getActiveContext();
- }
- return null;
- }
-
- /**
- * Returns the active provider or <code>null</code>
- *
- * @return active provider or <code>null</code>
- */
- protected IDebugContextProvider getActiveProvider() {
- if (!fProviders.isEmpty()) {
- return (IDebugContextProvider)fProviders.get(0);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partActivated(org.eclipse.ui.IWorkbenchPartReference)
- */
- public void partActivated(IWorkbenchPartReference partRef) {
- IDebugContextProvider provider = (IDebugContextProvider) fProvidersByPartId.get(partRef.getId());
- if (provider != null) {
- int index = fProviders.indexOf(provider);
- if (index > 0) {
- fProviders.remove(index);
- fProviders.add(0, provider);
- notify(provider);
- }
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partBroughtToTop(org.eclipse.ui.IWorkbenchPartReference)
- */
- public void partBroughtToTop(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partClosed(org.eclipse.ui.IWorkbenchPartReference)
- */
- public synchronized void partClosed(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partDeactivated(org.eclipse.ui.IWorkbenchPartReference)
- */
- public void partDeactivated(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partOpened(org.eclipse.ui.IWorkbenchPartReference)
- */
- public void partOpened(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partHidden(org.eclipse.ui.IWorkbenchPartReference)
- */
- public void partHidden(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partVisible(org.eclipse.ui.IWorkbenchPartReference)
- */
- public void partVisible(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener2#partInputChanged(org.eclipse.ui.IWorkbenchPartReference)
- */
- public void partInputChanged(IWorkbenchPartReference partRef) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.contexts.provisional.IDebugContextEventListener#contextEvent(org.eclipse.debug.internal.ui.contexts.provisional.DebugContextEvent)
- */
- public void debugContextChanged(DebugContextEvent event) {
- if (!fProviders.isEmpty()) {
- IDebugContextProvider provider = (IDebugContextProvider) fProviders.get(0);
- if (provider == event.getDebugContextProvider()) {
- notify(event);
- }
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/LaunchSuspendTrigger.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/LaunchSuspendTrigger.java
deleted file mode 100644
index 08dd151..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/LaunchSuspendTrigger.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.contexts;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IDebugEventSetListener;
-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.IThread;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.contexts.ISuspendTrigger;
-import org.eclipse.debug.ui.contexts.ISuspendTriggerListener;
-
-/**
- * @since 3.2
- */
-public class LaunchSuspendTrigger implements ISuspendTrigger, IDebugEventSetListener {
-
- private ListenerList fListeners = new ListenerList();
- private SuspendTriggerAdapterFactory fFactory = null;
- private ILaunch fLaunch = null;
-
- public LaunchSuspendTrigger(ILaunch launch, SuspendTriggerAdapterFactory factory) {
- fFactory = factory;
- fLaunch = launch;
- DebugPlugin.getDefault().addDebugEventListener(this);
- }
-
- public ILaunch getLaunch() {
- return fLaunch;
- }
-
- protected void dispose() {
- DebugPlugin.getDefault().removeDebugEventListener(this);
- fListeners = null;
- fFactory.dispose(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.contexts.ISuspendTrigger#addSuspendTriggerListener(org.eclipse.debug.ui.contexts.ISuspendTriggerListener)
- */
- public void addSuspendTriggerListener(ISuspendTriggerListener listener) {
- if (fListeners != null) {
- fListeners.add(listener);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.contexts.ISuspendTrigger#removeSuspendTriggerListener(org.eclipse.debug.ui.contexts.ISuspendTriggerListener)
- */
- public void removeSuspendTriggerListener(ISuspendTriggerListener listener) {
- if (fListeners != null) {
- fListeners.remove(listener);
- }
- if (fListeners.size() == 0) {
- dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent[])
- */
- public void handleDebugEvents(DebugEvent[] events) {
- // open the debugger if this is a suspend event and the debug view is not yet open
- // and the preferences are set to switch
- for (int i = 0; i < events.length; i++) {
- DebugEvent event = events[i];
- if (event.getKind() == DebugEvent.SUSPEND && !event.isEvaluation() && event.getDetail() != DebugEvent.STEP_END) {
-// Don't switch perspective for evaluations or stepping
- Object source = event.getSource();
- if (source instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) source;
- ILaunch launch = (ILaunch) adaptable.getAdapter(ILaunch.class);
- if (fLaunch.equals(launch)) {
- // only notify for this launch
- notifySuspend(event);
- }
- }
-
- }
- }
- }
-
- /**
- * @param event
- */
- private void notifySuspend(DebugEvent event) {
- Object source = event.getSource();
- if (source instanceof IDebugElement) {
- final ILaunch launch = ((IDebugElement)source).getLaunch();
- Object context = null;
- if (source instanceof IThread) {
- try {
- context = ((IThread)source).getTopStackFrame();
- } catch (DebugException e) {
- }
- } else if (source instanceof IDebugTarget) {
- context = source;
- }
- final Object temp = context;
- ListenerList list = fListeners;
- if (list != null) {
- Object[] listeners = list.getListeners();
- for (int i = 0; i < listeners.length; i++) {
- final ISuspendTriggerListener listener = (ISuspendTriggerListener) listeners[i];
- SafeRunner.run(new ISafeRunnable() {
- public void run() throws Exception {
- listener.suspended(launch, temp);
- }
-
- public void handleException(Throwable exception) {
- DebugUIPlugin.log(exception);
- }
-
- });
- }
- }
-
- }
-
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/SuspendTriggerAdapterFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/SuspendTriggerAdapterFactory.java
deleted file mode 100644
index 27c0268..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/SuspendTriggerAdapterFactory.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.contexts;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.ui.contexts.ISuspendTrigger;
-
-/**
- * @since 3.2
- */
-public class SuspendTriggerAdapterFactory implements IAdapterFactory {
-
- private Map fSuspendTriggers = new HashMap();
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public synchronized Object getAdapter(Object adaptableObject, Class adapterType) {
- if (adapterType.equals(ISuspendTrigger.class)) {
- if (adaptableObject instanceof ILaunch) {
- Object trigger = fSuspendTriggers.get(adaptableObject);
- if (trigger == null) {
- trigger = new LaunchSuspendTrigger((ILaunch) adaptableObject, this);
- fSuspendTriggers.put(adaptableObject, trigger);
- }
- return trigger;
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList() {
- return new Class[]{ISuspendTrigger.class};
- }
-
- public synchronized void dispose(LaunchSuspendTrigger trigger) {
- fSuspendTriggers.remove(trigger.getLaunch());
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/AsynchronousDebugLabelAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/AsynchronousDebugLabelAdapter.java
deleted file mode 100644
index 7f84fba..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/AsynchronousDebugLabelAdapter.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.elements.adapters;
-
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
-import org.eclipse.debug.internal.ui.LazyModelPresentation;
-import org.eclipse.debug.internal.ui.viewers.PartPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.provisional.AsynchronousLabelAdapter;
-import org.eclipse.debug.internal.ui.viewers.provisional.ILabelRequestMonitor;
-import org.eclipse.debug.internal.ui.views.launch.DebugElementHelper;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IDebugView;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * Asynchronous label adapter for debug elements.
- *
- * @since 3.2
- */
-public class AsynchronousDebugLabelAdapter extends AsynchronousLabelAdapter {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.viewers.AsynchronousLabelAdapter#computeLabels(java.lang.Object, org.eclipse.debug.ui.viewers.IPresentationContext, org.eclipse.debug.ui.viewers.ILabelRequestMonitor)
- */
- protected void computeLabels(Object element, IPresentationContext context, ILabelRequestMonitor monitor) {
- DelegatingModelPresentation presentation = DebugElementHelper.getPresentation();
- // Honor view specific settings in a debug view by copying model presentation settings
- // into the debug element helper's presentation before we get the label. This allows
- // for qualified name and type name settings to remain in tact.
- if (context instanceof PartPresentationContext) {
- PartPresentationContext ppc = (PartPresentationContext) context;
- if (element instanceof IDebugElement && ppc.getPart() instanceof IDebugView) {
- IWorkbenchPart part = ppc.getPart();
- if (part instanceof IDebugView) {
- IDebugModelPresentation pres = ((IDebugView)part).getPresentation(((IDebugElement)element).getModelIdentifier());
- Map settings = null;
- synchronized (presentation) {
- if (pres instanceof DelegatingModelPresentation) {
- settings = ((DelegatingModelPresentation)pres).getAttributes();
- } else if (pres instanceof LazyModelPresentation) {
- settings = ((LazyModelPresentation)pres).getAttributes();
- }
- if (settings != null) {
- Iterator iterator = settings.entrySet().iterator();
- while (iterator.hasNext()) {
- Map.Entry entry = (Entry) iterator.next();
- presentation.setAttribute((String) entry.getKey(), entry.getValue());
- }
- super.computeLabels(element, context, monitor);
- return;
- }
- }
- }
- }
- }
- super.computeLabels(element, context, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.viewers.AsynchronousLabelAdapter#getLabels(java.lang.Object, org.eclipse.debug.ui.viewers.IPresentationContext)
- */
- protected String[] getLabels(Object element, IPresentationContext context) throws CoreException {
- return new String[] {DebugElementHelper.getLabel(element)};
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.viewers.AsynchronousLabelAdapter#getImageDescriptors(java.lang.Object, org.eclipse.debug.ui.viewers.IPresentationContext)
- */
- protected ImageDescriptor[] getImageDescriptors(Object element, IPresentationContext context) throws CoreException {
- return new ImageDescriptor[] {DebugElementHelper.getImageDescriptor(element)};
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.viewers.AsynchronousLabelAdapter#getFontDatas(java.lang.Object, org.eclipse.debug.ui.viewers.IPresentationContext)
- */
- protected FontData[] getFontDatas(Object element, IPresentationContext context) throws CoreException {
- FontData[] datas = new FontData[getNumElements(context)];
- Arrays.fill(datas, DebugElementHelper.getFont(element));
- return datas;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.viewers.AsynchronousLabelAdapter#getForegrounds(java.lang.Object, org.eclipse.debug.ui.viewers.IPresentationContext)
- */
- protected RGB[] getForegrounds(Object element, IPresentationContext context) throws CoreException {
- RGB[] rgbs = new RGB[getNumElements(context)];
- Arrays.fill(rgbs, DebugElementHelper.getForeground(element));
- return rgbs;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.viewers.AsynchronousLabelAdapter#getBackgrounds(java.lang.Object, org.eclipse.debug.ui.viewers.IPresentationContext)
- */
- protected RGB[] getBackgrounds(Object element, IPresentationContext context) throws CoreException {
- RGB[] rgbs = new RGB[getNumElements(context)];
- Arrays.fill(rgbs, DebugElementHelper.getBackground(element));
- return rgbs;
- }
-
- /**
- * Returns the number of columns in the given presentation context, or 1
- * if there are no columns.
- *
- * @param context presentation context
- * @return number of columns or 1 if none
- */
- protected int getNumElements(IPresentationContext context) {
- String[] columns = context.getColumns();
- if (columns == null) {
- return 1;
- }
- return columns.length;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultVariableCellModifier.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultVariableCellModifier.java
deleted file mode 100644
index 346efdc..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultVariableCellModifier.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.elements.adapters;
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IVariable;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.DefaultLabelProvider;
-import org.eclipse.debug.internal.ui.actions.variables.details.DetailPaneAssignValueAction;
-import org.eclipse.jface.viewers.ICellModifier;
-
-/**
- * @since 3.2
- *
- */
-public class DefaultVariableCellModifier implements ICellModifier {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ICellModifier#canModify(java.lang.Object, java.lang.String)
- */
- public boolean canModify(Object element, String property) {
- if (VariableColumnPresentation.COLUMN_VARIABLE_VALUE.equals(property)) {
- if (element instanceof IVariable) {
- return ((IVariable) element).supportsValueModification();
- }
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ICellModifier#getValue(java.lang.Object, java.lang.String)
- */
- public Object getValue(Object element, String property) {
- if (VariableColumnPresentation.COLUMN_VARIABLE_VALUE.equals(property)) {
- if (element instanceof IVariable) {
- IVariable variable = (IVariable) element;
- try {
- return DefaultLabelProvider.escapeSpecialChars(variable.getValue().getValueString());
- } catch (DebugException e) {
- DebugUIPlugin.log(e);
- }
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ICellModifier#modify(java.lang.Object, java.lang.String, java.lang.Object)
- */
- public void modify(Object element, String property, Object value) {
- Object oldValue = getValue(element, property);
- if (!value.equals(oldValue)) {
- if (VariableColumnPresentation.COLUMN_VARIABLE_VALUE.equals(property)) {
- if (element instanceof IVariable) {
- if (value instanceof String) {
- // The value column displays special characters escaped, so encode the string with any special characters escaped properly
- String valueExpression = DefaultLabelProvider.encodeEsacpedChars((String)value);
- IVariable variable = (IVariable) element;
- DetailPaneAssignValueAction.assignValue(DebugUIPlugin.getShell(), variable, valueExpression);
- }
- }
- }
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultViewerInputProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultViewerInputProvider.java
deleted file mode 100644
index cd5a10d..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultViewerInputProvider.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Wind River Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.elements.adapters;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.internal.ui.model.elements.ViewerInputProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-/**
- * Default input provider supplies the expression manager as input to the
- * expression view.
- *
- * @since 3.4
- */
-public class DefaultViewerInputProvider extends ViewerInputProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ViewerInputProvider#getViewerInput(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
- */
- protected Object getViewerInput(Object source, IPresentationContext context, IViewerUpdate update) throws CoreException {
- return DebugPlugin.getDefault().getExpressionManager();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ViewerInputProvider#supportsContextId(java.lang.String)
- */
- protected boolean supportsContextId(String id) {
- return IDebugUIConstants.ID_EXPRESSION_VIEW.equals(id);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java
deleted file mode 100644
index 65c221e..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java
+++ /dev/null
@@ -1,503 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * WindRiver - Bug 192028 [Memory View] Memory view does not
- * display memory blocks that do not reference IDebugTarget
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.elements.adapters;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.IMemoryBlock;
-import org.eclipse.debug.core.model.IMemoryBlockExtension;
-import org.eclipse.debug.core.model.MemoryByte;
-import org.eclipse.debug.internal.ui.DebugUIMessages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.memory.provisional.AbstractAsyncTableRendering;
-import org.eclipse.debug.internal.ui.memory.provisional.MemoryViewPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.provisional.AsynchronousContentAdapter;
-import org.eclipse.debug.internal.ui.views.memory.MemoryViewUtil;
-import org.eclipse.debug.internal.ui.views.memory.renderings.MemorySegment;
-import org.eclipse.debug.internal.ui.views.memory.renderings.TableRenderingContentDescriptor;
-import org.eclipse.debug.ui.memory.IMemoryRendering;
-
-public class MemoryBlockContentAdapter extends AsynchronousContentAdapter {
-
- // Cache to allow the content provider to comppute change information
- // Cache is taken by copying the lineCache after a suspend event
- // or change event from the the memory block.
- protected Hashtable contentCache;
-
- public MemoryBlockContentAdapter()
- {
- contentCache = new Hashtable();
- }
-
- protected Object[] getChildren(Object parent, IPresentationContext context)
- throws CoreException {
-
- if (!(parent instanceof IMemoryBlock))
- return new Object[0];
-
- if (!(context instanceof MemoryViewPresentationContext))
- return new Object[0];
-
- MemoryViewPresentationContext memoryViewContext = (MemoryViewPresentationContext)context;
- IMemoryRendering rendering = memoryViewContext.getRendering();
-
- if (!(rendering instanceof AbstractAsyncTableRendering))
- return new Object[0];
-
- try
- {
- return getMemoryFromMemoryBlock(memoryViewContext);
- } catch (DebugException e) {
- throw e;
- }
-
- }
-
- protected boolean hasChildren(Object element, IPresentationContext context)
- throws CoreException {
-
- if (context instanceof MemoryViewPresentationContext)
- {
- if (((MemoryViewPresentationContext)context).getRendering() != null)
- return true;
- }
-
- return false;
- }
-
- protected boolean supportsPartId(String id) {
- return true;
- }
-
-
- private Object[] getMemoryFromMemoryBlock(MemoryViewPresentationContext context) throws DebugException {
- IMemoryBlock memoryBlock = context.getRendering().getMemoryBlock();
- if (memoryBlock instanceof IMemoryBlockExtension)
- {
- return loadContentForExtendedMemoryBlock(context);
- }
-
- return loadContentForSimpleMemoryBlock(context);
-
- }
-
- /**
- * @throws DebugException
- */
- public Object[] loadContentForSimpleMemoryBlock(MemoryViewPresentationContext context) throws DebugException {
- AbstractAsyncTableRendering rendering = getTableRendering(context);
- if (rendering != null)
- {
- IMemoryBlock memoryBlock = rendering.getMemoryBlock();
- long startAddress = memoryBlock.getStartAddress();
- BigInteger address = BigInteger.valueOf(startAddress);
- long length = memoryBlock.getLength();
- long numLines = length / rendering.getBytesPerLine();
- return getMemoryToFitTable(address, numLines, context);
- }
- return EMPTY;
- }
-
- /**
- * @throws DebugException
- */
- public Object[] loadContentForExtendedMemoryBlock(MemoryViewPresentationContext context) throws DebugException {
-
- AbstractAsyncTableRendering rendering = getTableRendering(context);
- if (rendering != null)
- {
- TableRenderingContentDescriptor descriptor = (TableRenderingContentDescriptor)rendering.getAdapter(TableRenderingContentDescriptor.class);
-
- if (descriptor == null)
- return new Object[0];
-
- if (descriptor.getNumLines() <= 0)
- return new Object[0];
-
- // calculate top buffered address
- BigInteger loadAddress = descriptor.getLoadAddress();
- if (loadAddress == null)
- {
- loadAddress = new BigInteger("0"); //$NON-NLS-1$
- }
-
- BigInteger mbStart = descriptor.getStartAddress();
- BigInteger mbEnd = descriptor.getEndAddress();
-
- // check that the load address is within range
- if (loadAddress.compareTo(mbStart) < 0 || loadAddress.compareTo(mbEnd) > 0)
- {
- // default load address to memory block base address
- loadAddress = ((IMemoryBlockExtension)descriptor.getMemoryBlock()).getBigBaseAddress();
- descriptor.setLoadAddress(loadAddress);
- }
-
- // if address is still out of range, throw an exception
- if (loadAddress.compareTo(mbStart) < 0 || loadAddress.compareTo(mbEnd) > 0)
- {
- throw new DebugException(DebugUIPlugin.newErrorStatus(DebugUIMessages.TableRenderingContentProvider_0 + loadAddress.toString(16), null));
- }
-
- int addressableUnitsPerLine = rendering.getAddressableUnitPerLine();
- BigInteger bufferStart = loadAddress.subtract(BigInteger.valueOf(descriptor.getPreBuffer()*addressableUnitsPerLine));
- BigInteger bufferEnd = loadAddress.add(BigInteger.valueOf(descriptor.getPostBuffer()*addressableUnitsPerLine));
- bufferEnd = bufferEnd.add(BigInteger.valueOf(descriptor.getNumLines()*addressableUnitsPerLine));
-
- // TODO: should rely on input to tell us what to load
- // instead of having the content adapter override the setting
- if (descriptor.isDynamicLoad())
- {
- if (bufferStart.compareTo(mbStart) < 0)
- bufferStart = mbStart;
-
- if (bufferEnd.compareTo(mbEnd) > 0)
- {
- bufferEnd = mbEnd;
-
- int numLines = bufferEnd.subtract(bufferStart).divide(BigInteger.valueOf(addressableUnitsPerLine)).intValue();
- if (numLines < descriptor.getNumLines())
- {
- // re-calculate buffer start since we may not have enough lines to popoulate the view
- bufferStart = bufferEnd.subtract(BigInteger.valueOf(descriptor.getNumLines()*addressableUnitsPerLine));
- bufferStart = bufferStart.subtract(BigInteger.valueOf(descriptor.getPreBuffer()*addressableUnitsPerLine));
-
- // if after adjusting buffer start, it goes before the memory block start
- // address, adjust it back
- if (bufferStart.compareTo(mbStart) < 0)
- bufferStart = mbStart;
- }
- }
-
- // buffer end must be greater than buffer start
- if (bufferEnd.compareTo(bufferStart) <= 0)
- throw new DebugException(DebugUIPlugin.newErrorStatus(DebugUIMessages.TableRenderingContentProvider_1, null));
-
- int numLines = bufferEnd.subtract(bufferStart).divide(BigInteger.valueOf(addressableUnitsPerLine)).intValue()+1;
- // get stoarage to fit the memory view tab size
- return getMemoryToFitTable(bufferStart, numLines,context);
- }
- else
- {
- if (bufferStart.compareTo(mbStart) < 0)
- bufferStart = mbStart;
-
- if (bufferEnd.compareTo(mbEnd) > 0)
- {
- bufferStart = mbEnd.subtract(BigInteger.valueOf((descriptor.getNumLines()-1)*addressableUnitsPerLine));
- bufferEnd = mbEnd;
-
- // after adjusting buffer start, check if it's smaller than memory block's start address
- if (bufferStart.compareTo(mbStart) < 0)
- bufferStart = mbStart;
- }
-
- // buffer end must be greater than buffer start
- if (bufferEnd.compareTo(bufferStart) <= 0)
- throw new DebugException(DebugUIPlugin.newErrorStatus(DebugUIMessages.TableRenderingContentProvider_2, null));
-
- int numLines = descriptor.getNumLines();
- int bufferNumLines = bufferEnd.subtract(bufferStart).divide(BigInteger.valueOf(addressableUnitsPerLine)).intValue()+1;
-
- if (bufferNumLines < numLines)
- numLines = bufferNumLines;
-
- // get stoarage to fit the memory view tab size
- return getMemoryToFitTable(bufferStart, numLines, context);
- }
- }
- return EMPTY;
- }
-
- /**
- * Get memory to fit table
- * @param startingAddress
- * @param numberOfLines
- * @param updateDelta
- * @throws DebugException
- */
- public Object[] getMemoryToFitTable(BigInteger startAddress, long numberOfLines, MemoryViewPresentationContext context) throws DebugException
- {
- AbstractAsyncTableRendering tableRendering = getTableRendering(context);
- if (tableRendering == null)
- {
- DebugException e = new DebugException(DebugUIPlugin.newErrorStatus(DebugUIMessages.MemoryViewContentProvider_Unable_to_retrieve_content, null));
- throw e;
- }
-
- TableRenderingContentDescriptor descriptor = (TableRenderingContentDescriptor)tableRendering.getAdapter(TableRenderingContentDescriptor.class);
- if(descriptor == null)
- return new Object[0];
-
- // do not ask for memory from memory block if the debug target
- // is already terminated
- IDebugTarget target = descriptor.getMemoryBlock().getDebugTarget();
-
- // check for null target to not calculate and retrieve memory for standard debug model
- if (target != null && (target.isDisconnected() || target.isTerminated()))
- return new Object[0];
-
- boolean error = false;
- DebugException dbgEvt = null;
-
- String adjustedAddress = startAddress.toString(16);
-
- // align to the closest boundary based on addressable size per line
- if (descriptor.isAlignAddressToBoundary() && descriptor.getMemoryBlock() instanceof IMemoryBlockExtension)
- {
- startAddress = MemoryViewUtil.alignToBoundary(startAddress, tableRendering.getAddressableUnitPerLine());
- }
-
- IMemoryBlockExtension extMemoryBlock = null;
- MemoryByte[] memoryBuffer = null;
-
- long reqNumBytes = 0;
- try
- {
-
- if (descriptor.getMemoryBlock() instanceof IMemoryBlockExtension)
- {
- reqNumBytes = tableRendering.getBytesPerLine() * numberOfLines;
- // get memory from memory block
- extMemoryBlock = (IMemoryBlockExtension) descriptor.getMemoryBlock();
-
- long reqNumberOfUnits = tableRendering.getAddressableUnitPerLine() * numberOfLines;
-
- memoryBuffer = extMemoryBlock.getBytesFromAddress(startAddress, reqNumberOfUnits);
-
- if(memoryBuffer == null)
- {
- DebugException e = new DebugException(DebugUIPlugin.newErrorStatus(DebugUIMessages.MemoryViewContentProvider_Unable_to_retrieve_content, null));
- throw e;
- }
- }
- else
- {
- // get memory from memory block
- byte[] memory = descriptor.getMemoryBlock().getBytes();
-
- if (memory == null)
- {
- DebugException e = new DebugException(DebugUIPlugin.newErrorStatus(DebugUIMessages.MemoryViewContentProvider_Unable_to_retrieve_content, null));
- throw e;
- }
-
- int prefillNumBytes = 0;
-
- // number of bytes need to prefill
- if (!startAddress.toString(16).endsWith("0")) //$NON-NLS-1$
- {
- adjustedAddress = startAddress.toString(16).substring(0, adjustedAddress.length() - 1);
- adjustedAddress += "0"; //$NON-NLS-1$
- BigInteger adjustedStart = new BigInteger(adjustedAddress, 16);
- prefillNumBytes = startAddress.subtract(adjustedStart).intValue();
- startAddress = adjustedStart;
- }
- reqNumBytes = descriptor.getMemoryBlock().getLength() + prefillNumBytes;
-
- // figure out number of dummy bytes to append
- while (reqNumBytes % tableRendering.getBytesPerLine() != 0)
- {
- reqNumBytes ++;
- }
-
- numberOfLines = reqNumBytes / tableRendering.getBytesPerLine();
-
- // create memory byte for IMemoryBlock
- memoryBuffer = new MemoryByte[(int)reqNumBytes];
-
- // prefill buffer to ensure double-word alignment
- for (int i=0; i<prefillNumBytes; i++)
- {
- MemoryByte tmp = new MemoryByte();
- tmp.setValue((byte)0);
- tmp.setWritable(false);
- tmp.setReadable(false);
- tmp.setEndianessKnown(false);
- memoryBuffer[i] = tmp;
- }
-
- // fill buffer with memory returned by debug adapter
- int j = prefillNumBytes; // counter for memoryBuffer
- for (int i=0; i<memory.length; i++)
- {
- MemoryByte tmp = new MemoryByte();
- tmp.setValue(memory[i]);
- tmp.setReadable(true);
- tmp.setWritable(true);
- tmp.setEndianessKnown(false);
- memoryBuffer[j] = tmp;
- j++;
- }
-
- // append to buffer to fill up the entire line
- for (int i=j; i<memoryBuffer.length; i++)
- {
- MemoryByte tmp = new MemoryByte();
- tmp.setValue((byte)0);
- tmp.setWritable(false);
- tmp.setReadable(false);
- tmp.setEndianessKnown(false);
- memoryBuffer[i] = tmp;
- }
- }
- }
- catch (DebugException e)
- {
- memoryBuffer = makeDummyContent(numberOfLines, tableRendering.getBytesPerLine());
-
- // finish creating the content provider before throwing an event
- error = true;
- dbgEvt = e;
- }
- catch (Throwable e)
- {
- // catch all errors from this process just to be safe
- memoryBuffer = makeDummyContent(numberOfLines, tableRendering.getBytesPerLine());
-
- // finish creating the content provider before throwing an event
- error = true;
- dbgEvt = new DebugException(DebugUIPlugin.newErrorStatus(e.getMessage(), e));
- }
-
- // if debug adapter did not return enough memory, create dummy memory
- if (memoryBuffer.length < reqNumBytes)
- {
- ArrayList newBuffer = new ArrayList();
-
- for (int i=0; i<memoryBuffer.length; i++)
- {
- newBuffer.add(memoryBuffer[i]);
- }
-
- for (int i=memoryBuffer.length; i<reqNumBytes; i++)
- {
- MemoryByte mb = new MemoryByte();
- mb.setReadable(false);
- mb.setWritable(false);
- mb.setEndianessKnown(false);
- newBuffer.add(mb);
- }
-
- memoryBuffer = (MemoryByte[])newBuffer.toArray(new MemoryByte[newBuffer.size()]);
-
- }
-
- boolean manageDelta = true;
-
- // If change information is not managed by the memory block
- // The view tab will manage it and calculate delta information
- // for its content cache.
- if (descriptor.getMemoryBlock() instanceof IMemoryBlockExtension)
- {
- manageDelta = !((IMemoryBlockExtension)descriptor.getMemoryBlock()).supportsChangeManagement();
- }
-
- if (error){
- throw dbgEvt;
- }
-
- // put memory information into MemoryViewLine
- return organizeLines(numberOfLines, memoryBuffer, startAddress, manageDelta, context);
-
-
- }
-
- private Object[] organizeLines(long numberOfLines, MemoryByte[] memoryBuffer, BigInteger address, boolean manageDelta, MemoryViewPresentationContext context)
- {
- Vector lineCache = new Vector();
- IMemoryRendering rendering = context.getRendering();
- if (!(rendering instanceof AbstractAsyncTableRendering))
- return lineCache.toArray();
-
- AbstractAsyncTableRendering tableRendering = (AbstractAsyncTableRendering)rendering;
- int addressableUnit = tableRendering.getBytesPerLine()/tableRendering.getAddressableSize();
-
- for (int i = 0; i < numberOfLines; i++)
- {
- int bytesPerLine = tableRendering.getBytesPerLine();
- MemoryByte[] memory = new MemoryByte[bytesPerLine];
-
- // counter for memory, starts from 0 to number of bytes per line
- int k = 0;
- // j is the counter for memArray, memory returned by debug adapter
- for (int j = i * bytesPerLine;
- j < i * bytesPerLine + bytesPerLine;
- j++)
- {
-
- byte changeFlag = memoryBuffer[j].getFlags();
- if (manageDelta)
- {
- // turn off both change and known bits to make sure that
- // the change bits returned by debug adapters do not take
- // any effect
-
- changeFlag |= MemoryByte.HISTORY_KNOWN;
- changeFlag ^= MemoryByte.HISTORY_KNOWN;
-
- changeFlag |= MemoryByte.CHANGED;
- changeFlag ^= MemoryByte.CHANGED;
- }
-
- MemoryByte newByteObj = new MemoryByte(memoryBuffer[j].getValue(), changeFlag);
- memory[k] = newByteObj;
- k++;
- }
-
- MemorySegment newLine = new MemorySegment(address, memory, addressableUnit);
- lineCache.add(newLine);
- address = address.add(BigInteger.valueOf(addressableUnit));
- }
- return lineCache.toArray();
- }
-
- /**
- * @param numberOfLines
- * @return an array of dummy MemoryByte
- */
- private MemoryByte[] makeDummyContent(long numberOfLines, int bytesPerLine) {
- MemoryByte[] memoryBuffer;
- // make up dummy memory, needed for recovery in case the debug adapter
- // is capable of retrieving memory again
-
- int numBytes = (int)(bytesPerLine * numberOfLines);
- memoryBuffer = new MemoryByte[numBytes];
-
- for (int i=0; i<memoryBuffer.length; i++){
- memoryBuffer[i] = new MemoryByte();
- memoryBuffer[i].setValue((byte)0);
- memoryBuffer[i].setWritable(false);
- memoryBuffer[i].setReadable(false);
- memoryBuffer[i].setEndianessKnown(false);
- }
- return memoryBuffer;
- }
-
- protected AbstractAsyncTableRendering getTableRendering(MemoryViewPresentationContext context)
- {
- IMemoryRendering memRendering = context.getRendering();
- if (memRendering != null && memRendering instanceof AbstractAsyncTableRendering)
- {
- return (AbstractAsyncTableRendering)memRendering;
- }
- return null;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockLabelAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockLabelAdapter.java
deleted file mode 100644
index 6e9c3c1..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockLabelAdapter.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.elements.adapters;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.model.IMemoryBlock;
-import org.eclipse.debug.core.model.IMemoryBlockExtension;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-public class MemoryBlockLabelAdapter extends AsynchronousDebugLabelAdapter {
-
- protected ImageDescriptor[] getImageDescriptors(Object element, IPresentationContext context) throws CoreException {
- if (element instanceof IMemoryBlock)
- return new ImageDescriptor[]{DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_OBJS_VARIABLE)};
-
- return new ImageDescriptor[0];
- }
-
- /**
- * @param memoryBlockLabel
- * @return
- */
- private String getLabel(IMemoryBlock memoryBlock) {
-
- String memoryBlockLabel = " "; //$NON-NLS-1$
- if (memoryBlock instanceof IMemoryBlockExtension)
- {
- // simply return the expression without the address
- // do not want to keep track of changes in the address
- if (((IMemoryBlockExtension)memoryBlock).getExpression() != null)
- {
- memoryBlockLabel += ((IMemoryBlockExtension)memoryBlock).getExpression();
- }
- }
- else
- {
- long address = memoryBlock.getStartAddress();
- memoryBlockLabel = Long.toHexString(address);
- }
- return memoryBlockLabel;
- }
-
- protected String[] getLabels(Object element, IPresentationContext context) throws CoreException {
- if (element instanceof IMemoryBlock)
- return new String[]{getLabel((IMemoryBlock)element)};
- return super.getLabels(element, context);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryRetrievalContentAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryRetrievalContentAdapter.java
deleted file mode 100644
index eb96392..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryRetrievalContentAdapter.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.elements.adapters;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IMemoryBlockRetrieval;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.provisional.AsynchronousContentAdapter;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-public class MemoryRetrievalContentAdapter extends AsynchronousContentAdapter{
-
- protected Object[] getChildren(Object parent, IPresentationContext context) throws CoreException {
- String id = context.getId();
- if (id.equals(IDebugUIConstants.ID_MEMORY_VIEW))
- {
- if (parent instanceof IMemoryBlockRetrieval)
- {
- return DebugPlugin.getDefault().getMemoryBlockManager().getMemoryBlocks((IMemoryBlockRetrieval)parent);
- }
- }
- return EMPTY;
- }
-
- protected boolean hasChildren(Object element, IPresentationContext context) throws CoreException {
- String id = context.getId();
- if (id.equals(IDebugUIConstants.ID_MEMORY_VIEW))
- {
- if (element instanceof IMemoryBlockRetrieval)
- {
- if (((IMemoryBlockRetrieval)element).supportsStorageRetrieval())
- return DebugPlugin.getDefault().getMemoryBlockManager().getMemoryBlocks((IMemoryBlockRetrieval)element).length > 0;
- }
- }
- return false;
- }
-
- protected boolean supportsPartId(String id) {
- return id.equals(IDebugUIConstants.ID_MEMORY_VIEW);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemorySegmentLabelAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemorySegmentLabelAdapter.java
deleted file mode 100644
index 5d07d2d..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemorySegmentLabelAdapter.java
+++ /dev/null
@@ -1,418 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.elements.adapters;
-
-import java.math.BigInteger;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.model.MemoryByte;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.memory.provisional.AbstractAsyncTableRendering;
-import org.eclipse.debug.internal.ui.memory.provisional.MemoryViewPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.provisional.AsynchronousLabelAdapter;
-import org.eclipse.debug.internal.ui.views.launch.DebugElementHelper;
-import org.eclipse.debug.internal.ui.views.memory.renderings.AbstractBaseTableRendering;
-import org.eclipse.debug.internal.ui.views.memory.renderings.MemorySegment;
-import org.eclipse.debug.internal.ui.views.memory.renderings.TableRenderingContentDescriptor;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.memory.IMemoryBlockTablePresentation;
-import org.eclipse.debug.ui.memory.MemoryRenderingElement;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IColorProvider;
-import org.eclipse.jface.viewers.IFontProvider;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.RGB;
-
-public class MemorySegmentLabelAdapter extends AsynchronousLabelAdapter {
-
- protected String[] getLabels(Object element, IPresentationContext context)
- throws CoreException {
-
- if (context instanceof MemoryViewPresentationContext)
- {
- MemoryViewPresentationContext tableRenderingContext = (MemoryViewPresentationContext)context;
- if (tableRenderingContext.getRendering() != null && tableRenderingContext.getRendering() instanceof AbstractAsyncTableRendering)
- {
- AbstractAsyncTableRendering tableRendering = (AbstractAsyncTableRendering)tableRenderingContext.getRendering();
- TableRenderingContentDescriptor descriptor = (TableRenderingContentDescriptor)tableRendering.getAdapter(TableRenderingContentDescriptor.class);
- if (descriptor != null)
- {
- String addressStr = getColumnText(element, 0, tableRendering, descriptor);
- int numColumns = tableRendering.getAddressableUnitPerLine() / tableRendering.getAddressableUnitPerColumn();
-
- String[] labels = new String[numColumns+2];
- labels[0] = addressStr;
-
- for (int i=0; i<=numColumns; i++)
- {
- labels[i+1] = getColumnText(element, i+1, tableRendering, (TableRenderingContentDescriptor)tableRendering.getAdapter(TableRenderingContentDescriptor.class));
- }
-
- labels[labels.length - 1 ] = IInternalDebugCoreConstants.EMPTY_STRING;
- return labels;
- }
- }
- }
- return new String[0];
- }
-
- private String getColumnText(Object element, int columnIndex, AbstractAsyncTableRendering tableRendering, TableRenderingContentDescriptor descriptor) {
- String columnLabel = null;
-
- if (columnIndex == 0)
- {
- IMemoryBlockTablePresentation presentation = (IMemoryBlockTablePresentation)tableRendering.getMemoryBlock().getAdapter(IMemoryBlockTablePresentation.class);
- if (presentation != null)
- {
- String rowLabel = presentation.getRowLabel(tableRendering.getMemoryBlock(), ((MemorySegment)element).getAddress());
- if (rowLabel != null)
- return rowLabel;
- }
-
- columnLabel = ((MemorySegment)element).getAddress().toString(16).toUpperCase();
-
- int addressSize = descriptor.getAddressSize();
- int prefillLength = addressSize * 2 - columnLabel.length();
- StringBuffer buf = new StringBuffer();
- if (prefillLength > 0)
- {
- for (int i=0; i<prefillLength; i++)
- {
- buf.append("0"); //$NON-NLS-1$
- }
- }
- buf.append(columnLabel);
- return buf.toString();
-
- }
- else if (columnIndex > (tableRendering.getBytesPerLine()/tableRendering.getBytesPerColumn()))
- {
- columnLabel = " "; //$NON-NLS-1$
- }
- else
- {
- if (element instanceof MemorySegment)
- {
- MemorySegment segment = (MemorySegment)element;
- if (segment.getBytes().length != tableRendering.getBytesPerLine())
- return IInternalDebugCoreConstants.EMPTY_STRING;
- }
-
- ILabelProvider labelProvider = (ILabelProvider)tableRendering.getAdapter(ILabelProvider.class);
- if (labelProvider != null && columnIndex > 0)
- {
- MemoryRenderingElement renderingElement = getMemoryRenderingElement(element, columnIndex, tableRendering);
- if (renderingElement != null) {
- String label = labelProvider.getText(renderingElement);
- if (label != null)
- return label;
- }
- }
-
- int start = (columnIndex-1)*tableRendering.getBytesPerColumn();
- MemoryByte[] bytes = ((MemorySegment)element).getBytes(start, tableRendering.getBytesPerColumn());
- BigInteger address = ((MemorySegment)element).getAddress();
- address = address.add(BigInteger.valueOf(start));
-
- columnLabel = tableRendering.getString(tableRendering.getRenderingId(), address, bytes);
- }
- return columnLabel;
- }
-
- protected ImageDescriptor[] getImageDescriptors(Object element,
- IPresentationContext context) throws CoreException {
- if (context instanceof MemoryViewPresentationContext)
- {
- MemoryViewPresentationContext tableRenderingContext = (MemoryViewPresentationContext)context;
- if (tableRenderingContext.getRendering() != null && tableRenderingContext.getRendering() instanceof AbstractAsyncTableRendering)
- {
- AbstractAsyncTableRendering tableRendering = (AbstractAsyncTableRendering)tableRenderingContext.getRendering();
- int numColumns = tableRendering.getAddressableUnitPerLine() / tableRendering.getAddressableUnitPerColumn();
-
- ImageDescriptor[] images = new ImageDescriptor[numColumns+2];
-
- for (int i=0; i<=numColumns; i++)
- {
- images[i] = getColumnImageDescriptor(element, i, tableRendering);
- }
-
- images[images.length - 1 ] = null;
- return images;
- }
- }
- return new ImageDescriptor[0];
- }
-
- private ImageDescriptor getColumnImageDescriptor(Object element, int columnIndex, AbstractAsyncTableRendering tableRendering)
- {
- if (columnIndex == 0)
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_OBJECT_MEMORY);
-
- if (element instanceof MemorySegment)
- {
- MemorySegment segment = (MemorySegment)element;
- if (segment.getBytes().length != tableRendering.getBytesPerLine())
- return null;
-
- ILabelProvider labelProvider = (ILabelProvider)tableRendering.getAdapter(ILabelProvider.class);
- if (labelProvider != null && columnIndex > 0)
- {
- MemoryRenderingElement renderingElement = getMemoryRenderingElement(element, columnIndex, tableRendering);
- if (renderingElement != null) {
- Image image = labelProvider.getImage(renderingElement);
- if (image != null)
- {
- return DebugElementHelper.getImageDescriptor(image);
- }
- }
- }
-
- int start = (columnIndex-1)*tableRendering.getBytesPerColumn();
-
- MemoryByte[] bytes = ((MemorySegment)element).getBytes(start, tableRendering.getBytesPerColumn());
- boolean allKnown = true;
- boolean unchanged = true;
- for (int i=0; i<bytes.length; i++)
- {
- if (!bytes[i].isHistoryKnown())
- allKnown = false;
-
- if (bytes[i].isChanged())
- unchanged = false;
- }
-
- if (allKnown)
- {
- // mark changed elements with changed icon
- if (!unchanged)
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_OBJECT_MEMORY_CHANGED);
-
- }
- }
- return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_OBJECT_MEMORY);
- }
-
- protected FontData[] getFontDatas(Object element,
- IPresentationContext context) throws CoreException {
- if (context instanceof MemoryViewPresentationContext)
- {
- MemoryViewPresentationContext tableRenderingContext = (MemoryViewPresentationContext)context;
- if (tableRenderingContext.getRendering() != null && tableRenderingContext.getRendering() instanceof AbstractAsyncTableRendering)
- {
- AbstractAsyncTableRendering tableRendering = (AbstractAsyncTableRendering)tableRenderingContext.getRendering();
- int numColumns = tableRendering.getAddressableUnitPerLine() / tableRendering.getAddressableUnitPerColumn();
-
- FontData[] fontData = new FontData[numColumns+2];
-
- for (int i=0; i<fontData.length-1; i++)
- {
- fontData[i] = getColumnFontData(element, i, tableRendering);
- }
- return fontData;
- }
- }
-
- return new FontData[0];
- }
-
- private FontData getColumnFontData(Object element, int columnIndex, AbstractAsyncTableRendering tableRendering)
- {
- if (element instanceof MemorySegment)
- {
- MemorySegment segment = (MemorySegment)element;
- if (segment.getBytes().length != tableRendering.getBytesPerLine())
- return null;
-
- IFontProvider fontProvider = (IFontProvider)tableRendering.getAdapter(IFontProvider.class);
- if (fontProvider != null && columnIndex > 0)
- {
- MemoryRenderingElement renderingElement = getMemoryRenderingElement(element, columnIndex, tableRendering);
- if (renderingElement != null) {
- Font font = fontProvider.getFont(renderingElement);
- if (font != null)
- return font.getFontData()[0];
- }
- }
- }
- return null;
- }
-
- protected RGB[] getForegrounds(Object element, IPresentationContext context)
- throws CoreException {
-
- if (context instanceof MemoryViewPresentationContext)
- {
- MemoryViewPresentationContext tableRenderingContext = (MemoryViewPresentationContext)context;
- if (tableRenderingContext.getRendering() != null && tableRenderingContext.getRendering() instanceof AbstractAsyncTableRendering)
- {
- AbstractAsyncTableRendering tableRendering = (AbstractAsyncTableRendering)tableRenderingContext.getRendering();
- int numColumns = tableRendering.getAddressableUnitPerLine() / tableRendering.getAddressableUnitPerColumn();
-
- RGB[] colors = new RGB[numColumns+2];
-
- for (int i=0; i<colors.length-1; i++)
- {
- colors[i] = getColumnForeground(element, i, tableRendering);
- }
-
- colors[colors.length-1] = null;
-
- return colors;
- }
- }
-
- return new RGB[0];
- }
-
- private RGB getColumnBackground(Object element, int columnIndex, AbstractAsyncTableRendering tableRendering)
- {
- if (columnIndex == 0)
- return null;
-
- if (element instanceof MemorySegment)
- {
- MemorySegment segment = (MemorySegment)element;
- if (segment.getBytes().length != tableRendering.getBytesPerLine())
- return null;
-
- IColorProvider colorProvider = (IColorProvider)tableRendering.getAdapter(IColorProvider.class);
- if (colorProvider != null && columnIndex > 0)
- {
- MemoryRenderingElement renderingElement = getMemoryRenderingElement(element, columnIndex, tableRendering);
- if (renderingElement != null) {
- Color color = colorProvider.getBackground(renderingElement);
- if (color != null)
- return color.getRGB();
- }
- }
- }
- return null;
- }
-
- private RGB getColumnForeground(Object element, int columnIndex, AbstractAsyncTableRendering tableRendering)
- {
- if (columnIndex == 0)
- return null;
-
- if (element instanceof MemorySegment)
- {
- MemorySegment segment = (MemorySegment)element;
- if (segment.getBytes().length != tableRendering.getBytesPerLine())
- return null;
-
- IColorProvider colorProvider = (IColorProvider)tableRendering.getAdapter(IColorProvider.class);
- if (colorProvider != null && columnIndex > 0)
- {
- MemoryRenderingElement renderingElement = getMemoryRenderingElement(element, columnIndex, tableRendering);
- if (renderingElement != null) {
- Color color = colorProvider.getForeground(renderingElement);
- if (color != null)
- return color.getRGB();
- }
- }
-
- int start = (columnIndex-1)*tableRendering.getBytesPerColumn();
- MemoryByte[] bytes = segment.getBytes(start, tableRendering.getBytesPerColumn());
- boolean allKnown = true;
- boolean unchanged = true;
- for (int i=0; i<bytes.length; i++)
- {
- if (!bytes[i].isHistoryKnown())
- allKnown = false;
-
- if (bytes[i].isChanged())
- unchanged = false;
- }
-
- if (allKnown)
- {
- // mark changed elements in changed color
- if (!unchanged)
- return DebugUIPlugin.getPreferenceColor(IDebugUIConstants.PREF_CHANGED_DEBUG_ELEMENT_COLOR).getRGB();
-
- return DebugUIPlugin.getPreferenceColor(IDebugUIConstants.PREF_MEMORY_HISTORY_KNOWN_COLOR).getRGB();
- }
-
- return DebugUIPlugin.getPreferenceColor(IDebugUIConstants.PREF_MEMORY_HISTORY_UNKNOWN_COLOR).getRGB();
-
- }
- return null;
- }
-
- protected RGB[] getBackgrounds(Object element, IPresentationContext context)
- throws CoreException {
-
- if (context instanceof MemoryViewPresentationContext)
- {
- MemoryViewPresentationContext tableRenderingContext = (MemoryViewPresentationContext)context;
- if (tableRenderingContext.getRendering() != null && tableRenderingContext.getRendering() instanceof AbstractAsyncTableRendering)
- {
- AbstractAsyncTableRendering tableRendering = (AbstractAsyncTableRendering)tableRenderingContext.getRendering();
- int numColumns = tableRendering.getAddressableUnitPerLine() / tableRendering.getAddressableUnitPerColumn();
-
- RGB[] colors = new RGB[numColumns+2];
-
- for (int i=0; i<colors.length-1; i++)
- {
- colors[i] = getColumnBackground(element, i, tableRendering);
- }
-
- colors[colors.length-1] = null;
-
- return colors;
- }
- }
-
- return new RGB[0];
- }
-
- /**
- * Returns a memory rendering element corresponding to the given element
- * or <code>null</code> if none.
- *
- * @param element element to be rendered
- * @param columnIndex column index at which to render
- * @return memory rendering element or <code>null</code>
- */
- private MemoryRenderingElement getMemoryRenderingElement(Object element, int columnIndex, AbstractBaseTableRendering rendering) {
- if (element instanceof MemorySegment) {
- MemorySegment line = (MemorySegment) element;
- BigInteger address = line.getAddress();
- int offset = (columnIndex - 1) * rendering.getBytesPerColumn();
- if (offset < rendering.getBytesPerLine() && (offset + rendering.getBytesPerColumn()) <= rendering.getBytesPerLine()) {
- return getMemoryRenderingElement(line, address, offset, rendering);
- }
- }
- return null;
- }
-
- private MemoryRenderingElement getMemoryRenderingElement(MemorySegment line, BigInteger lineAddress, int offset, AbstractBaseTableRendering rendering) {
- BigInteger cellAddress = lineAddress.add(BigInteger.valueOf(offset));
- MemoryByte[] bytes = line.getBytes(offset, rendering.getBytesPerColumn());
- // make a copy to ensure that the memory bytes are not overwritten
- // by clients
- MemoryByte[] copy = new MemoryByte[bytes.length];
- System.arraycopy(bytes, 0, copy, 0, bytes.length);
- MemoryRenderingElement renderingElement = new MemoryRenderingElement(
- rendering, cellAddress, copy);
- return renderingElement;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/Messages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/Messages.java
deleted file mode 100644
index 3dc7f87..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/Messages.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.elements.adapters;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @since 3.2
- *
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.debug.internal.ui.elements.adapters.Messages"; //$NON-NLS-1$
-
- private Messages() {
- }
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- public static String VariableColumnPresentation_0;
- public static String VariableColumnPresentation_1;
- public static String VariableColumnPresentation_2;
- public static String VariableColumnPresentation_3;
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/Messages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/Messages.properties
deleted file mode 100644
index 2e62499..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/Messages.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-VariableColumnPresentation_0=Declared Type
-VariableColumnPresentation_1=Name
-VariableColumnPresentation_2=Value
-VariableColumnPresentation_3=Actual Type
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/RegisterGroupProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/RegisterGroupProxy.java
deleted file mode 100644
index ba69b6f..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/RegisterGroupProxy.java
+++ /dev/null
@@ -1,429 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.elements.adapters;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IRegisterGroup;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.internal.core.commands.Request;
-import org.eclipse.debug.internal.ui.viewers.model.ViewerAdapterService;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.ui.IMemento;
-
-/**
- * Used as input to the registers view for a stack frame. Insulates register groups
- * that do not change across stack frame selection to avoid register groups collapsing
- * while stepping between frames.
- * <p>
- * The standard debug model {@link IStackFrame} uses an
- * {@link org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerInputProvider} to
- * create a register group proxy for the register view's input.
- * </p>
- * <p>
- * This class delegates to the underlying stack frame for the following adapters. This way,
- * if a standard model provides custom adapters they are still used to present custom content
- * in the view and provide stable register groups while stepping.
- * <ul>
- * <li>{@link IModelProxyFactory}</li>
- * <li>{@link IColumnPresentationFactory}</li>
- * <li>{@link IElementContentProvider}</li>
- * <li>{@link IElementMementoProvider}</li>
- * </ul>
- * </p>
- * @since 3.4
- */
-public class RegisterGroupProxy implements IModelProxyFactory, IColumnPresentationFactory, IElementContentProvider, IElementMementoProvider {
-
- private IRegisterGroup[] fGroups;
- private IStackFrame fFrame;
-
- private static final String HASH_CODE = "HASH_CODE"; //$NON-NLS-1$
-
- /**
- * Local implementation of a viewer update request. This class delegates to the underlying frame
- * for viewer requests. The requests have to be wrapped such that the request's element provided
- * for existing clients is the underlying frame, rather than the register group proxy (as existing
- * models do not know or need to know about the proxy).
- */
- private class Update extends Request implements IViewerUpdate {
- private IViewerUpdate fViewerUpdate;
-
- Update(IViewerUpdate update) {
- fViewerUpdate = update;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate#getElement()
- */
- public Object getElement() {
- return fFrame;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate#getElementPath()
- */
- public TreePath getElementPath() {
- return TreePath.EMPTY;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate#getPresentationContext()
- */
- public IPresentationContext getPresentationContext() {
- return fViewerUpdate.getPresentationContext();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.core.commands.Request#done()
- */
- public void done() {
- fViewerUpdate.setStatus(getStatus());
- fViewerUpdate.done();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate#getViewerInput()
- */
- public Object getViewerInput() {
- return fFrame;
- }
-
- }
-
- private class CountUpdate extends Update implements IChildrenCountUpdate {
-
- private IChildrenCountUpdate fUpdate;
-
- CountUpdate(IChildrenCountUpdate delegate) {
- super(delegate);
- fUpdate = delegate;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate#setChildCount(int)
- */
- public void setChildCount(int numChildren) {
- fUpdate.setChildCount(numChildren);
- }
-
- }
-
- private class HasUpdate extends Update implements IHasChildrenUpdate {
-
- private IHasChildrenUpdate fUpdate;
-
- HasUpdate(IHasChildrenUpdate delegate) {
- super(delegate);
- fUpdate = delegate;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate#setHasChilren(boolean)
- */
- public void setHasChilren(boolean hasChildren) {
- fUpdate.setHasChilren(hasChildren);
- }
-
- }
-
- private class ChildrenUpdate extends Update implements IChildrenUpdate {
-
- private IChildrenUpdate fUpdate;
-
- ChildrenUpdate(IChildrenUpdate delegate) {
- super(delegate);
- fUpdate = delegate;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate#getLength()
- */
- public int getLength() {
- return fUpdate.getLength();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate#getOffset()
- */
- public int getOffset() {
- return fUpdate.getOffset();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate#setChild(java.lang.Object, int)
- */
- public void setChild(Object child, int offset) {
- fUpdate.setChild(child, offset);
- }
-
- }
-
- /**
- * The memento request has to override {@link #getElement()} to provide the element
- * that a memento is requested for (which could be any element in the view, not just
- * the root stack frame).
- */
- private class MementoRequest extends Update implements IElementMementoRequest {
-
- private IElementMementoRequest fUpdate;
- MementoRequest(IElementMementoRequest request) {
- super(request);
- fUpdate = request;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest#getMemento()
- */
- public IMemento getMemento() {
- return fUpdate.getMemento();
- }
- public Object getElement() {
- return fUpdate.getElement();
- }
- public TreePath getElementPath() {
- return fUpdate.getElementPath();
- }
-
- }
-
- private class ElementCompare extends MementoRequest implements IElementCompareRequest {
-
- private IElementCompareRequest fRequest;
- ElementCompare(IElementCompareRequest request) {
- super(request);
- fRequest = request;
- }
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest#setEqual(boolean)
- */
- public void setEqual(boolean equal) {
- fRequest.setEqual(equal);
- }
-
- }
-
- /**
- * Creates a new register group proxy for the given stack frame.
- *
- * @param frame stack frame
- * @throws DebugException exception if unable to retrieve register groups
- */
- public RegisterGroupProxy(IStackFrame frame) throws DebugException {
- fFrame = frame;
- init(frame);
- }
-
- /* (non-Javadoc)
- *
- * A register group proxy is equal to other stack frames that have the same
- * register groups.
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj instanceof RegisterGroupProxy) {
- return Arrays.equals(fGroups, ((RegisterGroupProxy)obj).fGroups);
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- int code = getClass().hashCode();
- for (int i = 0; i < fGroups.length; i++) {
- code+=fGroups[i].hashCode();
- }
- return code;
- }
-
- /**
- * Initializes the register groups for this stack frame.
- *
- * @param frame stack frame
- */
- private void init(IStackFrame frame) throws DebugException {
- fGroups = frame.getRegisterGroups();
- }
-
- /**
- * Returns cached register groups for this stack frame.
- *
- * @return register groups
- */
- protected IRegisterGroup[] getRegisterGroups() {
- return fGroups;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory#createModelProxy(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
- */
- public IModelProxy createModelProxy(Object element, IPresentationContext context) {
- IModelProxyFactory factory = ViewerAdapterService.getModelProxyFactory(fFrame);
- if (factory != null) {
- return factory.createModelProxy(fFrame, context);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory#createColumnPresentation(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
- */
- public IColumnPresentation createColumnPresentation(IPresentationContext context, Object element) {
- IColumnPresentationFactory factory = ViewerAdapterService.getColumnPresentationFactory(fFrame);
- if (factory != null) {
- return factory.createColumnPresentation(context, fFrame);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory#getColumnPresentationId(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
- */
- public String getColumnPresentationId(IPresentationContext context, Object element) {
- IColumnPresentationFactory factory = ViewerAdapterService.getColumnPresentationFactory(fFrame);
- if (factory != null) {
- return factory.getColumnPresentationId(context, fFrame);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider#update(org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate[])
- */
- public void update(IChildrenCountUpdate[] updates) {
- IElementContentProvider provider = ViewerAdapterService.getContentProvider(fFrame);
- if (provider != null) {
- IChildrenCountUpdate[] others = new IChildrenCountUpdate[updates.length];
- for (int i = 0; i < updates.length; i++) {
- others[i] = new CountUpdate(updates[i]);
- }
- provider.update(others);
- } else {
- cancelUpdates(updates);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider#update(org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate[])
- */
- public void update(IChildrenUpdate[] updates) {
- IElementContentProvider provider = ViewerAdapterService.getContentProvider(fFrame);
- if (provider != null) {
- IChildrenUpdate[] others = new IChildrenUpdate[updates.length];
- for (int i = 0; i < updates.length; i++) {
- others[i] = new ChildrenUpdate(updates[i]);
- }
- provider.update(others);
- } else {
- cancelUpdates(updates);
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider#update(org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate[])
- */
- public void update(IHasChildrenUpdate[] updates) {
- IElementContentProvider provider = ViewerAdapterService.getContentProvider(fFrame);
- if (provider != null) {
- IHasChildrenUpdate[] others = new IHasChildrenUpdate[updates.length];
- for (int i = 0; i < updates.length; i++) {
- others[i] = new HasUpdate(updates[i]);
- }
- provider.update(others);
- } else {
- cancelUpdates(updates);
- }
- }
-
- /**
- * Cancels a collection of update requests.
- *
- * @param updates updates to cancel
- */
- private void cancelUpdates(IViewerUpdate[] updates) {
- for (int i = 0; i < updates.length; i++) {
- updates[i].setStatus(Status.CANCEL_STATUS);
- updates[i].done();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider#compareElements(org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest[])
- */
- public void compareElements(IElementCompareRequest[] requests) {
- IElementMementoProvider provider = ViewerAdapterService.getMementoProvider(fFrame);
- if (provider != null) {
- List others = new ArrayList(requests.length);
- for (int i = 0; i < requests.length; i++) {
- IElementCompareRequest request = requests[i];
- if (request.getElement().equals(this)) {
- Integer integer = request.getMemento().getInteger(HASH_CODE);
- if (integer != null) {
- request.setEqual(integer.intValue() == hashCode());
- } else {
- request.setEqual(false);
- }
- request.done();
- } else {
- others.add(new ElementCompare(request));
- }
- }
- if (!others.isEmpty()) {
- provider.compareElements((IElementCompareRequest[]) others.toArray(new IElementCompareRequest[others.size()]));
- }
- } else {
- cancelUpdates(requests);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider#encodeElements(org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest[])
- */
- public void encodeElements(IElementMementoRequest[] requests) {
- IElementMementoProvider provider = ViewerAdapterService.getMementoProvider(fFrame);
- if (provider != null) {
- List others = new ArrayList(requests.length);
- for (int i = 0; i < requests.length; i++) {
- IElementMementoRequest request = requests[i];
- if (request.getElement().equals(this)) {
- request.getMemento().putInteger(HASH_CODE, this.hashCode());
- request.done();
- } else {
- others.add(new MementoRequest(request));
- }
- }
- if (!others.isEmpty()) {
- provider.encodeElements((IElementMementoRequest[]) others.toArray(new IElementMementoRequest[others.size()]));
- }
- } else {
- cancelUpdates(requests);
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameSourceDisplayAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameSourceDisplayAdapter.java
deleted file mode 100644
index 5b40457..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameSourceDisplayAdapter.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.elements.adapters;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IDebugEventSetListener;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.ISourceLocator;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.internal.ui.InstructionPointerManager;
-import org.eclipse.debug.internal.ui.sourcelookup.SourceLookupResult;
-import org.eclipse.debug.internal.ui.views.launch.DecorationManager;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.sourcelookup.ISourceDisplay;
-import org.eclipse.debug.ui.sourcelookup.ISourceLookupResult;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * @since 3.2
- */
-public class StackFrameSourceDisplayAdapter implements ISourceDisplay {
-
- private IStackFrame fPrevFrame;
- private SourceLookupResult fPrevResult;
-
- /**
- * Constructs singleton source display adapter for stack frames.
- */
- public StackFrameSourceDisplayAdapter() {
- DebugPlugin.getDefault().addDebugEventListener(new IDebugEventSetListener() {
- public void handleDebugEvents(DebugEvent[] events) {
- for (int i = 0; i < events.length; i++) {
- final DebugEvent event = events[i];
- switch (event.getKind()) {
- case DebugEvent.TERMINATE:
- clearCachedModel(event.getSource());
- // fall through
- case DebugEvent.RESUME:
- if (!event.isEvaluation()) {
- Job uijob = new UIJob("clear source selection"){ //$NON-NLS-1$
- public IStatus runInUIThread(
- IProgressMonitor monitor) {
- clearSourceSelection(event.getSource());
- return Status.OK_STATUS;
- }
-
- };
- uijob.setSystem(true);
- uijob.schedule();
- }
- break;
- case DebugEvent.CHANGE:
- if (event.getSource() instanceof IStackFrame) {
- if (event.getDetail() == DebugEvent.CONTENT) {
- // force source lookup if a stack frame fires a content change event
- clearCachedModel(event.getSource());
- }
- }
- break;
- }
- }
- }
- });
- }
-
- /**
- * A job to perform source lookup on the currently selected stack frame.
- */
- class SourceLookupJob extends Job {
-
- private IStackFrame fTarget;
- private ISourceLocator fLocator;
- private IWorkbenchPage fPage;
-
- /**
- * Constructs a new source lookup job.
- */
- public SourceLookupJob(IStackFrame frame, ISourceLocator locator, IWorkbenchPage page) {
- super("Debug Source Lookup"); //$NON-NLS-1$
- setPriority(Job.INTERACTIVE);
- setSystem(true);
- fTarget = frame;
- fLocator = locator;
- fPage = page;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus run(IProgressMonitor monitor) {
- if (!monitor.isCanceled()) {
- if (!fTarget.isTerminated()) {
- ISourceLookupResult result = DebugUITools.lookupSource(fTarget, fLocator);
- synchronized (StackFrameSourceDisplayAdapter.this) {
- fPrevResult = (SourceLookupResult)result;
- fPrevFrame = fTarget;
- }
- if (!monitor.isCanceled() && !fTarget.isTerminated()) {
- new SourceDisplayJob(result, fPage).schedule();
- }
- }
- }
- return Status.OK_STATUS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
- */
- public boolean belongsTo(Object family) {
- // source lookup jobs are a family per workbench page
- if (family instanceof SourceLookupJob) {
- SourceLookupJob slj = (SourceLookupJob) family;
- return slj.fPage.equals(fPage);
- }
- return false;
- }
-
- }
-
- class SourceDisplayJob extends UIJob {
-
- private ISourceLookupResult fResult;
- private IWorkbenchPage fPage;
-
- public SourceDisplayJob(ISourceLookupResult result, IWorkbenchPage page) {
- super("Debug Source Display"); //$NON-NLS-1$
- setSystem(true);
- setPriority(Job.INTERACTIVE);
- fResult = result;
- fPage = page;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus runInUIThread(IProgressMonitor monitor) {
- if (!monitor.isCanceled() && fResult != null) {
- DebugUITools.displaySource(fResult, fPage);
- // termination may have occurred while displaying source
- if (monitor.isCanceled()) {
- Object artifact = fResult.getArtifact();
- if (artifact instanceof IStackFrame) {
- clearSourceSelection(((IStackFrame)artifact).getThread());
- }
- }
- }
-
- return Status.OK_STATUS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
- */
- public boolean belongsTo(Object family) {
- // source display jobs are a family per workbench page
- if (family instanceof SourceDisplayJob) {
- SourceDisplayJob sdj = (SourceDisplayJob) family;
- return sdj.fPage.equals(fPage);
- }
- return false;
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.contexts.ISourceDisplayAdapter#displaySource(java.lang.Object, org.eclipse.ui.IWorkbenchPage, boolean)
- */
- public synchronized void displaySource(Object context, IWorkbenchPage page, boolean force) {
- IStackFrame frame = (IStackFrame)context;
- if (!force && frame.equals(fPrevFrame)) {
- fPrevResult.updateArtifact(context);
- SourceDisplayJob sdj = new SourceDisplayJob(fPrevResult, page);
- // cancel any existing source display jobs for this page
- Job.getJobManager().cancel(sdj);
- sdj.schedule();
- } else {
- SourceLookupJob slj = new SourceLookupJob(frame, frame.getLaunch().getSourceLocator(), page);
- // cancel any existing source lookup jobs for this page
- Job.getJobManager().cancel(slj);
- slj.schedule();
- }
- }
-
- /**
- * Clears any source decorations associated with the given thread or
- * debug target.
- *
- * @param source thread or debug target
- */
- private void clearSourceSelection(Object source) {
- if (source instanceof IThread) {
- IThread thread = (IThread)source;
- DecorationManager.removeDecorations(thread);
- InstructionPointerManager.getDefault().removeAnnotations(thread);
- } else if (source instanceof IDebugTarget) {
- IDebugTarget target = (IDebugTarget)source;
- DecorationManager.removeDecorations(target);
- InstructionPointerManager.getDefault().removeAnnotations(target);
- }
- }
-
- /**
- * Clear any cached results associated with the given object.
- *
- * @param source
- */
- private synchronized void clearCachedModel(Object source) {
- if (fPrevFrame != null) {
- IDebugTarget target = null;
- if (source instanceof IDebugElement) {
- target = ((IDebugElement)source).getDebugTarget();
- }
- if (fPrevFrame.getDebugTarget().equals(target)) {
- fPrevFrame = null;
- fPrevResult = null;
- }
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameViewerInputProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameViewerInputProvider.java
deleted file mode 100644
index d48d9d8..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameViewerInputProvider.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Wind River Systems - support for alternative expression view content providers
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.elements.adapters;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.internal.ui.model.elements.ViewerInputProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-/**
- * @since 3.4
- */
-public class StackFrameViewerInputProvider extends ViewerInputProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ViewerInputProvider#getViewerInput(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
- */
- protected Object getViewerInput(Object source, IPresentationContext context, IViewerUpdate update) throws CoreException {
- if ( IDebugUIConstants.ID_REGISTER_VIEW.equals(context.getId()) ) {
- return new RegisterGroupProxy((IStackFrame) source);
- } else {
- return DebugPlugin.getDefault().getExpressionManager();
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.model.elements.ViewerInputProvider#supportsContextId(java.lang.String)
- */
- protected boolean supportsContextId(String id) {
- return IDebugUIConstants.ID_REGISTER_VIEW.equals(id) ||
- IDebugUIConstants.ID_EXPRESSION_VIEW.equals(id);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/VariableColumnFactoryAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/VariableColumnFactoryAdapter.java
deleted file mode 100644
index c756501..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/VariableColumnFactoryAdapter.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.elements.adapters;
-
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-/**
- * Factory for default variable column presentation.
- *
- * @since 3.2
- */
-public class VariableColumnFactoryAdapter implements IColumnPresentationFactory {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresenetationFactoryAdapter#createColumnPresentation(org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext, java.lang.Object)
- */
- public IColumnPresentation createColumnPresentation(IPresentationContext context, Object element) {
- String id = context.getId();
- if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(id) || IDebugUIConstants.ID_REGISTER_VIEW.equals(id)) {
- if (element instanceof IStackFrame) {
- return new VariableColumnPresentation();
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresenetationFactoryAdapter#getColumnPresentationId(org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext, java.lang.Object)
- */
- public String getColumnPresentationId(IPresentationContext context, Object element) {
- String id = context.getId();
- if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(id) || IDebugUIConstants.ID_REGISTER_VIEW.equals(id)) {
- if (element instanceof IStackFrame) {
- return VariableColumnPresentation.DEFAULT_VARIABLE_COLUMN_PRESENTATION;
- }
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/VariableColumnPresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/VariableColumnPresentation.java
deleted file mode 100644
index 961e340..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/VariableColumnPresentation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.elements.adapters;
-
-import org.eclipse.debug.internal.ui.viewers.provisional.AbstractColumnPresentation;
-import org.eclipse.debug.ui.IDebugUIConstants;
-
-/**
- * Columns for Java variables.
- *
- * @since 3.2
- */
-public class VariableColumnPresentation extends AbstractColumnPresentation {
-
- /**
- * Constant identifier for the default variable column presentation.
- */
- public final static String DEFAULT_VARIABLE_COLUMN_PRESENTATION = IDebugUIConstants.PLUGIN_ID + ".VARIALBE_COLUMN_PRESENTATION"; //$NON-NLS-1$
-
- /**
- * Default column identifiers
- */
- public final static String COLUMN_VARIABLE_NAME = DEFAULT_VARIABLE_COLUMN_PRESENTATION + ".COL_VAR_NAME"; //$NON-NLS-1$
- public final static String COLUMN_VARIABLE_TYPE = DEFAULT_VARIABLE_COLUMN_PRESENTATION + ".COL_VAR_TYPE"; //$NON-NLS-1$
- public final static String COLUMN_VARIABLE_VALUE = DEFAULT_VARIABLE_COLUMN_PRESENTATION + ".COL_VAR_VALUE"; //$NON-NLS-1$
- public final static String COLUMN_VALUE_TYPE = DEFAULT_VARIABLE_COLUMN_PRESENTATION + ".COL_VALUE_TYPE"; //$NON-NLS-1$
-
- private static final String[] ALL_COLUMNS = new String[]{COLUMN_VARIABLE_NAME, COLUMN_VARIABLE_TYPE, COLUMN_VARIABLE_VALUE, COLUMN_VALUE_TYPE};
- private static final String[] INITIAL_COLUMNS = new String[]{COLUMN_VARIABLE_NAME, COLUMN_VARIABLE_VALUE};
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getColumns()
- */
- public String[] getAvailableColumns() {
- return ALL_COLUMNS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getHeader(java.lang.String)
- */
- public String getHeader(String id) {
- if (COLUMN_VARIABLE_TYPE.equals(id)) {
- return Messages.VariableColumnPresentation_0;
- }
- if (COLUMN_VARIABLE_NAME.equals(id)) {
- return Messages.VariableColumnPresentation_1;
- }
- if (COLUMN_VARIABLE_VALUE.equals(id)) {
- return Messages.VariableColumnPresentation_2;
- }
- if (COLUMN_VALUE_TYPE.equals(id)) {
- return Messages.VariableColumnPresentation_3;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getId()
- */
- public String getId() {
- return DEFAULT_VARIABLE_COLUMN_PRESENTATION;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#getInitialColumns()
- */
- public String[] getInitialColumns() {
- return INITIAL_COLUMNS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.provisional.IColumnPresentation#isOptional()
- */
- public boolean isOptional() {
- return true;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/BreakpointImportExport.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/BreakpointImportExport.properties
deleted file mode 100644
index db93e42..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/BreakpointImportExport.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-WizardImportBreakpoints_0=Import Breakpoints
-WizardImportBreakpointsPage_0=Import Breakpoints
-WizardImportBreakpointsPage_1=File does not exist: {0}
-WizardImportBreakpointsPage_2=Import breakpoints from local file system.
-WizardImportBreakpointsPage_3=&Update existing breakpoints
-WizardImportBreakpointsPage_4=F&rom file:
-WizardImportBreakpointsPage_5=Create breakpoint &working sets
-WizardImportBreakpointsPage_6=Please specify a file to import.
-WizardExportBreakpoints_0=Export Breakpoints
-WizardExportBreakpointsPage_0=Please specify a destination file.
-WizardExportBreakpointsPage_1=Select one or more breakpoints to export.
-WizardExportBreakpointsPage_2=Brea&kpoints:
-WizardExportBreakpointsPage_3=The destination directory does not exist.
-WizardBreakpointsPage_1=&Select All
-WizardBreakpointsPage_2=&Deselect All
-WizardBreakpointsPage_4=Export breakpoints to the local file system.
-WizardBreakpointsPage_6=&Overwrite existing file without warning
-WizardBreakpointsPage_7=&To file:
-WizardBreakpointsPage_8=Brows&e...
-WizardBreakpointsPage_12=Overwrite?
-ImportExportOperations_0=Do you want to overwrite: {0} ?
-ImportOperation_0=Importing Breakpoints
-ExportOperation_0=Exporting Breakpoints
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java
deleted file mode 100644
index 92e8b31..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java
+++ /dev/null
@@ -1,321 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.importexport.breakpoints;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
-import org.eclipse.debug.internal.ui.SWTFactory;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsComparator;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsContentProvider;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsLabelProvider;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsViewer;
-import org.eclipse.debug.internal.ui.views.breakpoints.IBreakpointOrganizer;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.IBaseLabelProvider;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IViewPart;
-
-/**
- * This class creates a simplified debug view that can be used in wizards etc., to emulate the current debug view
- *
- * @see WizardExportBreakpointsPage
- * @see WizardImportBreakpointsPage
- *
- * @since 3.2
- */
-public class EmbeddedBreakpointsViewer {
-
- //widgets
- private IStructuredSelection fSelection = null;
- private BreakpointsContentProvider fProvider = null;
- private Tree fTree = null;
- private BreakpointsViewer fViewer = null;
- private ICheckStateListener fCheckListener = new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- updateCheckedState(event.getElement(), event.getChecked());
- }
- };
-
- /**
- * This constructor allows a specific selection to be used in stead of the default
- *
- * @param parent the parent composite to add this one to
- * @param input the input to the viewer
- * @param selection the selection to set on the viewer
- */
- public EmbeddedBreakpointsViewer(Composite parent, Object input, IStructuredSelection selection) {
- Assert.isNotNull(parent);
- Assert.isNotNull(input);
- createControl(parent, input, selection);
- }
-
- /**
- * Creates the control initialized to the current view, selection, and organization of the breakpoints view
- * @param parent the parent composite to add this one to.
- *
- * @param parent the parent composite to add this one to
- * @param input the input for the viewer
- * @param selection the selection for the viewer to be initialized to. If null the selection from the breakpoints view is used
- */
- private void createControl(Composite parent, Object input, IStructuredSelection selection) {
- fSelection = selection;
- if(fSelection == null) {
- IViewPart fViewpart = DebugUIPlugin.getActiveWorkbenchWindow().getActivePage().findView(IDebugUIConstants.ID_BREAKPOINT_VIEW);
- if(fViewpart != null) {
- fSelection = (IStructuredSelection)fViewpart.getViewSite().getSelectionProvider().getSelection();
- }
- else {
- fSelection = new StructuredSelection();
- }
- }
- Composite composite = SWTFactory.createComposite(parent, parent.getFont(), 1, 1, GridData.FILL_BOTH, 0, 0);
-
- // create the treeview
- fTree = new Tree(composite, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CHECK);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = 150;
- fTree.setLayoutData(gd);
- fProvider = new BreakpointsContentProvider();
- BreakpointsView view = ((BreakpointsView)DebugUIPlugin.getActiveWorkbenchWindow().getActivePage().findView(IDebugUIConstants.ID_BREAKPOINT_VIEW));
- fViewer = new BreakpointsViewer(fTree);
- BreakpointsLabelProvider labelprovider = new BreakpointsLabelProvider();
- if(view != null) {
- //if we have handle to the view try get the current attributes, that way the
- //presentation of the embedded viewer matches the current view
- IBaseLabelProvider current = ((StructuredViewer)view.getViewer()).getLabelProvider();
- if (current instanceof BreakpointsLabelProvider) {
- current = ((BreakpointsLabelProvider)current).getPresentation();
- }
- Map map = null;
- if(current instanceof DelegatingModelPresentation) {
- map = ((DelegatingModelPresentation) current).getAttributes();
- }
- if(map != null) {
- Object key = null;
- IDebugModelPresentation newpres = labelprovider.getPresentation();
- for(Iterator iter = map.keySet().iterator(); iter.hasNext();) {
- key = iter.next();
- newpres.setAttribute((String) key, map.get(key));
- }
- }
- }
- fViewer.setComparator(new BreakpointsComparator());
- fViewer.setLabelProvider(labelprovider);
- fViewer.addCheckStateListener(fCheckListener);
- IBreakpointOrganizer[] orgs = null;
- if(view != null) {
- orgs = view.getBreakpointOrganizers();
- }
- fViewer.setContentProvider(fProvider);
- fViewer.setInput(input);
- fProvider.setOrganizers(orgs);
- initViewerState();
- }
-
- /**
- * Performs the initialization of the viewer from a selection
- */
- private void initViewerState() {
- Object[] items = fSelection.toArray();
- fViewer.setGrayedElements(new Object[] {});
- fViewer.setCheckedElements(new Object[] {});
- ArrayList list = new ArrayList();
- for(int i = 0; i < items.length; i++) {
- Object item = items[i];
- if(item instanceof IBreakpoint) {
- list.add(item);
- }
- else if (item instanceof BreakpointContainer) {
- getBreakpointsFromContainers((BreakpointContainer)item, list);
- }
- }
- for(int i = 0; i < list.size(); i++) {
- updateCheckedState(list.get(i), true);
- }
- }
-
- /**
- * FInds the breakpoints of a given container
- * @param container the container to get breakpoints from
- * @param list the list of breakpoints to update state for
- */
- private void getBreakpointsFromContainers(BreakpointContainer container, ArrayList list) {
- Object[] elements = container.getChildren();
- for(int i = 0; i < elements.length; i++) {
- if(elements[i] instanceof IBreakpoint) {
- list.add(elements[i]);
- }
- else {
- getBreakpointsFromContainers((BreakpointContainer)elements[i], list);
- }
- }
- }
-
- /**
- * Returns the selection from the viewer with no duplicates
- * @return the selection from the viewer with no duplicates
- */
- public IStructuredSelection getCheckedElements() {
- Object[] list = fViewer.getCheckedElements();
- Vector selected = new Vector();
- for(int i = 0; i < list.length; i++) {
- if(!selected.contains(list[i])) {
- selected.addElement(list[i]);
- }
- }
- return new StructuredSelection(selected);
- }
-
- /**
- * Allows access to the viewer
- * @return the viewer
- */
- public BreakpointsViewer getViewer() {
- return fViewer;
- }
-
- /**
- * finds all occurrences of a widget to update
- * @param element the element to search for when finding occurrences
- * @return a list of widget occurrences to update or an empty list
- */
- private Widget[] searchItems(Object element) {
- ArrayList list = new ArrayList();
- TreeItem[] items = fTree.getItems();
- for (int i = 0; i < items.length; i++) {
- findAllOccurrences(items[i], element, list);
- }
- return (Widget[]) list.toArray(new Widget[0]);
- }
-
- /**
- * performs the actual search for items in the tree
- * @param list the list to add matches to
- * @param item the item in the tree
- * @param element the element to compare
- */
- private void findAllOccurrences(TreeItem item, Object element, ArrayList list) {
- if (element.equals(item.getData())) {
- list.add(item);
- }
- TreeItem[] items = item.getItems();
- for (int i = 0; i < items.length; i++) {
- findAllOccurrences(items[i], element, list);
- }
- }
-
- /**
- * Update the checked state of the given element and all of its children.
- *
- * @param obj the object that has been changed
- * @param enable the checked status of the obj
- */
- private void updateCheckedState(Object obj, boolean enable) {
- if (obj instanceof IBreakpoint) {
- Widget[] list = searchItems(obj);
- TreeItem item = null;
- for(int i = 0; i < list.length; i++) {
- item = (TreeItem)list[i];
- item.setChecked(enable);
- refreshParents(item);
- }
- }
- else if (obj instanceof BreakpointContainer) {
- ArrayList bps = new ArrayList();
- getBreakpointsFromContainers((BreakpointContainer)obj, bps);
- for(int j = 0; j < bps.size(); j++) {
- updateCheckedState(bps.get(j), enable);
- }
- }
- }
-
- /**
- * refreshes the grayed/checked state of the parents of item
- * @param item the item to refresh parents of
- */
- private void refreshParents(TreeItem item) {
- TreeItem parent = item.getParentItem();
- while (parent != null) {
- int checked = getNumberChildrenChecked(parent);
- if(checked == 0) {
- parent.setGrayed(false);
- parent.setChecked(false);
- }
- else if(checked == parent.getItemCount()) {
- if(getNumberChildrenGrayed(parent) > 0) {
- parent.setGrayed(true);
- }
- else {
- parent.setGrayed(false);
- }
- parent.setChecked(true);
- }
- else {
- parent.setGrayed(true);
- parent.setChecked(true);
- }
- parent = parent.getParentItem();
- }
- }
-
- /**
- * Gets the number of grayed children for this parent
- * @param parent the parent to inspect
- * @return treu is any one or more children is grayed, false otherwise
- */
- private int getNumberChildrenGrayed(TreeItem parent) {
- TreeItem[] children = parent.getItems();
- int count = 0;
- for(int i = 0; i < children.length; i++) {
- if(children[i].getGrayed()) {
- count++;
- }
- }
- return count;
- }
-
- /**
- * Checks to see if all of the children under an given parent are checked or not
- * @param children the children to check
- * @return true if all children are checked, false otherwise
- */
- private int getNumberChildrenChecked(TreeItem parent) {
- TreeItem[] children = parent.getItems();
- int count = 0;
- for(int i = 0; i < children.length; i++) {
- if(children[i].getChecked()) {
- count++;
- }
- }
- return count;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ExportBreakpoints.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ExportBreakpoints.java
deleted file mode 100644
index 0ca8478..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ExportBreakpoints.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.importexport.breakpoints;
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.IViewPart;
-
-/**
- * <p>
- * This class provides the aciton event for both the context menu in breakpoints view
- * and the drop down menu inn the breakpoints view.
- * </p>
- * <p>
- * The action simply calls the wizard to export breakpoints.
- * </p>
- * @see WizardExportBreakpoints
- * @see WizardExportBreakpointsPage
- *
- * @since 3.2
- */
-public class ExportBreakpoints extends AbstractDebugActionDelegate {
-
- /**
- * This method actually performs the execution of the action event
- *
- * @param action IAction the action
- */
- public void run(IAction action) {
- IViewPart fViewpart = DebugUIPlugin.getActiveWorkbenchWindow().getActivePage().findView(IDebugUIConstants.ID_BREAKPOINT_VIEW);
- WizardExportBreakpoints wiz = new WizardExportBreakpoints();
- wiz.init(DebugUIPlugin.getDefault().getWorkbench(), (IStructuredSelection)fViewpart.getViewSite().getSelectionProvider().getSelection());
- WizardDialog wizdialog = new WizardDialog(DebugUIPlugin.getShell(), wiz);
- wizdialog.setBlockOnOpen(true);
- wizdialog.open();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate#update(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- protected void update(IAction action, ISelection s) {
- getAction().setEnabled(DebugPlugin.getDefault().getBreakpointManager().hasBreakpoints());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate#doAction(java.lang.Object)
- */
- protected void doAction(Object element) throws DebugException {}
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/IImportExportConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/IImportExportConstants.java
deleted file mode 100644
index 991dc97..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/IImportExportConstants.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.importexport.breakpoints;
-
-/**
- *
- * XML tag constants for importing and exporting breakpoints
- */
-public interface IImportExportConstants {
-
- /**
- * <p>
- * The name for the top level node in the XMLMemento for storing/restoring breakpoint information.</br>
- *
- * General formulation of the XMLMemento is as follows:</br>
- *
- * breakpoints := (breakpoint)*</br>
- *
- * breakpoint := resource</br>
- *
- * resource := (marker)+</br>
- *
- * marker := (attribs)+</br>
- * </p>
- * @see WizardExportBreakpointsPage
- * @see WizardImportBreakpointsPage
- *
- */
- public static final String IE_NODE_BREAKPOINTS = "breakpoints"; //$NON-NLS-1$
-
- /**
- * The name of the node type for each of the imported or exported breakpoints
- *
- * @see WizardExportBreakpointsPage
- * @see WizardImportBreakpointsPage
- */
- public static final String IE_NODE_BREAKPOINT = "breakpoint"; //$NON-NLS-1$
-
- /**
- * <p>
- * The generalized ID for each of the values stored in a markers' attribute map.
- * Since a marker can have any number of attributes and or values, we use a
- * (name, value) paring in the XMLmemento to store them, without having a dependence upon what the attribute
- * is or what type it is.
- * </p>
- * @see WizardExportBreakpointsPage
- * @see WizardImportBreakpointsPage
- */
- public static final String IE_NODE_VALUE = "value"; //$NON-NLS-1$
-
- /**
- * Each breakpoint has an associated resource, which is described with this element
- * name
- *
- * @see WizardExportBreakpointsPage
- * @see WizardImportBreakpointsPage
- */
- public static final String IE_NODE_RESOURCE = "resource"; //$NON-NLS-1$
-
- /**
- * To validate the resource when filtering importable breakpoints we need to know its path.
- * This is the the name of XMLMemento node that stores that path.
- *
- * @see WizardExportBreakpointsPage
- * @see WizardImportBreakpointsPage
- */
- public static final String IE_NODE_PATH = "path"; //$NON-NLS-1$
-
- /**
- * To filter the type of path searched for within the workspace to allow for the filtering of
- * breakpoints for import, we need to know the type to filter for.
- *
- * This is the name of the XMLMemento node that stores the type of the resource
- *
- * @see WizardExportBreakpointsPage
- * @see WizardImportBreakpointsPage
- */
- public static final String IE_NODE_TYPE = "type"; //$NON-NLS-1$
-
- /**
- * The name for the marker node in the corresponding XMLMemento
- *
- * @see WizardExportBreakpointsPage
- * @see WizardImportBreakpointsPage
- */
- public static final String IE_NODE_MARKER = "marker"; //$NON-NLS-1$
-
- /**
- * The name for a marker attribute node in the corresponding XMLMemento
- *
- * @see WizardExportBreakpointsPage
- * @see WizardImportBreakpointsPage
- */
- public static final String IE_NODE_ATTRIB = "attrib"; //$NON-NLS-1$
-
- /**
- * The generalized name for the "name" node used in marker attribute nodes.
- * This is the other ID in the (name, value) pairing used to describe attributes
- * of markers.
- *
- * @see WizardExportBreakpointsPage
- * @see WizardImportBreakpointsPage
- */
- public static final String IE_NODE_NAME = "name"; //$NON-NLS-1$
-
- /**
- * The name of the enabled attribute, which is part of the breakpoint node information
- *
- * @see WizardExportBreakpointsPage
- * @see WizardImportBreakpointsPage
- */
- public static final String IE_BP_ENABLED = "enabled"; //$NON-NLS-1$
-
- /**
- * The name of the registered attribute, which is part of the breakpoint node information
- *
- * @see WizardExportBreakpointsPage
- * @see WizardImportBreakpointsPage
- */
- public static final String IE_BP_REGISTERED = "registered"; //$NON-NLS-1$
-
- /**
- * The name of the persistent attribute for breakpoint information
- */
- public static final String IE_BP_PERSISTANT = "persistant"; //$NON-NLS-1$
-
- /**
- * The default file extension for breakpoint export files
- */
- public static final String EXTENSION = "bkpt"; //$NON-NLS-1$
-
- /**
- * the charstart attribute from a marker
- */
- public static final String CHARSTART = "charStart"; //$NON-NLS-1$
-
- /**
- * The delimiter for the listing of working sets that a marker belongs to
- */
- public static final String DELIMITER = "<;#>"; //$NON-NLS-1$
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportBreakpoints.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportBreakpoints.java
deleted file mode 100644
index 0cd0a82..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportBreakpoints.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c)2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.importexport.breakpoints;
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.wizard.WizardDialog;
-
-/**
- * This class provides the aciton event for both the context menu in breakpoints view
- * and the drop down menu in the breakpoints view.
- * <p>
- * The action simply calls the wizard to import breakpoints.
- * </p>
- *
- * @see WizardImportBreakpoints
- * @see WizardImportBreakpointsPage
- *
- * @since 3.2
- */
-public class ImportBreakpoints extends AbstractDebugActionDelegate {
-
- /**
- * Opens import wizard
- *
- * @param action IAction the action
- */
- public void run(IAction action) {
- WizardImportBreakpoints wiz = new WizardImportBreakpoints();
- wiz.init(DebugUIPlugin.getDefault().getWorkbench(), null);
- WizardDialog wizdialog = new WizardDialog(DebugUIPlugin.getShell(), wiz);
- wizdialog.setBlockOnOpen(true);
- wizdialog.open();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate#doAction(java.lang.Object)
- */
- protected void doAction(Object element) throws DebugException {}
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate#update(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- protected void update(IAction action, ISelection s) {
- getAction().setEnabled(true);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportExportMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportExportMessages.java
deleted file mode 100644
index 17083df..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportExportMessages.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.importexport.breakpoints;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ImportExportMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.debug.internal.ui.importexport.breakpoints.BreakpointImportExport"; //$NON-NLS-1$
-
- private ImportExportMessages() {
- }
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, ImportExportMessages.class);
- }
-
- public static String WizardImportBreakpoints_0;
- public static String WizardExportBreakpoints_0;
- public static String WizardBreakpointsPage_1;
- public static String WizardBreakpointsPage_2;
- public static String WizardBreakpointsPage_4;
- public static String WizardBreakpointsPage_6;
- public static String WizardBreakpointsPage_7;
- public static String WizardBreakpointsPage_8;
- public static String WizardBreakpointsPage_12;
- public static String ImportExportOperations_0;
- public static String ImportOperation_0;
- public static String WizardImportBreakpointsPage_0;
- public static String WizardImportBreakpointsPage_1;
- public static String WizardImportBreakpointsPage_2;
- public static String WizardImportBreakpointsPage_3;
- public static String WizardImportBreakpointsPage_4;
- public static String ExportOperation_0;
- public static String WizardImportBreakpointsPage_5;
- public static String WizardExportBreakpointsPage_0;
- public static String WizardExportBreakpointsPage_1;
- public static String WizardExportBreakpointsPage_2;
- public static String WizardExportBreakpointsPage_3;
- public static String WizardImportBreakpointsPage_6;
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpoints.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpoints.java
deleted file mode 100644
index 882cab6..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpoints.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.importexport.breakpoints;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.IExportWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * <p>
- * This class provides a wizard for exporting breakpoints.
- * It serves dual purpose, in that it is used by the platform import/export wizard,
- * but it can also be used as a standalone wizard.
- * </p>
- * <p>
- * Example:
- * </p>
- * <pre>
- * IWizard wiz = new WizardExportBreakpoints();
- * wiz.init(workbench, selection);
- * WizardDialog wizdialog = new WizardDialog(shell, wiz);
- * wizdialog.open();
- * </pre>
- *
- * This class uses <code>WizardExportBreakpointsPage</code>
- *
- * @since 3.2
- *
- */
-public class WizardExportBreakpoints extends Wizard implements IExportWizard {
-
- /*
- * The main page
- */
- private WizardExportBreakpointsPage fMainPage = null;
-
- /**
- * The existing selection
- */
- private IStructuredSelection fSelection = null;
-
- /**
- * Identifier for dialog settings section for the export wizard.
- */
- private static final String EXPORT_DIALOG_SETTINGS = "BreakpointExportSettings"; //$NON-NLS-1$
-
- /**
- * This is the default constructor
- */
- public WizardExportBreakpoints() {
- super();
- DebugUIPlugin plugin = DebugUIPlugin.getDefault();
- IDialogSettings workbenchSettings = plugin.getDialogSettings();
- IDialogSettings section = workbenchSettings.getSection(EXPORT_DIALOG_SETTINGS);
- if (section == null)
- section = workbenchSettings.addNewSection(EXPORT_DIALOG_SETTINGS);
- setDialogSettings(section);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#addPages()
- */
- public void addPages() {
- super.addPages();
- fMainPage = new WizardExportBreakpointsPage(ImportExportMessages.WizardExportBreakpoints_0, fSelection);
- addPage(fMainPage);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#dispose()
- */
- public void dispose() {
- super.dispose();
- fMainPage = null;
- fSelection = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#performFinish()
- */
- public boolean performFinish() {
- return fMainPage.finish();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
- */
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- fSelection = selection;
- setWindowTitle(ImportExportMessages.WizardExportBreakpoints_0);
- setNeedsProgressMonitor(true);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpointsPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpointsPage.java
deleted file mode 100644
index d7eb361..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpointsPage.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.importexport.breakpoints;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.SWTFactory;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsViewer;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.actions.ExportBreakpointsOperation;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.PlatformUI;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * <p>
- * This class provides an internal implementation of a WizardPage, which is used
- * in the Export Breakpoints wizard.
- * </p>
- * <p>
- * The implementation presents the breakpoints to the user as they are shown in
- * their current breakpoint view.
- * </p>
- * <p>
- * Possible extensions would include:
- * <ul>
- * <li> Able to change the views as in the breakpoints view itself
- * <li> Able to reorder groups from within the wizard - easier in the viewer itself though
- * </ul>
- * </p>
- * This class is used by <code>WizardExportBreakpoints</code>
- *
- * @since 3.2
- */
-public class WizardExportBreakpointsPage extends WizardPage implements Listener {
-
- // widgets
- private Button fOverwriteExistingFilesCheckbox = null;
- private Text fDestinationNameField = null;
- private Button fDestinationBrowseButton = null;
- private IPath fPath = null;
- private EmbeddedBreakpointsViewer fTView = null;
- private IStructuredSelection fSelection = null;
- private Button fSelectAll = null;
- private Button fDeselectAll = null;
-
- //state constants
- private static final String OVERWRITE_ALL_STATE = "overwrite"; //$NON-NLS-1$
- private static final String DESTINATION_FILE_NAME = "filename"; //$NON-NLS-1$
-
- /**
- * This is the default constructor. It accepts the name for the tab as a
- * parameter and an existing selection
- *
- * @param pageName the name of the page
- */
- public WizardExportBreakpointsPage(String pageName, IStructuredSelection selection) {
- super(pageName, ImportExportMessages.WizardExportBreakpoints_0, null);
- fSelection = selection;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
- */
- public void handleEvent(Event event) {
- Widget source = event.widget;
- if (source == fDestinationBrowseButton) {
- handleDestinationBrowseButtonPressed();
- }
- else if (source == fDestinationNameField) {
- handlePathTextModifiedEvent();
- }
- else if(source == fSelectAll) {
- handleSelectAllPressed();
- }
- else if(source == fDeselectAll) {
- handleDeselectAllPressed();
- }
- }
-
- /**
- * Handles the select all button pressed
- *
- */
- private void handleSelectAllPressed() {
- BreakpointsViewer viewer = fTView.getViewer();
- viewer.getTree().selectAll();
- viewer.setCheckedElements(((IStructuredSelection)viewer.getSelection()).toArray());
- viewer.setGrayedElements(new Object[] {});
- viewer.getTree().deselectAll();
- setPageComplete(detectPageComplete());
- }
-
- /**
- * Handles the de-select all button pressed
- *
- */
- private void handleDeselectAllPressed() {
- BreakpointsViewer viewer = fTView.getViewer();
- viewer.setCheckedElements(new Object[] {});
- viewer.setGrayedElements(new Object[] {});
- setPageComplete(detectPageComplete());
- }
-
- /**
- * This method handles the modified event from the path combo box.
- */
- protected void handlePathTextModifiedEvent() {
- setPageComplete(detectPageComplete());
- }
-
- /**
- * Open the SaveAsDialog so the user can save the listing of selected breakpoints
- */
- protected void handleDestinationBrowseButtonPressed() {
- FileDialog dialog = new FileDialog(getContainer().getShell(), SWT.SAVE);
- dialog.setFilterExtensions(new String[]{"*."+IImportExportConstants.EXTENSION}); //$NON-NLS-1$
- dialog.setText(ImportExportMessages.WizardExportBreakpoints_0);
- String file = dialog.open();
- if(file != null) {
- fPath = new Path(file);
- if (fPath != null) {
- setErrorMessage(null);
- if(fPath.getFileExtension() == null) {
- fPath = fPath.addFileExtension(IImportExportConstants.EXTENSION);
- }
- else if(!fPath.getFileExtension().equals(IImportExportConstants.EXTENSION)) {
- fPath = fPath.addFileExtension(IImportExportConstants.EXTENSION);
- }
- fDestinationNameField.setText(fPath.toString());
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- initializeDialogUnits(parent);
- Composite composite = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_BOTH);
- SWTFactory.createLabel(composite, ImportExportMessages.WizardExportBreakpointsPage_2, 1);
- fTView = new EmbeddedBreakpointsViewer(composite, DebugPlugin.getDefault().getBreakpointManager(), fSelection);
- fTView.getViewer().addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- setPageComplete(detectPageComplete());
- }
- });
- fTView.getViewer().setSelection(fSelection);
- //ensure we can see the beginning check-boxes etc. (bug 180971)
- //this will not work in Windows Vista as there is no way to over-ride the default viewer item showing policy
- //by setting the horizontal bar selection index. I.e. the following line of code is ignored in Vista
- fTView.getViewer().getTree().getHorizontalBar().setSelection(0);
- createButtonsGroup(composite);
- createDestinationGroup(composite);
- fOverwriteExistingFilesCheckbox = SWTFactory.createCheckButton(composite, ImportExportMessages.WizardBreakpointsPage_6, null, false, 1);
- setControl(composite);
- setPageComplete(false);
- setMessage(ImportExportMessages.WizardBreakpointsPage_4);
- restoreWidgetState();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IDebugHelpContextIds.EXPORT_BREAKPOINTS_WIZARD_PAGE);
-
- Dialog.applyDialogFont(parent);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#getImage()
- */
- public Image getImage() {
- return DebugUITools.getImage(IInternalDebugUIConstants.IMG_WIZBAN_EXPORT_BREAKPOINTS);
- }
-
- /**
- * Creates the buttons for selecting all or none of the elements.
- *
- * @param parent the parent control
- */
- private void createButtonsGroup(Composite parent) {
- Composite composite = SWTFactory.createComposite(parent, parent.getFont(), 3, 1, GridData.FILL_HORIZONTAL, 0, 0);
- fSelectAll = SWTFactory.createPushButton(composite, ImportExportMessages.WizardBreakpointsPage_1, null);
- fSelectAll.addListener(SWT.Selection, this);
- fDeselectAll = SWTFactory.createPushButton(composite, ImportExportMessages.WizardBreakpointsPage_2, null);
- fDeselectAll.addListener(SWT.Selection, this);
- }
-
- /**
- * This method is used to determine if the page can be "finished".
- *
- * To be determined "finishable" there must be a save path and there must be
- * a selection in the tree.
- *
- * @return if the prerequisites of the wizard are met to allow the wizard to complete.
- */
- private boolean detectPageComplete() {
- String filepath = fDestinationNameField.getText().trim();
- if (filepath.equals(IInternalDebugCoreConstants.EMPTY_STRING)) {
- setErrorMessage(ImportExportMessages.WizardExportBreakpointsPage_0);
- return false;
- }
- IPath path = new Path(filepath);
- if(!path.removeLastSegments(1).toFile().exists()) {
- setErrorMessage(ImportExportMessages.WizardExportBreakpointsPage_3);
- return false;
- }
- int size = fTView.getCheckedElements().size();
- if (size == 0) {
- setErrorMessage(ImportExportMessages.WizardExportBreakpointsPage_1);
- return false;
- }
- setErrorMessage(null);
- setMessage(ImportExportMessages.WizardBreakpointsPage_4);
- return true;
- }
-
- /**
- * Create the export destination specification widgets
- *
- * @param parent org.eclipse.swt.widgets.Composite
- */
- protected void createDestinationGroup(Composite parent) {
- // destination specification group
- Composite comp = SWTFactory.createComposite(parent, parent.getFont(), 3, 1, GridData.FILL_HORIZONTAL, 0, 10);
- SWTFactory.createLabel(comp, ImportExportMessages.WizardBreakpointsPage_7, 1);
-
- fDestinationNameField = SWTFactory.createText(comp, SWT.SINGLE | SWT.BORDER, 1, GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- fDestinationNameField.addListener(SWT.Modify, this);
- fDestinationBrowseButton = SWTFactory.createPushButton(comp, ImportExportMessages.WizardBreakpointsPage_8, null);
- fDestinationBrowseButton.addListener(SWT.Selection, this);
- }
-
- /**
- * Save the state of the widgets select, for successive invocations of the wizard
- */
- private void saveWidgetState() {
- IDialogSettings settings = getDialogSettings();
- if(settings != null) {
- settings.put(OVERWRITE_ALL_STATE, fOverwriteExistingFilesCheckbox.getSelection());
- settings.put(DESTINATION_FILE_NAME, fDestinationNameField.getText().trim());
- }
- }
-
- /**
- * Restores the state of the wizard from previous invocations
- */
- private void restoreWidgetState() {
- IDialogSettings settings = getDialogSettings();
- if(settings != null) {
- fOverwriteExistingFilesCheckbox.setSelection(Boolean.valueOf(settings.get(OVERWRITE_ALL_STATE)).booleanValue());
- String filename = settings.get(DESTINATION_FILE_NAME);
- if (filename != null) {
- fDestinationNameField.setText(filename);
- }
- }
- }
-
- /**
- * The Finish button is clicked on the main wizard
- * dialog to export the breakpoints, we write them out with all persistent
- * information to a simple XML file via the use of XMLMemento.
- *
- * @return if the save operation was successful or not
- */
- public boolean finish() {
- try {
- //name typed in without using selection box
- if(fPath == null) {
- fPath = new Path(fDestinationNameField.getText().trim());
- if(fPath.getFileExtension() == null) {
- fPath = fPath.addFileExtension(IImportExportConstants.EXTENSION);
- }
- else if(!fPath.getFileExtension().equals(IImportExportConstants.EXTENSION)) {
- fPath = fPath.addFileExtension(IImportExportConstants.EXTENSION);
- }
- }
- saveWidgetState();
- if(fPath.toFile().exists() && !fOverwriteExistingFilesCheckbox.getSelection()) {
- if (!MessageDialog.openQuestion(null, ImportExportMessages.WizardBreakpointsPage_12, MessageFormat.format(ImportExportMessages.ImportExportOperations_0, new String[] {fPath.toPortableString()}))) {
- return false;
- }
- }
- // collect breakpoints
- Object[] elements = fTView.getCheckedElements().toArray();
- List breakpoints = new ArrayList();
- for (int i = 0; i < elements.length; i++) {
- Object object = elements[i];
- if (object instanceof IBreakpoint) {
- breakpoints.add(object);
- }
- }
- getContainer().run(false,
- true,
- new ExportBreakpointsOperation(
- (IBreakpoint[]) breakpoints.toArray(new IBreakpoint[breakpoints.size()]),
- fPath.toOSString()));
- }
- catch (InterruptedException e) {
- DebugPlugin.log(e);
- return false;
- }
- catch (InvocationTargetException e) {
- DebugPlugin.log(e);
- return false;
- }
- return true;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpoints.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpoints.java
deleted file mode 100644
index ae00a53..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpoints.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.importexport.breakpoints;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * <p>
- * Wizard for Importing breakpoints.
- * It serves a dual purpose, in that it is used by the platform import/export wizard,
- * but it can also be used as a standalone wizard.
- * </p>
- * <p>
- * Example:
- * </p>
- * <pre>
- * IWizard wiz = new WizardImportBreakpoints();
- * wiz.init(workbench, selection);
- * WizardDialog wizdialog = new WizardDialog(shell, wiz);
- * wizdialog.open();
- * </pre>
- *
- * This class uses <code>WizardImportBreakpointsPage</code>
- *
- * @since 3.2
- *
- */
-public class WizardImportBreakpoints extends Wizard implements IImportWizard {
-
- /*
- * The main page
- */
- private WizardImportBreakpointsPage fMainPage = null;
-
- /**
- * Identifier for dialog settings section for the import wizard.
- */
- private static final String IMPORT_DIALOG_SETTINGS = "BreakpointImportSettings"; //$NON-NLS-1$
-
- /**
- * This is the default constructor
- */
- public WizardImportBreakpoints() {
- super();
- DebugUIPlugin plugin = DebugUIPlugin.getDefault();
- IDialogSettings workbenchSettings = plugin.getDialogSettings();
- IDialogSettings section = workbenchSettings.getSection(IMPORT_DIALOG_SETTINGS);
- if (section == null)
- section = workbenchSettings.addNewSection(IMPORT_DIALOG_SETTINGS);
- setDialogSettings(section);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#addPages()
- */
- public void addPages() {
- super.addPages();
- fMainPage = new WizardImportBreakpointsPage(ImportExportMessages.WizardImportBreakpoints_0);
- addPage(fMainPage);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#dispose()
- */
- public void dispose() {
- super.dispose();
- fMainPage = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#performFinish()
- */
- public boolean performFinish() {
- return fMainPage.finish();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
- */
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- setWindowTitle(ImportExportMessages.WizardImportBreakpoints_0);
- setNeedsProgressMonitor(true);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsPage.java
deleted file mode 100644
index 3b67b08..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsPage.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.importexport.breakpoints;
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.SWTFactory;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.actions.ImportBreakpointsOperation;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.PlatformUI;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * The import breakpoints wizard page.
- *
- * This class is used in <code>WizardImportBreakpoints</code>.
- *
- * @since 3.2
- */
-public class WizardImportBreakpointsPage extends WizardPage implements Listener {
-
- //widgets
- private Button fAutoRemoveDuplicates = null;
- private Button fAutoCreateWorkingSets = null;
- private Text fFileNameField = null;
- private Button fBrowseForFileButton = null;
-
-// state constants
- private static final String REMOVE_DUPS = "overwrite"; //$NON-NLS-1$
- private static final String CREATE_WORKING_SETS = "createws"; //$NON-NLS-1$
- private static final String SOURCE_FILE_NAME = "filename"; //$NON-NLS-1$
-
- /**
- * This is the default constructor. It accepts the name for the tab as a
- * parameter
- *
- * @param pageName the name of the page
- */
- public WizardImportBreakpointsPage(String pageName) {
- super(pageName, ImportExportMessages.WizardImportBreakpointsPage_0, null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
- */
- public void handleEvent(Event event) {
- Widget source = event.widget;
- if(source == fBrowseForFileButton) {
- handleBrowseForFileButtonPressed();
- }
- setPageComplete(detectPageComplete());
- }
-
- /**
- * This method handles the fBrowseForFileButton being pressed.
- */
- protected void handleBrowseForFileButtonPressed() {
- FileDialog dialog = new FileDialog(getContainer().getShell(), SWT.OPEN);
- dialog.setFilterExtensions(new String[]{"*."+IImportExportConstants.EXTENSION}); //$NON-NLS-1$
- String file = dialog.open();
- if(file != null) {
- fFileNameField.setText(file);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- initializeDialogUnits(parent);
- Composite composite = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_BOTH);
- createDestinationGroup(composite);
- createOptionsGroup(composite);
- setControl(composite);
- restoreWidgetState();
- setPageComplete(detectPageComplete());
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IDebugHelpContextIds.IMPORT_BREAKPOINTS_WIZARD_PAGE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#getImage()
- */
- public Image getImage() {
- return DebugUITools.getImage(IInternalDebugUIConstants.IMG_WIZBAN_IMPORT_BREAKPOINTS);
- }
-
- /**
- * This method is used to determine if the page can be "finished".
- * To be determined "finishable" there must be an import path.
- *
- * @return if the prerequisites of the wizard are met to allow the wizard to complete.
- */
- private boolean detectPageComplete() {
- String fileName = fFileNameField.getText().trim();
- if (fileName.equals(IInternalDebugCoreConstants.EMPTY_STRING)) {
- setMessage(ImportExportMessages.WizardImportBreakpointsPage_6);
- return false;
- }
- File file = new File(fileName);
- if (!file.exists() || file.isDirectory()) {
- setMessage(MessageFormat.format(ImportExportMessages.WizardImportBreakpointsPage_1, new String[]{fileName}), ERROR);
- return false;
- }
-
- setMessage(ImportExportMessages.WizardImportBreakpointsPage_2);
- return true;
- }
-
- /**
- * Create the options specification widgets.
- *
- * @param parent the parent composite to add this one to
- */
- protected void createOptionsGroup(Composite parent) {
- fAutoRemoveDuplicates = SWTFactory.createCheckButton(parent, ImportExportMessages.WizardImportBreakpointsPage_3, null, false, 1);
- fAutoCreateWorkingSets = SWTFactory.createCheckButton(parent, ImportExportMessages.WizardImportBreakpointsPage_5, null, false, 1);
- }
-
- /**
- * Create the export destination specification widgets
- *
- * @param parent the parent composite to add this one to
- */
- protected void createDestinationGroup(Composite parent) {
- Composite comp = SWTFactory.createComposite(parent, parent.getFont(), 3, 1, GridData.FILL_HORIZONTAL, 0, 10);
- SWTFactory.createLabel(comp, ImportExportMessages.WizardImportBreakpointsPage_4, 1);
-
- // file name entry field
- fFileNameField = SWTFactory.createText(comp, SWT.BORDER | SWT.SINGLE, 1, GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- fFileNameField.addListener(SWT.Modify, this);
-
- // destination browse button
- fBrowseForFileButton = SWTFactory.createPushButton(comp, ImportExportMessages.WizardBreakpointsPage_8, null);
- fBrowseForFileButton.addListener(SWT.Selection, this);
- }
-
- /**
- * Save the state of the widgets select, for successive invocations of the wizard
- */
- private void saveWidgetState() {
- IDialogSettings settings = getDialogSettings();
- if(settings != null) {
- settings.put(REMOVE_DUPS, fAutoRemoveDuplicates.getSelection());
- settings.put(CREATE_WORKING_SETS, fAutoCreateWorkingSets.getSelection());
- settings.put(SOURCE_FILE_NAME, fFileNameField.getText().trim());
- }
- }
-
- /**
- * Restores the state of the wizard from previous invocations
- */
- private void restoreWidgetState() {
- IDialogSettings settings = getDialogSettings();
- if(settings != null) {
- fAutoRemoveDuplicates.setSelection(Boolean.valueOf(settings.get(REMOVE_DUPS)).booleanValue());
- fAutoCreateWorkingSets.setSelection(Boolean.valueOf(settings.get(CREATE_WORKING_SETS)).booleanValue());
- String fileName = settings.get(SOURCE_FILE_NAME);
- if (fileName != null) {
- fFileNameField.setText(fileName);
- }
- }
- }
-
- /**
- * <p>
- * This method is called when the Finish button is click on the main wizard
- * dialog To import the breakpoints, we read then from the tree
- * and add them into the BreakpointManager
- * </p>
- * @return if the import operation was successful or not
- */
- public boolean finish() {
- try {
- saveWidgetState();
- getContainer().run(false,
- true,
- new ImportBreakpointsOperation(
- fFileNameField.getText().trim(),
- fAutoRemoveDuplicates.getSelection(),
- fAutoCreateWorkingSets.getSelection()));
- }
- catch (InterruptedException e) {
- DebugPlugin.log(e);
- return false;
- }
- catch (InvocationTargetException e) {
- DebugPlugin.log(e);
- return false;
- }
- return true;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizard.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizard.java
deleted file mode 100644
index cfbbe1f..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizard.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.importexport.launchconfigurations;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.IExportWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * This class provides a wizard for exporting launch configurations to the local
- * file system
- *
- * @since 3.4.0
- */
-public class ExportLaunchConfigurationsWizard extends Wizard implements IExportWizard {
-
- private String EXPORT_DIALOG_SETTINGS = "ExportLaunchConfigurations"; //$NON-NLS-1$
-
- /**
- * Constructor
- */
- public ExportLaunchConfigurationsWizard() {
- super();
- DebugUIPlugin plugin = DebugUIPlugin.getDefault();
- IDialogSettings workbenchSettings = plugin.getDialogSettings();
- IDialogSettings section = workbenchSettings.getSection(EXPORT_DIALOG_SETTINGS);
- if (section == null)
- section = workbenchSettings.addNewSection(EXPORT_DIALOG_SETTINGS);
- setDialogSettings(section);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- public void addPages() {
- IWizardPage page = new ExportLaunchConfigurationsWizardPage();
- addPage(page);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#performFinish()
- */
- public boolean performFinish() {
- return ((ExportLaunchConfigurationsWizardPage)getStartingPage()).finish();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
- */
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- setWindowTitle(WizardMessages.ExportLaunchConfigurationsWizard_0);
- setNeedsProgressMonitor(true);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java
deleted file mode 100644
index 0551c39..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java
+++ /dev/null
@@ -1,432 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.importexport.launchconfigurations;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.core.LaunchConfiguration;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.SWTFactory;
-import org.eclipse.debug.internal.ui.launchConfigurations.LaunchCategoryFilter;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTreeViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.WorkbenchViewerComparator;
-import org.eclipse.ui.progress.UIJob;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * This calls provides the one and only wizard page to the
- * export launch configurations wizard.
- * @since 3.4.0
- */
-public class ExportLaunchConfigurationsWizardPage extends WizardPage {
-
- /**
- * The content provider for the tree viewer
- * @since 3.4.0
- */
- class ConfigContentProvider implements ITreeContentProvider {
-
- ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
-
- public Object[] getChildren(Object parentElement) {
- if(parentElement instanceof ILaunchConfigurationType) {
- try {
- return lm.getLaunchConfigurations((ILaunchConfigurationType) parentElement);
- }
- catch (Exception e) {
- DebugUIPlugin.logErrorMessage(e.getMessage());
- }
- }
- return null;
- }
- public Object getParent(Object element) {
- if(element instanceof ILaunchConfiguration) {
- try {
- return ((ILaunchConfiguration)element).getType();
- } catch (CoreException e) {
- return null;
- }
- }
- return null;
- }
- public boolean hasChildren(Object element) {
- return element instanceof ILaunchConfigurationType;
- }
- public Object[] getElements(Object inputElement) {
- return lm.getLaunchConfigurationTypes();
- }
- public void dispose() {lm = null;}
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
-
- }
- private String OVERWRITE = "overwrite"; //$NON-NLS-1$
- private String OLD_PATH = "oldpath"; //$NON-NLS-1$
- private CheckboxTreeViewer fViewer = null;
- private Text fFilePath = null;
- private Button fOverwrite = null;
-
- /**
- * Constructor
- */
- protected ExportLaunchConfigurationsWizardPage() {
- super(WizardMessages.ExportLaunchConfigurationsWizard_0);
- setTitle(WizardMessages.ExportLaunchConfigurationsWizard_0);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_BOTH);
- //add the check table
- createViewer(comp);
- //add the file path and browse button
- createFilePath(comp);
- //add the overwrite option
- fOverwrite = SWTFactory.createCheckButton(comp, WizardMessages.ExportLaunchConfigurationsWizardPage_1, null, getDialogSettings().getBoolean(OVERWRITE), 2);
- setControl(comp);
- PlatformUI .getWorkbench().getHelpSystem().setHelp(comp, IDebugHelpContextIds.EXPORT_LAUNCH_CONFIGURATIONS_PAGE);
- setMessage(WizardMessages.ExportLaunchConfigurationsWizardPage_7);
- //do not set page complete, Eclipse UI guidelines states wizards cannot start off with an error showing
- setPageComplete(false);
- }
-
- /**
- * Creates the check table viewer portion of the control
- * @param parent the parent to add the check table viewer to
- */
- protected void createViewer(Composite parent) {
- SWTFactory.createWrapLabel(parent, WizardMessages.ExportLaunchConfigurationsWizardPage_3, 2);
- Tree tree = new Tree(parent, SWT.BORDER | SWT.SINGLE | SWT.CHECK);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.horizontalSpan = 2;
- tree.setLayoutData(gd);
- fViewer = new CheckboxTreeViewer(tree);
- fViewer.setLabelProvider(DebugUITools.newDebugModelPresentation());
- fViewer.setComparator(new WorkbenchViewerComparator());
- fViewer.setContentProvider(new ConfigContentProvider());
- fViewer.setInput(DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes());
- //we don't want to see builders....
- fViewer.addFilter(new LaunchCategoryFilter(IInternalDebugUIConstants.ID_EXTERNAL_TOOL_BUILDER_LAUNCH_CATEGORY));
- //need to force load the children so that select all works initially
- fViewer.expandAll();
- fViewer.collapseAll();
- fViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- updateCheckedState(event.getElement());
- setPageComplete(isComplete());
- }
- });
- Composite buttoncomp = SWTFactory.createComposite(parent, parent.getFont(), 2, 2, GridData.FILL_HORIZONTAL, 0, 0);
- Button button = SWTFactory.createPushButton(buttoncomp, WizardMessages.ExportLaunchConfigurationsWizardPage_8, null);
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- fViewer.setAllChecked(true);
- setPageComplete(isComplete());
- }
- });
- button = SWTFactory.createPushButton(buttoncomp, WizardMessages.ExportLaunchConfigurationsWizardPage_9, null);
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- fViewer.setAllChecked(false);
- setPageComplete(isComplete());
- }
- });
- }
-
- /**
- * Updates the checked state of child launch configurations if the parent type is checked
- * @param item
- */
- protected void updateCheckedState(Object element) {
- boolean state = fViewer.getChecked(element);
- if(element instanceof ILaunchConfigurationType) {
- Object[] items = ((ConfigContentProvider)fViewer.getContentProvider()).getChildren(element);
- for(int i = 0; i < items.length; i++) {
- fViewer.setChecked(items[i], state);
- }
- fViewer.setGrayed(element, false);
- }
- else if(element instanceof ILaunchConfiguration) {
- ConfigContentProvider ccp = (ConfigContentProvider) fViewer.getContentProvider();
- Object parent = ccp.getParent(element);
- Object[] items = ccp.getChildren(parent);
- boolean checked = true;
- boolean onechecked = false;
- for(int i = 0; i < items.length; i++) {
- state = fViewer.getChecked(items[i]);
- checked &= state;
- if(state) {
- onechecked = true;
- }
- }
- fViewer.setGrayed(parent, onechecked & !checked);
- fViewer.setChecked(parent, checked | onechecked);
- }
- }
-
- /**
- * Creates the controls for the file path selection area of the page
- * @param parent
- */
- protected void createFilePath(Composite parent) {
- Composite comp = SWTFactory.createComposite(parent, parent.getFont(), 3, 2, GridData.FILL_HORIZONTAL, 0, 10);
- SWTFactory.createLabel(comp, WizardMessages.ExportLaunchConfigurationsWizardPage_4, 1);
- fFilePath = SWTFactory.createText(comp, SWT.SINGLE | SWT.BORDER, 1);
- String opath = getDialogSettings().get(OLD_PATH);
- fFilePath.setText((opath == null ? IInternalDebugCoreConstants.EMPTY_STRING : opath));
- fFilePath.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- setPageComplete(isComplete());
- }
- });
- Button button = SWTFactory.createPushButton(comp, WizardMessages.ExportLaunchConfigurationsWizardPage_0, null, GridData.END);
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- DirectoryDialog dd = new DirectoryDialog(getContainer().getShell());
- dd.setText(WizardMessages.ExportLaunchConfigurationsWizard_0);
- String file = dd.open();
- if(file != null) {
- IPath path = new Path(file);
- if (path != null) {
- fFilePath.setText(path.toString());
- setPageComplete(isComplete());
- }
- }
- }
- });
- }
-
- /**
- * Returns if the page is complete
- * @return true if the page is complete and can be 'finished', false otherwise
- */
- protected boolean isComplete() {
- Object[] elements = fViewer.getCheckedElements();
- boolean oneconfig = false;
- for(int i = 0; i < elements.length; i++) {
- if(elements[i] instanceof ILaunchConfiguration) {
- oneconfig = true;
- break;
- }
- }
- if(elements.length < 1 || !oneconfig) {
- setErrorMessage(WizardMessages.ExportLaunchConfigurationsWizardPage_5);
- return false;
- }
- String path = fFilePath.getText().trim();
- if(path.equals(IInternalDebugCoreConstants.EMPTY_STRING)) {
- setErrorMessage(WizardMessages.ExportLaunchConfigurationsWizardPage_6);
- return false;
- }
- if ((new File(path)).isFile()) {
- setErrorMessage(WizardMessages.ExportLaunchConfigurationsWizardPage_2);
- return false;
- }
- setErrorMessage(null);
- setMessage(WizardMessages.ExportLaunchConfigurationsWizardPage_7);
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#getImage()
- */
- public Image getImage() {
- return DebugUITools.getImage(IInternalDebugUIConstants.IMG_WIZBAN_EXPORT_CONFIGS);
- }
-
- /**
- * This method performs the work of the page
- * @return if the export job was successful or not
- */
- public boolean finish() {
- final String dpath = fFilePath.getText().trim();
- IDialogSettings settings = getDialogSettings();
- settings.put(OVERWRITE, fOverwrite.getSelection());
- settings.put(OLD_PATH, dpath);
- final Object[] configs = fViewer.getCheckedElements();
- final boolean overwrite = fOverwrite.getSelection();
- UIJob exportjob = new UIJob(getContainer().getShell().getDisplay(), WizardMessages.ExportLaunchConfigurationsWizard_0) {
- public IStatus runInUIThread(IProgressMonitor monitor) {
- if(monitor == null) {
- monitor = new NullProgressMonitor();
- }
- IPath destpath = new Path(dpath);
- File destfolder = destpath.toFile();
- if(!destfolder.exists()) {
- destfolder.mkdirs();
- }
- monitor.beginTask(WizardMessages.ExportLaunchConfigurationsWizardPage_10, configs.length);
- try {
- List errors = null;
- IFileStore file = null;
- File newfile = null;
- boolean owall = false, nowall = false;
- MessageDialog dialog = null;
- for(int i = 0; i < configs.length; i++) {
- if(monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
- if(configs[i] instanceof ILaunchConfiguration) {
- try {
- LaunchConfiguration launchConfig = (LaunchConfiguration) configs[i];
- file = launchConfig.getFileStore();
- if (file == null) {
- if (errors == null) {
- errors = new ArrayList(configs.length);
- }
- errors.add(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(),
- MessageFormat.format(WizardMessages.ExportLaunchConfigurationsWizardPage_19, new String[]{launchConfig.getName()}), null));
- } else {
- newfile = new File(destpath.append(file.getName()).toOSString());
- if(newfile.exists() & !overwrite) {
- if(nowall) {
- continue;
- }
- dialog = new MessageDialog(DebugUIPlugin.getShell(),
- WizardMessages.ExportLaunchConfigurationsWizardPage_11,
- null,
- MessageFormat.format(WizardMessages.ExportLaunchConfigurationsWizardPage_12, new String[] {file.getName()}),
- MessageDialog.QUESTION, new String[] {WizardMessages.ExportLaunchConfigurationsWizardPage_13, WizardMessages.ExportLaunchConfigurationsWizardPage_14, WizardMessages.ExportLaunchConfigurationsWizardPage_15, WizardMessages.ExportLaunchConfigurationsWizardPage_16, WizardMessages.ExportLaunchConfigurationsWizardPage_17}, 0);
- if(!owall) {
- int ret = dialog.open();
- switch(ret) {
- case 0: {
- copyFile(file, newfile);
- break;
- }
- case 1: {
- owall = true;
- copyFile(file, newfile);
- break;
- }
- case 3: {
- nowall = true;
- break;
- }
- case 4: {
- monitor.setCanceled(true);
- break;
- }
- }
- }
- else if(!nowall) {
- copyFile(file, newfile);
- }
- }
- else {
- copyFile(file, newfile);
- }
- }
- }
- catch (IOException e ) {
- if (errors == null) {
- errors = new ArrayList(configs.length);
- }
- errors.add(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(),
- e.getMessage(), e));
- }
- catch (CoreException e) {
- if (errors == null) {
- errors = new ArrayList(configs.length);
- }
- errors.add(e.getStatus());
- }
- }
- if(!monitor.isCanceled()) {
- monitor.worked(1);
- }
- }
- if (errors == null || errors.isEmpty()) {
- return Status.OK_STATUS;
- } else {
- if (errors.size() == 1) {
- return (IStatus)errors.get(0);
- } else {
- return new MultiStatus(DebugUIPlugin.getUniqueIdentifier(), 0,
- (IStatus[])errors.toArray(new IStatus[errors.size()]),
- WizardMessages.ExportLaunchConfigurationsWizardPage_18, null);
- }
- }
- }
- finally {
- monitor.done();
- }
- }
- };
- exportjob.schedule();
- return true;
- }
-
- /**
- * Copies a file from one location to another
- * @param in the file to copy
- * @param out the file to be copied out to
- * @throws Exception
- * @since 3.5
- */
- protected void copyFile(IFileStore in, File out) throws CoreException, IOException {
- BufferedInputStream is = new BufferedInputStream(in.openInputStream(EFS.NONE, null));
- BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(out));
- byte[] buf = new byte[1024];
- int i = 0;
- while((i = is.read(buf)) != -1) {
- os.write(buf, 0, i);
- }
- is.close();
- os.close();
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ImportLaunchConfigurationsWizard.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ImportLaunchConfigurationsWizard.java
deleted file mode 100644
index 1cefad9..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ImportLaunchConfigurationsWizard.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.importexport.launchconfigurations;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * This class provides a wizard for importing launch configurations from the local
- * file system into the current workspace.
- *
- * It allows the suer to specify if the configuration should be shared or local
- * once imported
- *
- * @since 3.4.0
- */
-public class ImportLaunchConfigurationsWizard extends Wizard implements IImportWizard {
-
- private String EXPORT_DIALOG_SETTINGS = "ExportLaunchConfigurations"; //$NON-NLS-1$
-
- /**
- * Constructor
- */
- public ImportLaunchConfigurationsWizard() {
- super();
- DebugUIPlugin plugin = DebugUIPlugin.getDefault();
- IDialogSettings workbenchSettings = plugin.getDialogSettings();
- IDialogSettings section = workbenchSettings.getSection(EXPORT_DIALOG_SETTINGS);
- if (section == null)
- section = workbenchSettings.addNewSection(EXPORT_DIALOG_SETTINGS);
- setDialogSettings(section);
- setNeedsProgressMonitor(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#performFinish()
- */
- public boolean performFinish() {
- return ((ImportLaunchConfigurationsWizardPage)getStartingPage()).finish();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- public void addPages() {
- addPage(new ImportLaunchConfigurationsWizardPage());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
- */
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- setWindowTitle(WizardMessages.ImportLaunchConfigurationsWizard_0);
- setNeedsProgressMonitor(true);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ImportLaunchConfigurationsWizardPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ImportLaunchConfigurationsWizardPage.java
deleted file mode 100644
index e441b35..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ImportLaunchConfigurationsWizardPage.java
+++ /dev/null
@@ -1,359 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.importexport.launchconfigurations;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.core.LaunchManager;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.SWTFactory;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.FileSystemElement;
-import org.eclipse.ui.dialogs.WizardResourceImportPage;
-import org.eclipse.ui.model.AdaptableList;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.wizards.datatransfer.FileSystemStructureProvider;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * This class providers the one and only page for the import launch configurations wizard
- * @since 3.4.0
- */
-public class ImportLaunchConfigurationsWizardPage extends WizardResourceImportPage {
-
- /**
- * Represents a debug view of the file system, in that we only care about folders and files with the
- * extension *.launch
- * @since 3.4.0
- */
- class DebugFileSystemElement extends FileSystemElement {
-
- private boolean populated = false;
-
- public DebugFileSystemElement(String name, FileSystemElement parent, boolean isDirectory) {
- super(name, parent, isDirectory);
- }
-
- public void setPopulated() {
- populated = true;
- }
-
- public boolean isPopulated() {
- return populated;
- }
-
- public AdaptableList getFiles() {
- if(!populated) {
- populateElementChildren();
- }
- return super.getFiles();
- }
-
- public AdaptableList getFolders() {
- if(!populated) {
- populateElementChildren();
- }
- return super.getFolders();
- }
-
- /**
- * Populates the children of the specified parent <code>FileSystemElement</code>
- * @param element
- * @param folderonly
- */
- private void populateElementChildren() {
- FileSystemStructureProvider provider = FileSystemStructureProvider.INSTANCE;
- List allchildren = provider.getChildren(this.getFileSystemObject());
- File child = null;
- DebugFileSystemElement newelement = null;
- Iterator iter = allchildren.iterator();
- while(iter.hasNext()) {
- child = (File) iter.next();
- if(child.isFile()) {
- Path childpath = new Path(child.getAbsolutePath());
- String extension = childpath.getFileExtension();
- if(extension != null && extension.equals(ILaunchConfiguration.LAUNCH_CONFIGURATION_FILE_EXTENSION)) {
- newelement = new DebugFileSystemElement(provider.getLabel(child), this, provider.isFolder(child));
- newelement.setFileSystemObject(child);
- }
- }
- else {
- newelement = new DebugFileSystemElement(provider.getLabel(child), this, provider.isFolder(child));
- newelement.setFileSystemObject(child);
- }
- }
- setPopulated();
- }
- }
-
- private String OVERWRITE = "import_config_overwrite"; //$NON-NLS-1$
- private String OLD_PATH = "import_config_oldpath"; //$NON-NLS-1$
-
- private Text fFromDirectory = null;
- private Button fOverwrite = null;
-
- /**
- * Constructor
- */
- public ImportLaunchConfigurationsWizardPage() {
- super(WizardMessages.ImportLaunchConfigurationsWizardPage_0, new StructuredSelection());
- setTitle(WizardMessages.ImportLaunchConfigurationsWizardPage_0);
- setMessage(WizardMessages.ImportLaunchConfigurationsWizardPage_5);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- Composite comp = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_BOTH);
- createRootDirectoryGroup(comp);
- createFileSelectionGroup(comp);
- IDialogSettings settings = getDialogSettings();
- fOverwrite = SWTFactory.createCheckButton(comp, WizardMessages.ImportLaunchConfigurationsWizardPage_1, null, settings.getBoolean(OVERWRITE), 1);
- String oldpath = settings.get(OLD_PATH);
- oldpath = (oldpath == null ? IInternalDebugCoreConstants.EMPTY_STRING : oldpath);
- fFromDirectory.setText((oldpath == null ? IInternalDebugCoreConstants.EMPTY_STRING : oldpath));
- resetSelection(new Path(oldpath));
- setControl(comp);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IDebugHelpContextIds.IMPORT_LAUNCH_CONFIGURATIONS_PAGE);
- setPageComplete(false);
- //do not set page complete, Eclipse UI guidelines states wizards cannot start off with an error showing
- }
-
- /**
- * Performs the actual work of the wizard page and return is the work was successful
- * @return true if the import completed normally, false otherwise
- */
- public boolean finish() {
- IDialogSettings settings = getDialogSettings();
- settings.put(OVERWRITE, fOverwrite.getSelection());
- settings.put(OLD_PATH, fFromDirectory.getText().trim());
- boolean overwrite = fOverwrite.getSelection();
- List items = getSelectedResources();
- File config, newconfig = null;
- boolean owall = false, nowall = false;
- MessageDialog dialog = null;
- final List filesToImport = new ArrayList();
- for(Iterator iter = items.iterator(); iter.hasNext();) {
- config = (File) ((DebugFileSystemElement) iter.next()).getFileSystemObject();
- newconfig = new File(new Path(LaunchManager.LOCAL_LAUNCH_CONFIGURATION_CONTAINER_PATH.toOSString()).append(config.getName()).toOSString());
- if(newconfig.exists() & !overwrite) {
- if(nowall) {
- continue;
- }
- if(!owall) {
- dialog = new MessageDialog(DebugUIPlugin.getShell(),
- WizardMessages.ExportLaunchConfigurationsWizardPage_11,
- null,
- MessageFormat.format(WizardMessages.ExportLaunchConfigurationsWizardPage_12, new String[] {config.getName()}),
- MessageDialog.QUESTION, new String[] {WizardMessages.ExportLaunchConfigurationsWizardPage_13, WizardMessages.ExportLaunchConfigurationsWizardPage_14, WizardMessages.ExportLaunchConfigurationsWizardPage_15, WizardMessages.ExportLaunchConfigurationsWizardPage_16, WizardMessages.ExportLaunchConfigurationsWizardPage_17}, 0);
- int ret = dialog.open();
- switch(ret) {
- case 0: {
- filesToImport.add(config);
- break;
- }
- case 1: {
- owall = true;
- filesToImport.add(config);
- break;
- }
- case 3: {
- nowall = true;
- break;
- }
- case 4: {
- return true;
- }
- }
- } else if(!nowall) {
- filesToImport.add(config);
- }
- } else {
- filesToImport.add(config);
- }
- }
-
- if (!filesToImport.isEmpty()) {
- Job job = new Job(WizardMessages.ExportLaunchConfigurationsWizard_0) {
- public IStatus run(IProgressMonitor monitor) {
- LaunchManager launchManager = (LaunchManager) DebugPlugin.getDefault().getLaunchManager();
- try {
- launchManager.importConfigurations((File[]) filesToImport.toArray(new File[filesToImport.size()]), monitor);
- } catch (CoreException e) {
- return e.getStatus();
- }
- return Status.OK_STATUS;
- }
- };
- job.schedule();
- }
- return true;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#getImage()
- */
- public Image getImage() {
- return DebugUITools.getImage(IInternalDebugUIConstants.IMG_WIZBAN_IMPORT_CONFIGS);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.WizardResourceImportPage#updateWidgetEnablements()
- */
- protected void updateWidgetEnablements() {
- setPageComplete(determinePageCompletion());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.WizardResourceImportPage#determinePageCompletion()
- */
- protected boolean determinePageCompletion() {
- if(fFromDirectory.getText().trim().equals(IInternalDebugCoreConstants.EMPTY_STRING)) {
- setErrorMessage(WizardMessages.ImportLaunchConfigurationsWizardPage_3);
- return false;
- }
- if(selectionGroup.getCheckedElementCount() < 1) {
- setErrorMessage(WizardMessages.ImportLaunchConfigurationsWizardPage_4);
- return false;
- }
- setErrorMessage(null);
- setMessage(WizardMessages.ImportLaunchConfigurationsWizardPage_5);
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.WizardResourceImportPage#createSourceGroup(org.eclipse.swt.widgets.Composite)
- */
- protected void createSourceGroup(Composite parent) {}
-
- /**
- * Create the group for creating the root directory
- */
- protected void createRootDirectoryGroup(Composite parent) {
- Composite comp = SWTFactory.createComposite(parent, parent.getFont(), 3, 1, GridData.FILL_HORIZONTAL, 0, 0);
- SWTFactory.createLabel(comp, WizardMessages.ImportLaunchConfigurationsWizardPage_6, 1);
- // source name entry field
- fFromDirectory = SWTFactory.createText(comp, SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY, 1, GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
- // source browse button
- Button browse = SWTFactory.createPushButton(comp, WizardMessages.ImportLaunchConfigurationsWizardPage_7, null);
- browse.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected(SelectionEvent e) {
- DirectoryDialog dd = new DirectoryDialog(getContainer().getShell());
- dd.setText(WizardMessages.ImportLaunchConfigurationsWizardPage_0);
- String filename = dd.open();
- if(filename != null) {
- IPath path = new Path(filename);
- if (path != null) {
- fFromDirectory.setText(path.toString());
- resetSelection(path);
- setPageComplete(determinePageCompletion());
- }
- }
- }
- });
- }
-
- /**
- * Resets the selection of the tree root element for the viewer
- * @param path the path from the text widget
- */
- protected void resetSelection(final IPath path) {
- BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
- public void run() {
- File file = new File(path.toOSString());
- DebugFileSystemElement dummyparent = new DebugFileSystemElement(IInternalDebugCoreConstants.EMPTY_STRING, null, true);
- dummyparent.setPopulated();
- DebugFileSystemElement element = new DebugFileSystemElement(FileSystemStructureProvider.INSTANCE.getLabel(file),
- dummyparent,
- file.isDirectory());
- element.setFileSystemObject(file);
- element.getFiles();
- selectionGroup.setRoot(dummyparent);
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.WizardResourceImportPage#getFileProvider()
- */
- protected ITreeContentProvider getFileProvider() {
- return new WorkbenchContentProvider() {
- public Object[] getChildren(Object o) {
- if (o instanceof DebugFileSystemElement) {
- DebugFileSystemElement element = (DebugFileSystemElement) o;
- return element.getFiles().getChildren(element);
- }
- return new Object[0];
- }
- };
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.WizardResourceImportPage#getFolderProvider()
- */
- protected ITreeContentProvider getFolderProvider() {
- return new WorkbenchContentProvider() {
- public Object[] getChildren(Object o) {
- if (o instanceof DebugFileSystemElement) {
- DebugFileSystemElement element = (DebugFileSystemElement) o;
- return element.getFolders().getChildren();
- }
- return new Object[0];
- }
-
- public boolean hasChildren(Object o) {
- if (o instanceof DebugFileSystemElement) {
- DebugFileSystemElement element = (DebugFileSystemElement) o;
- if (element.isPopulated()) {
- return getChildren(element).length > 0;
- }
- //If we have not populated then wait until asked
- return true;
- }
- return false;
- }
- };
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/WizardMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/WizardMessages.java
deleted file mode 100644
index 706a4b7..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/WizardMessages.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.importexport.launchconfigurations;
-
-import org.eclipse.osgi.util.NLS;
-
-public class WizardMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.debug.internal.ui.importexport.launchconfigurations.WizardMessages"; //$NON-NLS-1$
- public static String ExportLaunchConfigurationsWizard_0;
- public static String ExportLaunchConfigurationsWizardPage_0;
- public static String ExportLaunchConfigurationsWizardPage_1;
- public static String ExportLaunchConfigurationsWizardPage_10;
- public static String ExportLaunchConfigurationsWizardPage_11;
- public static String ExportLaunchConfigurationsWizardPage_12;
- public static String ExportLaunchConfigurationsWizardPage_13;
- public static String ExportLaunchConfigurationsWizardPage_14;
- public static String ExportLaunchConfigurationsWizardPage_15;
- public static String ExportLaunchConfigurationsWizardPage_16;
- public static String ExportLaunchConfigurationsWizardPage_17;
- public static String ExportLaunchConfigurationsWizardPage_18;
- public static String ExportLaunchConfigurationsWizardPage_19;
- public static String ExportLaunchConfigurationsWizardPage_2;
- public static String ExportLaunchConfigurationsWizardPage_3;
- public static String ExportLaunchConfigurationsWizardPage_4;
- public static String ExportLaunchConfigurationsWizardPage_5;
- public static String ExportLaunchConfigurationsWizardPage_6;
- public static String ExportLaunchConfigurationsWizardPage_7;
- public static String ExportLaunchConfigurationsWizardPage_8;
- public static String ExportLaunchConfigurationsWizardPage_9;
- public static String ImportLaunchConfigurationsWizard_0;
- public static String ImportLaunchConfigurationsWizardPage_0;
- public static String ImportLaunchConfigurationsWizardPage_1;
- public static String ImportLaunchConfigurationsWizardPage_3;
- public static String ImportLaunchConfigurationsWizardPage_4;
- public static String ImportLaunchConfigurationsWizardPage_5;
- public static String ImportLaunchConfigurationsWizardPage_6;
- public static String ImportLaunchConfigurationsWizardPage_7;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, WizardMessages.class);
- }
-
- private WizardMessages() {
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/WizardMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/WizardMessages.properties
deleted file mode 100644
index b2d6f0d..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/WizardMessages.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-ExportLaunchConfigurationsWizard_0=Export Launch Configurations
-ExportLaunchConfigurationsWizardPage_0=Brows&e...
-ExportLaunchConfigurationsWizardPage_1=&Overwrite existing file(s) without warning
-ExportLaunchConfigurationsWizardPage_10=Exporting Launch Configurations
-ExportLaunchConfigurationsWizardPage_11=Overwrite?
-ExportLaunchConfigurationsWizardPage_12=Would you like overwrite {0}?
-ExportLaunchConfigurationsWizardPage_13=Yes
-ExportLaunchConfigurationsWizardPage_14=Yes to All
-ExportLaunchConfigurationsWizardPage_15=No
-ExportLaunchConfigurationsWizardPage_16=No to All
-ExportLaunchConfigurationsWizardPage_17=Cancel
-ExportLaunchConfigurationsWizardPage_18=Launch configuration export failed
-ExportLaunchConfigurationsWizardPage_19=Launch configuration does not exist: {0}
-ExportLaunchConfigurationsWizardPage_2=Specified export location is not a directory
-ExportLaunchConfigurationsWizardPage_3=&Launch Configurations:
-ExportLaunchConfigurationsWizardPage_4=Location:
-ExportLaunchConfigurationsWizardPage_5=Please select at least one launch configuration to export
-ExportLaunchConfigurationsWizardPage_6=Please specify a path to export the launch configurations to
-ExportLaunchConfigurationsWizardPage_7=Select launch configurations to export
-ExportLaunchConfigurationsWizardPage_8=&Select All
-ExportLaunchConfigurationsWizardPage_9=&Deselect All
-ImportLaunchConfigurationsWizard_0=Import Launch Configurations
-ImportLaunchConfigurationsWizardPage_0=Import Launch Configurations
-ImportLaunchConfigurationsWizardPage_1=&Overwrite existing launch configurations without warning.
-ImportLaunchConfigurationsWizardPage_3=You must select a root folder
-ImportLaunchConfigurationsWizardPage_4=You must select at least one configuration to import
-ImportLaunchConfigurationsWizardPage_5=Import launch configurations from the local file system
-ImportLaunchConfigurationsWizardPage_6=From &Directory:
-ImportLaunchConfigurationsWizardPage_7=Brows&e...
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/AbstractLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/AbstractLaunchConfigurationAction.java
deleted file mode 100644
index 2d0606f..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/AbstractLaunchConfigurationAction.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.actions.SelectionListenerAction;
-
-/**
- * Common function/behavior for launch configuration view actions
- */
-public abstract class AbstractLaunchConfigurationAction extends SelectionListenerAction {
-
- /**
- * The mode this action was created in (run, debug, ...)
- */
- private String fMode;
-
- /**
- * Allows a requestor to abort this action.
- */
- public interface IConfirmationRequestor {
- /**
- * Returns whether this action should proceed. Confirmation is requested
- * when an action is run.
- *
- * @return whether this action should proceed
- */
- public boolean getConfirmation();
- }
-
- /**
- * This action's confirmation requestor or <code>null</code> if none
- */
- private IConfirmationRequestor fConfirmationRequestor;
-
- /**
- * The viewer this action is working on
- */
- private Viewer fViewer;
-
- /**
- * Constructor for AbstractLaunchConfigurationAction.
- * @param text
- */
- public AbstractLaunchConfigurationAction(String text, Viewer viewer, String mode) {
- super(text);
- fViewer = viewer;
- fViewer.addSelectionChangedListener(this);
- fMode = mode;
- }
-
- /**
- * Returns the shell this action is contained in.
- *
- * @return the shell this action is contained in
- */
- protected Shell getShell() {
- return getViewer().getControl().getShell();
- }
-
- /**
- * Returns the viewer this action is working on
- *
- * @return the viewer this action is working on
- */
- protected Viewer getViewer() {
- return fViewer;
- }
-
- /**
- * Performs this action once confirmation has been aquired. Subclasses
- * should override this method.
- */
- protected abstract void performAction();
-
- /**
- * @see org.eclipse.jface.action.IAction#run()
- */
- public final void run() {
- if (fConfirmationRequestor != null) {
- if (!fConfirmationRequestor.getConfirmation()) {
- return;
- }
- }
- Runnable r = new Runnable() {
- /**
- * @see java.lang.Runnable#run()
- */
- public void run() {
- performAction();
- }
- };
- BusyIndicator.showWhile(getShell().getDisplay(), r);
- }
-
- /**
- * Sets this action's confirmation requestor.
- *
- * @param confirmationRequestor
- */
- public void setConfirmationRequestor(IConfirmationRequestor confirmationRequestor) {
- fConfirmationRequestor = confirmationRequestor;
- }
-
- /**
- * Disposes this action
- */
- public void dispose() {
- fViewer.removeSelectionChangedListener(this);
- }
-
- /**
- * Show an error dialog on the given exception.
- *
- * @param exception
- */
- protected void errorDialog(CoreException exception) {
- ErrorDialog.openError(getShell(), null, null, exception.getStatus());
- }
-
- /**
- * Return this action's mode.
- *
- * @return launch mode
- */
- protected String getMode() {
- return fMode;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ClosedProjectFilter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ClosedProjectFilter.java
deleted file mode 100644
index d36c2e4..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/ClosedProjectFilter.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-
-/**
- *
- * This implementation is used to filter closed projects from the launch configuration dialog.
- * It is (de)activated via the <code>IInternalDebugUIConstants.PREF_FILTER_LAUNCH_CLOSED</code> preference, and is
- * provided to fix bug 19521.
- *
- * @since 3.2
- *
- */
-public class ClosedProjectFilter extends ViewerFilter {
-
- /**
- * Constructor
- */
- public ClosedProjectFilter() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parent, Object element) {
- //always let through types, we only care about configs
- if(element instanceof ILaunchConfigurationType) {
- return true;
- }
- if(element instanceof ILaunchConfiguration) {
- try {
- ILaunchConfiguration config = (ILaunchConfiguration)element;
- IResource[] resources = config.getMappedResources();
- //if it has no mapping, it might not have migration delegate, so let it pass
- if(resources == null) {
- return true;
- }
- for(int i = 0; i < resources.length; i++) {
- IProject project= resources[i].getProject();
- //we don't want overlap with the deleted projects filter, so we need to allow projects that don't exist through
- if(project != null && (project.isOpen() || !project.exists())) {
- return true;
- }
- }
- }
- catch (CoreException e) {}
- }
- return false;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CollapseAllLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CollapseAllLaunchConfigurationAction.java
deleted file mode 100644
index a8ab1d7..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CollapseAllLaunchConfigurationAction.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.TreeViewer;
-
-/**
- * Provides a collapse all button for the launch configuration viewer toolbar
- * @since 3.2
- */
-public class CollapseAllLaunchConfigurationAction extends Action {
-
- /**
- * Action identifier for IDebugView#getAction(String)
- */
- public static final String ID_COLLAPSEALL_ACTION = DebugUIPlugin.getUniqueIdentifier() + ".ID_COLLAPSEALL_ACTION"; //$NON-NLS-1$
-
- /**
- * the viewer to perform the collapse all on
- */
- private TreeViewer fViewer = null;
-
- /**
- * Constructor
- * @param viewer the viewer to perform the collapse all on
- */
- public CollapseAllLaunchConfigurationAction(TreeViewer viewer) {
- fViewer = viewer;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- return DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_COLLAPSE_ALL);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getText()
- */
- public String getText() {
- return LaunchConfigurationsMessages.CollapseAllLaunchConfigurationAction_0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getToolTipText()
- */
- public String getToolTipText() {
- return LaunchConfigurationsMessages.CollapseAllLaunchConfigurationAction_1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getDisabledImageDescriptor()
- */
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_COLLAPSE_ALL);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run() {
- fViewer.collapseAll();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getDescription()
- */
- public String getDescription() {
- return LaunchConfigurationsMessages.CollapseAllLaunchConfigurationAction_2;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorProjectPromptStatusHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorProjectPromptStatusHandler.java
deleted file mode 100644
index 3c1d9a9..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorProjectPromptStatusHandler.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.IStatusHandler;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.widgets.Shell;
-
-import com.ibm.icu.text.MessageFormat;
-
-
-public class CompileErrorProjectPromptStatusHandler implements IStatusHandler {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object)
- */
- public Object handleStatus(IStatus status, Object source) throws CoreException {
- ILaunchConfiguration config = null;
- List projects = new ArrayList();
-
- if (source instanceof List) {
- List args = (List) source;
- Iterator iterator = args.iterator();
- while (iterator.hasNext()) {
- Object arg = iterator.next();
- if (arg instanceof ILaunchConfiguration) {
- config = (ILaunchConfiguration) arg;
- if (DebugUITools.isPrivate(config)) {
- return Boolean.TRUE;
- }
- } else if (arg instanceof IProject) {
- projects.add(arg);
- }
- }
- }
- Shell shell = DebugUIPlugin.getShell();
- StringBuffer projectList = new StringBuffer();
- //we need to limit this
- int size = Math.min(20, projects.size());
- for (int i = 0; i < size; i++) {
- if (i > 0) {
- projectList.append(", "); //$NON-NLS-1$
- }
- projectList.append(((IProject)projects.get(i)).getName());
- }
- String projectMessage = null;
- if(projects.size() > 20) {
- projectMessage = MessageFormat.format(LaunchConfigurationsMessages.CompileErrorProjectPromptStatusHandler_0, new Object[]{projectList.toString()});
- } else{
- projectMessage = projectList.toString();
- }
- String title = LaunchConfigurationsMessages.CompileErrorPromptStatusHandler_0;
- String message = MessageFormat.format(LaunchConfigurationsMessages.CompileErrorPromptStatusHandler_2, new String[]{projectMessage});
- IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
-
- String pref = store.getString(IInternalDebugUIConstants.PREF_CONTINUE_WITH_COMPILE_ERROR);
- if (pref != null) {
- if (pref.equals(MessageDialogWithToggle.ALWAYS)) {
- return Boolean.TRUE;
- }
- }
- MessageDialogWithToggle dialog = new MessageDialogWithToggle(shell,
- title,
- null,
- message,
- MessageDialog.QUESTION,
- new String[] {IDialogConstants.PROCEED_LABEL, IDialogConstants.CANCEL_LABEL},
- 0,
- LaunchConfigurationsMessages.CompileErrorProjectPromptStatusHandler_1,
- false);
- int open = dialog.open();
- if (open == IDialogConstants.PROCEED_ID) {
- if(dialog.getToggleState()) {
- store.setValue(IInternalDebugUIConstants.PREF_CONTINUE_WITH_COMPILE_ERROR, MessageDialogWithToggle.ALWAYS);
- }
- return Boolean.TRUE;
- }
- else {
- return Boolean.FALSE;
- }
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorPromptStatusHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorPromptStatusHandler.java
deleted file mode 100644
index ac08053..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorPromptStatusHandler.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.IStatusHandler;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class CompileErrorPromptStatusHandler implements IStatusHandler {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object)
- */
- public Object handleStatus(IStatus status, Object source) throws CoreException {
- if (source instanceof ILaunchConfiguration) {
- ILaunchConfiguration config = (ILaunchConfiguration)source;
- if (DebugUITools.isPrivate(config)) {
- return Boolean.TRUE;
- }
- }
-
- Shell shell = DebugUIPlugin.getShell();
- String title = LaunchConfigurationsMessages.CompileErrorPromptStatusHandler_0;
- String message = LaunchConfigurationsMessages.CompileErrorPromptStatusHandler_1;
- IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
-
- String pref = store.getString(IInternalDebugUIConstants.PREF_CONTINUE_WITH_COMPILE_ERROR);
- if (pref != null) {
- if (pref.equals(MessageDialogWithToggle.ALWAYS)) {
- return Boolean.TRUE;
- }
- }
- MessageDialogWithToggle dialog = new MessageDialogWithToggle(
- shell,
- title,
- null,
- message,
- MessageDialog.WARNING,
- new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL},
- 1,
- LaunchConfigurationsMessages.CompileErrorProjectPromptStatusHandler_1,
- false);
- dialog.setPrefKey(IInternalDebugUIConstants.PREF_CONTINUE_WITH_COMPILE_ERROR);
- dialog.setPrefStore(store);
- dialog.open();
-
- int returnValue = dialog.getReturnCode();
- if (returnValue == IDialogConstants.YES_ID) {
- return Boolean.TRUE;
- }
- return Boolean.FALSE;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CreateLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CreateLaunchConfigurationAction.java
deleted file mode 100644
index b13ca8d..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CreateLaunchConfigurationAction.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * Creates a new launch configuration based on the selection.
- */
-public class CreateLaunchConfigurationAction extends AbstractLaunchConfigurationAction {
-
- /**
- * Action identifier for IDebugView#getAction(String)
- */
- public static final String ID_CREATE_ACTION = DebugUIPlugin.getUniqueIdentifier() + ".ID_CREATE_ACTION"; //$NON-NLS-1$
-
- /**
- * Constructs an action to create a launch configuration
- */
- public CreateLaunchConfigurationAction(Viewer viewer, String mode) {
- super(LaunchConfigurationsMessages.CreateLaunchConfigurationAction_Ne_w_1, viewer, mode);
- }
-
- /**
- * @see AbstractLaunchConfigurationAction#performAction()
- */
- protected void performAction() {
- Object object = getStructuredSelection().getFirstElement();
- //double click with Ctrl key mask results in empty selection: bug 156087
- //do no work if the selection is null
- if(object != null) {
- ILaunchConfigurationType type= null;
- // Construct a new config of the selected type
- if (object instanceof ILaunchConfiguration) {
- ILaunchConfiguration config= (ILaunchConfiguration) object;
- try {
- type = config.getType();
- } catch (CoreException e) {
- errorDialog(e);
- return;
- }
- } else {
- type = (ILaunchConfigurationType) object;
- }
- try {
- ILaunchConfigurationWorkingCopy wc = type.newInstance(null, DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(LaunchConfigurationsMessages.CreateLaunchConfigurationAction_New_configuration_2));
- ILaunchConfigurationTabGroup tabGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(wc, getMode());
- // this only works because this action is only present when the dialog is open
- ILaunchConfigurationDialog dialog = LaunchConfigurationsDialog.getCurrentlyVisibleLaunchConfigurationDialog();
- tabGroup.createTabs(dialog, dialog.getMode());
- ILaunchConfigurationTab[] tabs = tabGroup.getTabs();
- for (int i = 0; i < tabs.length; i++) {
- tabs[i].setLaunchConfigurationDialog(dialog);
- }
- tabGroup.setDefaults(wc);
- tabGroup.dispose();
- wc.doSave();
- } catch (CoreException e) {
- errorDialog(e);
- return;
- }
- }
- }
-
- /**
- * @see org.eclipse.ui.actions.SelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected boolean updateSelection(IStructuredSelection selection) {
- return selection.size() == 1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getDisabledImageDescriptor()
- */
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_NEW_CONFIG);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- return DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_NEW_CONFIG);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getToolTipText()
- */
- public String getToolTipText() {
- return LaunchConfigurationsMessages.LaunchConfigurationsDialog_0;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DebugModePromptStatusHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DebugModePromptStatusHandler.java
deleted file mode 100644
index b56132a..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DebugModePromptStatusHandler.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.IStatusHandler;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.widgets.Shell;
-
-
-public class DebugModePromptStatusHandler implements IStatusHandler {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object)
- */
- public Object handleStatus(IStatus status, Object source) throws CoreException {
- if (source instanceof ILaunchConfiguration) {
- ILaunchConfiguration config = (ILaunchConfiguration)source;
- if (DebugUITools.isPrivate(config)) {
- return Boolean.FALSE;
- }
- }
-
- IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
- ILaunchConfiguration configuration = (ILaunchConfiguration)source;
- String pref = store.getString(IInternalDebugUIConstants.PREF_RELAUNCH_IN_DEBUG_MODE);
- if (pref != null) {
- if (pref.equals(MessageDialogWithToggle.NEVER)) {
- return Boolean.FALSE;
- } else if (pref.equals(MessageDialogWithToggle.ALWAYS)) {
- relaunchInDebugMode(configuration);
- return Boolean.TRUE;
- }
- }
-
- Shell activeShell = DebugUIPlugin.getShell();
- String title = LaunchConfigurationsMessages.DebugModePromptStatusHandler_0;
- String message = LaunchConfigurationsMessages.DebugModePromptStatusHandler_1;
-
- MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoCancelQuestion(activeShell, title, message, null, false, store, IInternalDebugUIConstants.PREF_RELAUNCH_IN_DEBUG_MODE);
- int buttonId = dialog.getReturnCode();
- if (buttonId == IDialogConstants.YES_ID) {
- relaunchInDebugMode(configuration);
- return Boolean.TRUE; // stops launch
- } else if (buttonId == IDialogConstants.NO_ID) {
- return Boolean.FALSE; // continue launch
- } else { //CANCEL
- return Boolean.TRUE; // stops the launch
- }
- }
- /**
- * @param configuration
- */
- private void relaunchInDebugMode(ILaunchConfiguration configuration) {
- DebugUITools.launch(configuration, ILaunchManager.DEBUG_MODE);
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeleteLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeleteLaunchConfigurationAction.java
deleted file mode 100644
index 7738c16..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeleteLaunchConfigurationAction.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * Deletes the selected launch configuration(s).
- */
-public class DeleteLaunchConfigurationAction extends AbstractLaunchConfigurationAction {
-
- /**
- * Action identifier for IDebugView#getAction(String)
- */
- public static final String ID_DELETE_ACTION = DebugUIPlugin.getUniqueIdentifier() + ".ID_DELETE_ACTION"; //$NON-NLS-1$
-
- /**
- * Constructs an action to delete launch configuration(s)
- */
- public DeleteLaunchConfigurationAction(Viewer viewer, String mode) {
- super(LaunchConfigurationsMessages.DeleteLaunchConfigurationAction_Dele_te_1, viewer, mode);
- }
-
- /**
- * Determines if the action can delete the select launch configuration(s) or not
- * @return true if the selected launch configuration(s) can be deleted or not
- * @since 3.3
- */
- protected boolean shouldDelete() {
- IStructuredSelection selection = getStructuredSelection();
- // Make the user confirm the deletion
- String dialogMessage = selection.size() > 1 ? LaunchConfigurationsMessages.LaunchConfigurationDialog_Do_you_wish_to_delete_the_selected_launch_configurations__1 : LaunchConfigurationsMessages.LaunchConfigurationDialog_Do_you_wish_to_delete_the_selected_launch_configuration__2; //
- return MessageDialog.openQuestion(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Confirm_Launch_Configuration_Deletion_3, dialogMessage);
- }
-
- /**
- * @see AbstractLaunchConfigurationAction#performAction()
- */
- protected void performAction() {
- if(!shouldDelete()) {
- return;
- }
- IStructuredSelection selection = getStructuredSelection();
-
- getViewer().getControl().setRedraw(false);
- Iterator iterator = selection.iterator();
- while (iterator.hasNext()) {
- ILaunchConfiguration configuration = (ILaunchConfiguration)iterator.next();
- try {
- configuration.delete();
- } catch (CoreException e) {
- errorDialog(e);
- }
- }
- getViewer().getControl().setRedraw(true);
- }
-
- /**
- * @see org.eclipse.ui.actions.SelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected boolean updateSelection(IStructuredSelection selection) {
- if (selection.isEmpty()) {
- return false;
- }
- Iterator items = selection.iterator();
- while (items.hasNext()) {
- if (!(items.next() instanceof ILaunchConfiguration)) {
- return false;
- }
- }
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getDisabledImageDescriptor()
- */
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_DELETE_CONFIG);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- return DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DELETE_CONFIG);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getToolTipText()
- */
- public String getToolTipText() {
- return LaunchConfigurationsMessages.LaunchConfigurationsDialog_1;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeletedProjectFilter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeletedProjectFilter.java
deleted file mode 100644
index fb68746..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeletedProjectFilter.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-
-/**
- *
- * Provides implementation to filter unavailable projects form the launch configuration dialog.
- * It is (de) activated via the <code>IInternalDebugUIConstants.PREF_FILTER_LAUNCH_DELETED</code> preference.
- *
- * @since 3.2
- *
- */
-public class DeletedProjectFilter extends ViewerFilter {
-
- /**
- * Constructor
- */
- public DeletedProjectFilter() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- //always let through types, we only care about configs
- if (element instanceof ILaunchConfigurationType) {
- return true;
- }
- if(element instanceof ILaunchConfiguration) {
- try {
- ILaunchConfiguration config = (ILaunchConfiguration)element;
- IResource[] resources = config.getMappedResources();
- if(resources == null) {
- return true;
- }
- for(int i = 0; i < resources.length; i++) {
- IProject project= resources[i].getProject();
- if(project != null && project.exists()) {
- return true;
- }
- }
- }
- catch(CoreException e) {}
- }
- return false;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchConfigurationAction.java
deleted file mode 100644
index 825ed3c..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchConfigurationAction.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * Duplicates the selected launch configuration.
- */
-public class DuplicateLaunchConfigurationAction extends AbstractLaunchConfigurationAction {
-
- /**
- * Action identifier for IDebugView#getAction(String)
- */
- public static final String ID_DUPLICATE_ACTION = DebugUIPlugin.getUniqueIdentifier() + ".ID_DUPLICATE_ACTION"; //$NON-NLS-1$
-
- /**
- * Constructs an action to duplicate a launch configuration
- */
- public DuplicateLaunchConfigurationAction(Viewer viewer, String mode) {
- super(LaunchConfigurationsMessages.DuplicateLaunchConfigurationAction__Duplicate_1, viewer, mode);
- }
-
- /**
- * @see AbstractLaunchConfigurationAction#performAction()
- */
- protected void performAction() {
- ILaunchConfiguration original = (ILaunchConfiguration)getStructuredSelection().getFirstElement();
- String newName = DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(original.getName());
- try {
- ILaunchConfigurationWorkingCopy newWorkingCopy = original.copy(newName);
- newWorkingCopy.doSave();
- } catch (CoreException e) {
- errorDialog(e);
- }
- }
-
- /**
- * @see org.eclipse.ui.actions.SelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
- */
- protected boolean updateSelection(IStructuredSelection selection) {
- return selection.size() == 1 && selection.getFirstElement() instanceof ILaunchConfiguration;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getDisabledImageDescriptor()
- */
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_DUPLICATE_CONFIG);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- return DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DUPLICATE_CONFIG);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getToolTipText()
- */
- public String getToolTipText() {
- return LaunchConfigurationsMessages.LaunchConfigurationsDialog_5;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchDelegatesStatusHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchDelegatesStatusHandler.java
deleted file mode 100644
index a599a91..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchDelegatesStatusHandler.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import java.util.HashSet;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchDelegate;
-import org.eclipse.debug.core.IStatusHandler;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This class provides a mechanism to prompt users in the UI thread from debug.core in the case where
- * duplicate launch delegates have been detected and a preferred delegate needs to be selected.
- *
- * As this handler is used once a launch has been started, and only prompts in the event that the launch <i>can</i>
- * continue with further input, it must be a blocking operation.
- *
- * @since 3.3
- */
-public class DuplicateLaunchDelegatesStatusHandler implements IStatusHandler {
-
- /**
- * @see org.eclipse.debug.core.IStatusHandler#handleStatus(org.eclipse.core.runtime.IStatus, java.lang.Object)
- */
- public Object handleStatus(IStatus status, Object source) throws CoreException {
- if(source instanceof Object[]) {
- Object[] infos = (Object[]) source;
- if(infos.length == 2) {
- ILaunchConfiguration config = (ILaunchConfiguration) infos[0];
- String mode = (String) infos[1];
- Shell shell = DebugUIPlugin.getShell();
- HashSet modes = new HashSet();
- modes.add(mode);
- modes.addAll(config.getModes());
- SelectLaunchersDialog sldd = new SelectLaunchersDialog(shell,
- config.getType().getDelegates(modes),
- config.getWorkingCopy(),
- mode);
- if(sldd.open() != IDialogConstants.OK_ID) {
- return Status.CANCEL_STATUS;
- }
- //check that the delegate has been set
- ILaunchDelegate delegate = config.getPreferredDelegate(modes);
- if(delegate == null) {
- delegate = config.getType().getPreferredDelegate(modes);
- }
- return (delegate == null ? Status.CANCEL_STATUS : Status.OK_STATUS);
- }
- }
- return Status.CANCEL_STATUS;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/EnvironmentVariable.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/EnvironmentVariable.java
deleted file mode 100644
index c93c3ae..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/EnvironmentVariable.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 Keith Seitz and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Keith Seitz (keiths@redhat.com) - initial implementation
- * IBM Corporation - integration and code cleanup
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-/**
- * A key/value set whose data is passed into Runtime.exec(...)
- */
-public class EnvironmentVariable
-{
- // The name of the environment variable
- private String name;
-
- // The value of the environment variable
- private String value;
-
- public EnvironmentVariable(String name, String value)
- {
- this.name = name;
- this.value = value;
- }
-
- /**
- * Returns this variable's name, which serves as the key in the key/value
- * pair this variable represents
- *
- * @return this variable's name
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Returns this variables value.
- *
- * @return this variable's value
- */
- public String getValue()
- {
- return value;
- }
-
- /**
- * Sets this variable's value
- * @param value
- */
- public void setValue(String value)
- {
- this.value = value;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return getName();
- }
-
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- boolean equal = false;
- if (obj instanceof EnvironmentVariable) {
- EnvironmentVariable var = (EnvironmentVariable)obj;
- equal = var.getName().equals(name);
- }
- return equal;
- }
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return name.hashCode();
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java
deleted file mode 100644
index 7bedac0..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java
+++ /dev/null
@@ -1,471 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.SWTFactory;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * Dialog for organizing favorite launch configurations
- */
-public class FavoritesDialog extends TrayDialog {
-
- /**
- * Table of favorite launch configurations
- */
- private TableViewer fFavoritesTable;
-
- // history being organized
- private LaunchHistory fHistory;
-
- // favorites collection under edit
- private List fFavorites;
-
- // buttons
- protected Button fAddFavoriteButton;
- protected Button fRemoveFavoritesButton;
- protected Button fMoveUpButton;
- protected Button fMoveDownButton;
-
- // button action handler
- /**
- * Listener that delegates when a button is pressed
- */
- private SelectionAdapter fButtonListener= new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button button = (Button) e.widget;
- if (button == fAddFavoriteButton) {
- handleAddConfigButtonSelected();
- } else if (button == fRemoveFavoritesButton) {
- removeSelectedFavorites();
- } else if (button == fMoveUpButton) {
- handleMoveUpButtonSelected();
- } else if (button == fMoveDownButton) {
- handleMoveDownButtonSelected();
- }
- }
- };
-
- /**
- * Listener that delegates when the selection changes in a table
- */
- private ISelectionChangedListener fSelectionChangedListener= new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- handleFavoriteSelectionChanged();
- }
- };
-
- /**
- * Listener that delegates when a key is pressed in a table
- */
- private KeyListener fKeyListener= new KeyAdapter() {
- public void keyPressed(KeyEvent event) {
- if (event.character == SWT.DEL && event.stateMask == 0) {
- removeSelectedFavorites();
- }
- }
- };
-
- /**
- * Content provider for favorites table
- */
- protected class FavoritesContentProvider implements IStructuredContentProvider {
- public Object[] getElements(Object inputElement) {
- ILaunchConfiguration[] favorites= (ILaunchConfiguration[]) getFavorites().toArray(new ILaunchConfiguration[0]);
- return LaunchConfigurationManager.filterConfigs(favorites);
- }
- public void dispose() {}
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
- }
-
- /**
- * Constructs a favorites dialog.
- *
- * @param parentShell shell to open the dialog on
- * @param history launch history to edit
- */
- public FavoritesDialog(Shell parentShell, LaunchHistory history) {
- super(parentShell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- fHistory = history;
- }
-
- /**
- * The 'add config' button has been pressed
- */
- protected void handleAddConfigButtonSelected() {
- SelectFavoritesDialog sfd = new SelectFavoritesDialog(fFavoritesTable.getControl().getShell(), getLaunchHistory(), getFavorites());
- sfd.open();
- Object[] selection = sfd.getResult();
- if (selection != null) {
- for (int i = 0; i < selection.length; i++) {
- getFavorites().add(selection[i]);
- }
- updateStatus();
- }
- }
-
- /**
- * The 'remove favorites' button has been pressed
- */
- protected void removeSelectedFavorites() {
- IStructuredSelection sel = (IStructuredSelection)getFavoritesTable().getSelection();
- Iterator iter = sel.iterator();
- while (iter.hasNext()) {
- Object config = iter.next();
- getFavorites().remove(config);
- }
- getFavoritesTable().refresh();
- }
-
- /**
- * The 'move up' button has been pressed
- */
- protected void handleMoveUpButtonSelected() {
- handleMove(-1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#getInitialSize()
- */
- protected Point getInitialSize() {
- return new Point(350, 400);
- }
-
- /**
- * The 'move down' button has been pressed
- */
- protected void handleMoveDownButtonSelected() {
- handleMove(1);
- }
-
- /**
- * Handles moving a favorite up or down the listing
- * @param direction the direction to make the move (up or down)
- */
- protected void handleMove(int direction) {
- IStructuredSelection sel = (IStructuredSelection)getFavoritesTable().getSelection();
- List selList= sel.toList();
- Object[] movedFavs= new Object[getFavorites().size()];
- int i;
- for (Iterator favs = selList.iterator(); favs.hasNext();) {
- Object config = favs.next();
- i= getFavorites().indexOf(config);
- movedFavs[i + direction]= config;
- }
-
- getFavorites().removeAll(selList);
-
- for (int j = 0; j < movedFavs.length; j++) {
- Object config = movedFavs[j];
- if (config != null) {
- getFavorites().add(j, config);
- }
- }
- getFavoritesTable().refresh();
- handleFavoriteSelectionChanged();
- }
-
- /**
- * Returns the table of favorite launch configurations.
- *
- * @return table viewer
- */
- protected TableViewer getFavoritesTable() {
- return fFavoritesTable;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite) super.createDialogArea(parent);
- getShell().setText(MessageFormat.format(LaunchConfigurationsMessages.FavoritesDialog_1, new String[]{getModeLabel()}));
- createFavoritesArea(composite);
- handleFavoriteSelectionChanged();
- return composite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
- Control contents = super.createContents(parent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getDialogArea(), IDebugHelpContextIds.ORGANIZE_FAVORITES_DIALOG);
- return contents;
- }
-
- /**
- * Returns a label to use for launch mode with accelerators removed.
- *
- * @return label to use for launch mode with accelerators removed
- */
- private String getModeLabel() {
- return DebugUIPlugin.removeAccelerators(fHistory.getLaunchGroup().getLabel());
- }
-
- /**
- * Creates the main area of the dialog
- * @param parent the parent to add this content to
- */
- protected void createFavoritesArea(Composite parent) {
- Composite topComp = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_BOTH, 0, 0);
- SWTFactory.createLabel(topComp, LaunchConfigurationsMessages.FavoritesDialog_2, 2);
- fFavoritesTable = createTable(topComp, new FavoritesContentProvider());
- Composite buttonComp = SWTFactory.createComposite(topComp, topComp.getFont(), 1, 1, GridData.VERTICAL_ALIGN_BEGINNING, 0, 0);
- fAddFavoriteButton = SWTFactory.createPushButton(buttonComp, LaunchConfigurationsMessages.FavoritesDialog_3, null);
- fAddFavoriteButton.addSelectionListener(fButtonListener);
- fAddFavoriteButton.setEnabled(true);
- fRemoveFavoritesButton = SWTFactory.createPushButton(buttonComp, LaunchConfigurationsMessages.FavoritesDialog_4, null);
- fRemoveFavoritesButton.addSelectionListener(fButtonListener);
- fMoveUpButton = SWTFactory.createPushButton(buttonComp, LaunchConfigurationsMessages.FavoritesDialog_5, null);
- fMoveUpButton.addSelectionListener(fButtonListener);
- fMoveDownButton = SWTFactory.createPushButton(buttonComp, LaunchConfigurationsMessages.FavoritesDialog_6, null);
- fMoveDownButton.addSelectionListener(fButtonListener);
- }
-
- /**
- * Creates a fully configured table with the given content provider
- */
- private TableViewer createTable(Composite parent, IContentProvider contentProvider) {
- TableViewer tableViewer= new TableViewer(parent, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION);
- tableViewer.setLabelProvider(DebugUITools.newDebugModelPresentation());
- tableViewer.setContentProvider(contentProvider);
- tableViewer.setInput(DebugUIPlugin.getDefault());
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.widthHint = 100;
- gd.heightHint = 100;
- tableViewer.getTable().setLayoutData(gd);
- tableViewer.getTable().setFont(parent.getFont());
- tableViewer.addSelectionChangedListener(fSelectionChangedListener);
- tableViewer.getControl().addKeyListener(fKeyListener);
- return tableViewer;
- }
-
- /**
- * Returns the current list of favorites.
- */
- protected List getFavorites() {
- if (fFavorites == null) {
- ILaunchConfiguration[] favs = getInitialFavorites();
- fFavorites = new ArrayList(favs.length);
- addAll(favs, fFavorites);
- }
- return fFavorites;
- }
-
- protected LaunchHistory getLaunchHistory() {
- return fHistory;
- }
-
- /**
- * Returns the initial content for the favorites list
- */
- protected ILaunchConfiguration[] getInitialFavorites() {
- return getLaunchHistory().getFavorites();
- }
-
- /**
- * Returns the mode of this page - run or debug.
- */
- protected String getMode() {
- return getLaunchHistory().getLaunchGroup().getMode();
- }
-
- /**
- * Copies the array into the list
- */
- protected void addAll(Object[] array, List list) {
- for (int i = 0; i < array.length; i++) {
- list.add(array[i]);
- }
- }
-
- /**
- * Refresh all tables and buttons
- */
- protected void updateStatus() {
- getFavoritesTable().refresh();
- handleFavoriteSelectionChanged();
- }
-
- /**
- * The selection in the favorites list has changed
- */
- protected void handleFavoriteSelectionChanged() {
- IStructuredSelection selection = (IStructuredSelection)getFavoritesTable().getSelection();
- List favs = getFavorites();
- boolean notEmpty = !selection.isEmpty();
- Iterator elements= selection.iterator();
- boolean first= false;
- boolean last= false;
- int lastFav= favs.size() - 1;
- while (elements.hasNext()) {
- Object element = elements.next();
- if(!first && favs.indexOf(element) == 0) {
- first= true;
- }
- if (!last && favs.indexOf(element) == lastFav) {
- last= true;
- }
- }
-
- fRemoveFavoritesButton.setEnabled(notEmpty);
- fMoveUpButton.setEnabled(notEmpty && !first);
- fMoveDownButton.setEnabled(notEmpty && !last);
- }
-
- /**
- * Method performOK. Uses scheduled Job format.
- * @since 3.2
- */
- public void saveFavorites() {
-
- final Job job = new Job(LaunchConfigurationsMessages.FavoritesDialog_8) {
- protected IStatus run(IProgressMonitor monitor) {
- ILaunchConfiguration[] initial = getInitialFavorites();
- List current = getFavorites();
- String groupId = getLaunchHistory().getLaunchGroup().getIdentifier();
-
- int taskSize = Math.abs(initial.length-current.size());//get task size
- monitor.beginTask(LaunchConfigurationsMessages.FavoritesDialog_8, taskSize);//and set it
-
- // removed favorites
- for (int i = 0; i < initial.length; i++) {
- ILaunchConfiguration configuration = initial[i];
- if (!current.contains(configuration)) {
- // remove fav attributes
- try {
- ILaunchConfigurationWorkingCopy workingCopy = configuration.getWorkingCopy();
- workingCopy.setAttribute(IDebugUIConstants.ATTR_DEBUG_FAVORITE, (String)null);
- workingCopy.setAttribute(IDebugUIConstants.ATTR_DEBUG_FAVORITE, (String)null);
- List groups = workingCopy.getAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, (List)null);
- if (groups != null) {
- groups.remove(groupId);
- if (groups.isEmpty()) {
- groups = null;
- }
- workingCopy.setAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, groups);
- }
- workingCopy.doSave();
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- return Status.CANCEL_STATUS;
- }
- }
- monitor.worked(1);
- }
-
- // update added favorites
- Iterator favs = current.iterator();
- while (favs.hasNext()) {
- ILaunchConfiguration configuration = (ILaunchConfiguration)favs.next();
- try {
- List groups = configuration.getAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, (List)null);
- if (groups == null) {
- groups = new ArrayList();
- }
- if (!groups.contains(groupId)) {
- groups.add(groupId);
- ILaunchConfigurationWorkingCopy workingCopy = configuration.getWorkingCopy();
- workingCopy.setAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, groups);
- workingCopy.doSave();
- }
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- return Status.CANCEL_STATUS;
- }
- monitor.worked(1);
- }
-
- fHistory.setFavorites(getArray(current));
- monitor.done();
- return Status.OK_STATUS;
- }
- };
- job.setPriority(Job.LONG);
- PlatformUI.getWorkbench().getProgressService().showInDialog(getParentShell(), job);
- job.schedule();
-
- }
-
- protected ILaunchConfiguration[] getArray(List list) {
- return (ILaunchConfiguration[])list.toArray(new ILaunchConfiguration[list.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
- protected void okPressed() {
- saveFavorites();
- super.okPressed();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings()
- */
- protected IDialogSettings getDialogBoundsSettings() {
- IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(getDialogSettingsSectionName());
- if (section == null) {
- section = settings.addNewSection(getDialogSettingsSectionName());
- }
- return section;
- }
-
- /**
- * Returns the name of the section that this dialog stores its settings in
- *
- * @return String
- */
- private String getDialogSettingsSectionName() {
- return "FAVORITES_DIALOG_SECTION"; //$NON-NLS-1$
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FilterDropDownMenuCreator.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FilterDropDownMenuCreator.java
deleted file mode 100644
index 5073920..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FilterDropDownMenuCreator.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.SWTFactory;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-
-/**
- * Creates the drop down menu for the filtering button in the launch configuration dialog
- * @since 3.2
- */
-public class FilterDropDownMenuCreator implements IMenuCreator {
-
- /**
- * Provides wrapper action for filtering actions on the launch configuration dialog
- * @since 3.2
- */
- class FilterAction extends Action {
-
- /** The preference store. */
- private IPreferenceStore fStore = null;
-
- /** The preference key for the value in the store. */
- private String fKey = null;
-
- /**
- * Constructor for check style menu items
- * @param store the pref store
- * @param name the name of the action
- * @param key the pref key it is tied to
- */
- public FilterAction(Menu menu, IPreferenceStore store, String name, String key) {
- super(name, IAction.AS_CHECK_BOX);
- fStore = store;
- fKey = key;
- setChecked(fStore.getBoolean(fKey));
- fillIntoMenu(menu, this);
- }
-
- /**
- * Constructor for flyout menu style actions
- * @param menu the parent menu
- * @param name the text of the action
- * @param creator the menu creator for this action
- */
- public FilterAction(Menu menu, String name, IMenuCreator creator) {
- super(name, IAction.AS_DROP_DOWN_MENU);
- setMenuCreator(creator);
- fillIntoMenu(menu, this);
- }
-
- /**
- * fills the new action into the specified menu
- * @param menu the parent menu
- * @param action the new aciton to fill in to the parent
- */
- private void fillIntoMenu(Menu menu, IAction action) {
- ActionContributionItem item = new ActionContributionItem(action);
- item.fill(menu, -1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run() {
- if(fStore != null) {
- fStore.setValue(fKey, isChecked());
- }
- }
- }
-
- /**
- * the menu created via this class
- */
- private Menu fCreatedMenu = null;
-
- /**
- * gets the DebugUIPlugin preference store
- * @return the pref store
- */
- private IPreferenceStore getDebugPrefStore() {
- return DebugUIPlugin.getDefault().getPreferenceStore();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#dispose()
- */
- public void dispose() {
- fCreatedMenu = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)
- */
- public Menu getMenu(Control parent) {
- if(fCreatedMenu != null) {
- fCreatedMenu.dispose();
- }
- //create the menu & items
- fCreatedMenu = new Menu(parent);
- new FilterAction(fCreatedMenu, getDebugPrefStore(), LaunchConfigurationsMessages.FilterDropDownMenuCreator_0, IInternalDebugUIConstants.PREF_FILTER_LAUNCH_CLOSED);
- new FilterAction(fCreatedMenu, getDebugPrefStore(), LaunchConfigurationsMessages.FilterDropDownMenuCreator_1, IInternalDebugUIConstants.PREF_FILTER_LAUNCH_DELETED);
- new FilterAction(fCreatedMenu, getDebugPrefStore(), LaunchConfigurationsMessages.FilterDropDownMenuCreator_2, IInternalDebugUIConstants.PREF_FILTER_LAUNCH_TYPES);
- new FilterAction(fCreatedMenu, getDebugPrefStore(), LaunchConfigurationsMessages.FilterDropDownMenuCreator_4, IInternalDebugUIConstants.PREF_FILTER_WORKING_SETS);
-
- //add separator
- new MenuItem(fCreatedMenu, SWT.SEPARATOR);
-
- //add pref action
- IAction action = new Action(LaunchConfigurationsMessages.FilterDropDownMenuCreator_3) {
- public void run() {
- SWTFactory.showPreferencePage("org.eclipse.debug.ui.LaunchConfigurations"); //$NON-NLS-1$
- }
- };
- new ActionContributionItem(action).fill(fCreatedMenu, -1);
- return fCreatedMenu;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)
- */
- public Menu getMenu(Menu parent) {
- return fCreatedMenu;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FilterLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FilterLaunchConfigurationAction.java
deleted file mode 100644
index e6fd293..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FilterLaunchConfigurationAction.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.SWTFactory;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * provides the implementation of the filtering action for the launch configuration view within the
- * Launch Configuration Dialog
- * @since 3.2
- */
-public class FilterLaunchConfigurationAction extends Action {
-
- /**
- * Action identifier for IDebugView#getAction(String)
- */
- public static final String ID_FILTER_ACTION = DebugUIPlugin.getUniqueIdentifier() + ".ID_FILTER_ACTION"; //$NON-NLS-1$
-
- /**
- * the menu for this drop down style action
- */
- private FilterDropDownMenuCreator fMenuCreator;
-
- /**
- * Constructor
- * @param text the text for the action
- * @param viewer the viewer the action acts upon
- * @param mode the mode
- */
- public FilterLaunchConfigurationAction() {
- super(LaunchConfigurationsMessages.FilterLaunchConfigurationAction_0, IAction.AS_DROP_DOWN_MENU);
- fMenuCreator = new FilterDropDownMenuCreator();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run() {
- SWTFactory.showPreferencePage("org.eclipse.debug.ui.LaunchConfigurations"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getDescription()
- */
- public String getDescription() {
- return LaunchConfigurationsMessages.LaunchConfigurationsDialog_4;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getDisabledImageDescriptor()
- */
- public ImageDescriptor getDisabledImageDescriptor() {
- return DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_FILTER_CONFIGS);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- return DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_FILTER_CONFIGS);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getMenuCreator()
- */
- public IMenuCreator getMenuCreator() {
- return fMenuCreator;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#getToolTipText()
- */
- public String getToolTipText() {
- return LaunchConfigurationsMessages.LaunchConfigurationsDialog_4;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchCategoryFilter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchCategoryFilter.java
deleted file mode 100644
index ae6e65f..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchCategoryFilter.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.ui.activities.WorkbenchActivityHelper;
-
-/**
- * Filters (hides) launch configurations and launch configuration
- * types from a specific launch category.
- */
-public class LaunchCategoryFilter extends ViewerFilter {
-
- private String fCategory;
-
- /**
- * Constructs a filter that hides configurations from a specific
- * category.
- *
- * @param groupExtension
- */
- public LaunchCategoryFilter(String category) {
- fCategory = category;
- }
-
- /**
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- ILaunchConfigurationType type = null;
- ILaunchConfiguration config = null;
- if (parentElement instanceof ILaunchConfigurationType) {
- type = (ILaunchConfigurationType)parentElement;
- }
- if (element instanceof ILaunchConfigurationType) {
- type = (ILaunchConfigurationType)element;
- }
- if (element instanceof ILaunchConfiguration) {
- config = (ILaunchConfiguration)element;
- try {
- type = config.getType();
- }
- catch (CoreException e) {}
- }
- boolean priv = false;
- if (config != null) {
- try {
- priv = config.getAttribute(IDebugUIConstants.ATTR_PRIVATE, false);
- } catch (CoreException e) {
- }
- } else if (type != null) {
- priv = !type.isPublic();
- }
- if (type != null) {
- return !priv && !equalCategories(type.getCategory(), fCategory) && !WorkbenchActivityHelper.filterItem(new LaunchConfigurationTypeContribution(type));
- }
- return true;
- }
-
- /**
- * Returns whether the given categories are equal.
- *
- * @param c1 category identifier or <code>null</code>
- * @param c2 category identifier or <code>null</code>
- * @return boolean
- */
- private boolean equalCategories(String c1, String c2) {
- if (c1 == null || c2 == null) {
- return c1 == c2;
- }
- return c1.equals(c2);
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java
deleted file mode 100644
index 0c91d59..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.ui.model.WorkbenchViewerComparator;
-
-/**
- * Groups configurations by type.
- *
- * @since 3.3
- * CONTEXTLAUNCHING
- */
-public class LaunchConfigurationComparator extends WorkbenchViewerComparator {
-
- /**
- * the map of categories of <code>ILaunchConfigurationType</code>s to <code>Integer</code>s entries
- */
- private static Map fgCategories;
-
- /**
- * @see org.eclipse.jface.viewers.ViewerComparator#category(java.lang.Object)
- */
- public int category(Object element) {
- Map map = getCategories();
- if (element instanceof ILaunchConfiguration) {
- ILaunchConfiguration configuration = (ILaunchConfiguration) element;
- try {
- Integer i = (Integer) map.get(configuration.getType());
- if (i != null) {
- return i.intValue();
- }
- } catch (CoreException e) {
- }
- }
- return map.size();
- }
-
- /**
- * Returns the map of categories
- * @return the map of categories
- */
- private Map getCategories() {
- if (fgCategories == null) {
- fgCategories = new HashMap();
- List types = Arrays.asList(DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes());
- Collections.sort(types, new Comparator() {
- public int compare(Object o1, Object o2) {
- ILaunchConfigurationType t1 = (ILaunchConfigurationType) o1;
- ILaunchConfigurationType t2 = (ILaunchConfigurationType) o2;
- return t1.getName().compareTo(t2.getName());
- }
-
- });
- Iterator iterator = types.iterator();
- int i = 0;
- while (iterator.hasNext()) {
- fgCategories.put(iterator.next(), new Integer(i));
- i++;
- }
- }
- return fgCategories;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java
deleted file mode 100644
index f544212..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationDialog.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * A dialog used to edit & launch a single launch configuration.
- */
-public class LaunchConfigurationDialog extends LaunchConfigurationPropertiesDialog {
-
- /**
- * Constructs a dialog
- *
- * @param shell
- * @param launchConfiguration
- * @param group
- */
- public LaunchConfigurationDialog(Shell shell, ILaunchConfiguration launchConfiguration, LaunchGroupExtension group) {
- super(shell, launchConfiguration, group);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, ID_LAUNCH_BUTTON, getLaunchButtonText(), true);
- createButton(parent, ID_CLOSE_BUTTON, LaunchConfigurationsMessages.LaunchConfigurationDialog_Close_1, false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#getTitleAreaTitle()
- */
- protected String getTitleAreaTitle() {
- return LaunchConfigurationsMessages.LaunchConfigurationDialog_Modify_attributes_and_launch__1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#getHelpContextId()
- */
- protected String getHelpContextId() {
- return IDebugHelpContextIds.SINGLE_LAUNCH_CONFIGURATION_DIALOG;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#updateButtons()
- */
- public void updateButtons() {
- // Launch button
- getTabViewer().refresh();
- getButton(ID_LAUNCH_BUTTON).setEnabled(getTabViewer().canLaunch() & getTabViewer().canLaunchWithModes() & !getTabViewer().hasDuplicateDelegates());
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#getDialogSettingsSectionName()
- */
- protected String getDialogSettingsSectionName() {
- return IDebugUIConstants.PLUGIN_ID + ".SINGLE_LAUNCH_CONFIGURATION_DIALOG_SECTION"; //$NON-NLS-1$
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationEditDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationEditDialog.java
deleted file mode 100644
index af33234..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationEditDialog.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This class is used to construct a launch configuration dialog used to edit a launch configuration and continue or cancel (optional),
- * not allowing a launch to occur.
- *
- * @since 3.3
- */
-public class LaunchConfigurationEditDialog extends LaunchConfigurationDialog {
-
- private boolean fShowCancel = false;
-
- /**
- * Constructor
- * @param shell the shell to create this dialog on
- * @param launchConfiguration the launch config that this dialog is allowing you to edit
- * @param group the launch group associated with the showing tab group
- * @param showcancel if the cancel button should be shown or not
- */
- public LaunchConfigurationEditDialog(Shell shell, ILaunchConfiguration launchConfiguration, LaunchGroupExtension group, boolean showcancel) {
- super(shell, launchConfiguration, group);
- fShowCancel = showcancel;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#getTitleAreaTitle()
- */
- protected String getTitleAreaTitle() {
- return LaunchConfigurationsMessages.LaunchConfigurationEditDialog_0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, ID_LAUNCH_BUTTON, LaunchConfigurationsMessages.LaunchConfigurationEditDialog_1, true);
- if(fShowCancel) {
- createButton(parent, ID_CANCEL_BUTTON, IDialogConstants.CANCEL_LABEL, false);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#updateButtons()
- */
- public void updateButtons() {
- getTabViewer().refresh();
- getButton(ID_LAUNCH_BUTTON).setEnabled(getTabViewer().canLaunch() & getTabViewer().canLaunchWithModes() & !getTabViewer().hasDuplicateDelegates());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog#getDialogSettingsSectionName()
- */
- protected String getDialogSettingsSectionName() {
- return IDebugUIConstants.PLUGIN_ID + ".LAUNCH_CONFIGURATION_EDIT_DIALOG_SECTION"; //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#buttonPressed(int)
- */
- protected void buttonPressed(int buttonId) {
- if(buttonId == ID_LAUNCH_BUTTON) {
- setReturnCode(IDialogConstants.OK_ID);
- int status = shouldSaveCurrentConfig();
- if(status != IDialogConstants.CANCEL_ID) {
- if(status != ID_DISCARD_BUTTON) {
- if(status == IDialogConstants.YES_ID) {
- getTabViewer().handleApplyPressed();
- }
- }
- }
- }
- else if(buttonId == ID_CANCEL_BUTTON) {
- setReturnCode(IDialogConstants.CANCEL_ID);
- }
- close();
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationFilteredTree.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationFilteredTree.java
deleted file mode 100644
index d760e0c..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationFilteredTree.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.ILaunchGroup;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.HelpEvent;
-import org.eclipse.swt.events.HelpListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.FilteredTree;
-import org.eclipse.ui.dialogs.PatternFilter;
-import org.eclipse.ui.model.WorkbenchViewerComparator;
-
-/**
- * Overrides the default filtered tree to use our own tree viewer which supports preserving selection after filtering
- *
- * @see LaunchConfigurationView
- * @see LaunchConfigurationViewer
- *
- * @since 3.3
- */
-public final class LaunchConfigurationFilteredTree extends FilteredTree {
-
- private ILaunchGroup fLaunchGroup = null;
- private ViewerFilter[] fFilters = null;
- private int fTreeStyle = -1;
- private PatternFilter fPatternFilter = null;
-
- /**
- * Constructor
- * @param parent
- * @param treeStyle
- * @param filter
- */
- public LaunchConfigurationFilteredTree(Composite parent, int treeStyle, PatternFilter filter, ILaunchGroup group, ViewerFilter[] filters) {
- super(parent, treeStyle, filter, true);
- fLaunchGroup = group;
- fFilters = filters;
- fPatternFilter = filter;
- fTreeStyle = treeStyle;
- }
-
- /**
- * @see org.eclipse.ui.dialogs.FilteredTree#doCreateTreeViewer(org.eclipse.swt.widgets.Composite, int)
- */
- protected TreeViewer doCreateTreeViewer(Composite cparent, int style) {
- treeViewer = new LaunchConfigurationViewer(cparent, style);
- treeViewer.setLabelProvider(DebugUITools.newDebugModelPresentation());
- treeViewer.setComparator(new WorkbenchViewerComparator());
- treeViewer.setContentProvider(new LaunchConfigurationTreeContentProvider(fLaunchGroup.getMode(), cparent.getShell()));
- treeViewer.addFilter(new LaunchGroupFilter(fLaunchGroup));
- treeViewer.setInput(ResourcesPlugin.getWorkspace().getRoot());
- if(fFilters != null) {
- for (int i = 0; i < fFilters.length; i++) {
- treeViewer.addFilter(fFilters[i]);
- }
- }
- treeViewer.getControl().addHelpListener(new HelpListener() {
- public void helpRequested(HelpEvent evt) {
- handleHelpRequest(evt);
- }
- });
- return treeViewer;
- }
-
- /**
- * @see org.eclipse.ui.dialogs.FilteredTree#createControl(org.eclipse.swt.widgets.Composite, int)
- */
- protected void createControl(Composite cparent, int treeStyle) {
- super.createControl(cparent, treeStyle);
- setBackground(cparent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
- }
-
- /**
- * @see org.eclipse.ui.dialogs.FilteredTree#init(int, org.eclipse.ui.dialogs.PatternFilter)
- * force it to do nothing so that we can initialize the class properly
- */
- protected void init(int treeStyle, PatternFilter filter) {}
-
- /**
- * This method is used to create the actual set of controls for the dialog
- */
- public void createViewControl() {
- super.init(fTreeStyle, fPatternFilter);
- }
-
- /**
- * Handle help events locally rather than deferring to WorkbenchHelp. This
- * allows help specific to the selected config type to be presented.
- *
- */
- protected void handleHelpRequest(HelpEvent evt) {
- if (getViewer().getTree() != evt.getSource()) {
- return;
- }
- String id = computeContextId();
- if (id != null)
- PlatformUI.getWorkbench().getHelpSystem().displayHelp(id);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.FilteredTree#textChanged()
- */
- protected void textChanged() {
- LaunchConfigurationsDialog dialog = (LaunchConfigurationsDialog)LaunchConfigurationsDialog.getCurrentlyVisibleLaunchConfigurationDialog();
- if(dialog == null) {
- return;
- }
- LaunchConfigurationTabGroupViewer viewer = dialog.getTabViewer();
- if(viewer == null) {
- return;
- }
- if(viewer.isDirty()) {
- String text = getFilterString();
- if(text.equals(IInternalDebugCoreConstants.EMPTY_STRING)) {
- //we have removed the last char of select-all delete key, reset like the filter control does
- getPatternFilter().setPattern(null);
- getViewer().refresh();
- return;
- }
- else if(text.equals(getInitialText())) {
- //ignore, this is the default text set from losing focus
- return;
- }
- String message = LaunchConfigurationsMessages.LaunchConfigurationFilteredTree_search_with_errors;
- String title = LaunchConfigurationsMessages.LaunchConfigurationFilteredTree_discard_changes;
- boolean cansave = viewer.canSave();
- if(cansave) {
- message = LaunchConfigurationsMessages.LaunchConfigurationFilteredTree_search_with_changes;
- title = LaunchConfigurationsMessages.LaunchConfigurationFilteredTree_save_changes;
- }
- if(MessageDialog.openQuestion(getShell(), title, message)) {
- if(cansave) {
- viewer.handleApplyPressed();
- }
- else {
- viewer.handleRevertPressed();
- }
- super.textChanged();
- }
- else {
- clearText();
- }
- }
- else {
- super.textChanged();
- }
- }
-
- /**
- * Computes the context id for this viewer
- * @return the context id
- */
- public String computeContextId() {
- try {
- ISelection selection = getViewer().getSelection();
- if (!selection.isEmpty() && selection instanceof IStructuredSelection ) {
- IStructuredSelection structuredSelection = (IStructuredSelection) selection;
- Object firstSelected = structuredSelection.getFirstElement();
- ILaunchConfigurationType configType = null;
- if (firstSelected instanceof ILaunchConfigurationType) {
- configType = (ILaunchConfigurationType) firstSelected;
- }
- else if (firstSelected instanceof ILaunchConfiguration) {
- configType = ((ILaunchConfiguration) firstSelected).getType();
- }
- if (configType != null) {
- String helpContextId = LaunchConfigurationPresentationManager.getDefault().getHelpContext(configType, fLaunchGroup.getMode());
- if (helpContextId != null) {
- return helpContextId;
- }
- }
- }
- }
- catch (CoreException ce) {DebugUIPlugin.log(ce);}
- return null;
- }
-
- /**
- * Returns the launch configuration viewer for this filtered tree
- * @return the tree viewer appropriately cast
- */
- public LaunchConfigurationViewer getLaunchConfigurationViewer() {
- return (LaunchConfigurationViewer) getViewer();
- }
-
- /* (non-Javadoc)
- *
- * Called after a re-filter due to user typing text. Update the filter count
- * in the LCD
- *
- * @see org.eclipse.ui.dialogs.FilteredTree#updateToolbar(boolean)
- */
- protected void updateToolbar(boolean visible) {
- super.updateToolbar(visible);
- // update filter count
- getLaunchConfigurationViewer().filterChanged();
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java
deleted file mode 100644
index 1ddbe86..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java
+++ /dev/null
@@ -1,1226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.core.expressions.EvaluationContext;
-import org.eclipse.core.expressions.IEvaluationContext;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ISaveContext;
-import org.eclipse.core.resources.ISaveParticipant;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchDelegate;
-import org.eclipse.debug.core.ILaunchListener;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.core.IConfigurationElementConstants;
-import org.eclipse.debug.internal.core.LaunchManager;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.ILaunchHistoryChangedListener;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.debug.ui.ILaunchGroup;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.activities.IWorkbenchActivitySupport;
-import org.eclipse.ui.activities.WorkbenchActivityHelper;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Manages UI related launch configuration artifacts
- *
- * Since 3.3 the Launch Configuration Manager is an <code>ISaveParticipant</code>, allowing it to participate in
- * workspace persistence life-cycles.
- *
- * @see ISaveParticipant
- * @see org.eclipse.debug.ui.ILaunchShortcut
- * @see ILaunchGroup
- * @see ILaunchListener
- * @see ILaunchHistoryChangedListener
- * @see DebugUIPlugin
- * @see LaunchHistory
- */
-public class LaunchConfigurationManager implements ILaunchListener, ISaveParticipant {
- /**
- * A comparator for the ordering of launch shortcut extensions
- * @since 3.3
- */
- class ShortcutComparator implements Comparator {
- /**
- * @see Comparator#compare(Object, Object)
- */
- public int compare(Object a, Object b) {
- LaunchShortcutExtension shorcutA = (LaunchShortcutExtension)a;
- String labelA = shorcutA.getLabel();
- String pathA = shorcutA.getMenuPath();
- LaunchShortcutExtension shortcutB = (LaunchShortcutExtension)b;
- String labelB = shortcutB.getLabel();
- String pathB = shortcutB.getMenuPath();
-
- // group by path, then sort by label
- // a null path sorts last (i.e. highest)
- if (nullOrEqual(pathA, pathB)) {
- // null labels sort last (i.e. highest)
- if (labelA == labelB) {
- return 0;
- }
- if (labelA == null) {
- return 1;
- }
- if (labelB == null) {
- return -1;
- }
- return labelA.compareToIgnoreCase(labelB);
- }
- // compare paths
- if (pathA == null) {
- return 1;
- }
- if (pathB == null) {
- return -1;
- }
- return pathA.compareToIgnoreCase(pathB);
- }
-
- private boolean nullOrEqual(String a, String b) {
- if (a == null) {
- return b == null;
- }
- return a.equals(b);
- }
-
- }
-
- /**
- * Launch group extensions, keyed by launch group identifier.
- */
- protected Map fLaunchGroups;
-
- /**
- * Launch histories keyed by launch group identifier
- */
- protected Map fLaunchHistories;
-
- /**
- * The list of registered implementors of <code>ILaunchHistoryChangedListener</code>
- */
- protected List fLaunchHistoryChangedListeners = new ArrayList(3);
-
- /**
- * Launch shortcuts
- */
- private List fLaunchShortcuts = null;
-
- /**
- * Launch shortcuts, cached by perspective ids
- */
- private Map fLaunchShortcutsByPerspective = null;
-
- /**
- * Cache of launch configuration tab images with error overlays
- */
- protected ImageRegistry fErrorImages = null;
-
- /**
- * true when restoring launch history
- */
- protected boolean fRestoring = false;
-
- /**
- * The name of the file used to persist the launch history.
- */
- private static final String LAUNCH_CONFIGURATION_HISTORY_FILENAME = "launchConfigurationHistory.xml"; //$NON-NLS-1$
-
- /**
- * performs initialization of the manager when it is started
- */
- public void startup() {
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- launchManager.addLaunchListener(this);
- DebugUIPlugin.getDefault().addSaveParticipant(this);
- //update histories for launches already registered
- ILaunch[] launches = launchManager.getLaunches();
- for (int i = 0; i < launches.length; i++) {
- launchAdded(launches[i]);
- }
- }
-
- /**
- * Returns whether any launch config supports the given mode.
- *
- * @param mode launch mode
- * @return whether any launch config supports the given mode
- */
- public boolean launchModeAvailable(String mode) {
- return ((LaunchManager)DebugPlugin.getDefault().getLaunchManager()).launchModeAvailable(mode);
- }
-
- /**
- * Returns whether the given launch configuration should be visible in the
- * debug ui. If the config is marked as private, or belongs to a different
- * category (i.e. non-null), then this configuration should not be displayed
- * in the debug ui.
- *
- * @param launchConfiguration
- * @return boolean
- */
- public static boolean isVisible(ILaunchConfiguration launchConfiguration) {
- try {
- return !(launchConfiguration.getAttribute(IDebugUIConstants.ATTR_PRIVATE, false));
- } catch (CoreException e) {
- }
- return false;
- }
-
- /**
- * Returns a collection of launch configurations that does not contain
- * configurations from disabled activities.
- *
- * @param configurations a collection of configurations
- * @return the given collection minus any configurations from disabled activities
- */
- public static ILaunchConfiguration[] filterConfigs(ILaunchConfiguration[] configurations) {
- IWorkbenchActivitySupport activitySupport = PlatformUI.getWorkbench().getActivitySupport();
- if (activitySupport == null) {
- return configurations;
- }
- List filteredConfigs = new ArrayList();
- ILaunchConfigurationType type = null;
- LaunchConfigurationTypeContribution contribution = null;
- ILaunchConfiguration configuration = null;
- for (int i = 0; i < configurations.length; i++) {
- configuration = configurations[i];
- try {
- type = configuration.getType();
- contribution = new LaunchConfigurationTypeContribution(type);
- if (DebugUIPlugin.doLaunchConfigurationFiltering(configuration) & !WorkbenchActivityHelper.filterItem(contribution)) {
- filteredConfigs.add(configuration);
- }
- }
- catch (CoreException e) {DebugUIPlugin.log(e.getStatus());}
- }
- return (ILaunchConfiguration[]) filteredConfigs.toArray(new ILaunchConfiguration[filteredConfigs.size()]);
- }
-
- /**
- * Returns a listing of <code>IlaunchDeleagtes</code> that does not contain any delegates from disabled activities
- * @param delegates the raw listing of delegates to filter
- * @return the filtered listing of <code>ILaunchDelegate</code>s or an empty array, never <code>null</code>.
- * @since 3.3
- */
- public static ILaunchDelegate[] filterLaunchDelegates(ILaunchConfigurationType type, Set modes) throws CoreException {
- IWorkbenchActivitySupport as = PlatformUI.getWorkbench().getActivitySupport();
- ILaunchDelegate[] delegates = type.getDelegates(modes);
- if(as == null) {
- return delegates;
- }
- HashSet set = new HashSet();
- for(int i = 0; i < delegates.length; i++) {
- //filter by capabilities
- if(!WorkbenchActivityHelper.filterItem(new LaunchDelegateContribution(delegates[i]))) {
- set.add(delegates[i]);
- }
- }
- return (ILaunchDelegate[]) set.toArray(new ILaunchDelegate[set.size()]);
- }
-
- /**
- * Performs cleanup operations when the manager is being disposed of.
- */
- public void shutdown() {
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- launchManager.removeLaunchListener(this);
- if (fLaunchHistories != null) {
- Iterator histories = fLaunchHistories.values().iterator();
- while (histories.hasNext()) {
- LaunchHistory history = (LaunchHistory)histories.next();
- history.dispose();
- }
- }
- DebugUIPlugin.getDefault().removeSaveParticipant(this);
- }
-
- /**
- * @see ILaunchListener#launchRemoved(ILaunch)
- */
- public void launchRemoved(ILaunch launch) {}
-
- /**
- * @see ILaunchListener#launchChanged(ILaunch)
- */
- public void launchChanged(ILaunch launch) {}
-
- /**
- * Must not assume that will only be called from the UI thread.
- *
- * @see ILaunchListener#launchAdded(ILaunch)
- */
- public void launchAdded(final ILaunch launch) {
- removeTerminatedLaunches(launch);
- }
-
- /**
- * Removes terminated launches from the launch view, leaving the specified launch in the view
- * @param newLaunch the newly added launch to leave in the view
- */
- protected void removeTerminatedLaunches(ILaunch newLaunch) {
- if (DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IDebugUIConstants.PREF_AUTO_REMOVE_OLD_LAUNCHES)) {
- ILaunchManager lManager= DebugPlugin.getDefault().getLaunchManager();
- Object[] launches= lManager.getLaunches();
- for (int i= 0; i < launches.length; i++) {
- ILaunch launch= (ILaunch)launches[i];
- if (launch != newLaunch && launch.isTerminated()) {
- lManager.removeLaunch(launch);
- }
- }
- }
- }
-
- /**
- * Returns the most recent launch for the given group, or <code>null</code>
- * if none. This method does not include any filtering for the returned launch configuration.
- *
- * This method is exposed via DebugTools.getLastLaunch
- *
- * @return the last launch, or <code>null</code> if none
- */
- public ILaunchConfiguration getLastLaunch(String groupId) {
- LaunchHistory history = getLaunchHistory(groupId);
- if (history != null) {
- return history.getRecentLaunch();
- }
- return null;
- }
-
- /**
- * Returns the most recent launch for the given group taking launch configuration
- * filters into account, or <code>null</code> if none.
- *
- * @param groupId launch group
- * @return the most recent, un-filtered launch
- */
- public ILaunchConfiguration getFilteredLastLaunch(String groupId) {
- LaunchHistory history = getLaunchHistory(groupId);
- if (history != null) {
- ILaunchConfiguration[] filterConfigs = history.getCompleteLaunchHistory();
- if (filterConfigs.length > 0) {
- return filterConfigs[0];
- }
- }
- return null;
- }
-
- /**
- * Add the specified listener to the list of listeners that will be notified when the
- * launch history changes.
- */
- public void addLaunchHistoryListener(ILaunchHistoryChangedListener listener) {
- if (!fLaunchHistoryChangedListeners.contains(listener)) {
- fLaunchHistoryChangedListeners.add(listener);
- }
- }
-
- /**
- * Remove the specified listener from the list of listeners that will be notified when the
- * launch history changes.
- */
- public void removeLaunchHistoryListener(ILaunchHistoryChangedListener listener) {
- fLaunchHistoryChangedListeners.remove(listener);
- }
-
- /**
- * Notify all launch history listeners that the launch history has changed in some way.
- */
- protected void fireLaunchHistoryChanged() {
- Iterator iterator = fLaunchHistoryChangedListeners.iterator();
- ILaunchHistoryChangedListener listener = null;
- while (iterator.hasNext()) {
- listener = (ILaunchHistoryChangedListener) iterator.next();
- listener.launchHistoryChanged();
- }
- }
-
- /**
- * Returns the history listing as XML
- * @return the history listing as XML
- * @throws CoreException
- * @throws ParserConfigurationException
- * @throws TransformerException
- * @throws IOException
- */
- protected String getHistoryAsXML() throws CoreException, ParserConfigurationException {
- Document doc = DebugUIPlugin.getDocument();
- Element historyRootElement = doc.createElement(IConfigurationElementConstants.LAUNCH_HISTORY);
- doc.appendChild(historyRootElement);
-
- Iterator histories = fLaunchHistories.values().iterator();
- LaunchHistory history = null;
- while (histories.hasNext()) {
- history = (LaunchHistory)histories.next();
- Element groupElement = doc.createElement(IConfigurationElementConstants.LAUNCH_GROUP);
- groupElement.setAttribute(IConfigurationElementConstants.ID, history.getLaunchGroup().getIdentifier());
- historyRootElement.appendChild(groupElement);
- Element historyElement = doc.createElement(IConfigurationElementConstants.MRU_HISTORY);
- groupElement.appendChild(historyElement);
- createEntry(doc, historyElement, history.getCompleteLaunchHistory());
- Element favs = doc.createElement(IConfigurationElementConstants.FAVORITES);
- groupElement.appendChild(favs);
- createEntry(doc, favs, history.getFavorites());
- history.setSaved(true);
- }
- return DebugPlugin.serializeDocument(doc);
- }
-
- /**
- * Creates a new launch history element and adds it to the specified <code>Document</code>
- * @param doc the <code>Document</code> to add the new element to
- * @param historyRootElement the root element
- * @param mode the modes the history element should apply to
- * @param configurations the configurations to create entries for
- * @throws CoreException
- */
- protected void createEntry(Document doc, Element historyRootElement, ILaunchConfiguration[] configurations) throws CoreException {
- for (int i = 0; i < configurations.length; i++) {
- ILaunchConfiguration configuration = configurations[i];
- if (configuration.exists()) {
- Element launch = doc.createElement(IConfigurationElementConstants.LAUNCH);
- launch.setAttribute(IConfigurationElementConstants.MEMENTO, configuration.getMemento());
- historyRootElement.appendChild(launch);
- }
- }
- }
-
- /**
- * Returns the path to the local file for the launch history
- * @return the file path for the launch history file
- */
- protected IPath getHistoryFilePath() {
- return DebugUIPlugin.getDefault().getStateLocation().append(LAUNCH_CONFIGURATION_HISTORY_FILENAME);
- }
-
- /**
- * Write out an XML file indicating the entries on the run & debug history lists and
- * the most recent launch.
- */
- protected void persistLaunchHistory() throws IOException, CoreException, ParserConfigurationException {
- synchronized (this) {
- if (fLaunchHistories == null || fRestoring) {
- return;
- }
- }
- boolean shouldsave = false;
- for(Iterator iter = fLaunchHistories.values().iterator(); iter.hasNext();) {
- shouldsave |= ((LaunchHistory)iter.next()).needsSaving();
- }
- if(shouldsave) {
- IPath historyPath = getHistoryFilePath();
- String osHistoryPath = historyPath.toOSString();
- String xml = getHistoryAsXML();
- File file = new File(osHistoryPath);
- file.createNewFile();
-
- FileOutputStream stream = new FileOutputStream(file);
- stream.write(xml.getBytes("UTF8")); //$NON-NLS-1$
- stream.close();
- }
- }
-
- /**
- * Find the XML history file and parse it. Place the corresponding configurations
- * in the appropriate history, and set the most recent launch.
- */
- private void restoreLaunchHistory() {
- // Find the history file
- IPath historyPath = getHistoryFilePath();
- String osHistoryPath = historyPath.toOSString();
- File file = new File(osHistoryPath);
- // If no history file, nothing to do
- if (!file.exists()) {
- return;
- }
- InputStream stream= null;
- Element rootHistoryElement= null;
- try {
- // Parse the history file
- stream = new BufferedInputStream(new FileInputStream(file));
- try {
- DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- parser.setErrorHandler(new DefaultHandler());
- rootHistoryElement = parser.parse(new InputSource(stream)).getDocumentElement();
- } catch (SAXException e) {
- DebugUIPlugin.log(e);
- return;
- } catch (ParserConfigurationException e) {
- DebugUIPlugin.log(e);
- return;
- } finally {
- stream.close();
- }
- } catch (IOException exception) {
- DebugUIPlugin.log(exception);
- return;
- }
- // If root node isn't what we expect, return
- if (!rootHistoryElement.getNodeName().equalsIgnoreCase(IConfigurationElementConstants.LAUNCH_HISTORY)) {
- return;
- }
- // For each child of the root node, construct a launch config handle and add it to
- // the appropriate history, or set the most recent launch
- Collection l = fLaunchHistories.values();
- LaunchHistory[] histories = (LaunchHistory[])l.toArray(new LaunchHistory[l.size()]);
- NodeList list = rootHistoryElement.getChildNodes();
- int length = list.getLength();
- Node node = null;
- Element entry = null;
- for (int i = 0; i < length; ++i) {
- node = list.item(i);
- short type = node.getNodeType();
- if (type == Node.ELEMENT_NODE) {
- entry = (Element) node;
- if (entry.getNodeName().equalsIgnoreCase(IConfigurationElementConstants.LAUNCH)) {
- createHistoryElement(entry, histories, false);
- } else if (entry.getNodeName().equalsIgnoreCase(IConfigurationElementConstants.LAST_LAUNCH)) {
- createHistoryElement(entry, histories, true);
- } else if (entry.getNodeName().equals(IConfigurationElementConstants.LAUNCH_GROUP)) {
- String id = entry.getAttribute(IConfigurationElementConstants.ID);
- if (id != null) {
- LaunchHistory history = getLaunchHistory(id);
- if (history != null) {
- restoreHistory(entry, history);
- }
- }
- }
- }
- }
- }
-
- /**
- * Restores the given launch history.
- *
- * @param groupElement launch group history
- * @param history associated history cache
- */
- private void restoreHistory(Element groupElement, LaunchHistory history) {
- NodeList nodes = groupElement.getChildNodes();
- int length = nodes.getLength();
- for (int i = 0; i < length; i++) {
- Node node = nodes.item(i);
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- Element element = (Element)node;
- if (element.getNodeName().equals(IConfigurationElementConstants.MRU_HISTORY)) {
- ILaunchConfiguration[] configs = getLaunchConfigurations(element);
- for (int j = 0; j < configs.length; j++) {
- history.addHistory(configs[j], false);
- }
- } else if (element.getNodeName().equals(IConfigurationElementConstants.FAVORITES)) {
- ILaunchConfiguration[] favs = getLaunchConfigurations(element);
- history.setFavorites(favs);
- // add any favorites that have been added to the workspace before this plug-in
- // was loaded - @see bug 231600
- ILaunchConfiguration[] configurations = getLaunchManager().getLaunchConfigurations();
- for (int j = 0; j < configurations.length; j++) {
- history.checkFavorites(configurations[j]);
- }
- }
- }
- }
- }
-
- /**
- * Restores a list of configurations.
- * @param root element
- * @return list of configurations under the element
- */
- private ILaunchConfiguration[] getLaunchConfigurations(Element root) {
- List configs = new ArrayList();
- NodeList nodes = root.getChildNodes();
- int length = nodes.getLength();
- for (int i = 0; i < length; i++) {
- Node node = nodes.item(i);
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- Element element = (Element) node;
- if (element.getNodeName().equals(IConfigurationElementConstants.LAUNCH)) {
- String memento = element.getAttribute(IConfigurationElementConstants.MEMENTO);
- if (memento != null) {
- try {
- ILaunchConfiguration configuration = DebugPlugin.getDefault().getLaunchManager().getLaunchConfiguration(memento);
- //touch the config to see if its type exists
- configuration.getType();
- if (configuration.exists()) {
- configs.add(configuration);
- }
- } catch (CoreException e) {
- //do nothing as we don't care about non-existent, or configs with no type
- }
- }
- }
- }
- }
- return (ILaunchConfiguration[]) configs.toArray(new ILaunchConfiguration[configs.size()]);
- }
-
- /**
- * Construct a launch configuration corresponding to the specified XML
- * element, and place it in the appropriate history.
- */
- private void createHistoryElement(Element entry, LaunchHistory[] histories, boolean prepend) {
- String memento = entry.getAttribute(IConfigurationElementConstants.MEMENTO);
- String mode = entry.getAttribute(IConfigurationElementConstants.MODE);
- try {
- ILaunchConfiguration launchConfig = DebugPlugin.getDefault().getLaunchManager().getLaunchConfiguration(memento);
- //touch the type to see if its type exists
- launchConfig.getType();
- if (launchConfig.exists()) {
- LaunchHistory history = null;
- for (int i = 0; i < histories.length; i++) {
- history = histories[i];
- if (history.accepts(launchConfig) && history.getLaunchGroup().getMode().equals(mode)) {
- history.addHistory(launchConfig, prepend);
- }
- }
- }
- } catch (CoreException e) {
- //do nothing, as we want to throw away invalid launch history entries silently
- }
- }
-
- /**
- * Load all registered extensions of the 'launch shortcut' extension point.
- */
- private synchronized void loadLaunchShortcuts() {
- if(fLaunchShortcuts == null) {
- // Get the configuration elements
- IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_LAUNCH_SHORTCUTS);
- IConfigurationElement[] infos = extensionPoint.getConfigurationElements();
-
- // Load the configuration elements into a Map
- fLaunchShortcuts = new ArrayList(infos.length);
- for (int i = 0; i < infos.length; i++) {
- fLaunchShortcuts.add(new LaunchShortcutExtension(infos[i]));
- }
- Collections.sort(fLaunchShortcuts, new ShortcutComparator());
- }
- }
-
- /**
- * Load all registered extensions of the 'launch groups' extension point.
- */
- private synchronized void loadLaunchGroups() {
- if (fLaunchGroups == null) {
- // Get the configuration elements
- IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_LAUNCH_GROUPS);
- IConfigurationElement[] infos= extensionPoint.getConfigurationElements();
-
- // Load the configuration elements into a Map
- fLaunchGroups = new HashMap(infos.length);
- LaunchGroupExtension ext = null;
- for (int i = 0; i < infos.length; i++) {
- ext = new LaunchGroupExtension(infos[i]);
- fLaunchGroups.put(ext.getIdentifier(), ext);
- }
- }
- }
-
- /**
- * Returns all launch shortcuts
- *
- * @return all launch shortcuts
- */
- public List getLaunchShortcuts() {
- if (fLaunchShortcuts == null) {
- loadLaunchShortcuts();
- }
- return fLaunchShortcuts;
- }
-
- /**
- * Creates a listing of the launch shortcut extensions that are applicable to the underlying resource
- * @param resource the underlying resource
- * @return a listing of applicable launch shortcuts or an empty list, never <code>null</code>
- * @since 3.3
- */
- public List getLaunchShortcuts(IResource resource) {
- List list = new ArrayList();
- List sc = getLaunchShortcuts();
- List ctxt = new ArrayList();
- if(resource != null) {
- ctxt.add(resource);
- }
- IEvaluationContext context = new EvaluationContext(null, ctxt);
- context.addVariable("selection", ctxt); //$NON-NLS-1$
- LaunchShortcutExtension ext = null;
- for(Iterator iter = sc.iterator(); iter.hasNext();) {
- ext = (LaunchShortcutExtension) iter.next();
- try {
- if(ext.evalEnablementExpression(context, ext.getContextualLaunchEnablementExpression()) && !WorkbenchActivityHelper.filterItem(ext)) {
- if(!list.contains(ext)) {
- list.add(ext);
- }
- }
- }
- catch(CoreException ce) {/*do nothing*/}
- }
- return list;
- }
-
- /**
- * Returns an array of all of the ids of the <code>ILaunchConfigurationType</code>s that apply to the currently
- * specified <code>IResource</code>.
- *
- * @param resource the resource context
- * @return an array of applicable <code>ILaunchConfigurationType</code> ids, or an empty array, never <code>null</code>
- * @since 3.3
- * CONTEXTLAUNCHING
- */
- public String[] getApplicableConfigurationTypes(IResource resource) {
- List types = new ArrayList();
- List exts = getLaunchShortcuts();
- LaunchShortcutExtension ext = null;
- List list = new ArrayList();
- list.add(resource);
- IEvaluationContext context = new EvaluationContext(null, list);
- context.setAllowPluginActivation(true);
- context.addVariable("selection", list); //$NON-NLS-1$
- HashSet set = new HashSet();
- for(Iterator iter = exts.listIterator(); iter.hasNext();) {
- ext = (LaunchShortcutExtension) iter.next();
- try {
- if(ext.evalEnablementExpression(context, ext.getContextualLaunchEnablementExpression())) {
- set.addAll(ext.getAssociatedConfigurationTypes());
- }
- }
- catch(CoreException ce) {
- IStatus status = new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), "Launch shortcut '" + ext.getId() + "' enablement expression caused exception. Shortcut was removed.", ce); //$NON-NLS-1$ //$NON-NLS-2$
- DebugUIPlugin.log(status);
- iter.remove();
- }
- }
- LaunchManager lm = (LaunchManager) DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType type = null;
- for(Iterator iter = set.iterator(); iter.hasNext();) {
- type = lm.getLaunchConfigurationType((String)iter.next());
- if(type != null) {
- if(!types.contains(type) && type.isPublic() && !"org.eclipse.ui.externaltools.builder".equals(type.getCategory())) { //$NON-NLS-1$
- types.add(type.getIdentifier());
- }
- }
- }
- return (String[]) types.toArray(new String[types.size()]);
- }
-
- /**
- * Returns an array of the <code>ILaunchConfiguration</code>s that apply to the specified <code>IResource</code>
- * @param resource the resource
- * @return an array of applicable <code>ILaunchConfiguration</code>s for the specified <code>IResource</code> or an empty
- * array if none, never <code>null</code>
- * @since 3.3
- */
- public ILaunchConfiguration[] getApplicableLaunchConfigurations(String[] types, IResource resource) {
- ArrayList list = new ArrayList();
- try {
- if(resource != null) {
- String[] ctypes = types;
- if(ctypes == null) {
- ctypes = getApplicableConfigurationTypes(resource);
- }
- //copy into collection for hashcode matching
- HashSet typeset = new HashSet(ctypes.length);
- for(int i = 0; i < ctypes.length; i++) {
- typeset.add(ctypes[i]);
- }
- ILaunchConfiguration[] configurations = filterConfigs(getLaunchManager().getLaunchConfigurations());
- ILaunchConfiguration configuration = null;
- IResource[] resrcs = null;
- for(int i = 0; i < configurations.length; i++) {
- configuration = configurations[i];
- if(typeset.contains(configuration.getType().getIdentifier()) && acceptConfiguration(configuration)) {
- resrcs = configuration.getMappedResources();
- if (resrcs != null) {
- for (int j = 0; j < resrcs.length; j++) {
- if (resource.equals(resrcs[j]) || resource.getFullPath().isPrefixOf(resrcs[j].getFullPath())) {
- list.add(configuration);
- break;
- }
- }
- }
- else {
- //in the event the config has no mapping
- list.add(configuration);
- }
- }
- }
- }
- } catch (CoreException e) {
- list.clear();
- DebugPlugin.log(e);
- }
- return (ILaunchConfiguration[]) list.toArray(new ILaunchConfiguration[list.size()]);
- }
-
- /**
- * Returns if the specified configuration should be considered as a potential candidate
- * @param config
- * @return if the specified configuration should be considered as a potential candidate
- * @throws CoreException
- */
- private boolean acceptConfiguration(ILaunchConfiguration config) throws CoreException {
- if(config != null && !DebugUITools.isPrivate(config)) {
- if(!"org.eclipse.ui.externaltools".equals(config.getType().getCategory())) { //$NON-NLS-1$
- return true;
- }
- else {
- IResource[] res = config.getMappedResources();
- if(res != null) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * Returns all launch shortcuts for the given category
- *
- * @return all launch shortcuts
- */
- public List getLaunchShortcuts(String category) {
- return filterShortcuts(getLaunchShortcuts(), category);
- }
-
- /**
- * Return a list of filtered launch shortcuts, based on the given category.
- *
- * @param unfiltered
- * @param category
- * @return List
- */
- protected List filterShortcuts(List unfiltered, String category) {
- List filtered = new ArrayList(unfiltered.size());
- Iterator iter = unfiltered.iterator();
- LaunchShortcutExtension extension = null;
- while (iter.hasNext()){
- extension = (LaunchShortcutExtension)iter.next();
- if (category == null) {
- if (extension.getCategory() == null) {
- filtered.add(extension);
- }
- } else if (category.equals(extension.getCategory())){
- filtered.add(extension);
- }
- }
- return filtered;
- }
-
- /**
- * Returns all launch shortcuts defined for the given perspective,
- * empty list if none.
- *
- * @param perpsective perspective identifier
- * @param category the category for the shortcut
- * @return all launch shortcuts defined for the given perspective,
- * empty list if none.
- * @deprecated the use of perspectives for launch shortcuts has been
- * deprecated since 3.1, use a contextualLaunch element instead
- */
- public List getLaunchShortcuts(String perpsective, String category) {
- if (fLaunchShortcutsByPerspective == null) {
- Iterator shortcuts = getLaunchShortcuts().iterator();
- fLaunchShortcutsByPerspective = new HashMap(10);
- LaunchShortcutExtension ext = null;
- Iterator perspectives = null;
- while (shortcuts.hasNext()) {
- ext = (LaunchShortcutExtension)shortcuts.next();
- perspectives = ext.getPerspectives().iterator();
- while (perspectives.hasNext()) {
- String id = (String)perspectives.next();
- List list = (List)fLaunchShortcutsByPerspective.get(id);
- if (list == null) {
- list = new ArrayList(4);
- fLaunchShortcutsByPerspective.put(id, list);
- }
- list.add(ext);
- }
- }
- }
- List list = (List)fLaunchShortcutsByPerspective.get(perpsective);
- if (list == null) {
- return new ArrayList();
- }
- return filterShortcuts(list, category);
- }
-
- /**
- * Returns the first occurrence of any one of the configurations in the provided list, if they are found in the launch history
- * for the corresponding launch group
- * @param configurations
- * @param mode
- * @param resource
- * @return the associated launch configuration from the MRU listing or <code>null</code> if there isn't one
- * @since 3.3
- */
- public ILaunchConfiguration getMRUConfiguration(List configurations, ILaunchGroup group, IResource resource) {
- if(group != null) {
- ArrayList candidates = new ArrayList();
- LaunchHistory history = getLaunchHistory(group.getIdentifier());
- if(history != null) {
- ILaunchConfiguration[] configs = history.getCompleteLaunchHistory();
- for(int i = 0; i < configs.length; i++) {
- if(configurations.contains(configs[i])) {
- if(resource instanceof IContainer) {
- return configs[i];
- }
- else {
- candidates.add(configs[i]);
- }
- }
- }
- ILaunchConfiguration config = null;
- if(resource != null) {
- //first try to find a config that exactly matches the resource mapping, and collect partial matches
- IResource[] res = null;
- for(Iterator iter = candidates.iterator(); iter.hasNext();) {
- config = (ILaunchConfiguration) iter.next();
- try {
- res = config.getMappedResources();
- if(res != null) {
- for(int i = 0; i < res.length; i++) {
- if(res[i].equals(resource)) {
- return config;
- }
- }
- }
- }
- catch(CoreException ce) {}
- }
- }
- for(int i = 0; i < configs.length; i++) {
- if(candidates.contains(configs[i])) {
- return configs[i];
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Returns the shared config from the selected resource or <code>null</code> if the selected resources is not a shared config
- * @param receiver the object to test if it is a shared launch configuration
- * @return the shared config from the selected resource or <code>null</code> if the selected resources is not a shared config
- * @since 3.3
- */
- public ILaunchConfiguration isSharedConfig(Object receiver) {
- if(receiver instanceof IFile) {
- IFile file = (IFile) receiver;
- String ext = file.getFileExtension();
- if(ext == null) {
- return null;
- }
- if(ext.equals("launch")) { //$NON-NLS-1$
- ILaunchConfiguration config = DebugPlugin.getDefault().getLaunchManager().getLaunchConfiguration(file);
- if(config != null && config.exists()) {
- return config;
- }
- }
- }
- else if(receiver instanceof IFileEditorInput) {
- IFileEditorInput input = (IFileEditorInput) receiver;
- return isSharedConfig(input.getFile());
- }
- else if(receiver instanceof IEditorPart) {
- return isSharedConfig(((IEditorPart) receiver).getEditorInput());
- }
- return null;
- }
-
- /**
- * Returns the image used to display an error in the given tab
- */
- public Image getErrorTabImage(ILaunchConfigurationTab tab) {
- if (fErrorImages == null) {
- fErrorImages = new ImageRegistry();
- }
- String key = tab.getClass().getName();
- Image image = fErrorImages.get(key);
- if (image == null) {
- // create image
- Image base = tab.getImage();
- if (base == null) {
- base = DebugPluginImages.getImage(IInternalDebugUIConstants.IMG_OVR_TRANSPARENT);
- }
- base = new Image(Display.getCurrent(), base, SWT.IMAGE_COPY);
- LaunchConfigurationTabImageDescriptor desc = new LaunchConfigurationTabImageDescriptor(base, LaunchConfigurationTabImageDescriptor.ERROR);
- image = desc.createImage();
- fErrorImages.put(key, image);
- }
- return image;
- }
-
- /**
- * Return the launch group with the given id, or <code>null</code>
- *
- * @return the launch group with the given id, or <code>null</code>
- */
- public LaunchGroupExtension getLaunchGroup(String id) {
- if (fLaunchGroups == null) {
- loadLaunchGroups();
- }
- return (LaunchGroupExtension)fLaunchGroups.get(id);
- }
-
- /**
- * Return all defined launch groups
- *
- * @return all defined launch groups
- */
- public ILaunchGroup[] getLaunchGroups() {
- if (fLaunchGroups == null) {
- loadLaunchGroups();
- }
- Collection groups = fLaunchGroups.values();
- return (ILaunchGroup[])groups.toArray(new ILaunchGroup[groups.size()]);
- }
-
- /**
- * Return the launch history with the given group id, or <code>null</code>
- *
- * @return the launch history with the given group id, or <code>null</code>
- */
- public LaunchHistory getLaunchHistory(String id) {
- loadLaunchHistories();
- return (LaunchHistory)fLaunchHistories.get(id);
- }
-
- /**
- * Returns the singleton instance of the launch manager
- * @return the singleton instance of the launch manager
- * @since 3.3
- */
- private LaunchManager getLaunchManager() {
- return (LaunchManager) DebugPlugin.getDefault().getLaunchManager();
- }
-
- /**
- * Restore launch history
- */
- private synchronized void loadLaunchHistories() {
- if (fLaunchHistories == null) {
- fRestoring = true;
- ILaunchGroup[] groups = getLaunchGroups();
- fLaunchHistories = new HashMap(groups.length);
- ILaunchGroup extension = null;
- for (int i = 0; i < groups.length; i++) {
- extension = groups[i];
- if (extension.isPublic()) {
- fLaunchHistories.put(extension.getIdentifier(), new LaunchHistory(extension));
- }
- }
- restoreLaunchHistory();
- fRestoring = false;
- }
- }
-
- /**
- * Returns the default launch group for the given mode.
- *
- * @param mode
- * @return launch group
- */
- public LaunchGroupExtension getDefaultLaunchGroup(String mode) {
- if (mode.equals(ILaunchManager.DEBUG_MODE)) {
- return getLaunchGroup(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP);
- }
- return getLaunchGroup(IDebugUIConstants.ID_RUN_LAUNCH_GROUP);
- }
-
- /**
- * Returns the launch group the given launch configuration type belongs to, in
- * the specified mode, or <code>null</code> if none.
- *
- * @param type the type
- * @param mode the mode
- * @return the launch group the given launch configuration belongs to, in
- * the specified mode, or <code>null</code> if none
- */
- public ILaunchGroup getLaunchGroup(ILaunchConfigurationType type, String mode) {
- if (!type.supportsMode(mode)) {
- return null;
- }
- String category = type.getCategory();
- ILaunchGroup[] groups = getLaunchGroups();
- ILaunchGroup extension = null;
- for (int i = 0; i < groups.length; i++) {
- extension = groups[i];
- if (category == null) {
- if (extension.getCategory() == null && extension.getMode().equals(mode)) {
- return extension;
- }
- } else if (category.equals(extension.getCategory())) {
- if (extension.getMode().equals(mode)) {
- return extension;
- }
- }
- }
- return null;
- }
-
- /**
- * Returns the {@link ILaunchGroup} for the given mode set and
- * {@link ILaunchConfigurationType}.
- * @param type the type
- * @param modeset the set of modes, which are combined to one mode string
- * @return the associated {@link ILaunchGroup} or <code>null</code>
- *
- * @since 3.4.0
- */
- public ILaunchGroup getLaunchGroup(ILaunchConfigurationType type, Set modeset) {
- StringBuffer buff = new StringBuffer();
- Object item = null;
- for(Iterator iter = modeset.iterator(); iter.hasNext();) {
- item = iter.next();
- if(item instanceof String) {
- buff.append(item);
- if(iter.hasNext()) {
- buff.append(","); //$NON-NLS-1$
- }
- }
- }
- return getLaunchGroup(type, buff.toString());
- }
-
- /**
- * Returns the private launch configuration used as a place-holder to represent/store
- * the information associated with a launch configuration type.
- *
- * @param type launch configuration type
- * @return launch configuration
- * @since 3.0
- */
- public static ILaunchConfiguration getSharedTypeConfig(ILaunchConfigurationType type) throws CoreException {
- String id = type.getIdentifier();
- String name = id + ".SHARED_INFO"; //$NON-NLS-1$
- ILaunchConfiguration shared = null;
- ILaunchConfiguration[] configurations = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(type);
- ILaunchConfiguration configuration = null;
- for (int i = 0; i < configurations.length; i++) {
- configuration = configurations[i];
- if (configuration.getName().equals(name)) {
- shared = configuration;
- break;
- }
- }
-
- if (shared == null) {
- // create a new shared config
- ILaunchConfigurationWorkingCopy workingCopy;
- workingCopy = type.newInstance(null, name);
- workingCopy.setAttribute(IDebugUIConstants.ATTR_PRIVATE, true);
- // null entries indicate default settings
- // save
- shared = workingCopy.doSave();
- }
- return shared;
- }
-
-
- /**
- * @see org.eclipse.core.resources.ISaveParticipant#doneSaving(org.eclipse.core.resources.ISaveContext)
- */
- public void doneSaving(ISaveContext context) {}
-
- /**
- * @see org.eclipse.core.resources.ISaveParticipant#prepareToSave(org.eclipse.core.resources.ISaveContext)
- */
- public void prepareToSave(ISaveContext context) throws CoreException {}
-
- /**
- * @see org.eclipse.core.resources.ISaveParticipant#rollback(org.eclipse.core.resources.ISaveContext)
- */
- public void rollback(ISaveContext context) {}
-
- /**
- * @see org.eclipse.core.resources.ISaveParticipant#saving(org.eclipse.core.resources.ISaveContext)
- */
- public void saving(ISaveContext context) throws CoreException {
- try {
- persistLaunchHistory();
- } catch (IOException e) {
- throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), "Internal error saving launch history", e)); //$NON-NLS-1$
- } catch (ParserConfigurationException e) {
- throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), "Internal error saving launch history", e)); //$NON-NLS-1$
- }
- }
-
- /**
- * Sets the given launch to be the most recent launch in the launch
- * history (for applicable histories).
- * <p>
- * @param configuration configuration to be set as most recent
- * @since 3.3
- */
- public void setRecentLaunch(ILaunch launch) {
- ILaunchGroup[] groups = DebugUITools.getLaunchGroups();
- int size = groups.length;
- for (int i = 0; i < size; i++) {
- String id = groups[i].getIdentifier();
- LaunchHistory history = getLaunchHistory(id);
- if (history != null)
- history.launchAdded(launch);
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java
deleted file mode 100644
index 3ca3eb7..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java
+++ /dev/null
@@ -1,382 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchDelegate;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.ILaunchMode;
-import org.eclipse.debug.internal.core.IConfigurationElementConstants;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.LaunchConfigurationTabExtension;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.activities.IWorkbenchActivitySupport;
-import org.eclipse.ui.activities.WorkbenchActivityHelper;
-
-/**
- * Manages contributed launch configuration tabs
- *
- * @see LaunchConfigurationTabGroupWrapper
- * @see LaunchConfigurationTabExtension
- * @see LaunchConfigurationTabGroupExtension
- */
-public class LaunchConfigurationPresentationManager {
-
- /**
- * The singleton launch configuration presentation manager
- */
- private static LaunchConfigurationPresentationManager fgDefault;
-
- /**
- * Collection of launch configuration tab group extensions
- * defined in plug-in xml. Entries are keyed by launch
- * configuration type identifier (<code>String</code>),
- * and entries are tables of launch modes (<code>String</code>)
- * to <code>LaunchConfigurationTabGroupExtension</code>. "*" is
- * used to represent the default tab group (i.e. unspecified mode).
- */
- private Hashtable fTabGroupExtensions;
-
- /**
- * contributed tabs are stored by the tab group id that they contribute to.
- * each entry is a <code>Hashtable</code> consisting of the corresponding
- * <code>LaunchConfigurationTabExtension</code> objects for each contributed tab stored by their
- * id
- *
- * @since 3.3
- */
- private Hashtable fContributedTabs;
-
- /**
- * Constructs the singleton launch configuration presentation
- * manager.
- */
- private LaunchConfigurationPresentationManager() {
- fgDefault = this;
- }
-
- /**
- * Returns the launch configuration presentation manager
- */
- public static LaunchConfigurationPresentationManager getDefault() {
- if (fgDefault == null) {
- fgDefault = new LaunchConfigurationPresentationManager();
- }
- return fgDefault;
- }
-
- /**
- * Creates launch configuration tab group extensions for each extension
- * defined in XML, and adds them to the table of tab group extensions.
- */
- private void initializeTabGroupExtensions() {
- if(fTabGroupExtensions == null) {
- fTabGroupExtensions = new Hashtable();
- IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_LAUNCH_CONFIGURATION_TAB_GROUPS);
- IConfigurationElement[] groups = extensionPoint.getConfigurationElements();
- LaunchConfigurationTabGroupExtension group = null;
- String typeId = null;
- Map map = null;
- List modes = null;
- for (int i = 0; i < groups.length; i++) {
- group = new LaunchConfigurationTabGroupExtension(groups[i]);
- typeId = group.getTypeIdentifier();
- map = (Map)fTabGroupExtensions.get(typeId);
- if (map == null) {
- map = new Hashtable();
- fTabGroupExtensions.put(typeId, map);
- }
- modes = group.getModes();
- if(modes.isEmpty()) {
- String mode = "*"; //$NON-NLS-1$
- reportReplacement((LaunchConfigurationTabGroupExtension) map.put(mode, group), group, mode);
- }
- Set ms = null;
- for(Iterator iter = modes.iterator(); iter.hasNext();) {
- ms = (Set) iter.next();
- reportReplacement((LaunchConfigurationTabGroupExtension) map.put(ms, group), group, ms);
- }
- }
- }
- }
-
- /**
- * Reports if a tab group extension has been replaced by another contribution
- * @param oldext the old tab group extension from the cache
- * @param newext the new one being cached
- * @param mode the mode(s) the group applies to
- *
- * @since 3.6
- */
- void reportReplacement(LaunchConfigurationTabGroupExtension oldext, LaunchConfigurationTabGroupExtension newext, Object mode) {
- if(oldext != null) {
- Status status = new Status(IStatus.ERROR,
- DebugUIPlugin.getUniqueIdentifier(),
- NLS.bind(LaunchConfigurationsMessages.LaunchConfigurationPresentationManager_0,
- new String[]{oldext.getIdentifier(), oldext.getTypeIdentifier(), mode.toString(), newext.getIdentifier()}));
- DebugUIPlugin.log(status);
- }
- }
-
- /**
- * This method is used to collect all of the contributed tabs defined by the <code>launchConfigurationTabs</code>
- * extension point
- *
- * @since 3.3
- */
- private void initializeContributedTabExtensions() {
- fContributedTabs = new Hashtable();
- IExtensionPoint epoint = Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_LAUNCH_TABS);
- IConfigurationElement[] elements = epoint.getConfigurationElements();
- LaunchConfigurationTabExtension tab = null;
- Hashtable element = null;
- for(int i = 0; i < elements.length; i++) {
- tab = new LaunchConfigurationTabExtension(elements[i]);
- element = (Hashtable) fContributedTabs.get(tab.getTabGroupId());
- if(element == null) {
- element = new Hashtable();
- element.put(tab.getIdentifier(), tab);
- fContributedTabs.put(tab.getTabGroupId(), element);
- }
- element.put(tab.getIdentifier(), tab);
- }
- }
-
- /**
- * Returns the tab group for the given launch configuration type and mode.
- *
- * @param type launch configuration type
- * @param mode launch mode
- * @return the tab group for the given type of launch configuration, or <code>null</code> if none
- * @exception CoreException if an exception occurs creating the group
- */
- public ILaunchConfigurationTabGroup getTabGroup(ILaunchConfigurationType type, String mode) throws CoreException {
- HashSet modes = new HashSet();
- modes.add(mode);
- LaunchConfigurationTabGroupExtension ext = getExtension(type.getIdentifier(), modes);
- if (ext == null) {
- IStatus status = new Status(IStatus.ERROR, IDebugUIConstants.PLUGIN_ID, IDebugUIConstants.INTERNAL_ERROR, "No tab group defined for launch configuration type " + type.getIdentifier(), null); //$NON-NLS-1$
- throw new CoreException(status);
- }
- return new LaunchConfigurationTabGroupWrapper(ext.newTabGroup(), ext.getIdentifier(), null);
- }
-
- /**
- * Returns the tab group for the given launch configuration and the mode the dialog opened in
- * @param type the type of the configuration
- * @param config
- * @param mode
- * @return
- * @throws CoreException
- */
- public ILaunchConfigurationTabGroup getTabGroup(ILaunchConfiguration config, String mode) throws CoreException {
- HashSet modes = new HashSet();
- modes.add(mode);
- LaunchConfigurationTabGroupExtension ext = getExtension(config.getType().getIdentifier(), modes);
- if (ext == null) {
- IStatus status = new Status(IStatus.ERROR, IDebugUIConstants.PLUGIN_ID, IDebugUIConstants.INTERNAL_ERROR, "No tab group defined for launch configuration type " + config.getType().getIdentifier(), null); //$NON-NLS-1$
- throw new CoreException(status);
- }
- return new LaunchConfigurationTabGroupWrapper(ext.newTabGroup(), ext.getIdentifier(), config);
- }
-
- /**
- * Returns the proxy elements for all contributed tabs for the specified tab group id
- * @param groupid the id of the tab group
- * @param config the config the tab group is opened on
- * @param mode the mode the associated launch dialog is opened on
- * @return the listing of all of the tab extensions or an empty array, never <code>null</code>
- *
- * @since 3.3
- */
- protected LaunchConfigurationTabExtension[] getTabExtensions(String groupid, ILaunchConfiguration config, String mode) throws CoreException {
- initializeContributedTabExtensions();
- Hashtable tabs = (Hashtable) fContributedTabs.get(groupid);
- if(tabs != null) {
- return filterLaunchTabExtensions((LaunchConfigurationTabExtension[]) tabs.values().toArray(new LaunchConfigurationTabExtension[tabs.size()]), config, mode);
- }
- return new LaunchConfigurationTabExtension[0];
- }
-
- /**
- * Returns a listing of <code>LaunchConfiguraitonTabExtension</code>s that does not contain any tabs
- * from disabled activities
- * <p>
- * There are thre ways that tabs can be filtered form the launch dialog:
- * <ol>
- * <li>The tabs can belong to tooling that is contributed via a specific type of workbench activity, and is therefore filtered with capabilities</li>
- * <li>The tabs can be filtered via the associatedDelegate extension point, if a tab is said to apply only to certain tooling, only show it in the instance when that tooling is used</li>
- * <li>A tab is not part of a workbench activity, nor specifies an associated launch delegate -- show the tab</li>
- * </ol>
- * </p>
- * @param tabs the raw listing of tabs to filter
- * @return the listing of filtered <code>LaunchConfigurationTabExtension</code>s or an empty array, never <code>null</code>
- *
- * @since 3.3
- */
- protected LaunchConfigurationTabExtension[] filterLaunchTabExtensions(LaunchConfigurationTabExtension[] tabs, ILaunchConfiguration config, String mode) throws CoreException {
- IWorkbenchActivitySupport as = PlatformUI.getWorkbench().getActivitySupport();
- if(as == null || config == null) {
- return tabs;
- }
- HashSet set = new HashSet();
- for(int i = 0; i < tabs.length; i ++) {
- //filter capabilities
- if(!WorkbenchActivityHelper.filterItem(new LaunchTabContribution(tabs[i]))) {
- //filter to preferred delegate (if there is one)
- HashSet modes = (HashSet) config.getModes();
- modes.add(mode);
- ILaunchDelegate delegate = config.getPreferredDelegate(modes);
- if(delegate == null) {
- delegate = config.getType().getPreferredDelegate(modes);
- }
- Set delegateSet = tabs[i].getDelegateSet();
- if(delegate != null) {
- if(delegateSet.isEmpty() || delegateSet.contains(delegate.getId())) {
- set.add(tabs[i]);
- }
- }
- else {
- //otherwise filter based on the collection of delegates for the modes
- ILaunchDelegate[] delegates = config.getType().getDelegates(modes);
- for(int j = 0; j < delegates.length; j++) {
- if(delegateSet.size() == 0 || delegateSet.contains(delegates[j].getId())) {
- //associated with all modes and tab groups or only specific ones if indicated
- set.add(tabs[i]);
- }
- }
- }
- }
- }
- return (LaunchConfigurationTabExtension[]) set.toArray(new LaunchConfigurationTabExtension[set.size()]);
- }
-
- /**
- * Returns the launch tab group extension for the given type and mode, or
- * <code>null</code> if none
- *
- * @param type launch configuration type identifier
- * @param mode launch mode identifier
- * @return launch tab group extension or <code>null</code>
- */
- protected LaunchConfigurationTabGroupExtension getExtension(String type, Set modes) {
- initializeTabGroupExtensions();
- Map map = (Map)fTabGroupExtensions.get(type);
- if (map != null) {
- Object extension = map.get(modes);
- if (extension == null) {
- // get the default tabs
- extension = map.get("*"); //$NON-NLS-1$
- }
- return (LaunchConfigurationTabGroupExtension)extension;
- }
- return null;
- }
-
- /**
- * Returns the identifier of the help context that is associated with the
- * specified launch configuration type and mode, or <code>null</code> if none.
- *
- * @param type launch config type
- * @param mode launch mode
- * @return the identifier for the help context associated with the given
- * type of launch configuration, or <code>null</code>
- * @exception CoreException if an exception occurs creating the group
- * @since 2.1
- */
- public String getHelpContext(ILaunchConfigurationType type, String mode) throws CoreException {
- HashSet modes = new HashSet();
- modes.add(mode);
- LaunchConfigurationTabGroupExtension ext = getExtension(type.getIdentifier(), modes);
- if (ext == null) {
- IStatus status = new Status(IStatus.ERROR, IDebugUIConstants.PLUGIN_ID, IDebugUIConstants.INTERNAL_ERROR, "No tab group defined for launch configuration type " + type.getIdentifier(), null); //$NON-NLS-1$
- throw new CoreException(status);
- }
- return ext.getHelpContextId();
- }
-
- /**
- * Returns the description of the given configuration type
- * in the specified mode or <code>null</code> if none.
- *
- * @param configType the config type
- * @param mode the launch mode
- * @return the description of the given configuration type, possible <code>null</code>
- */
- public String getDescription(ILaunchConfigurationType configType, String mode) {
- HashSet modes = new HashSet();
- modes.add(mode);
- LaunchConfigurationTabGroupExtension extension = getExtension(configType.getAttribute(IConfigurationElementConstants.ID), modes);
- return (extension != null ? extension.getDescription(modes) : null);
- }
-
- /**
- * Returns a sorted list of launch mode names corresponding to the given identifiers.
- *
- * @param modes set of launch mode identifiers
- * @return sorted list of launch mode names
- */
- public List getLaunchModeNames(Set modes) {
- List names = new ArrayList();
- Iterator iterator = modes.iterator();
- ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
- while (iterator.hasNext()) {
- String id = (String) iterator.next();
- ILaunchMode mode = manager.getLaunchMode(id);
- if (mode == null) {
- names.add(id);
- } else {
- names.add(DebugUIPlugin.removeAccelerators(mode.getLabel()));
- }
- }
- Collections.sort(names);
- return names;
- }
-
- /**
- * Returns the label of the mode id with all accelerators removed
- * @param modeid the id of the mode i.e. 'run'
- * @return the formatted label of the specified mode id with all accelerators removed, or <code>null</code> if no label is available
- * @since 3.3
- */
- public String getLaunchModeLabel(String modeid) {
- String mode = null;
- ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchMode lmode = manager.getLaunchMode(modeid);
- if(lmode != null) {
- return lmode.getLabel();
- }
- return mode;
- }
-
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java
deleted file mode 100644
index 0da0427..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationListener;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * A dialog used to edit a single launch configuration.
- */
-public class LaunchConfigurationPropertiesDialog extends LaunchConfigurationsDialog implements ILaunchConfigurationListener {
-
- /**
- * The launch configuration to display
- */
- private ILaunchConfiguration fLaunchConfiguration;
-
- /**
- * Whether to set default values when opened
- * @since 3.3
- */
- private boolean fSetDefaultOnOpen = false;
-
- /**
- * Constructs a new launch configuration dialog on the given
- * parent shell.
- *
- * @param shell the parent shell
- * @param selection the selection used to initialize this dialog, typically the
- * current workbench selection
- * @param group launch group
- */
- public LaunchConfigurationPropertiesDialog(Shell shell, ILaunchConfiguration launchConfiguration, LaunchGroupExtension group) {
- super(shell, group);
- fLaunchConfiguration = launchConfiguration;
- DebugPlugin.getDefault().getLaunchManager().addLaunchConfigurationListener(this);
- }
-
- /**
- * Constructs a new launch configuration dialog on the given
- * parent shell.
- *
- * @param shell the parent shell
- * @param selection the selection used to initialize this dialog, typically the
- * current workbench selection
- * @param reservednames a set of names of virtual launch configurations that need to be considered
- * when configuration names are generated
- * @param group launch group
- */
- public LaunchConfigurationPropertiesDialog(Shell shell, ILaunchConfiguration launchConfiguration, LaunchGroupExtension group, Set reservednames) {
- super(shell, group);
- fLaunchConfiguration = launchConfiguration;
- DebugPlugin.getDefault().getLaunchManager().addLaunchConfigurationListener(this);
- fReservedNames = reservednames;
- }
-
- /**
- * Returns the launch configuration being displayed.
- *
- * @return ILaunchConfiguration
- */
- protected ILaunchConfiguration getLaunchConfiguration() {
- return fLaunchConfiguration;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#initializeBounds()
- */
- protected void initializeBounds() {
- super.initializeBounds();
- resize();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#initializeContent()
- */
- protected void initializeContent() {
- ILaunchConfiguration launchConfiguration = getLaunchConfiguration();
- if (fSetDefaultOnOpen && launchConfiguration instanceof ILaunchConfigurationWorkingCopy) {
- ILaunchConfigurationWorkingCopy wc = (ILaunchConfigurationWorkingCopy) launchConfiguration;
- try {
- ILaunchConfigurationTabGroup tabGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(wc, getMode());
- // this only works because this action is only present when the dialog is open
- ILaunchConfigurationDialog dialog = LaunchConfigurationsDialog.getCurrentlyVisibleLaunchConfigurationDialog();
- tabGroup.createTabs(dialog, dialog.getMode());
- ILaunchConfigurationTab[] tabs = tabGroup.getTabs();
- for (int i = 0; i < tabs.length; i++) {
- tabs[i].setLaunchConfigurationDialog(dialog);
- }
- tabGroup.setDefaults(wc);
- tabGroup.dispose();
- } catch (CoreException e) {
- DebugUIPlugin.log(e.getStatus());
- }
- }
- getTabViewer().setInput(launchConfiguration);
- IStatus status = getInitialStatus();
- if (status != null) {
- handleStatus(status);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#close()
- */
- public boolean close() {
- if (!isSafeToClose()) {
- return false;
- }
- DebugPlugin.getDefault().getLaunchManager().removeLaunchConfigurationListener(this);
- return super.close();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#addContent(org.eclipse.swt.widgets.Composite)
- */
- protected void addContent(Composite dialogComp) {
- GridData gd;
- Composite topComp = new Composite(dialogComp, SWT.NONE);
- gd = new GridData(GridData.FILL_BOTH);
- topComp.setLayoutData(gd);
- GridLayout topLayout = new GridLayout();
- topLayout.numColumns = 1;
- topLayout.marginHeight = 5;
- topLayout.marginWidth = 5;
- topComp.setLayout(topLayout);
- topComp.setFont(dialogComp.getFont());
-
- // Set the things that TitleAreaDialog takes care of
- setTitle(getTitleAreaTitle());
- setMessage(IInternalDebugCoreConstants.EMPTY_STRING);
- setModeLabelState();
-
- // Build the launch configuration edit area and put it into the composite.
- Composite editAreaComp = createLaunchConfigurationEditArea(topComp);
- gd = new GridData(GridData.FILL_BOTH);
- editAreaComp.setLayoutData(gd);
- editAreaComp.setFont(dialogComp.getFont());
-
- dialogComp.layout(true);
- applyDialogFont(dialogComp);
- }
-
- /**
- * returns the title area title of the dialog
- * @return the title area title
- */
- protected String getTitleAreaTitle() {
- return LaunchConfigurationsMessages.LaunchConfigurationPropertiesDialog_Edit_launch_configuration_properties_1;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
- protected void createButtonsForButtonBar(Composite parent) {
- // create OK and Cancel buttons by default
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#getShellTitle()
- */
- protected String getShellTitle() {
- return LaunchConfigurationsMessages.LaunchConfigurationPropertiesDialog_Properties_for__0__2;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#getHelpContextId()
- */
- protected String getHelpContextId() {
- return IDebugHelpContextIds.LAUNCH_CONFIGURATION_PROPERTIES_DIALOG;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#updateButtons()
- */
- public void updateButtons() {
- getTabViewer().refresh();
- getButton(IDialogConstants.OK_ID).setEnabled(getTabViewer().canSave());
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
- protected void okPressed() {
- getTabViewer().handleApplyPressed();
- super.okPressed();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#open()
- */
- public int open() {
- setOpenMode(-1);
- return super.open();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog#getDialogSettingsSectionName()
- */
- protected String getDialogSettingsSectionName() {
- return IDebugUIConstants.PLUGIN_ID + ".LAUNCH_CONFIGURATION_PROPERTIES_DIALOG_SECTION"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public void launchConfigurationAdded(ILaunchConfiguration configuration) {
- ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
- if (getLaunchConfiguration().equals(manager.getMovedFrom(configuration))) {
- // this config was re-named, update the dialog with the new config
- fLaunchConfiguration = configuration;
- getTabViewer().setInput(getLaunchConfiguration());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public void launchConfigurationChanged(ILaunchConfiguration configuration) {}
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public void launchConfigurationRemoved(ILaunchConfiguration configuration) {}
-
- /**
- * Sets whether the tab group should set default values in the launch configuration
- * when the dialog is opened. If this method is not called, default values are not
- * set.
- *
- * @param setDefaults whether to set default values
- */
- public void setDefaultsOnOpen(boolean setDefaults) {
- fSetDefaultOnOpen = setDefaults;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationSelectionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationSelectionDialog.java
deleted file mode 100644
index 6bc35fa..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationSelectionDialog.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import org.eclipse.debug.internal.ui.AbstractDebugListSelectionDialog;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This class provides a dialog for selecting a given launch configuration from a listing
- *
- * @since 3.3.0
- * CONTEXTLAUNCHING
- */
-public class LaunchConfigurationSelectionDialog extends AbstractDebugListSelectionDialog {
-
- private static final String DIALOG_SETTINGS = IDebugUIConstants.PLUGIN_ID + ".SELECT_LAUNCH_CONFIGURATION_DIALOG"; //$NON-NLS-1$;
- private Object fInput;
-
- /**
- * Constructor
- * @param parent
- */
- public LaunchConfigurationSelectionDialog(Shell parent, Object input) {
- super(parent);
- fInput = input;
- setTitle(LaunchConfigurationsMessages.LaunchConfigurationSelectionDialog_0);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getDialogSettingsId()
- */
- protected String getDialogSettingsId() {
- return DIALOG_SETTINGS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getHelpContextId()
- */
- protected String getHelpContextId() {
- return IDebugHelpContextIds.SELECT_LAUNCH_CONFIGURATION_DIALOG;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerInput()
- */
- protected Object getViewerInput() {
- return fInput;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerLabel()
- */
- protected String getViewerLabel() {
- return LaunchConfigurationsMessages.LaunchConfigurationSelectionDialog_1;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupExtension.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupExtension.java
deleted file mode 100644
index 67cee23..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupExtension.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.debug.internal.core.IConfigurationElementConstants;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
-
-
-/**
- * Proxy to a launch configuration tab group element
- */
-public class LaunchConfigurationTabGroupExtension {
-
- /**
- * The configuration element defining this tab group.
- */
- private IConfigurationElement fConfig = null;
-
- /**
- * A list of sets of modes that this tab group supports
- * @since 3.3
- */
- private List fModes = null;
-
- /**
- * A map of mode sets to descriptions
- * @since 3.3
- */
- private Map fDescriptions = null;
-
- /**
- * Perspectives for each mode
- */
- private Map fPerspectives = null;
-
- /**
- * Constructs a launch configuration tab extension based
- * on the given configuration element
- *
- * @param element the configuration element defining the
- * attributes of this launch configuration tab extension
- * @return a new launch configuration tab extension
- */
- public LaunchConfigurationTabGroupExtension(IConfigurationElement element) {
- setConfigurationElement(element);
- }
-
- /**
- * Sets the configuration element that defines the attributes
- * for this launch configuration tab group extension.
- *
- * @param element configuration element
- */
- private void setConfigurationElement(IConfigurationElement element) {
- fConfig = element;
- }
-
- /**
- * Returns the configuration element that defines the attributes
- * for this launch configuration tab group extension.
- *
- * @param configuration element that defines the attributes
- * for this launch configuration tab extension
- */
- protected IConfigurationElement getConfigurationElement() {
- return fConfig;
- }
-
- /**
- * Returns the set of modes specified in the configuration data, or <code>null</code>
- * if none (i.e. default tab group)
- *
- * @return the set of modes specified in the configuration data, or
- * <code>null</code>
- */
- protected List getModes() {
- if (fModes == null) {
- fModes = new ArrayList();
- fPerspectives = new Hashtable();
- IConfigurationElement[] modes = fConfig.getChildren(IConfigurationElementConstants.LAUNCH_MODE);
- if (modes.length > 0) {
- IConfigurationElement element = null;
- String perspective = null, mode = null;
- Set mset = null;
- for (int i = 0; i < modes.length; i++) {
- element = modes[i];
- mode = element.getAttribute(IConfigurationElementConstants.MODE);
- mset = new HashSet();
- mset.add(mode);
- fModes.add(mset);
- perspective = element.getAttribute(IConfigurationElementConstants.PERSPECTIVE);
- if (perspective != null) {
- fPerspectives.put(mset, perspective);
- }
- }
- }
- }
- return fModes;
- }
-
- /**
- * Returns the perspective associated with the given launch
- * mode, as specified in plug-in XML, or <code>null</code> if none.
- *
- * @param modes the set of launch modes
- * @return perspective identifier, or <code>null</code>
- */
- protected String getPerspective(Set modes) {
- getModes();
- return (String)fPerspectives.get(modes);
- }
-
- /**
- * Returns the identifier of the type of launch configuration this
- * tab group is associated with
- *
- * @return the identifier of the type of launch configuration this
- * tab group is associated with
- */
- protected String getTypeIdentifier() {
- return getConfigurationElement().getAttribute(IConfigurationElementConstants.TYPE);
- }
-
- /**
- * Returns the identifier of the help context associated with this tab
- * group, or <code>null</code> if one was not specified.
- *
- * @return the identifier of this tab group's help context or
- * <code>null</code>
- * @since 2.1
- */
- protected String getHelpContextId() {
- return getConfigurationElement().getAttribute(IConfigurationElementConstants.HELP_CONTEXT_ID);
- }
-
- /**
- * Returns the identifier of the tab group
- * @return the id of the tab group
- *
- * @since 3.3
- */
- protected String getIdentifier() {
- return getConfigurationElement().getAttribute(IConfigurationElementConstants.ID);
- }
-
- /**
- * Returns a new tab group defined by this extension
- *
- * @return a new tab group defined by this extension
- * @exception CoreException if an exception occurs instantiating
- * the tab group
- */
- public ILaunchConfigurationTabGroup newTabGroup() throws CoreException {
- return (ILaunchConfigurationTabGroup)getConfigurationElement().createExecutableExtension(IConfigurationElementConstants.CLASS);
- }
-
- /**
- * Returns this tab group's description in the given mode set.
- *
- * @param modes the set of modes
- * @return a description of the Launch Mode if available. If not available, attempts to return
- * a description of the Launch Configuration. If no appropriate description is found an empty string is returned.
- */
- public String getDescription(Set modes) {
- String description = null;
- if(fDescriptions == null) {
- fDescriptions = new HashMap();
- IConfigurationElement[] children = fConfig.getChildren(IConfigurationElementConstants.LAUNCH_MODE);
- IConfigurationElement child = null;
- String mode = null;
- HashSet set = null;
- for (int i = 0; i < children.length; i++) {
- child = children[i];
- mode = child.getAttribute(IConfigurationElementConstants.MODE);
- if(mode != null) {
- set = new HashSet();
- set.add(mode);
- }
- description = child.getAttribute(IConfigurationElementConstants.DESCRIPTION);
- if(description != null) {
- fDescriptions.put(set, description);
- }
- }
-
- }
- description = (String) fDescriptions.get(modes);
- if(description == null) {
- description = fConfig.getAttribute(IConfigurationElementConstants.DESCRIPTION);
-
- }
- return (description == null ? IInternalDebugCoreConstants.EMPTY_STRING : description);
- }
-
-}
-
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
deleted file mode 100644
index 4ad6811..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
+++ /dev/null
@@ -1,1412 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchDelegate;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.core.LaunchConfigurationWorkingCopy;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.SWTFactory;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ColorRegistry;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.custom.CTabFolder;
-import org.eclipse.swt.custom.CTabItem;
-import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.custom.ViewForm;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbenchPreferenceConstants;
-import org.eclipse.ui.PlatformUI;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * A viewer that displays tabs for a launch configuration, with apply and revert
- * buttons.
- */
-public class LaunchConfigurationTabGroupViewer {
-
- /**
- * Containing launch dialog
- */
- private ILaunchConfigurationDialog fDialog;
-
- /**
- * The this viewer's input
- */
- private Object fInput;
-
- /**
- * The launch configuration (original) being edited
- */
- private ILaunchConfiguration fOriginal;
-
- /**
- * The working copy of the original
- */
- private ILaunchConfigurationWorkingCopy fWorkingCopy;
-
- /**
- * This view's control, which contains a composite area of controls
- */
- private Composite fViewerControl;
-
- /**
- * The composite which is hidden/displayed as tabs are required.
- */
- private Composite fVisibleArea;
-
- /**
- * Name label widget
- */
- private Label fNameLabel;
-
- /**
- * Name text widget
- */
- private Text fNameWidget;
-
- /**
- * Composite containing the launch config tab widgets
- */
- private Composite fTabComposite;
-
- /**
- * Tab folder
- */
- private CTabFolder fTabFolder;
-
- /**
- * The current tab group being displayed
- */
- private ILaunchConfigurationTabGroup fTabGroup;
-
- /**
- * The type of config tabs are currently displayed
- * for
- */
- private ILaunchConfigurationType fTabType;
-
- /**
- * Index of the active tab
- */
- private int fCurrentTabIndex = -1;
-
- /**
- * Apply & Revert buttons
- */
- private Button fApplyButton;
- private Button fRevertButton;
-
- /**
- * Whether tabs are currently being disposed or initialized
- */
- private boolean fDisposingTabs = false;
- private boolean fInitializingTabs = false;
-
- /**
- * The description of the currently selected launch configuration or
- * launch configuration type or <code>null</code> if none.
- */
- private String fDescription = null;
-
- /**
- * A place holder for switching between the tabs for a config and the getting started tab
- * @since 3.2
- */
- private Composite fTabPlaceHolder = null;
-
- /**
- * A link to allow users to select a valid set of launch options for the specified mode
- * @since 3.3
- */
- private Link fOptionsLink = null;
-
- /**
- * A label to indicate that the user needs to select an a launcher.
- * @since 3.5
- */
- private Label fOptionsErrorLabel = null;
-
- /**
- * A new composite replacing the perspectives tab
- * @since 3.2
- */
- private Composite fGettingStarted = null;
-
- private ViewForm fViewform;
-
- /**
- * Constructs a viewer in the given composite, contained by the given
- * launch configuration dialog.
- *
- * @param parent composite containing this viewer
- * @param dialog containing launch configuration dialog
- */
- public LaunchConfigurationTabGroupViewer(Composite parent, ILaunchConfigurationDialog dialog) {
- super();
- fDialog = dialog;
- createControl(parent);
- }
-
- /**
- * Cleanup
- */
- public void dispose() {
- disposeTabGroup();
- }
-
- /**
- * Dispose the active tab group, if any.
- */
- protected void disposeTabGroup() {
- if (fTabGroup != null) {
- fTabGroup.dispose();
- fTabGroup = null;
- fTabType = null;
- }
- }
-
- /**
- * Creates this viewer's control This area displays the name of the launch
- * configuration currently being edited, as well as a tab folder of tabs
- * that are applicable to the launch configuration.
- *
- * @return the composite used for launch configuration editing
- */
- private void createControl(Composite parent) {
- fViewerControl = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.horizontalSpacing = 0;
- layout.verticalSpacing = 0;
- fViewerControl.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_BOTH);
- fViewerControl.setLayoutData(gd);
-
- fViewform = new ViewForm(fViewerControl, SWT.FLAT | SWT.BORDER);
- layout = new GridLayout(1, false);
- layout.horizontalSpacing = 0;
- layout.verticalSpacing = 0;
- fViewform.setLayout(layout);
- gd = new GridData(GridData.FILL_BOTH);
- fViewform.setLayoutData(gd);
- fVisibleArea = fViewform;
- fViewform.setTopLeft(null);
-
- Composite mainComp = new Composite(fViewform, SWT.FLAT);
- layout = new GridLayout(1, false);
- layout.verticalSpacing = 0;
- layout.horizontalSpacing = 0;
- mainComp.setLayout(layout);
- fViewform.setContent(mainComp);
-
- fTabPlaceHolder = new Composite(mainComp, SWT.NONE);
- fTabPlaceHolder.setLayout(new StackLayout());
- gd = new GridData(GridData.FILL_BOTH);
- fTabPlaceHolder.setLayoutData(gd);
-
- fGettingStarted = new Composite(fTabPlaceHolder, SWT.NONE);
- fGettingStarted.setLayout(new GridLayout());
- gd = new GridData(GridData.FILL_BOTH);
- fGettingStarted.setLayoutData(gd);
-
- createGettingStarted(fGettingStarted);
-
- fTabComposite = new Composite(fTabPlaceHolder, SWT.NONE);
- layout = new GridLayout(2, false);
- layout.verticalSpacing = 10;
- layout.horizontalSpacing = 5;
- fTabComposite.setLayout(layout);
- gd = new GridData(GridData.FILL_BOTH);
- fTabComposite.setLayoutData(gd);
-
- fNameLabel = new Label(fTabComposite, SWT.HORIZONTAL | SWT.LEFT);
- fNameLabel.setText(LaunchConfigurationsMessages.LaunchConfigurationDialog__Name__16);
- fNameLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- fNameWidget = new Text(fTabComposite, SWT.SINGLE | SWT.BORDER);
- fNameWidget.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fNameWidget.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- if(!fInitializingTabs) {
- handleNameModified();
- }
- }
- }
- );
-
- createTabFolder(fTabComposite);
-
- Composite blComp = SWTFactory.createComposite(mainComp, mainComp.getFont(), 2, 1, GridData.FILL_HORIZONTAL);
- Composite linkComp = SWTFactory.createComposite(blComp, blComp.getFont(), 2, 1, GridData.FILL_HORIZONTAL);
-
- //a link for launch options
- fOptionsErrorLabel = new Label(linkComp, SWT.NONE);
- gd = new GridData();
- fOptionsErrorLabel.setLayoutData(gd);
-
- fOptionsLink = new Link(linkComp, SWT.WRAP);
- fOptionsLink.setFont(linkComp.getFont());
- gd = new GridData(SWT.LEFT);
- gd.grabExcessHorizontalSpace = true;
- fOptionsLink.setLayoutData(gd);
- fOptionsLink.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- //collect the options available
- try {
- if(!canLaunchWithModes()) {
- SelectLaunchModesDialog sld = new SelectLaunchModesDialog(getShell(),
- getLaunchConfigurationDialog().getMode(), getWorkingCopy());
- if(sld.open() == IDialogConstants.OK_ID) {
- //set the options to the config
- Object[] res = sld.getResult();
- if(res != null) {
- Set modes = (Set) res[0];
- modes.remove(getLaunchConfigurationDialog().getMode());
- ILaunchConfigurationWorkingCopy wc = getWorkingCopy();
- wc.setModes(modes);
- refreshStatus();
- }
- }
- }
- else if(hasMultipleDelegates()) {
- SelectLaunchersDialog sldd = new SelectLaunchersDialog(getShell(),
- getWorkingCopy().getType().getDelegates(getCurrentModeSet()),
- getWorkingCopy(),
- getLaunchConfigurationDialog().getMode());
- if(sldd.open() == IDialogConstants.OK_ID) {
- displayInstanceTabs(true);
- refreshStatus();
- }
- }
- } catch (CoreException ex) {}
- }
- });
- fOptionsLink.setVisible(false);
-
- Composite buttonComp = new Composite(blComp, SWT.NONE);
- GridLayout buttonCompLayout = new GridLayout();
- buttonCompLayout.numColumns = 2;
- buttonComp.setLayout(buttonCompLayout);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
- buttonComp.setLayoutData(gd);
-
- fApplyButton = new Button(buttonComp, SWT.PUSH);
- fApplyButton.setText(LaunchConfigurationsMessages.LaunchConfigurationDialog__Apply_17);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
- fApplyButton.setLayoutData(gd);
- SWTFactory.setButtonDimensionHint(fApplyButton);
- fApplyButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent evt) {
- handleApplyPressed();
- }
- });
-
- fRevertButton = new Button(buttonComp, SWT.PUSH);
- fRevertButton.setText(LaunchConfigurationsMessages.LaunchConfigurationDialog_Revert_2);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
- fRevertButton.setLayoutData(gd);
- SWTFactory.setButtonDimensionHint(fRevertButton);
- fRevertButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent evt) {
- handleRevertPressed();
- }
- });
- Dialog.applyDialogFont(parent);
- }
-
- /**
- * Creates some help text for the tab group launch types
- * @param parent the parent composite
- * @since 3.2
- */
- private void createGettingStarted(Composite parent) {
- Font font = parent.getFont();
- GridData gd = null;
- int width = parent.getBounds().width - 30;
- SWTFactory.createWrapLabel(parent, LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_1, 1, width);
- SWTFactory.createWrapCLabel(parent, LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_2, DebugUITools.getImage(IInternalDebugUIConstants.IMG_ELCL_NEW_CONFIG), 1, width);
- SWTFactory.createWrapCLabel(parent, LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_6, DebugUITools.getImage(IInternalDebugUIConstants.IMG_ELCL_DUPLICATE_CONFIG), 1, width);
- SWTFactory.createWrapCLabel(parent, LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_4, DebugUITools.getImage(IInternalDebugUIConstants.IMG_ELCL_DELETE_CONFIG), 1, width);
- SWTFactory.createWrapCLabel(parent, LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_8, DebugUITools.getImage(IInternalDebugUIConstants.IMG_ELCL_FILTER_CONFIGS), 1, width);
- SWTFactory.createWrapCLabel(parent, LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_3, DebugUITools.getImage(IInternalDebugUIConstants.IMG_OVR_TRANSPARENT), 1, width);
-
- SWTFactory.createHorizontalSpacer(parent, 2);
- Link link = new Link(parent, SWT.LEFT | SWT.WRAP);
- link.setText(LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_5);
- link.setFont(font);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.widthHint = width;
- link.setLayoutData(gd);
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- SWTFactory.showPreferencePage("org.eclipse.debug.ui.PerspectivePreferencePage"); //$NON-NLS-1$
- }
- });
- }
-
- /**
- * Creates the tab folder for displaying config instances
- * @param parent
- */
- private void createTabFolder(Composite parent) {
- if (fTabFolder == null) {
- ColorRegistry reg = JFaceResources.getColorRegistry();
- Color c1 = reg.get("org.eclipse.ui.workbench.ACTIVE_TAB_BG_START"), //$NON-NLS-1$
- c2 = reg.get("org.eclipse.ui.workbench.ACTIVE_TAB_BG_END"); //$NON-NLS-1$
- fTabFolder = new CTabFolder(parent, SWT.NO_REDRAW_RESIZE | SWT.NO_TRIM | SWT.FLAT);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.horizontalSpan = 2;
- fTabFolder.setSelectionBackground(new Color[] {c1, c2}, new int[] {100}, true);
- fTabFolder.setSelectionForeground(reg.get("org.eclipse.ui.workbench.ACTIVE_TAB_TEXT_COLOR")); //$NON-NLS-1$
- fTabFolder.setSimple(PlatformUI.getPreferenceStore().getBoolean(IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS));
- fTabFolder.setLayoutData(gd);
- fTabFolder.setBorderVisible(true);
- fTabFolder.setFont(parent.getFont());
- fTabFolder.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- if (!fInitializingTabs) {
- handleTabSelected();
- refresh();
- }
- }
- });
- }
- }
-
- /**
- * Returns the apply button
- */
- protected Button getApplyButton() {
- return fApplyButton;
- }
-
- /**
- * Returns the revert button
- */
- protected Button getRevertButton() {
- return fRevertButton;
- }
-
- /**
- * Sets the current name
- */
- public void setName(String name) {
- if (getWorkingCopy() != null) {
- if (name == null) {
- fNameWidget.setText(IInternalDebugCoreConstants.EMPTY_STRING);
- }
- else {
- fNameWidget.setText(name.trim());
- }
- refreshStatus();
- }
- }
-
- /**
- * @see org.eclipse.jface.viewers.Viewer#getControl()
- */
- public Control getControl() {
- return fViewerControl;
- }
-
- /**
- * Returns the shell this viewer is contained in.
- */
- private Shell getShell() {
- return getControl().getShell();
- }
-
- /**
- * Returns the current input to the viewer. Input will
- * be one of {@link ILaunchConfiguration} or {@link ILaunchConfigurationType}
- *
- * @return returns the current input
- */
- public Object getInput() {
- return fInput;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.Viewer#refresh()
- */
- public void refresh() {
- if (fInitializingTabs) {
- return;
- }
- ILaunchConfigurationTab[] tabs = getTabs();
- if (tabs != null) {
- // update the working copy from the active tab
- boolean newwc = !getWorkingCopy().isDirty();
- ILaunchConfigurationTab tab = getActiveTab();
- if (tab != null) {
- tab.performApply(getWorkingCopy());
- }
- if((fOriginal instanceof ILaunchConfigurationWorkingCopy) && newwc) {
- try {
- ILaunchConfigurationWorkingCopy copy = getWorkingCopy();
- if(copy != null) {
- copy.doSave();
- }
- }
- catch (CoreException e) {DebugUIPlugin.log(e);}
- }
- updateButtons();
- // update error ticks
- CTabItem item = null;
- boolean error = false;
- Image image = null;
- for (int i = 0; i < tabs.length; i++) {
- item = fTabFolder.getItem(i);
- image = tabs[i].getImage();
- item.setImage(image);
- if(!tabs[i].isValid(getWorkingCopy())) {
- error = tabs[i].getErrorMessage() != null;
- if(error) {
- item.setImage(DebugUIPlugin.getDefault().getLaunchConfigurationManager().getErrorTabImage(tabs[i]));
- }
- }
- }
- showLink();
- getLaunchConfigurationDialog().updateMessage();
- }
- }
-
- /**
- * Shows the link for either multiple launch delegates or bad launch mode combinations
- *
- * @since 3.3
- */
- private void showLink() {
- String text = null;
- if(!canLaunchWithModes()) {
- text = LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_13;
- }
- else if(hasMultipleDelegates()) {
- ILaunchDelegate delegate = getPreferredDelegate();
- if(delegate != null) {
- String name = delegate.getName();
- if(name == null) {
- text = LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_15;
- }
- else {
- text = MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_16, new String[] {name});
- }
- }
- else {
- text = LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_17;
- }
- }
- if(text != null) {
- fOptionsLink.setText(text);
- }
- fOptionsLink.setVisible(!canLaunchWithModes() || hasMultipleDelegates());
- if (hasDuplicateDelegates()) {
- fOptionsErrorLabel.setImage(JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_ERROR));
- } else {
- fOptionsErrorLabel.setImage(null);
- }
- fViewform.layout(true, true);
- }
-
- /**
- * Returns the preferred launch delegate for the current launch configuration and mode set
- * @return the preferred launch delegate
- *
- * @since 3.3
- */
- protected ILaunchDelegate getPreferredDelegate() {
- ILaunchDelegate preferred = null;
- ILaunchConfigurationWorkingCopy config = getWorkingCopy();
- if(config != null) {
- try {
- Set modes = getCurrentModeSet();
- preferred = config.getPreferredDelegate(modes);
- if(preferred == null) {
- preferred = config.getType().getPreferredDelegate(modes);
- }
- }
- catch(CoreException ce) {DebugUIPlugin.log(ce);}
- }
- return preferred;
- }
-
- /**
- * Returns the listing of modes for the current config
- * @return the listing of modes for the current config
- * @since 3.3
- */
- private Set getCurrentModeSet() {
- Set set = new HashSet();
- ILaunchConfigurationWorkingCopy config = getWorkingCopy();
- if(config != null) {
- try {
- set.addAll(config.getModes());
- set.add(getLaunchConfigurationDialog().getMode());
- }
- catch(CoreException ce) {DebugUIPlugin.log(ce);}
- }
- return set;
- }
-
- /**
- * updates the button states
- */
- private void updateButtons() {
- boolean dirty = isDirty() && canSave();
- fApplyButton.setEnabled(dirty);
- fRevertButton.setEnabled(dirty);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.Viewer#setInput(java.lang.Object)
- */
- public void setInput(final Object input) {
- if(DebugUIPlugin.getStandardDisplay().getThread().equals(Thread.currentThread())) {
- setInput0(input);
- }
- else {
- DebugUIPlugin.getStandardDisplay().syncExec(new Runnable() {
- public void run() {
- setInput0(input);
- }
- });
- }
-
- }
- /**
- * Sets the input to the tab group viewer
- * @param input the new input
- * @since 3.3
- */
- private void setInput0(Object input) {
- if (input == null) {
- if (fInput == null) {
- return;
- }
- inputChanged(input);
- } else {
- if (!input.equals(fInput)) {
- inputChanged(input);
- }
- }
- }
-
- /**
- * The input has changed to the given object, possibly <code>null</code>.
- *
- * @param input the new input, possibly <code>null</code>
- */
- protected void inputChanged(Object input) {
- fInput = input;
- Runnable r = new Runnable() {
- public void run() {
- try {
- fVisibleArea.setRedraw(false);
- if (fInput instanceof ILaunchConfiguration) {
- ILaunchConfiguration configuration = (ILaunchConfiguration)fInput;
- boolean refreshtabs = !delegatesEqual(fWorkingCopy, configuration);
- fOriginal = configuration;
- fWorkingCopy = configuration.getWorkingCopy();
- displayInstanceTabs(refreshtabs);
- } else if (fInput instanceof ILaunchConfigurationType) {
- fDescription = getDescription((ILaunchConfigurationType)fInput);
- setNoInput();
- } else {
- setNoInput();
- }
- } catch (CoreException ce) {
- errorDialog(ce);
- setNoInput();
- }
- finally {
- refreshStatus();
- fVisibleArea.setRedraw(true);
- }
- }
- };
- BusyIndicator.showWhile(getShell().getDisplay(), r);
- }
-
- /**
- * Sets the tab group viewer to have no input, this is the case when null is passed as an input type
- * Setting no input is equivalent to resetting all items, clearing any messages and showing the 'getting started' pane
- * @since 3.2
- */
- private void setNoInput() {
- fOriginal = null;
- fWorkingCopy = null;
- disposeExistingTabs();
- updateButtons();
- updateVisibleControls(false);
- ILaunchConfigurationDialog lcd = getLaunchConfigurationDialog();
- if(lcd instanceof LaunchConfigurationsDialog) {
- if(((LaunchConfigurationsDialog)lcd).isTreeSelectionEmpty()) {
- fDescription = IInternalDebugCoreConstants.EMPTY_STRING;
- }
- }
- }
-
- /**
- * Returns if the two configurations are using the same <code>ILaunchDelegate</code> or not
- * @param config1
- * @param config2
- * @return true if the configurations are using the same <code>ILaunchDelegate</code> or false if they are not
- * @since 3.3
- */
- protected boolean delegatesEqual(ILaunchConfiguration config1, ILaunchConfiguration config2) {
- try {
- if(config1 == null || config2 == null) {
- return false;
- }
- Set modes = getCurrentModeSet();
- ILaunchDelegate d1 = config1.getPreferredDelegate(modes);
- if(d1 == null) {
- d1 = config1.getType().getPreferredDelegate(modes);
- }
- ILaunchDelegate d2 = config2.getPreferredDelegate(modes);
- if(d2 == null) {
- d2 = config2.getType().getPreferredDelegate(modes);
- }
- if(d1 != null) {
- return d1.equals(d2);
- }
- }
- catch(CoreException ce) {DebugUIPlugin.log(ce);}
- return false;
- }
-
- /**
- * Updates the visibility of controls based on the status provided
- * @param visible the visibility status to be applied to the controls
- */
- private void updateVisibleControls(boolean visible) {
- fApplyButton.setVisible(visible);
- fRevertButton.setVisible(visible);
- fOptionsLink.setVisible(visible);
- if(visible) {
- ((StackLayout)fTabPlaceHolder.getLayout()).topControl = fTabComposite;
- }
- else {
- ((StackLayout)fTabPlaceHolder.getLayout()).topControl = fGettingStarted;
- }
- fTabPlaceHolder.layout(true, true);
- }
-
- /**
- * sets the current widget focus to the 'Name' widget
- */
- protected void setFocusOnName() {
- fNameWidget.setFocus();
- }
-
- /**
- * Displays tabs for the current working copy
- */
- protected void displayInstanceTabs(boolean redrawTabs) {
- // Turn on initializing flag to ignore message updates
- fInitializingTabs = true;
- ILaunchConfigurationType type = null;
- try {
- type = getWorkingCopy().getType();
- }
- catch (CoreException e) {
- errorDialog(e);
- fInitializingTabs = false;
- return;
- }
- if(redrawTabs) {
- showInstanceTabsFor(type);
- }
- // show the name area
- updateVisibleControls(true);
-
- // Retrieve the current tab group. If there is none, clean up and leave
- ILaunchConfigurationTabGroup tabGroup = getTabGroup();
- if (tabGroup == null) {
- IStatus status = new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), 0, MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_No_tabs_defined_for_launch_configuration_type__0__1, new String[]{type.getName()}), null);
- CoreException e = new CoreException(status);
- errorDialog(e);
- fInitializingTabs = false;
- return;
- }
-
- // Update the tabs with the new working copy
- tabGroup.initializeFrom(getWorkingCopy());
-
- // Update the name field
- fNameWidget.setText(getWorkingCopy().getName());
-
- fCurrentTabIndex = fTabFolder.getSelectionIndex();
-
- // Turn off initializing flag to update message
- fInitializingTabs = false;
-
- if (!fVisibleArea.isVisible()) {
- fVisibleArea.setVisible(true);
- }
- }
-
- /**
- * Populate the tabs in the configuration edit area to be appropriate to the current
- * launch configuration type.
- */
- private void showInstanceTabsFor(ILaunchConfigurationType configType) {
- // try to keep on same tab
- Class tabKind = null;
- if (getActiveTab() != null) {
- tabKind = getActiveTab().getClass();
- }
- // Build the new tabs
- ILaunchConfigurationTabGroup group = null;
- try {
- group = createGroup();
- } catch (CoreException ce) {
- DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Error_19, LaunchConfigurationsMessages.LaunchConfigurationDialog_Exception_occurred_creating_launch_configuration_tabs_27,ce); //
- return;
- }
- disposeExistingTabs();
- fTabGroup = group;
- fTabType = configType;
- ILaunchConfigurationTab[] tabs = getTabs();
- CTabItem tab = null;
- String name = IInternalDebugCoreConstants.EMPTY_STRING;
- Control control = null;
- for (int i = 0; i < tabs.length; i++) {
- tab = new CTabItem(fTabFolder, SWT.BORDER);
- name = tabs[i].getName();
- if (name == null) {
- name = LaunchConfigurationsMessages.LaunchConfigurationDialog_unspecified_28;
- }
- tab.setText(name);
- tab.setImage(tabs[i].getImage());
- tabs[i].createControl(tab.getParent());
- control = tabs[i].getControl();
- if (control != null) {
- tab.setControl(control);
- }
- }
- //set the default tab as the first one
- if (tabs.length > 0) {
- setActiveTab(tabs[0]);
- }
- // select same tab as before, if possible
- for (int i = 0; i < tabs.length; i++) {
- if (tabs[i].getClass().equals(tabKind)) {
- setActiveTab(tabs[i]);
- break;
- }
- }
- fDescription = getDescription(configType);
- }
-
- /**
- * Returns the description of the given configuration type
- * in the current mode or <code>null</code> if none.
- *
- * @param configType the config type
- * @return the description of the given configuration type or <code>null</code>
- */
- private String getDescription(ILaunchConfigurationType configType) {
- String description = null;
- if(configType != null) {
- String mode = fDialog.getMode();
- description = LaunchConfigurationPresentationManager.getDefault().getDescription(configType, mode);
- }
- if (description == null) {
- description = IInternalDebugCoreConstants.EMPTY_STRING;
- }
- return description;
- }
-
- /**
- * Returns tab group for the given type of launch configuration.
- * Tabs are initialized to be contained in this dialog.
- *
- * @exception CoreException if unable to instantiate a tab group
- */
- protected ILaunchConfigurationTabGroup createGroup() throws CoreException {
- // Use a final Object array to store the tab group and any exception that
- // results from the Runnable
- final Object[] finalArray = new Object[2];
- Runnable runnable = new Runnable() {
- public void run() {
- ILaunchConfigurationTabGroup tabGroup = null;
- try {
- tabGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(getWorkingCopy(), getLaunchConfigurationDialog().getMode());
- finalArray[0] = tabGroup;
- } catch (CoreException ce) {
- finalArray[1] = ce;
- return;
- }
- tabGroup.createTabs(getLaunchConfigurationDialog(), getLaunchConfigurationDialog().getMode());
- ILaunchConfigurationTab[] tabs = tabGroup.getTabs();
- for (int i = 0; i < tabs.length; i++) {
- tabs[i].setLaunchConfigurationDialog(getLaunchConfigurationDialog());
- }
- }
- };
-
- // Creating the tabs can result in plug-in loading, so we show the busy cursor
- BusyIndicator.showWhile(getControl().getDisplay(), runnable);
-
- // Re-throw any CoreException if there was one
- if (finalArray[1] != null) {
- throw (CoreException)finalArray[1];
- }
-
- // Otherwise return the tab group
- return (ILaunchConfigurationTabGroup)finalArray[0];
- }
-
- /**
- * Returns the tabs currently being displayed, or
- * <code>null</code> if none.
- *
- * @return currently displayed tabs, or <code>null</code>
- */
- public ILaunchConfigurationTab[] getTabs() {
- if (getTabGroup() != null) {
- return getTabGroup().getTabs();
- }
- return null;
- }
-
- /**
- * Returns the currently active <code>ILaunchConfigurationTab</code>
- * being displayed, or <code>null</code> if there is none.
- *
- * @return currently active <code>ILaunchConfigurationTab</code>, or <code>null</code>.
- */
- public ILaunchConfigurationTab getActiveTab() {
- ILaunchConfigurationTab[] tabs = getTabs();
- if (fTabFolder != null && tabs != null) {
- int pageIndex = fTabFolder.getSelectionIndex();
- if (pageIndex >= 0) {
- return tabs[pageIndex];
- }
- }
- return null;
- }
-
- /**
- * Returns whether the launch configuration being edited is dirty (i.e.
- * needs saving)
- *
- * @return whether the launch configuration being edited needs saving
- */
- public boolean isDirty() {
- ILaunchConfigurationWorkingCopy workingCopy = getWorkingCopy();
- if (workingCopy == null) {
- return false;
- }
- if(workingCopy.getParent() != null) {
- return !workingCopy.getParent().contentsEqual(workingCopy);
- }
- // Working copy hasn't been saved
- if (workingCopy.getOriginal() == null) {
- return true;
- }
- return fOriginal != null && !fOriginal.contentsEqual(workingCopy);
- }
-
- /**
- * Update apply & revert buttons, as well as buttons and message on the
- * launch config dialog.
- */
- protected void refreshStatus() {
- if (!fInitializingTabs) {
- LaunchConfigurationsDialog lcd = (LaunchConfigurationsDialog) getLaunchConfigurationDialog();
- lcd.refreshStatus();
- }
- }
-
- /**
- * Returns the containing launch dialog
- */
- protected ILaunchConfigurationDialog getLaunchConfigurationDialog() {
- return fDialog;
- }
-
- /**
- * Returns the original launch configuration being edited, possibly
- * <code>null</code>.
- *
- * @return ILaunchConfiguration
- */
- protected ILaunchConfiguration getOriginal() {
- return fOriginal;
- }
-
- /**
- * Returns the working copy used to edit the original, possibly
- * <code>null</code>.
- */
- protected ILaunchConfigurationWorkingCopy getWorkingCopy() {
- return fWorkingCopy;
- }
-
- /**
- * Return whether the current configuration can be saved.
- * <p>
- * Note this is NOT the same thing as the config simply being valid. It
- * is possible to save a config that does not validate. This method
- * determines whether the config can be saved without causing a serious
- * error. For example, a shared config that has no specified location would
- * cause this method to return <code>false</code>.
- * </p>
- */
- public boolean canSave() {
- if (fInitializingTabs) {
- return false;
- }
- // First make sure that name doesn't prevent saving the config
- try {
- verifyName();
- } catch (CoreException ce) {
- return false;
- }
-
- // Next, make sure none of the tabs object to saving the config
- ILaunchConfigurationTab[] tabs = getTabs();
- if (tabs == null) {
- return false;
- }
- for (int i = 0; i < tabs.length; i++) {
- if (!tabs[i].canSave()) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * @see ILaunchConfigurationDialog#canLaunch()
- */
- public boolean canLaunch() {
- if(fInitializingTabs) {
- return false;
- }
- if (getWorkingCopy() == null) {
- return false;
- }
- try {
- verifyName();
- } catch (CoreException e) {
- return false;
- }
-
- ILaunchConfigurationTab[] tabs = getTabs();
- if (tabs == null) {
- return false;
- }
- for (int i = 0; i < tabs.length; i++) {
- if (!tabs[i].isValid(getWorkingCopy())) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Determines if the tab groups that is currently visible can launch with the currently selected
- * set of options.
- *
- * @return true if the dialog can launch with the given set of modes, false otherwise
- *
- * @since 3.3
- */
- public boolean canLaunchWithModes() {
- if(fInitializingTabs) {
- return false;
- }
- //check if selected options exist and that the selected combination can be launched
- try {
- ILaunchConfigurationWorkingCopy wc = getWorkingCopy();
- if(wc != null) {
- return wc.getType().supportsModeCombination(getCurrentModeSet());
- }
- } catch (CoreException e) {
- }
- return true;
- }
-
- /**
- * Returns if the type currently showing in the tab group viewer has duplicate launch delegates for the given set of modes.
- *
- * The given set of modes comprises the current mode that the launch dialog was opened in as well as any modes that have been set on the launch
- * configuration.
- * @return the true if there are duplicates, false otherwise
- *
- * @since 3.3
- */
- public boolean hasDuplicateDelegates() {
- if(fInitializingTabs) {
- return false;
- }
- ILaunchConfiguration config = getWorkingCopy();
- if(config != null) {
- if(hasMultipleDelegates()) {
- return getPreferredDelegate() == null;
- }
- }
- return false;
- }
-
- /**
- * Determines if the currently showing launch configuration has multiple launch delegates for the same mode set, but does not care
- * if there has been a default selected yet or not
- * @return true if the current launch configuration has multiple launch delegates, false otherwise
- */
- private boolean hasMultipleDelegates() {
- ILaunchConfiguration config = getWorkingCopy();
- if(config != null) {
- try {
- Set modes = getCurrentModeSet();
- ILaunchDelegate[] delegates = LaunchConfigurationManager.filterLaunchDelegates(fTabType, modes);
- return delegates.length > 1;
- }
- catch (CoreException ce) {DebugUIPlugin.log(ce);}
- }
- return false;
- }
-
- /**
- * Returns the current error message or <code>null</code> if none.
- */
- public String getErrorMesssage() {
- if (fInitializingTabs) {
- return null;
- }
-
- if (getWorkingCopy() == null) {
- return null;
- }
- try {
- verifyName();
- } catch (CoreException ce) {
- return ce.getStatus().getMessage();
- }
-
- if(hasDuplicateDelegates()) {
- return LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_18;
- }
-
- String message = null;
- ILaunchConfigurationTab activeTab = getActiveTab();
- if (activeTab == null) {
- return null;
- }
- message = activeTab.getErrorMessage();
- if (message != null) {
- return message;
- }
-
- ILaunchConfigurationTab[] allTabs = getTabs();
- for (int i = 0; i < allTabs.length; i++) {
- ILaunchConfigurationTab tab = allTabs[i];
- if (tab == activeTab) {
- continue;
- }
- message = tab.getErrorMessage();
- if (message != null) {
- StringBuffer temp= new StringBuffer();
- temp.append('[');
- temp.append(DebugUIPlugin.removeAccelerators(tab.getName()));
- temp.append("]: "); //$NON-NLS-1$
- temp.append(message);
- return temp.toString();
- }
- }
- if(!canLaunchWithModes()) {
- Set modes = getCurrentModeSet();
- List names = LaunchConfigurationPresentationManager.getDefault().getLaunchModeNames(modes);
- return MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_14, new String[]{names.toString()});
- }
- return null;
- }
-
- /**
- * Returns the current message or <code>null</code> if none.
- * @return Returns an appropriate message for display to user. The message returned will be:
- * The message defined by the visible tab,
- * or The tab group description for the particular launch mode,
- * or The generic tab group description,
- * or <code>null</code> if no message is defined
- */
- public String getMessage() {
- if (fInitializingTabs) {
- return null;
- }
-
- String message = fDescription;
-
- ILaunchConfigurationTab tab = getActiveTab();
- if (tab != null) {
- String tabMessage = tab.getMessage();
- if (tabMessage != null) {
- message = tabMessage;
- }
- }
-
- return message;
- }
-
- /**
- * Verify that the launch configuration name is valid.
- */
- protected void verifyName() throws CoreException {
- if (fNameWidget.isVisible()) {
- ILaunchManager mgr = DebugPlugin.getDefault().getLaunchManager();
- String currentName = fNameWidget.getText().trim();
-
- // If there is no name, complain
- if (currentName.length() < 1) {
- throw new CoreException(new Status(IStatus.ERROR,
- DebugUIPlugin.getUniqueIdentifier(),
- 0,
- LaunchConfigurationsMessages.LaunchConfigurationDialog_Name_required_for_launch_configuration_11,
- null));
- }
- try {
- mgr.isValidLaunchConfigurationName(currentName);
- }
- catch(IllegalArgumentException iae) {
- throw new CoreException(new Status(IStatus.ERROR,
- DebugUIPlugin.getUniqueIdentifier(),
- 0,
- iae.getMessage(),
- null));
- }
- // Otherwise, if there's already a config with the same name, complain
- if (fOriginal != null && !fOriginal.getName().equals(currentName)) {
- Set reservednames = ((LaunchConfigurationsDialog)getLaunchConfigurationDialog()).getReservedNameSet();
- if (mgr.isExistingLaunchConfigurationName(currentName) || (reservednames != null ? reservednames.contains(currentName) : false)) {
- throw new CoreException(new Status(IStatus.ERROR,
- DebugUIPlugin.getUniqueIdentifier(),
- 0,
- LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_configuration_already_exists_with_this_name_12,
- null));
- }
- }
- }
- }
-
- /**
- * Remove the existing tabs that are showing
- */
- private void disposeExistingTabs() {
- fDisposingTabs = true;
- fTabFolder.dispose();
- fTabFolder = null;
- createTabFolder(fTabComposite);
- disposeTabGroup();
- fDisposingTabs = false;
- }
-
- /**
- * Returns the current tab group
- *
- * @return the current tab group, or <code>null</code> if none
- */
- public ILaunchConfigurationTabGroup getTabGroup() {
- return fTabGroup;
- }
-
- /**
- * Notification that a tab has been selected
- *
- * Disallow tab changing when the current tab is invalid.
- * Update the config from the tab being left, and refresh
- * the tab being entered.
- */
- protected void handleTabSelected() {
- if (fDisposingTabs || fInitializingTabs) {
- return;
- }
- ILaunchConfigurationTab[] tabs = getTabs();
- if (fCurrentTabIndex == fTabFolder.getSelectionIndex() || tabs == null || tabs.length == 0 || fCurrentTabIndex > (tabs.length - 1)) {
- return;
- }
- if (fCurrentTabIndex != -1) {
- ILaunchConfigurationTab tab = tabs[fCurrentTabIndex];
- ILaunchConfigurationWorkingCopy wc = getWorkingCopy();
- if (wc != null) {
- tab.deactivated(wc);
- getActiveTab().activated(wc);
- }
- }
- fCurrentTabIndex = fTabFolder.getSelectionIndex();
- }
-
- /**
- * Notification the name field has been modified
- */
- protected void handleNameModified() {
- getWorkingCopy().rename(fNameWidget.getText().trim());
- refreshStatus();
- }
-
- /**
- * Notification that the 'Apply' button has been pressed
- */
- protected boolean handleApplyPressed() {
- if(fOriginal != null && fOriginal.isReadOnly()) {
- IStatus status = ResourcesPlugin.getWorkspace().validateEdit(new IFile[] {fOriginal.getFile()}, fViewerControl.getShell());
- if(!status.isOK()) {
- return false;
- }
- }
- Exception exception = null;
- try {
- // update launch config
- fInitializingTabs = true;
- // trim name
- String trimmed = fNameWidget.getText().trim();
- fNameWidget.setText(trimmed);
- if(fWorkingCopy == null) {
- fWorkingCopy = fOriginal.getWorkingCopy();
- }
- fWorkingCopy.rename(trimmed);
- getTabGroup().performApply(fWorkingCopy);
- if (isDirty()) {
- if(!fWorkingCopy.isLocal()) {
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- fOriginal = ((LaunchConfigurationWorkingCopy)fWorkingCopy).doSave(monitor);
- }
- catch (CoreException e) {DebugUIPlugin.log(e);}
- }
- };
- getLaunchConfigurationDialog().run(true, false, runnable);
- }
- else {
- fOriginal = fWorkingCopy.doSave();
- }
- }
- updateButtons();
- fInitializingTabs = false;
- }
- catch (CoreException e) {exception = e;}
- catch (InvocationTargetException e) {exception = e;}
- catch (InterruptedException e) {exception = e;}
- if(exception != null) {
- DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_Configuration_Error_46, LaunchConfigurationsMessages.LaunchConfigurationDialog_Exception_occurred_while_saving_launch_configuration_47, exception); //
- return false;
- } else {
- return true;
- }
- }
-
- /**
- * Notification that the 'Revert' button has been pressed
- */
- protected void handleRevertPressed() {
- try {
- if(fTabGroup != null) {
- fTabGroup.initializeFrom(fOriginal);
- fNameWidget.setText(fOriginal.getName());
- fWorkingCopy = fOriginal.getWorkingCopy();
- refreshStatus();
- }
- }
- catch (CoreException e) {DebugUIPlugin.log(e);}
- }
-
- /**
- * Show an error dialog on the given exception.
- *
- * @param exception
- */
- protected void errorDialog(CoreException exception) {
- ErrorDialog.openError(getShell(), null, null, exception.getStatus());
- }
-
- /**
- * Sets the displayed tab to the given tab. Has no effect if the specified
- * tab is not one of the tabs being displayed in the dialog currently.
- *
- * @param tab the tab to display/activate
- */
- public void setActiveTab(ILaunchConfigurationTab tab) {
- ILaunchConfigurationTab[] tabs = getTabs();
- if(tabs != null) {
- for (int i = 0; i < tabs.length; i++) {
- if (tabs[i].getClass().equals(tab.getClass())) {
- setActiveTab(i);
- return;
- }
- }
- }
- }
-
- /**
- * Sets the displayed tab to the tab with the given index. Has no effect if
- * the specified index is not within the limits of the tabs returned by
- * <code>getTabs()</code>.
- *
- * @param index the index of the tab to display
- */
- public void setActiveTab(int index) {
- ILaunchConfigurationTab[] tabs = getTabs();
- if (index >= 0 && index < tabs.length) {
- fTabFolder.setSelection(index);
- handleTabSelected();
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java
deleted file mode 100644
index 4afaa21..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Doug <doug.satchwell@btinternet.com> - Bug 243053
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.LaunchConfigurationTabExtension;
-import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
-
-/**
- * This class is used to wrap a contributed <code>ILaunchConfigurationTabGroup</code> with any contributed tabs
- * for that group (from a <code>launchConfigurationTabs</code> extension point).
- *
- * @since 3.3
- */
-public class LaunchConfigurationTabGroupWrapper implements ILaunchConfigurationTabGroup {
-
- /**
- * Collects all tabs and contributed tabs in the correct ordering
- *
- * @since 3.5
- */
- class TabCollector implements Iterator {
-
- private HashSet idSet = null;
- private ArrayList tabList = null;
- private ArrayList extList = null;
-
- public TabCollector(List tabs, List exts) {
- tabList = new ArrayList(tabs);
- extList = new ArrayList(exts);
- idSet = new HashSet(tabList.size() + extList.size());
- }
-
- /**
- * Get the tab for any extension that is 'relative' to any of the previously returned tabs
- *
- * @return the next tab extension tab
- */
- private ILaunchConfigurationTab nextExtensionTab() {
- for (Iterator iterator = extList.iterator(); iterator.hasNext();) {
- LaunchConfigurationTabExtension launchConfigurationTabExtension = (LaunchConfigurationTabExtension)iterator.next();
- String relativeTab = launchConfigurationTabExtension.getRelativeTabId();
- if (relativeTab == null || idSet.contains(relativeTab)) {
- iterator.remove();
- return launchConfigurationTabExtension.getTab();
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see java.util.Iterator#hasNext()
- */
- public boolean hasNext() {
- return extList.size() > 0 || tabList.size() > 0;
- }
-
- /* (non-Javadoc)
- * @see java.util.Iterator#next()
- */
- public Object next() {
- ILaunchConfigurationTab nextTab = nextExtensionTab();
- if (nextTab == null) {
- if (tabList.size() > 0) {
- nextTab = (ILaunchConfigurationTab)tabList.remove(0);
- }
- else {
- LaunchConfigurationTabExtension launchConfigurationTabExtension = (LaunchConfigurationTabExtension)extList.remove(0);
- nextTab = launchConfigurationTabExtension.getTab();
- }
- }
- if (nextTab instanceof AbstractLaunchConfigurationTab) {
- String id = ((AbstractLaunchConfigurationTab)nextTab).getId();
- if (id != null) {
- idSet.add(id);
- }
- }
- return nextTab;
- }
-
- /* (non-Javadoc)
- * @see java.util.Iterator#remove()
- */
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-
- private ILaunchConfigurationTabGroup fGroup = null;
- private String fGroupId = null;
- /**
- * listing of tab extensions that we have to create
- */
- private List fTabs = null;
- private String fMode = null;
- private ILaunchConfiguration fConfig = null;
-
- /**
- * Constructor
- * @param group the existing group to wrapper
- * @param groupId the string id of the associated tab group
- * @param config the launch configuration this tab group is opened on
- */
- public LaunchConfigurationTabGroupWrapper(ILaunchConfigurationTabGroup group, String groupId, ILaunchConfiguration config) {
- fGroup = group;
- fGroupId = groupId;
- fConfig = config;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String)
- */
- public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
- if(fGroup != null) {
- fGroup.createTabs(dialog, mode);
- fMode = mode;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#dispose()
- */
- public void dispose() {
- fGroup.dispose();
- if(fTabs != null) {
- List tabs = Arrays.asList(fGroup.getTabs());
- ILaunchConfigurationTab tab = null;
- for(int i = 0; i < fTabs.size(); i++) {
- tab = (ILaunchConfigurationTab)fTabs.get(i);
- if(!tabs.contains(tab)) {
- tab.dispose();
- }
- }
- fTabs.clear();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#getTabs()
- */
- public ILaunchConfigurationTab[] getTabs() {
- if(fTabs == null) {
- try {
- fTabs = new ArrayList();
- LaunchConfigurationTabExtension[] ext = LaunchConfigurationPresentationManager.getDefault().getTabExtensions(fGroupId, fConfig, fMode);
- //if there are no extensions bypass and do a raw copy into
- if(ext.length > 0) {
- TabCollector collector = new TabCollector(Arrays.asList(fGroup.getTabs()), Arrays.asList(ext));
- while(collector.hasNext()) {
- Object next = collector.next();
- if (next != null) {
- fTabs.add(next);
- }
- }
- }
- else {
- ILaunchConfigurationTab[] tabs = fGroup.getTabs();
- for(int i = 0; i < tabs.length; i++) {
- fTabs.add(tabs[i]);
- }
- }
- }
- catch (CoreException ce) {DebugUIPlugin.log(ce);}
- }
- return (ILaunchConfigurationTab[]) fTabs.toArray(new ILaunchConfigurationTab[fTabs.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public void initializeFrom(ILaunchConfiguration configuration) {
- fGroup.initializeFrom(configuration);
- if(fTabs != null) {
- List tabs = Arrays.asList(fGroup.getTabs());
- ILaunchConfigurationTab tab = null;
- for(int i = 0; i < fTabs.size(); i++) {
- tab = (ILaunchConfigurationTab)fTabs.get(i);
- if(!tabs.contains(tab)) {
- tab.initializeFrom(configuration);
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#launched(org.eclipse.debug.core.ILaunch)
- */
- public void launched(ILaunch launch) {
- if(fGroup != null) {
- fGroup.launched(launch);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
- public void performApply(ILaunchConfigurationWorkingCopy configuration) {
- fGroup.performApply(configuration);
- if(fTabs != null) {
- List tabs = Arrays.asList(fGroup.getTabs());
- ILaunchConfigurationTab tab = null;
- for(int i = 0; i < fTabs.size(); i++) {
- tab = (ILaunchConfigurationTab)fTabs.get(i);
- if(!tabs.contains(tab)) {
- tab.performApply(configuration);
- }
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
- public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
- fGroup.setDefaults(configuration);
- if(fTabs != null) {
- List tabs = Arrays.asList(fGroup.getTabs());
- ILaunchConfigurationTab tab = null;
- for(int i = 0; i < fTabs.size(); i++) {
- tab = (ILaunchConfigurationTab)fTabs.get(i);
- if(!tabs.contains(tab)) {
- tab.setDefaults(configuration);
- }
- }
- }
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabImageDescriptor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabImageDescriptor.java
deleted file mode 100644
index 1cb7e16..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabImageDescriptor.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.resource.CompositeImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.Point;
-
-/**
- * A JDIImageDescriptor consists of a main icon and several adornments. The adornments
- * are computed according to flags set on creation of the descriptor.
- */
-public class LaunchConfigurationTabImageDescriptor extends CompositeImageDescriptor {
-
- /** Flag to render the error adornment */
- public final static int ERROR= 0x001;
-
- private Image fBaseImage;
- private int fFlags;
- private Point fSize;
-
- /**
- * Create a new JDIImageDescriptor.
- *
- * @param baseImage an image descriptor used as the base image
- * @param flags flags indicating which adornments are to be rendered
- *
- */
- public LaunchConfigurationTabImageDescriptor(Image baseImage, int flags) {
- setBaseImage(baseImage);
- setFlags(flags);
- }
-
- /**
- * @see CompositeImageDescriptor#getSize()
- */
- protected Point getSize() {
- if (fSize == null) {
- ImageData data= getBaseImage().getImageData();
- setSize(new Point(data.width, data.height));
- }
- return fSize;
- }
-
- /**
- * @see Object#equals(java.lang.Object)
- */
- public boolean equals(Object object) {
- if (!(object instanceof LaunchConfigurationTabImageDescriptor)){
- return false;
- }
-
- LaunchConfigurationTabImageDescriptor other= (LaunchConfigurationTabImageDescriptor)object;
- return (getBaseImage().equals(other.getBaseImage()) && getFlags() == other.getFlags());
- }
-
- /**
- * @see Object#hashCode()
- */
- public int hashCode() {
- return getBaseImage().hashCode() | getFlags();
- }
-
- /**
- * @see CompositeImageDescriptor#drawCompositeImage(int, int)
- */
- protected void drawCompositeImage(int width, int height) {
- ImageData bg= getBaseImage().getImageData();
- if (bg == null) {
- bg= DEFAULT_IMAGE_DATA;
- }
- drawImage(bg, 0, 0);
- drawOverlays();
- }
-
- /**
- * Add any overlays to the image as specified in the flags.
- */
- protected void drawOverlays() {
- int flags= getFlags();
- ImageData data= null;
- if ((flags & ERROR) != 0) {
- data= DebugUITools.getImage(IDebugUIConstants.IMG_OVR_ERROR).getImageData();
- drawImage(data, 0, 0);
- }
- }
-
- protected Image getBaseImage() {
- return fBaseImage;
- }
-
- protected void setBaseImage(Image baseImage) {
- fBaseImage = baseImage;
- }
-
- protected int getFlags() {
- return fFlags;
- }
-
- protected void setFlags(int flags) {
- fFlags = flags;
- }
-
- protected void setSize(Point size) {
- fSize = size;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java
deleted file mode 100644
index 09cdd70..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.activities.WorkbenchActivityHelper;
-
-/**
- * Content provider for representing launch configuration types & launch configurations in a tree.
- *
- * @since 2.1
- */
-public class LaunchConfigurationTreeContentProvider implements ITreeContentProvider {
-
- /**
- * Empty Object array
- */
- private static final Object[] EMPTY_ARRAY = new Object[0];
-
- /**
- * The mode in which the tree is being shown, one of <code>RUN_MODE</code>
- * or <code>DEBUG_MODE</code> defined in <code>ILaunchManager</code>.
- * If this is <code>null</code>, then it means both modes are being shown.
- */
- private String fMode;
-
- /**
- * The Shell context
- */
- private Shell fShell;
-
- /**
- * Constructor
- * @param mode the mode
- * @param shell the parent shell
- */
- public LaunchConfigurationTreeContentProvider(String mode, Shell shell) {
- setMode(mode);
- setShell(shell);
- }
-
- /**
- * Actual launch configurations have no children. Launch configuration types have
- * all configurations of that type as children, minus any configurations that are
- * marked as private.
- * <p>
- * In 2.1, the <code>category</code> attribute was added to launch config
- * types. The debug UI only displays those configs that do not specify a
- * category.
- * </p>
- *
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof ILaunchConfiguration) {
- return EMPTY_ARRAY;
- } else if (parentElement instanceof ILaunchConfigurationType) {
- try {
- ILaunchConfigurationType type = (ILaunchConfigurationType)parentElement;
- return getLaunchManager().getLaunchConfigurations(type);
- } catch (CoreException e) {
- DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Error_19, LaunchConfigurationsMessages.LaunchConfigurationDialog_An_exception_occurred_while_retrieving_launch_configurations_20, e); //
- }
- } else {
- return getLaunchManager().getLaunchConfigurationTypes();
- }
- return EMPTY_ARRAY;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object element) {
- if (element instanceof ILaunchConfiguration) {
- if (!((ILaunchConfiguration)element).exists()) {
- return null;
- }
- try {
- return ((ILaunchConfiguration)element).getType();
- } catch (CoreException e) {
- DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Error_19, LaunchConfigurationsMessages.LaunchConfigurationDialog_An_exception_occurred_while_retrieving_launch_configurations_20, e); //
- }
- } else if (element instanceof ILaunchConfigurationType) {
- return ResourcesPlugin.getWorkspace().getRoot();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object element) {
- if (element instanceof ILaunchConfiguration) {
- return false;
- }
- return getChildren(element).length > 0;
- }
-
- /**
- * Return only the launch configuration types that support the current mode AND
- * are marked as 'public'.
- *
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object inputElement) {
- ILaunchConfigurationType[] allTypes = getLaunchManager().getLaunchConfigurationTypes();
- return filterTypes(allTypes).toArray();
- }
-
- /**
- * Returns a list containing the given types minus any types that
- * should not be visible. A type should not be visible if it doesn't match
- * the current mode or if it matches a disabled activity.
- *
- * @param allTypes the types
- * @return the given types minus any types that should not be visible.
- */
- private List filterTypes(ILaunchConfigurationType[] allTypes) {
- List filteredTypes= new ArrayList();
- String mode = getMode();
- LaunchConfigurationTypeContribution contribution;
- for (int i = 0; i < allTypes.length; i++) {
- ILaunchConfigurationType type = allTypes[i];
- contribution= new LaunchConfigurationTypeContribution(type);
- if (isVisible(type, mode) && !WorkbenchActivityHelper.filterItem(contribution)) {
- filteredTypes.add(type);
- }
- }
- return filteredTypes;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- public void dispose() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- /**
- * Return <code>true</code> if the specified launch configuration type should
- * be visible in the specified mode, <code>false</code> otherwise.
- */
- private boolean isVisible(ILaunchConfigurationType configType, String mode) {
- if (!configType.isPublic()) {
- return false;
- }
- if (mode == null) {
- return true;
- }
- return configType.supportsMode(mode);
- }
-
- /**
- * Convenience method to get the singleton launch manager.
- */
- private ILaunchManager getLaunchManager() {
- return DebugPlugin.getDefault().getLaunchManager();
- }
-
- /**
- * Write accessor for the mode value
- */
- private void setMode(String mode) {
- fMode = mode;
- }
-
- /**
- * Read accessor for the mode value
- */
- private String getMode() {
- return fMode;
- }
-
- /**
- * Write accessor for the shell value
- */
- private void setShell(Shell shell) {
- fShell = shell;
- }
-
- /**
- * Read accessor for the shell value
- */
- private Shell getShell() {
- return fShell;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypeContribution.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypeContribution.java
deleted file mode 100644
index 8a7b3c6..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypeContribution.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.ui.IPluginContribution;
-
-/**
- * A plug-in contribution (UI element) which contains a launch configuration
- * type (Core element). Plug-in contributions are passed to the workbench
- * activity support to filter elements from the UI.
- */
-class LaunchConfigurationTypeContribution implements IPluginContribution {
-
- protected ILaunchConfigurationType type;
-
- /**
- * Creates a new plug-in contribution for the given type
- *
- * @param type the launch configuration type
- */
- public LaunchConfigurationTypeContribution(ILaunchConfigurationType type) {
- this.type= type;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPluginContribution#getLocalId()
- */
- public String getLocalId() {
- return type.getIdentifier();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPluginContribution#getPluginId()
- */
- public String getPluginId() {
- return type.getPluginIdentifier();
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypeFilter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypeFilter.java
deleted file mode 100644
index 86d5d60..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTypeFilter.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-
-/**
- * Provides the implementation of the filter for filtering the launch configuration viewer based on the preference
- * <code>IInternalDebugUIConstants.PREF_FILTER_LAUNCH_TYPES</code>
- *
- * @since 3.2
- */
-public class LaunchConfigurationTypeFilter extends ViewerFilter {
-
- /**
- * Constructor
- */
- public LaunchConfigurationTypeFilter() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- if(element instanceof ILaunchConfiguration) {
- return true;
- }
- //we only care about launch configuration types
- if(element instanceof ILaunchConfigurationType) {
- IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
- String[] types = store.getString(IInternalDebugUIConstants.PREF_FILTER_TYPE_LIST).split("\\,"); //$NON-NLS-1$
- for(int i = 0; i < types.length; i++) {
- if(types[i].equals(((ILaunchConfigurationType)element).getIdentifier())) {
- return false;
- }
- }
- return true;
- }
- return false;
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java
deleted file mode 100644
index bd96853..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java
+++ /dev/null
@@ -1,435 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationListener;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.SWTFactory;
-import org.eclipse.debug.ui.AbstractDebugView;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.IDebugView;
-import org.eclipse.help.HelpSystem;
-import org.eclipse.help.IContext;
-import org.eclipse.help.IContextProvider;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-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.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PatternFilter;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * A tree view of launch configurations
- */
-public class LaunchConfigurationView extends AbstractDebugView implements ILaunchConfigurationListener {
-
- /**
- * the filtering tree viewer
- *
- * @since 3.2
- */
- private LaunchConfigurationFilteredTree fTree;
-
- /**
- * a handle to the launch manager
- *
- * @since 3.2
- */
- private ILaunchManager fLaunchManager = DebugPlugin.getDefault().getLaunchManager();
-
- /**
- * The launch group to display
- */
- private LaunchGroupExtension fLaunchGroup;
-
- /**
- * Actions
- */
- private CreateLaunchConfigurationAction fCreateAction;
- private DeleteLaunchConfigurationAction fDeleteAction;
- private DuplicateLaunchConfigurationAction fDuplicateAction;
- private CollapseAllLaunchConfigurationAction fCollapseAllAction;
-
- /**
- * Action for providing filtering to the Launch Configuration Dialog
- * @since 3.2
- */
- private FilterLaunchConfigurationAction fFilterAction;
-
- /**
- * This label is used to notify users that items (possibly) have been filtered from the
- * launch configuration view
- * @since 3.3
- */
- private Label fFilteredNotice = null;
-
- /**
- * Whether to automatically select configs that are added
- */
- private boolean fAutoSelect = true;
-
- /**
- * the group of additional filters to be added to the viewer
- * @since 3.2
- */
- private ViewerFilter[] fFilters = null;
-
- /**
- * Constructs a launch configuration view for the given launch group
- */
- public LaunchConfigurationView(LaunchGroupExtension launchGroup) {
- super();
- fLaunchGroup = launchGroup;
- }
-
- /**
- * Constructor
- * @param launchGroup
- * @param filters
- */
- public LaunchConfigurationView(LaunchGroupExtension launchGroup, ViewerFilter[] filters) {
- super();
- fLaunchGroup = launchGroup;
- fFilters = filters;
- }
-
- /**
- * Returns the launch group this view is displaying.
- *
- * @return the launch group this view is displaying
- */
- protected LaunchGroupExtension getLaunchGroup() {
- return fLaunchGroup;
- }
-
- /**
- * @see org.eclipse.debug.ui.AbstractDebugView#createViewer(org.eclipse.swt.widgets.Composite)
- */
- protected Viewer createViewer(Composite parent) {
- fTree = new LaunchConfigurationFilteredTree(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL, new PatternFilter(), fLaunchGroup, fFilters);
- fTree.createViewControl();
- getLaunchManager().addLaunchConfigurationListener(this);
- LaunchConfigurationViewer viewer = fTree.getLaunchConfigurationViewer();
- viewer.setLaunchConfigurationView(this);
- return viewer;
- }
-
- /**
- * @see org.eclipse.debug.ui.AbstractDebugView#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class key) {
- if (key == IContextProvider.class) {
- return new IContextProvider () {
- public int getContextChangeMask() {
- return SELECTION;
- }
-
- public IContext getContext(Object target) {
- String id = fTree.computeContextId();
- if (id!=null)
- return HelpSystem.getContext(id);
- return null;
- }
-
- public String getSearchExpression(Object target) {
- return null;
- }
- };
- }
- return super.getAdapter(key);
- }
-
- /**
- * Returns the filtering text control from the viewer or <code>null</code>
- * if the text control was not created.
- *
- * @return the filtering text control or <code>null</code>
- * @since 3.2
- */
- public Text getFilteringTextControl() {
- return fTree.getFilterControl();
- }
-
- /**
- * @see org.eclipse.debug.ui.AbstractDebugView#createActions()
- */
- protected void createActions() {
- fCreateAction = new CreateLaunchConfigurationAction(getViewer(), getLaunchGroup().getMode());
- setAction(CreateLaunchConfigurationAction.ID_CREATE_ACTION, fCreateAction);
-
- fDeleteAction = new DeleteLaunchConfigurationAction(getViewer(), getLaunchGroup().getMode());
- setAction(DeleteLaunchConfigurationAction.ID_DELETE_ACTION, fDeleteAction);
- setAction(IDebugView.REMOVE_ACTION, fDeleteAction);
-
- fDuplicateAction = new DuplicateLaunchConfigurationAction(getViewer(), getLaunchGroup().getMode());
- setAction(DuplicateLaunchConfigurationAction.ID_DUPLICATE_ACTION, fDuplicateAction);
-
- fCollapseAllAction = new CollapseAllLaunchConfigurationAction((TreeViewer)getViewer());
- setAction(CollapseAllLaunchConfigurationAction.ID_COLLAPSEALL_ACTION, fCollapseAllAction);
-
- fFilterAction = new FilterLaunchConfigurationAction();
- setAction(FilterLaunchConfigurationAction.ID_FILTER_ACTION, fFilterAction);
-
- }
-
- /**
- * @see org.eclipse.debug.ui.AbstractDebugView#getHelpContextId()
- */
- protected String getHelpContextId() {
- return IDebugHelpContextIds.LAUNCH_CONFIGURATION_VIEW;
- }
-
- /**
- * @see org.eclipse.debug.ui.AbstractDebugView#fillContextMenu(org.eclipse.jface.action.IMenuManager)
- */
- protected void fillContextMenu(IMenuManager menu) {
- menu.add(fCreateAction);
- menu.add(fDuplicateAction);
- menu.add(fDeleteAction);
- menu.add(new Separator());
- }
-
- /**
- * @see org.eclipse.debug.ui.AbstractDebugView#configureToolBar(org.eclipse.jface.action.IToolBarManager)
- */
- protected void configureToolBar(IToolBarManager tbm) {}
-
- /**
- * Returns this view's tree viewer
- *
- * @return this view's tree viewer
- */
- protected TreeViewer getTreeViewer() {
- return fTree.getLaunchConfigurationViewer();
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchPart#dispose()
- */
- public void dispose() {
- fCreateAction.dispose();
- fDeleteAction.dispose();
- fDuplicateAction.dispose();
- fFilterAction = null;
- fCollapseAllAction = null;
- getLaunchManager().removeLaunchConfigurationListener(this);
- }
-
- /**
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public void launchConfigurationAdded(final ILaunchConfiguration configuration) {
- if(isSupportedConfiguration(configuration)) {
- //due to notification and async messages we need to collect the moved from config
- //now, else it is null'd out before the following async job runs
- //@see bug 211235 - making local config shared creates "non-existant dup" in LCD
- final ILaunchConfiguration from = getLaunchManager().getMovedFrom(configuration);
- // handle asynchronously: @see bug 198428 - Deadlock deleting launch configuration
- Display display = DebugUIPlugin.getStandardDisplay();
- display.asyncExec(new Runnable() {
- public void run() {
- if(!fTree.isDisposed()) {
- handleConfigurationAdded(configuration, from);
- }
- }
- });
- }
- }
-
- /**
- * The given launch configuration has been added. Add it to the tree.
- * @param configuration the added configuration
- */
- private void handleConfigurationAdded(ILaunchConfiguration configuration, ILaunchConfiguration from) {
- TreeViewer viewer = getTreeViewer();
- if (viewer != null) {
- try {
- viewer.add(configuration.getType(), configuration);
- // if moved, remove original now
- if (from != null) {
- viewer.remove(from);
- }
- if (isAutoSelect()) {
- viewer.setSelection(new StructuredSelection(configuration), true);
- }
- updateFilterLabel();
- }
- catch (CoreException e) {}
- }
- }
-
- /**
- * Returns if the specified configuration is supported by this instance of the view.
- * Supported means that:
- * <ul>
- * <li>The configuration is not private</li>
- * <li>AND that the configurations' type supports the mode of the current launch group</li>
- * <li>AND that the category of the configurations' type matches that of the current launch group</li>
- * </ul>
- * @param configuration the configuration
- * @return true if the configuration is supported by this instance of the view, false otherwise
- *
- * @since 3.4
- */
- protected boolean isSupportedConfiguration(ILaunchConfiguration configuration) {
- try {
- ILaunchConfigurationType type = configuration.getType();
- return !configuration.getAttribute(IDebugUIConstants.ATTR_PRIVATE, false) &&
- type.supportsMode(getLaunchGroup().getMode()) &&
- equalCategories(type.getCategory(), getLaunchGroup().getCategory());
- }
- catch(CoreException ce) {
- DebugUIPlugin.log(ce);
- }
- return false;
- }
-
- /**
- * Returns whether the given categories are equal.
- *
- * @param c1 category identifier or <code>null</code>
- * @param c2 category identifier or <code>null</code>
- * @return boolean
- *
- * @since 3.4
- */
- private boolean equalCategories(String c1, String c2) {
- if (c1 == null || c2 == null) {
- return c1 == c2;
- }
- return c1.equals(c2);
- }
-
- /**
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public void launchConfigurationChanged(ILaunchConfiguration configuration) {}
-
- /**
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration)
- */
- public void launchConfigurationRemoved(final ILaunchConfiguration configuration) {
- // if moved, ignore
- ILaunchConfiguration to = getLaunchManager().getMovedTo(configuration);
- if (to != null) {
- return;
- }
- // handle asynchronously: @see bug 198428 - Deadlock deleting launch configuration
- Display display = DebugUIPlugin.getStandardDisplay();
- display.asyncExec(new Runnable() {
- public void run() {
- if(!fTree.isDisposed()) {
- handleConfigurationRemoved(configuration);
- }
- }
- });
- }
-
- /**
- * The given launch configuration has been removed. Remove it from the tree.
- * @param configuration the deleted configuration
- */
- private void handleConfigurationRemoved(ILaunchConfiguration configuration) {
- getTreeViewer().remove(configuration);
- updateFilterLabel();
- }
-
- /**
- * This is similar to IWorkbenchPart#createPartControl(Composite), but it is
- * called by the launch dialog when creating the launch config tree view.
- * Since this view is not contained in the workbench, we cannot do all the
- * usual initialization (toolbars, etc).
- */
- public void createLaunchDialogControl(Composite parent) {
- createViewer(parent);
- createActions();
- createContextMenu(getViewer().getControl());
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, getHelpContextId());
- getViewer().getControl().addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- handleKeyPressed(e);
- }
- });
- if (getViewer() instanceof StructuredViewer) {
- ((StructuredViewer)getViewer()).addDoubleClickListener(this);
- }
- fFilteredNotice = SWTFactory.createLabel(parent, IInternalDebugCoreConstants.EMPTY_STRING, 1);
- fFilteredNotice.setBackground(parent.getBackground());
- }
-
- /**
- * @see org.eclipse.debug.ui.IDebugView#getViewer()
- */
- public Viewer getViewer() {
- return fTree.getLaunchConfigurationViewer();
- }
-
- /**
- * Updates the filter notification label
- * @since 3.3
- */
- public void updateFilterLabel() {
- LaunchConfigurationViewer viewer = (LaunchConfigurationViewer) getViewer();
- fFilteredNotice.setText(MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationView_0, new String[] {Integer.toString(viewer.getNonFilteredChildCount()), Integer.toString(viewer.getTotalChildCount())}));
- }
-
- /**
- * returns the launch manager
- * @return
- */
- protected ILaunchManager getLaunchManager() {
- return fLaunchManager;
- }
-
- /**
- * Sets whether to automatically select configs that are
- * added into the view (newly created).
- *
- * @param select whether to automatically select configs that are
- * added into the view (newly created)
- */
- public void setAutoSelect(boolean select) {
- fAutoSelect = select;
- }
-
- /**
- * Returns whether this view is currently configured to
- * automatically select newly created configs that are
- * added into the view.
- *
- * @return whether this view is currently configured to
- * automatically select newly created configs
- */
- protected boolean isAutoSelect() {
- return fAutoSelect;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java
deleted file mode 100644
index dd4eba6..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
-
-/**
- * This class allow the notion of the viewer to be abstracted from the launch configuration view, as well as allowing the over-riding of
- * selection preservation when filtering/deletion occurs
- * @since 3.3
- */
-public class LaunchConfigurationViewer extends TreeViewer {
-
- private int fTotalCount = 0;
- private LaunchConfigurationView fView = null;
-
- /**
- * Constructor
- * @param tree the tree to create the viewer on
- */
- public LaunchConfigurationViewer(Tree tree) {
- super(tree);
- }
-
- /**
- * Constructor
- * @param parent
- * @param style
- */
- public LaunchConfigurationViewer(Composite parent, int style) {
- this(new Tree(parent, style));
- }
-
- /**
- * @see org.eclipse.jface.viewers.StructuredViewer#preservingSelection(java.lang.Runnable)
- */
- protected void preservingSelection(Runnable updateCode) {
- IStructuredSelection selection = (IStructuredSelection) getSelection();
- if(!selection.isEmpty()) {
- int[] indices = collectIndices(selection.getFirstElement());
- updateCode.run();
- ArrayList set = new ArrayList();
- Object o = null;
- for(Iterator iter = selection.iterator(); iter.hasNext();) {
- o = iter.next();
- if(o instanceof ILaunchConfiguration) {
- if(!((ILaunchConfiguration)o).exists()) {
- continue;
- }
- }
- if(internalGetWidgetToSelect(o) != null) {
- if(!set.contains(o)) {
- set.add(o);
- }
- }
- }
- if(set.isEmpty()) {
- //make a new selection based on the first item in the structured selection
- Tree tree = getTree();
- if(tree.getItemCount() > 0) {
- int index = selectIndex(tree.getItemCount(), indices[0]);
- if(index > -1) {
- TreeItem pitem = null;
- if(indices[0] > tree.getItemCount()-1) {
- pitem = tree.getItem(tree.getItemCount()-1);
- }
- else {
- pitem = tree.getItem(indices[0]);
- }
- if(pitem != null) {
- o = pitem.getData();
- if(indices[1] > -1) {
- index = selectIndex(pitem.getItemCount(), indices[1]);
- if(index > -1) {
- ILaunchConfiguration config = null;
- for(int i = index; i > -1; i--) {
- config = (ILaunchConfiguration) pitem.getItem(i).getData();
- if(config != null && config.exists()) {
- o = config;
- break;
- }
- }
- }
- else {
- if(pitem.getItemCount() > 0) {
- o = pitem.getItem((indices[1]-1 > -1 ? indices[1]-1 : 0)).getData();
- if(o == null) {
- o = pitem.getData();
- }
- }
- }
- }
- }
- }
- if(!set.contains(o)) {
- set.add(o);
- }
- }
- }
- setSelection(new StructuredSelection(set), true);
- }
- else {
- super.preservingSelection(updateCode);
- }
- getTree().getHorizontalBar().setSelection(0);
- }
-
- /**
- * Covers the case of an outlier indice
- * @param count the count to compare the index to
- * @param index the index to compare against the count
- * @return the adjusted index in the event index is an outlier, or -1 if it falls within the 'count' range
- */
- private int selectIndex(int count, int index) {
- if(index < count) {
- return index;
- }
- if(index > count-1) {
- return count-1;
- }
- if(index < 0) {
- return 0;
- }
- return -1;
- }
-
- /**
- * Returns the total count of all of the children that <i>could</i> be visible at
- * the time the input was set to the viewer
- * @return the total number of elements
- */
- protected int getTotalChildCount() {
- return fTotalCount;
- }
-
- /**
- * @see org.eclipse.jface.viewers.AbstractTreeViewer#remove(java.lang.Object)
- */
- public void remove(Object elementsOrTreePaths) {
- super.remove(elementsOrTreePaths);
- fTotalCount--;
- }
-
- /**
- * @see org.eclipse.jface.viewers.TreeViewer#internalAdd(org.eclipse.swt.widgets.Widget, java.lang.Object, java.lang.Object[])
- */
- protected void internalAdd(Widget widget, Object parentElement, Object[] childElements) {
- super.internalAdd(widget, parentElement, childElements);
- fTotalCount++;
- }
-
- /**
- * @see org.eclipse.jface.viewers.AbstractTreeViewer#inputChanged(java.lang.Object, java.lang.Object)
- */
- protected void inputChanged(Object input, Object oldInput) {
- super.inputChanged(input, oldInput);
- //calc the total number of items that could be visible in the view
- LaunchConfigurationTreeContentProvider cp = (LaunchConfigurationTreeContentProvider) getContentProvider();
- Object[] types = cp.getElements(null);
- LaunchGroupFilter filter = new LaunchGroupFilter(((LaunchConfigurationsDialog)LaunchConfigurationsDialog.getCurrentlyVisibleLaunchConfigurationDialog()).getLaunchGroup());
- ILaunchConfiguration[] configs = null;
- for(int i = 0; i < types.length; i++) {
- if(filter.select(this, types[i], null)) {
- fTotalCount++;
- configs = (ILaunchConfiguration[]) cp.getChildren(types[i]);
- for(int j = 0; j < configs.length; j++) {
- if(LaunchConfigurationManager.isVisible(configs[j])) {
- fTotalCount++;
- }
- }
- }
- }
- }
-
- /**
- * returns the number of children that are remaining in the view.
- * Note that this method will force the loading of all children
- * @return the count of all children in the viewer
- *
- * @since 3.3
- */
- protected int getNonFilteredChildCount() {
- int count = 0;
- getTree().setRedraw(false);
- TreeItem[] items = getTree().getItems();
- count += items.length;
- boolean expanded = false;
- TreeItem item = null;
- for(int i = 0; i < items.length; i++) {
- item = items[i];
- expanded = item.getExpanded();
- setExpandedState(item.getData(), true);
- count += item.getItems().length;
- item.setExpanded(expanded);
- }
- getTree().setRedraw(true);
- return count;
- }
-
- /**
- * Collects the indices of the child and parent items for the specified element
- * @param object the element to collect indices for
- * @return an array of indices for the specified element
- */
- private int[] collectIndices(Object object) {
- int[] indices = {-1, -1};
- if(object != null) {
- TreeItem item = (TreeItem) findItem(object);
- if(item != null) {
- TreePath path = getTreePathFromItem(item);
- item = (TreeItem) findItem(path.getFirstSegment());
- if(item != null) {
- indices[0] = getTree().indexOf(item);
- if(path.getSegmentCount() == 2) {
- indices[1] = indexOf(item.getItems(), path.getLastSegment());
- }
- }
- }
- }
- return indices;
- }
-
- /**
- * Finds the index of the specified object in the given array of tree items
- * @param items the items to search for the specified object
- * @param object the object to find the index of
- * @return the index of the specified object in the listing of tree items, or -1 if not found
- */
- private int indexOf(TreeItem[] items, Object object) {
- if(object != null) {
- for(int i = 0; i < items.length; i++) {
- if(object.equals(items[i].getData())) {
- return i;
- }
- }
- }
- return -1;
- }
-
- /**
- * The filter changed due to text typing - update the filter count
- */
- protected void filterChanged() {
- if (fView != null) {
- fView.updateFilterLabel();
- }
-
- }
-
- /**
- * @param launchConfigurationView
- */
- protected void setLaunchConfigurationView(LaunchConfigurationView launchConfigurationView) {
- fView = launchConfigurationView;
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
deleted file mode 100644
index 4a43a50..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
+++ /dev/null
@@ -1,1501 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Sebastian Davids - Bug 137923
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.launchConfigurations;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.IStatusHandler;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.core.LaunchManager;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.IDebugView;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.operation.ModalContext;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.wizard.ProgressMonitorPart;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.custom.ViewForm;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.WorkbenchJob;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * The dialog used to edit and launch launch configurations.
- */
-public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaunchConfigurationDialog, IPropertyChangeListener {
-
- /**
- * Keep track of the currently visible dialog instance
- */
- private static ILaunchConfigurationDialog fgCurrentlyVisibleLaunchConfigurationDialog;
- /**
- * Id for 'Launch' button.
- */
- protected static final int ID_LAUNCH_BUTTON = IDialogConstants.CLIENT_ID + 1;
-
- /**
- * Id for 'Close' button.
- */
- protected static final int ID_CLOSE_BUTTON = IDialogConstants.CLIENT_ID + 2;
- /**
- * Id for 'Cancel' button.
- */
- protected static final int ID_CANCEL_BUTTON = IDialogConstants.CLIENT_ID + 3;
-
- /**
- * The id for the 'No' button on the discard changes message box
- * @since 3.3
- */
- protected static final int ID_DISCARD_BUTTON = IDialogConstants.CLIENT_ID + 4;
-
- /**
- * Constant specifying how wide this dialog is allowed to get (as a percentage of
- * total available screen width) as a result of tab labels in the edit area.
- */
- protected static final float MAX_DIALOG_WIDTH_PERCENT = 0.75f;
- /**
- * Constant specifying how tall this dialog is allowed to get (as a percentage of
- * total available screen height) as a result of preferred tab size.
- */
- protected static final float MAX_DIALOG_HEIGHT_PERCENT = 0.60f;
- /**
- * Size of this dialog if there is no preference specifying a size.
- */
- protected static final Point DEFAULT_INITIAL_DIALOG_SIZE = new Point(800, 640);
- /**
- * defines some default sash weights when we have a new workspace
- * @since 3.2
- */
- private static final int[] DEFAULT_SASH_WEIGHTS = new int[] {190, 610};
- /**
- * Constant specifying that this dialog should be opened with the last configuration launched
- * in the workspace selected.
- */
- public static final int LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_LAST_LAUNCHED = 2;
- /**
- * Constant specifying that this dialog should be opened with the value specified via
- * <code>setInitialSelection()</code> selected.
- */
- public static final int LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION = 3;
- /**
- * Constant specifying that a new launch configuration dialog was not opened. Instead
- * an existing launch configuration dialog was used.
- */
- public static final int LAUNCH_CONFIGURATION_DIALOG_REUSE_OPEN = 4;
- /**
- * defines the delimiter used in the persistence of the expanded state
- * @since 3.2
- */
- private static final String DELIMITER = ", "; //$NON-NLS-1$
- /**
- * Specifies how this dialog behaves when opened. Value is one of the
- * 'LAUNCH_CONFIGURATION_DIALOG' constants defined in this class.
- */
- private int fOpenMode = LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_LAST_LAUNCHED;
-
- /**
- * dialog settings
- */
- private static final String DIALOG_SASH_WEIGHTS_1 = IDebugUIConstants.PLUGIN_ID + ".DIALOG_SASH_WEIGHTS_1"; //$NON-NLS-1$
- private static final String DIALOG_SASH_WEIGHTS_2 = IDebugUIConstants.PLUGIN_ID + ".DIALOG_SASH_WEIGHTS_2"; //$NON-NLS-1$
- private static final String DIALOG_EXPANDED_NODES = IDebugUIConstants.PLUGIN_ID + ".EXPANDED_NODES"; //$NON-NLS-1$
-
- /**
- * Returns the currently visible dialog
- * @return the currently visible launch dialog
- */
- public static ILaunchConfigurationDialog getCurrentlyVisibleLaunchConfigurationDialog() {
- return fgCurrentlyVisibleLaunchConfigurationDialog;
- }
- /**
- * Sets which launch dialog is currently the visible one
- * @param dialog the dialog to set as the visible one
- */
- public static void setCurrentlyVisibleLaunchConfigurationDialog(ILaunchConfigurationDialog dialog) {
- fgCurrentlyVisibleLaunchConfigurationDialog = dialog;
- }
-
- /**
- * widgets
- */
- private Control fLastControl;
- private Composite fButtonComp;
- private SashForm fSashForm;
- private LaunchConfigurationView fLaunchConfigurationView;
- private LaunchConfigurationTabGroupViewer fTabViewer;
- private Button fProgressMonitorCancelButton;
- private ProgressMonitorPart fProgressMonitorPart;
- private LaunchGroupExtension fGroup;
- private Image fBannerImage;
-
- /**
- * When this dialog is opened in <code>LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION</code>
- * mode, this specifies the selection that is initially shown in the dialog.
- */
- private IStructuredSelection fInitialSelection;
-
- /**
- * The status to open the dialog on, or <code>null</code> if none.
- */
- private IStatus fInitialStatus;
-
- /**
- * The number of 'long-running' operations currently taking place in this dialog
- */
- private long fActiveRunningOperations = 0;
-
- /**
- * Double-click action
- */
- private IAction fDoubleClickAction;
-
- /**
- * Filters for the LCD
- * @since 3.2
- */
- private ClosedProjectFilter fClosedProjectFilter;
- private DeletedProjectFilter fDeletedProjectFilter;
- private LaunchConfigurationTypeFilter fLCTFilter;
- private WorkingSetsFilter fWorkingSetsFilter;
-
- /**
- * set of reserved names that should not be considered when generating a new name for a launch configuration
- */
- protected Set fReservedNames = null;
-
- /**
- * Constructs a new launch configuration dialog on the given
- * parent shell.
- *
- * @param shell the parent shell
- * @param group the group of launch configuration to display
- */
- public LaunchConfigurationsDialog(Shell shell, LaunchGroupExtension group) {
- super(shell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- setLaunchGroup(group);
- }
-
- /**
- * Adds content to the dialog area
- *
- * @param dialogComp
- */
- protected void addContent(Composite dialogComp) {
- GridData gd;
- Composite topComp = new Composite(dialogComp, SWT.NONE);
- gd = new GridData(GridData.FILL_BOTH);
- topComp.setLayoutData(gd);
- GridLayout topLayout = new GridLayout(2, false);
- topLayout.marginHeight = 5;
- topLayout.marginWidth = 5;
- topComp.setLayout(topLayout);
-
- // Set the things that TitleAreaDialog takes care of
- setTitle(LaunchConfigurationsMessages.LaunchConfigurationDialog_Create__manage__and_run_launch_configurations_8);
- setMessage(LaunchConfigurationsMessages.LaunchConfigurationDialog_Ready_to_launch_2);
- setModeLabelState();
-
- // Create the SashForm that contains the selection area on the left,
- // and the edit area on the right
- gd = new GridData(GridData.FILL_BOTH);
- gd.horizontalSpan = 2;
- SashForm sash = new SashForm(topComp, SWT.SMOOTH);
- sash.setOrientation(SWT.HORIZONTAL);
- sash.setLayoutData(gd);
- sash.setFont(dialogComp.getFont());
- sash.setVisible(true);
- fSashForm = sash;
-
- // Build the launch configuration selection area and put it into the composite.
- Control launchConfigSelectionArea = createLaunchConfigurationSelectionArea(fSashForm);
- gd = new GridData(GridData.FILL_VERTICAL);
- launchConfigSelectionArea.setLayoutData(gd);
-
- // Build the launch configuration edit area and put it into the composite.
- Composite editAreaComp = createLaunchConfigurationEditArea(fSashForm);
- gd = new GridData(GridData.FILL_BOTH);
- editAreaComp.setLayoutData(gd);
-
- dialogComp.layout(true);
- applyDialogFont(dialogComp);
- }
-
- /**
- * Handle the 'close' & 'launch' buttons here, all others are handled
- * in <code>Dialog</code>
- *
- * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
- */
- protected void buttonPressed(int buttonId) {
- if (buttonId == ID_LAUNCH_BUTTON) {
- handleLaunchPressed();
- }
- else if (buttonId == ID_CLOSE_BUTTON) {
- handleClosePressed();
- }
- else {
- super.buttonPressed(buttonId);
- }
- }
-
- /**
- * Return whether the current configuration should be saved or discarded. This involves determining
- * if it is dirty, and if it is, asking the user what to do.
- *
- * @return if we can discard the current config or not
- */
- protected int shouldSaveCurrentConfig() {
- if (fTabViewer.isDirty()) {
- if (fTabViewer.canSave()) {
- return showSaveChangesDialog();
- }
- return showUnsavedChangesDialog();
- }
- return IDialogConstants.NO_ID;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#close()
- */
- public boolean close() {
- if (!isSafeToClose()) {
- return false;
- }
- persistSashWeights();
- persistExpansion();
- setCurrentlyVisibleLaunchConfigurationDialog(null);
- getBannerImage().dispose();
- fTabViewer.dispose();
- if (fLaunchConfigurationView != null) {
- fLaunchConfigurationView.dispose();
- }
- DebugUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
- return super.close();
- }
-
- /**
- * Sets the title for the dialog, and establishes the help context.
- *
- * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell);
- */
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(getShellTitle());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#create()
- */
- public void create() {
- super.create();
- if (fTabViewer.getInput() == null) {
- fTabViewer.inputChanged(null);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonBar(org.eclipse.swt.widgets.Composite)
- */
- protected Control createButtonBar(Composite parent) {
- Font font = parent.getFont();
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight= 0;
- layout.marginWidth= 0;
- layout.marginLeft = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- composite.setFont(font);
- // create help control if needed
- if (isHelpAvailable()) {
- createHelpControl(composite);
- }
- Composite monitorComposite = new Composite(composite, SWT.NULL);
- layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.numColumns = 2;
- monitorComposite.setLayout(layout);
- monitorComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- GridLayout pmLayout = new GridLayout();
- fProgressMonitorPart = new ProgressMonitorPart(monitorComposite, pmLayout);
- fProgressMonitorPart.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fProgressMonitorPart.setFont(font);
- fProgressMonitorCancelButton = createButton(monitorComposite, ID_CANCEL_BUTTON, LaunchConfigurationsMessages.LaunchConfigurationDialog_Cancel_3, true);
- fProgressMonitorCancelButton.setFont(font);
- monitorComposite.setVisible(false);
-
- /*
- * Create the rest of the button bar, but tell it not to
- * create a help button (we've already created it).
- */
- boolean helpAvailable = isHelpAvailable();
- setHelpAvailable(false);
- fButtonComp = (Composite) super.createButtonBar(composite);
- setHelpAvailable(helpAvailable);
- return composite;
- }
-
-
-
- /**
- * A launch configuration dialog overrides this method
- * to create a custom set of buttons in the button bar.
- * This dialog has 'Launch' and 'Cancel'
- * buttons.
- *
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
- protected void createButtonsForButtonBar(Composite parent) {
- Button button = createButton(parent, ID_LAUNCH_BUTTON, getLaunchButtonText(), true);
- button.setEnabled(false);
- createButton(parent, ID_CLOSE_BUTTON, LaunchConfigurationsMessages.LaunchConfigurationDialog_Close_1, false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
- Control contents = super.createContents(parent);
- initializeContent();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(getShell(), getHelpContextId());
- return contents;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Control createDialogArea(Composite parent) {
- Composite dialogComp = (Composite)super.createDialogArea(parent);
- addContent(dialogComp);
- if(fLaunchConfigurationView != null) {
- fLaunchConfigurationView.updateFilterLabel();
- }
- return dialogComp;
- }
-
- /**
- * Creates the launch configuration edit area of the dialog.
- * This area displays the name of the launch configuration
- * currently being edited, as well as a tab folder of tabs
- * that are applicable to the launch configuration.
- *
- * @return the composite used for launch configuration editing
- */
- protected Composite createLaunchConfigurationEditArea(Composite parent) {
- setTabViewer(new LaunchConfigurationTabGroupViewer(parent, this));
- return (Composite)fTabViewer.getControl();
- }
-
- /**
- * Creates all of the actions for the toolbar
- * @param toolbar
- * @since 3.2
- */
- protected void createToolbarActions(ToolBarManager tmanager) {
- tmanager.add(getNewAction());
- tmanager.add(getDuplicateAction());
- tmanager.add(getDeleteAction());
- tmanager.add(new Separator());
- tmanager.add(getCollapseAllAction());
- tmanager.add(getFilterAction());
- tmanager.update(true);
- DebugUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
- }
-
- /**
- * Creates the launch configuration selection area of the dialog.
- * This area displays a tree of launch configurations that the user
- * may select, and allows users to create new configurations, and
- * delete and duplicate existing configurations.
- *
- * @return the composite used for launch configuration selection area
- */
- protected Control createLaunchConfigurationSelectionArea(Composite parent) {
- Composite comp = new Composite(parent, SWT.FLAT);
- GridLayout gridLayout = new GridLayout(1, false);
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- comp.setLayout(gridLayout);
- comp.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- ViewForm viewForm = new ViewForm(comp, SWT.FLAT | SWT.BORDER);
- ToolBar toolBar = new ToolBar(viewForm, SWT.FLAT);
- toolBar.setBackground(parent.getBackground());
- ToolBarManager toolBarManager= new ToolBarManager(toolBar);
- viewForm.setTopLeft(toolBar);
- viewForm.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Composite viewFormContents = new Composite(viewForm, SWT.FLAT);
- gridLayout = new GridLayout();
- gridLayout.marginHeight = 5;
- gridLayout.marginWidth = 5;
- viewFormContents.setLayout(gridLayout);
- viewFormContents.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
- fLaunchConfigurationView = new LaunchConfigurationView(getLaunchGroup(), createViewerFilters());
- fLaunchConfigurationView.createLaunchDialogControl(viewFormContents);
-
- //create toolbar actions, we reuse the actions from the view so we wait until after
- //the view is created to add them to the toolbar
- createToolbarActions(toolBarManager);
- fDoubleClickAction = new Action() {
- public void run() {
- IStructuredSelection selection = (IStructuredSelection)fLaunchConfigurationView.getViewer().getSelection();
- Object target = selection.getFirstElement();
- if (target instanceof ILaunchConfiguration) {
- if (fTabViewer.canLaunch() & fTabViewer.canLaunchWithModes() & !fTabViewer.hasDuplicateDelegates()) {
- handleLaunchPressed();
- }
- } else {
- getNewAction().run();
- }
- }
- };
- fLaunchConfigurationView.setAction(IDebugView.DOUBLE_CLICK_ACTION, fDoubleClickAction);
- Viewer viewer = fLaunchConfigurationView.getViewer();
-
- Control control = viewer.getControl();
- GridData gd = new GridData(GridData.FILL_BOTH);
- control.setLayoutData(gd);
- viewForm.setContent(viewFormContents);
- AbstractLaunchConfigurationAction.IConfirmationRequestor requestor = new AbstractLaunchConfigurationAction.IConfirmationRequestor() {
- public boolean getConfirmation() {
- int status = shouldSaveCurrentConfig();
- if(status == IDialogConstants.YES_ID) {
- fTabViewer.handleApplyPressed();
- return true;
- }
- else if(status == IDialogConstants.NO_ID) {
- fTabViewer.handleRevertPressed();
- return true;
- }
- return false;
- }
- };
- getDuplicateAction().setConfirmationRequestor(requestor);
- getNewAction().setConfirmationRequestor(requestor);
- ((StructuredViewer) viewer).addPostSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- handleLaunchConfigurationSelectionChanged(event);
- getNewAction().setEnabled(getNewAction().isEnabled());
- getDeleteAction().setEnabled(getDeleteAction().isEnabled());
- getDuplicateAction().setEnabled(getDuplicateAction().isEnabled());
- }
- });
- return comp;
- }
-
- /**
- * Create the filters to be initially applied to the viewer.
- * The initial filters are based on the persisted preferences
- * @return the array of initial filters
- * @since 3.2
- */
- private ViewerFilter[] createViewerFilters() {
- ArrayList filters = new ArrayList();
- fClosedProjectFilter = new ClosedProjectFilter();
- if(DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_CLOSED)) {
- filters.add(fClosedProjectFilter);
- }
- fDeletedProjectFilter = new DeletedProjectFilter();
- if(DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_DELETED)) {
- filters.add(fDeletedProjectFilter);
- }
- fLCTFilter = new LaunchConfigurationTypeFilter();
- if(DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_TYPES)) {
- filters.add(fLCTFilter);
- }
- fWorkingSetsFilter = new WorkingSetsFilter();
- if(DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_FILTER_WORKING_SETS)) {
- filters.add(fWorkingSetsFilter);
- }
- return (ViewerFilter[]) filters.toArray(new ViewerFilter[filters.size()]);
- }
-
- /**
- * Set the initial selection in the tree.
- */
- public void doInitialTreeSelection() {
- fLaunchConfigurationView.getViewer().setSelection(fInitialSelection);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#generateName(java.lang.String)
- */
- public String generateName(String name) {
- if (name == null) {
- name = IInternalDebugCoreConstants.EMPTY_STRING;
- }
- return getLaunchManager().generateLaunchConfigurationName(name);
- }
-
- /**
- * Generates and returns a unique name using the specified name as a prefix in the event
- * the specified name already exists or is contained in the set of reserved names.
- * @param name the name to use as a prefix for generating a new name
- * @param reservednames a listing of names that should be considered as 'taken' and cannot be generated
- * by this method
- * @return a new name based on the specified name.
- *
- * @since 3.3
- */
- public String generateName(String name, Set reservednames) {
- if(name == null) {
- name = IInternalDebugCoreConstants.EMPTY_STRING;
- }
- return ((LaunchManager)getLaunchManager()).generateUniqueLaunchConfigurationNameFrom(name, reservednames);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#getActiveTab()
- */
- public ILaunchConfigurationTab getActiveTab() {
- return fTabViewer.getActiveTab();
- }
-
- /**
- * Returns the banner image to display in the title area
- */
- protected Image getBannerImage() {
- if (fBannerImage == null) {
- ImageDescriptor descriptor = getLaunchGroup().getBannerImageDescriptor();
- if (descriptor != null) {
- fBannerImage = descriptor.createImage();
- }
- }
- return fBannerImage;
- }
-
- /**
- * Gets the delete menu action
- *
- * @return the delete menu action
- */
- protected AbstractLaunchConfigurationAction getDeleteAction() {
- return (AbstractLaunchConfigurationAction)fLaunchConfigurationView.getAction(DeleteLaunchConfigurationAction.ID_DELETE_ACTION);
- }
-
- /**
- * Gets the filter action
- * @return the filter menu action
- * @since 3.2
- */
- protected IAction getFilterAction() {
- return fLaunchConfigurationView.getAction(FilterLaunchConfigurationAction.ID_FILTER_ACTION);
- }
-
- /**
- * Gets the collapse all action
- * @return the collapse all action
- * @since 3.2
- */
- protected IAction getCollapseAllAction() {
- return fLaunchConfigurationView.getAction(CollapseAllLaunchConfigurationAction.ID_COLLAPSEALL_ACTION);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings()
- * @since 3.2
- */
- protected IDialogSettings getDialogBoundsSettings() {
- return getDialogSettings();
- }
-
- /**
- * Returns the dialog settings for this dialog. Subclasses should override
- * <code>getDialogSettingsSectionName()</code>.
- *
- * @return IDialogSettings
- */
- protected IDialogSettings getDialogSettings() {
- IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(getDialogSettingsSectionName());
- if (section == null) {
- section = settings.addNewSection(getDialogSettingsSectionName());
- }
- return section;
- }
-
- /**
- * Returns the name of the section that this dialog stores its settings in
- *