Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.wst.html.ui/.project')
-rw-r--r--bundles/org.eclipse.wst.html.ui/.project28
1 files changed, 0 insertions, 28 deletions
diff --git a/bundles/org.eclipse.wst.html.ui/.project b/bundles/org.eclipse.wst.html.ui/.project
deleted file mode 100644
index 38bee736ad..0000000000
--- a/bundles/org.eclipse.wst.html.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.html.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>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>

Back to the top

ples/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/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/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/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/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/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/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/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.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/ExternalToolBuilder.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/registry/ExternalToolMigration.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/BackgroundResourceRefresher.java 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/ProgramLaunchDelegate.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
Diffstat
-rw-r--r--org.eclipse.core.variables/.classpath7
-rw-r--r--org.eclipse.core.variables/.cvsignore2
-rw-r--r--org.eclipse.core.variables/.project34
-rw-r--r--org.eclipse.core.variables/.settings/org.eclipse.jdt.core.prefs96
-rw-r--r--org.eclipse.core.variables/.settings/org.eclipse.pde.prefs17
-rw-r--r--org.eclipse.core.variables/META-INF/MANIFEST.MF13
-rw-r--r--org.eclipse.core.variables/about.html28
-rw-r--r--org.eclipse.core.variables/build.properties18
-rw-r--r--org.eclipse.core.variables/plugin.properties16
-rw-r--r--org.eclipse.core.variables/plugin.xml16
-rw-r--r--org.eclipse.core.variables/schema/dynamicVariables.exsd130
-rw-r--r--org.eclipse.core.variables/schema/valueVariables.exsd156
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/ContributedValueVariable.java142
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/DynamicVariable.java76
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/EclipseHomeVariableResolver.java43
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java291
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariable.java81
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java614
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/ValueVariable.java76
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/VariablesMessages.java39
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/VariablesMessages.properties18
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/variables/IDynamicVariable.java60
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/variables/IDynamicVariableResolver.java36
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/variables/IStringVariable.java57
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/variables/IStringVariableManager.java191
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/variables/IValueVariable.java91
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/variables/IValueVariableInitializer.java30
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/variables/IValueVariableListener.java47
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/variables/VariablesPlugin.java114
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/variables/package.html45
-rw-r--r--org.eclipse.debug.examples.core/.classpath9
-rw-r--r--org.eclipse.debug.examples.core/.cvsignore1
-rw-r--r--org.eclipse.debug.examples.core/.project34
-rw-r--r--org.eclipse.debug.examples.core/.settings/org.eclipse.jdt.core.prefs47
-rw-r--r--org.eclipse.debug.examples.core/META-INF/MANIFEST.MF21
-rw-r--r--org.eclipse.debug.examples.core/about.html28
-rw-r--r--org.eclipse.debug.examples.core/build.properties21
-rw-r--r--org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java1408
-rw-r--r--org.eclipse.debug.examples.core/pdavm/tests/vmtest10.pda38
-rw-r--r--org.eclipse.debug.examples.core/pdavm/tests/vmtest2.pda48
-rw-r--r--org.eclipse.debug.examples.core/pdavm/tests/vmtest3.pda13
-rw-r--r--org.eclipse.debug.examples.core/pdavm/tests/vmtest6.pda31
-rw-r--r--org.eclipse.debug.examples.core/pdavm/tests/vmtest8.pda14
-rw-r--r--org.eclipse.debug.examples.core/pdavm/tests/vmtest9.pda23
-rw-r--r--org.eclipse.debug.examples.core/pdavm/tests/vmtest_children.pda8
-rw-r--r--org.eclipse.debug.examples.core/plugin.xml103
-rw-r--r--org.eclipse.debug.examples.core/readme.html11
-rw-r--r--org.eclipse.debug.examples.core/samples/counter.pda11
-rw-r--r--org.eclipse.debug.examples.core/samples/drop.pda12
-rw-r--r--org.eclipse.debug.examples.core/samples/example.pda35
-rw-r--r--org.eclipse.debug.examples.core/samples/fibonacci.pda32
-rw-r--r--org.eclipse.debug.examples.core/samples/registers.pda72
-rw-r--r--org.eclipse.debug.examples.core/samples/stack.pda21
-rw-r--r--org.eclipse.debug.examples.core/samples/structures.pda29
-rw-r--r--org.eclipse.debug.examples.core/scripts/build.xml66
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/ClockControl.java93
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/LengthControl.java36
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/MidiLaunch.java165
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/MidiLaunchDelegate.java126
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/SequencerControl.java132
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TempoControl.java89
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TimeControl.java88
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/DebugCorePlugin.java133
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDALineBreakpoint.java206
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDARunToLineBreakpoint.java70
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDAWatchpoint.java231
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/launcher/PDALaunchDelegate.java152
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/IPDAEventListener.java44
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAArray.java51
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAArrayEntry.java98
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugElement.java109
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugTarget.java571
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackFrame.java260
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackValue.java92
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAThread.java563
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAValue.java109
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAVariable.java114
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/WordStructureDelegate.java53
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDABitFieldData.java41
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAChildrenCommand.java34
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAClearBreakpointCommand.java31
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommand.java40
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommandResult.java27
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADataCommand.java35
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADropFrameCommand.java44
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalCommand.java43
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalResultEvent.java32
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvent.java75
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEventStopCommand.java48
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAExitedEvent.java29
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommand.java36
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommandResult.java30
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameData.java46
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAGroupsCommand.java33
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAListResult.java43
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDANoSuchLabelEvent.java40
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPopDataCommand.java34
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPushDataCommand.java36
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegisterData.java43
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommand.java33
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommandResult.java39
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersEvent.java30
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumeCommand.java40
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumedEvent.java29
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARunControlEvent.java69
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetBreakpointCommand.java46
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetDataCommand.java36
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetVarCommand.java38
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommand.java39
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommandResult.java40
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommand.java36
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommandResult.java31
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStartedEvent.java30
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepCommand.java45
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepReturnCommand.java46
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendCommand.java40
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendedEvent.java43
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminateCommand.java34
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminatedEvent.java29
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAUnimplementedInstructionEvent.java41
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumeCommand.java37
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumedEvent.java36
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMStartedEvent.java30
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendCommand.java37
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendedEvent.java44
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMTerminatedEvent.java29
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVarCommand.java39
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAWatchCommand.java43
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/package.html99
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupDirector.java32
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupParticipant.java38
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourcePathComputerDelegate.java65
-rw-r--r--org.eclipse.debug.examples.core/src_ant/org/eclipse/debug/examples/ant/tasks/PreProcessor.java295
-rw-r--r--org.eclipse.debug.examples.ui/.classpath7
-rw-r--r--org.eclipse.debug.examples.ui/.cvsignore1
-rw-r--r--org.eclipse.debug.examples.ui/.project34
-rw-r--r--org.eclipse.debug.examples.ui/.settings/org.eclipse.jdt.core.prefs37
-rw-r--r--org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF30
-rw-r--r--org.eclipse.debug.examples.ui/about.html28
-rw-r--r--org.eclipse.debug.examples.ui/build.properties22
-rw-r--r--org.eclipse.debug.examples.ui/icons/full/dlcl16/pop.gifbin159 -> 0 bytes
-rw-r--r--org.eclipse.debug.examples.ui/icons/full/dlcl16/push.gifbin361 -> 0 bytes
-rw-r--r--org.eclipse.debug.examples.ui/icons/full/elcl16/pop.gifbin163 -> 0 bytes
-rw-r--r--org.eclipse.debug.examples.ui/icons/full/elcl16/push.gifbin590 -> 0 bytes
-rw-r--r--org.eclipse.debug.examples.ui/icons/full/obj16/clef.pngbin396 -> 0 bytes
-rw-r--r--org.eclipse.debug.examples.ui/icons/full/obj16/note.gifbin895 -> 0 bytes
-rw-r--r--org.eclipse.debug.examples.ui/icons/full/obj16/pda.gifbin182 -> 0 bytes
-rw-r--r--org.eclipse.debug.examples.ui/plugin.xml431
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlCellModifier.java67
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEditor.java41
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java116
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlLabelProvider.java40
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java41
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiAdapterFactory.java101
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java74
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiStepOverHandler.java46
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnFactory.java45
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnPresentation.java79
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java97
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java96
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerModelProxyFactory.java46
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnFactory.java45
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnPresentation.java92
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackContentProvider.java63
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java50
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java111
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ControlDetailPaneFactory.java111
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/TempoSliderDetailPane.java108
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiLaunchShortcut.java163
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java177
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiTabGroup.java33
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java212
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/AdapterFactory.java48
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/ModelProxyFactory.java32
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetContentProvider.java71
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetProxy.java38
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAThreadEventHandler.java147
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java227
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java57
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDARunToLineAdapter.java76
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTarget.java168
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTargetFactory.java84
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/AnnotationHover.java45
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java102
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistant.java42
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java48
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditorMessages.properties15
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAScanner.java92
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDASourceViewerConfiguration.java63
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PopFrameActionDelegate.java96
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java91
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/WordFinder.java79
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDALaunchShortcut.java77
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java196
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDATabGroup.java39
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/presentation/PDAModelPresentation.java192
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/AbstractDataStackViewHandler.java66
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CanPushTester.java46
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java175
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopHandler.java60
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushHandler.java37
-rw-r--r--org.eclipse.ui.console/.classpath7
-rw-r--r--org.eclipse.ui.console/.cvsignore1
-rw-r--r--org.eclipse.ui.console/.project34
-rw-r--r--org.eclipse.ui.console/.settings/org.eclipse.jdt.core.prefs99
-rw-r--r--org.eclipse.ui.console/.settings/org.eclipse.pde.prefs17
-rw-r--r--org.eclipse.ui.console/META-INF/MANIFEST.MF20
-rw-r--r--org.eclipse.ui.console/about.html28
-rw-r--r--org.eclipse.ui.console/build.properties20
-rw-r--r--org.eclipse.ui.console/icons/full/clcl16/clear_co.gifbin595 -> 0 bytes
-rw-r--r--org.eclipse.ui.console/icons/full/clcl16/lock_co.gifbin626 -> 0 bytes
-rw-r--r--org.eclipse.ui.console/icons/full/clcl16/pin.gifbin358 -> 0 bytes
-rw-r--r--org.eclipse.ui.console/icons/full/cview16/console_view.gifbin582 -> 0 bytes
-rw-r--r--org.eclipse.ui.console/icons/full/dlcl16/clear_co.gifbin364 -> 0 bytes
-rw-r--r--org.eclipse.ui.console/icons/full/dlcl16/lock_co.gifbin588 -> 0 bytes
-rw-r--r--org.eclipse.ui.console/icons/full/dlcl16/pin.gifbin223 -> 0 bytes
-rw-r--r--org.eclipse.ui.console/icons/full/dlcl16/rem_co.gifbin159 -> 0 bytes
-rw-r--r--org.eclipse.ui.console/icons/full/elcl16/clear_co.gifbin595 -> 0 bytes
-rw-r--r--org.eclipse.ui.console/icons/full/elcl16/lock_co.gifbin626 -> 0 bytes
-rw-r--r--org.eclipse.ui.console/icons/full/elcl16/new_con.gifbin612 -> 0 bytes
-rw-r--r--org.eclipse.ui.console/icons/full/elcl16/pin.gifbin358 -> 0 bytes
-rw-r--r--org.eclipse.ui.console/icons/full/elcl16/rem_co.gifbin163 -> 0 bytes
-rw-r--r--org.eclipse.ui.console/icons/full/eview16/console_view.gifbin582 -> 0 bytes
-rw-r--r--org.eclipse.ui.console/plugin.properties24
-rw-r--r--org.eclipse.ui.console/plugin.xml89
-rw-r--r--org.eclipse.ui.console/schema/consoleFactories.exsd136
-rw-r--r--org.eclipse.ui.console/schema/consolePageParticipants.exsd122
-rw-r--r--org.eclipse.ui.console/schema/consolePatternMatchListeners.exsd153
-rw-r--r--org.eclipse.ui.console/scripts/exportplugin.xml35
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/AbstractConsole.java335
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java182
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsole.java97
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleConstants.java156
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleDocumentPartitioner.java51
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleFactory.java48
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleListener.java39
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleManager.java107
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsolePageParticipant.java71
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleView.java93
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IHyperlink.java37
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IHyperlink2.java33
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsole.java293
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleInputStream.java285
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java269
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IPatternMatchListener.java87
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IPatternMatchListenerDelegate.java46
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsole.java137
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java92
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/PatternMatchEvent.java73
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsole.java554
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsolePage.java413
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java699
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/actions/ClearOutputAction.java95
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/actions/CloseConsoleAction.java41
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/actions/TextViewerAction.java84
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/actions/TextViewerGotoLineAction.java121
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/actions/package.html20
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/package.html36
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocument.java115
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocumentAdapter.java394
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDropDownAction.java169
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java121
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleHyperlinkPosition.java51
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java461
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.java68
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.properties53
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePageParticipantExtension.java73
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePatternMatcher.java310
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java158
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleResourceBundleMessages.java35
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleResourceBundleMessages.properties19
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleTypePropertyTester.java32
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleView.java807
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleViewConsoleFactory.java46
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java125
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java55
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/HyperlinkUpdater.java56
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IConsoleHelpContextIds.java46
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IInternalConsoleConstants.java31
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePage.java141
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartition.java209
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java693
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsoleViewer.java144
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/OpenConsoleAction.java153
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListener.java71
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListenerExtension.java153
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java54
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ScrollLockAction.java51
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ShowConsoleAction.java64
-rw-r--r--org.eclipse.ui.externaltools/.classpath8
-rw-r--r--org.eclipse.ui.externaltools/.cvsignore4
-rw-r--r--org.eclipse.ui.externaltools/.project34
-rw-r--r--org.eclipse.ui.externaltools/.settings/org.eclipse.jdt.core.prefs97
-rw-r--r--org.eclipse.ui.externaltools/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--org.eclipse.ui.externaltools/.settings/org.eclipse.pde.prefs14
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuildTab.java417
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java546
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.java99
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.properties77
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java645
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsUtil.java203
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/IgnoreWhiteSpaceComparator.java47
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/WorkingSetComparator.java52
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/ExternalToolMenuDelegate.java40
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/OpenExternalToolsConfigurations.java24
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/BuilderUtils.java386
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolBuilder.java288
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsImages.java205
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.java28
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.properties17
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsPlugin.java167
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsPreferenceInitializer.java32
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolConstants.java231
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolsHelpContextIds.java37
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IPreferenceConstants.java33
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ImageDescriptorRegistry.java91
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/registry/ExternalToolMigration.java411
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderLabelProvider.java132
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java1241
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/EditCommandDialog.java79
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsPreferencePage.java97
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.java71
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.properties60
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/FileSelectionDialog.java245
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/TreeAndListGroup.java315
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildFilesResolver.java136
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildProjectResolver.java73
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildTypeResolver.java26
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/SystemPathResolver.java66
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/VariableMessages.java24
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/VariableMessages.properties13
-rw-r--r--org.eclipse.ui.externaltools/META-INF/MANIFEST.MF24
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/BackgroundResourceRefresher.java87
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.java30
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.properties19
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramBuilderTabGroup.java35
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramLaunchDelegate.java246
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramMainTab.java56
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramTabGroup.java37
-rw-r--r--org.eclipse.ui.externaltools/about.html28
-rw-r--r--org.eclipse.ui.externaltools/build.properties21
-rw-r--r--org.eclipse.ui.externaltools/buildfiles/exportplugin.xml38
-rw-r--r--org.eclipse.ui.externaltools/icons/full/dtool16/external_tools.gifbin570 -> 0 bytes
-rw-r--r--org.eclipse.ui.externaltools/icons/full/etool16/external_tools.gifbin587 -> 0 bytes
-rw-r--r--org.eclipse.ui.externaltools/icons/full/obj16/build_tab.gifbin577 -> 0 bytes
-rw-r--r--org.eclipse.ui.externaltools/icons/full/obj16/builder.gifbin574 -> 0 bytes
-rw-r--r--org.eclipse.ui.externaltools/icons/full/obj16/classpath.gifbin338 -> 0 bytes
-rw-r--r--org.eclipse.ui.externaltools/icons/full/obj16/external_tools.gifbin587 -> 0 bytes
-rw-r--r--org.eclipse.ui.externaltools/icons/full/obj16/invalid_build_tool.gifbin339 -> 0 bytes
-rw-r--r--org.eclipse.ui.externaltools/icons/full/obj16/main_tab.gifbin360 -> 0 bytes
-rw-r--r--org.eclipse.ui.externaltools/icons/full/wizban/ext_tools_wiz.pngbin4855 -> 0 bytes
-rw-r--r--org.eclipse.ui.externaltools/plugin.properties40
-rw-r--r--org.eclipse.ui.externaltools/plugin.xml220
-rw-r--r--org.eclipse.ui.externaltools/schema/configurationDuplicationMaps.exsd117
354 files changed, 0 insertions, 34065 deletions
diff --git a/org.eclipse.core.variables/.classpath b/org.eclipse.core.variables/.classpath
deleted file mode 100644
index ce7393340..000000000
--- 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 693869726..000000000
--- 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 03df26fb2..000000000
--- 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 05664ee2f..000000000
--- 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 7eebeb8c9..000000000
--- 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 eb43f8008..000000000
--- 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.200.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 460233046..000000000
--- 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 (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). 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, &quot;Program&quot; 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 (&quot;Redistributor&quot;) 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 bcf8553e1..000000000
--- 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 88108aaa6..000000000
--- 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 97246bb7f..000000000
--- a/org.eclipse.core.variables/plugin.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension-point id="valueVariables" name="%valueVariablesExtensionPointName" schema="schema/valueVariables.exsd"/>
- <extension-point id="dynamicVariables" name="%dynamicVariablesExtensionPointName" schema="schema/dynamicVariables.exsd"/>
- <extension
- point="org.eclipse.core.variables.dynamicVariables">
- <variable
- description="%eclipse_home.description"
- name="eclipse_home"
- resolver="org.eclipse.core.internal.variables.EclipseHomeVariableResolver"
- supportsArgument="false"/>
- </extension>
-
-</plugin>
diff --git a/org.eclipse.core.variables/schema/dynamicVariables.exsd b/org.eclipse.core.variables/schema/dynamicVariables.exsd
deleted file mode 100644
index 5168a891f..000000000
--- 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 &lt;code&gt;org.eclipse.core.variables.IDynamicVariableResolver&lt;/code&gt;, 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 &lt;code&gt;true&lt;/code&gt;.
- </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:
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.core.variables.dynamicVariables&quot;&gt;
- &lt;variable
- name=&quot;resource_name&quot;
- expanderClass=&quot;com.example.ResourceNameExpander&quot;
- description=&quot;The name of the selected resource&quot;&gt;
- &lt;/variable&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute &lt;b&gt;resolver&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.core.variables.IDynamicVariableResolver&lt;/b&gt;.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2003, 2005 IBM Corporation and others.&lt;br&gt;
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-&lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </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 7dd314c57..000000000
--- 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&apos;s value will always be derived from the extension and cannot be edited by the user. When false, this variable&apos;s value will be initialized from any &lt;code&gt;initialValue&lt;/code&gt; attribtue or initializer class, and can be modified by the user. Once a read-write variable is modified, it&apos;s value is persisted and overrides any value specified by an extension&apos;s &lt;code&gt;initialValue&lt;/code&gt; or initializer class. When unspecified, the value of this attribute is &lt;code&gt;false&lt;/code&gt;. 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 &lt;code&gt;initializerClass&lt;/code&gt; 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 &lt;code&gt;org.eclipse.core.variables.IValueVariableInitializer&lt;/code&gt;. When specified, an &lt;code&gt;initialValue&lt;/code&gt; 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:
-
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.core.variables.valueVariables&quot;&gt;
- &lt;variable
- name=&quot;FOO_HOME&quot;
- initialValue=&quot;/usr/local/foo&quot;&gt;
- &lt;/variable&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
-
-In the example above, the specified variable is created with the initial value &quot;/usr/local/foo&quot;.
-
- The following is an example of a value variable contribution with an initializer class:
-&lt;p&gt;
-&lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.core.variables.valueVariables&quot;&gt;
- &lt;variable
- name=&quot;FOO_HOME&quot;
- initializerClass=&quot;com.example.FooLocator&quot;&gt;
- &lt;/variable&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
-&lt;/p&gt;
-
-In the example above, the variable FOO_HOME is created and the class &quot;com.example.FooLocator&quot; will be
-used to initialize the value the first time it&apos;s requested.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Value of the attribute &lt;b&gt;initializerClass&lt;/b&gt; must be a fully qualified name of a Java class that implements the interface &lt;b&gt;org.eclipse.core.variables.IValueVariableInitializer&lt;/b&gt;.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2003, 2006 IBM Corporation and others.&lt;br&gt;
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which
-accompanies this distribution, and is available at
-&lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </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 f53bf67e1..000000000
--- 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 f2d48d810..000000000
--- 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 17ca4a1a7..000000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/EclipseHomeVariableResolver.java
+++ /dev/null
@@ -1,43 +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
- * 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.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) {
- String file = url.getFile();
- 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 94bd5d7ea..000000000
--- 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 498b411b5..000000000
--- 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 fe3e8d69a..000000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
+++ /dev/null
@@ -1,614 +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
- * 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.FactoryConfigurationError;
-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.Preferences;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
-import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
-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.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Singleton string variable manager.
- */
-public class StringVariableManager implements IStringVariableManager, IPropertyChangeListener {
-
- /**
- * 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();
- VariablesPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(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= VariablesPlugin.getDefault().getPluginPreferences().getString(PREF_VALUE_VARIABLES);
- if (variablesString.length() == 0) {
- return;
- }
- Element root= null;
- Throwable ex = 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 (UnsupportedEncodingException e) {
- ex = e;
- } catch (ParserConfigurationException e) {
- ex = e;
- } catch (FactoryConfigurationError e) {
- ex = e;
- } catch (SAXException e) {
- ex = e;
- } catch (IOException e) {
- ex = e;
- }
- if (ex != null) {
- VariablesPlugin.logMessage("An exception occurred while loading persisted value variables.", ex); //$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() {
- Preferences prefs= VariablesPlugin.getDefault().getPluginPreferences();
- 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;
- prefs.setValue(PREF_VALUE_VARIABLES, variableString);
- VariablesPlugin.getDefault().savePluginPreferences();
- 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.IPropertyChangeListener#propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if (PREF_VALUE_VARIABLES.equals(event.getProperty())) {
- 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 3bac3d076..000000000
--- 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 27378a62b..000000000
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/VariablesMessages.java
+++ /dev/null
@@ -1,39 +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 - 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$
- //
- // 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
- //
-
- 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 945dbd36a..000000000
--- 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 b81fff749..000000000
--- 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>
- * &lt;extension point="org.eclipse.core.variables.dynamicVariables"&gt;
- * &lt;variable
- * name="resource_name"
- * resolver="com.example.ResourceNameResolver"
- * description="The name of the selected resource"
- * supportsArgument="false"&gt;
- * &lt;/variable&gt;
- * &lt;/extension&gt;
- * </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 b5cefaafb..000000000
--- 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 70c3e25f0..000000000
--- 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 e3502e99b..000000000
--- 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 4b25138d0..000000000
--- 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>
- * &lt;extension point="org.eclipse.core.variables.valueVariables"&gt;
- * &lt;variable
- * name="FOO_HOME"
- * initialValue="/usr/local/foo"&gt;
- * &lt;/variable&gt;
- * &lt;/extension&gt;
- * </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>
- * &lt;extension point="org.eclipse.core.variables.valueVariables"&gt;
- * &lt;variable
- * name="FOO_HOME"
- * initializerClass="com.example.FooLocator"&gt;
- * &lt;/variable&gt;
- * &lt;/extension&gt;
- * </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 035a907db..000000000
--- 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 37dac25df..000000000
--- 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 4fa1b74a5..000000000
--- 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 0d27de0b3..000000000
--- 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>&quot;abc${foo}ghi&quot;</code>.
- If the value of <code>foo</code> is <code>&quot;def&quot;</code>, the result
- of a string substitution would be <code>&quot;abcdefghi&quot;</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>&quot;${foo:bar}&quot;</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 9f8cf0e63..000000000
--- 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 ba077a403..000000000
--- 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 b1f1fe3ee..000000000
--- 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 d6de6c150..000000000
--- 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 63456da11..000000000
--- 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.1.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 460233046..000000000
--- 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 (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). 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, &quot;Program&quot; 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 (&quot;Redistributor&quot;) 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 f50444bad..000000000
--- 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 98a56ddc3..000000000
--- a/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java
+++ /dev/null
@@ -1,1408 +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 ("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 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 837277f5f..000000000
--- 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 95a35f04f..000000000
--- 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 5aecdc5e6..000000000
--- 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 d90a960cf..000000000
--- 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 7729409c2..000000000
--- 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 336a251d9..000000000
--- 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 b0bbd163d..000000000
--- 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 dadb0fe8f..000000000
--- a/org.eclipse.debug.examples.core/plugin.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.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
- -->
-
-<plugin>
- <extension
- point="org.eclipse.core.variables.valueVariables">
- <variable
- description="Path to Perl executable in the local file system"
- name="perlExecutable"
- initialValue="c:\perl\bin\perl.exe"/>
- </extension>
-<!--#ifdef ex1-->
-<!--#else-->
- <extension
- point="org.eclipse.debug.core.launchConfigurationTypes">
- <launchConfigurationType
- sourceLocatorId="pda.sourceLocator"
- delegate="org.eclipse.debug.examples.core.pda.launcher.PDALaunchDelegate"
- sourcePathComputerId="pda.sourcePathComputer"
- name="PDA Application"
- id="pda.launchType"
- modes="run, debug"/>
- </extension>
-<!--#endif-->
-
- <extension
- point="org.eclipse.debug.core.launchConfigurationTypes">
- <launchConfigurationType
- delegate="org.eclipse.debug.examples.core.midi.launcher.MidiLaunchDelegate"
- name="MIDI Sequence"
- id="midi.launchType"
- modes="run, debug"/>
- </extension>
-
-<!--#ifdef ex4-->
-<!--#else-->
- <extension
- point="org.eclipse.debug.core.sourceLocators">
- <sourceLocator
- class="org.eclipse.debug.examples.core.pda.sourcelookup.PDASourceLookupDirector"
- name="PDA Source Locator"
- id="pda.sourceLocator"/>
- </extension>
- <extension
- point="org.eclipse.debug.core.sourcePathComputers">
- <sourcePathComputer
- class="org.eclipse.debug.examples.core.pda.sourcelookup.PDASourcePathComputerDelegate"
- id="pda.sourcePathComputer"/>
- </extension>
-<!--#endif-->
-
-<!--#ifdef ex3-->
-<!--#else-->
- <extension
- point="org.eclipse.debug.core.breakpoints">
- <breakpoint
- class="org.eclipse.debug.examples.core.pda.breakpoints.PDALineBreakpoint"
- name="PDA Line Breakpoints"
- markerType="org.eclipse.debug.examples.core.pda.markerType.lineBreakpoint"
- id="pda.lineBreakpoint"/>
- <breakpoint
- class="org.eclipse.debug.examples.core.pda.breakpoints.PDAWatchpoint"
- name="PDA Watchpoints"
- markerType="org.eclipse.debug.examples.core.pda.markerType.watchpoint"
- id="pda.watchpoint"/>
- </extension>
- <extension
- id="pda.markerType.lineBreakpoint"
- name="PDA Line Breakpoint Marker"
- point="org.eclipse.core.resources.markers">
- <super type="org.eclipse.debug.core.lineBreakpointMarker"/>
- <persistent value="true"/>
- </extension>
- <extension
- id="pda.markerType.watchpoint"
- name="PDA Watchpoint Marker"
- point="org.eclipse.core.resources.markers">
- <super type="org.eclipse.debug.examples.core.pda.markerType.lineBreakpoint"/>
- <persistent value="true"/>
- </extension>
-<!--#endif-->
-
-<!--#ifdef ex6-->
-<!--#else-->
- <extension
- point="org.eclipse.debug.core.logicalStructureTypes">
- <logicalStructureType
- class="org.eclipse.debug.examples.core.pda.model.WordStructureDelegate"
- description="Words"
- id="pda.wordStructure"
- modelIdentifier="pda.debugModel"/>
- </extension>
-<!--#endif-->
-</plugin>
diff --git a/org.eclipse.debug.examples.core/readme.html b/org.eclipse.debug.examples.core/readme.html
deleted file mode 100644
index 2a7cb9df3..000000000
--- 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&reg;&#8482; comes with Perl. For Microsoft&reg; Windows&reg;, 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 &#8220;perlExecutable&#8221;
- 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 &gt; Preferences &gt;
- Run/Debug &gt; 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 9b2b73100..000000000
--- 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 84f60fee0..000000000
--- 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 a95886358..000000000
--- 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 e39595a98..000000000
--- 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 97fd8d409..000000000
--- 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 c7fa1628b..000000000
--- 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 4cc881728..000000000
--- 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 df434e655..000000000
--- 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 639f1acf5..000000000
--- 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 3a754c91a..000000000
--- 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 75801ecea..000000000
--- 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 b5538a787..000000000
--- 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 3274582cc..000000000
--- 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 feb3b32e4..000000000
--- 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 93aa54df4..000000000
--- 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 be74eb78a..000000000
--- 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 45f2a06b4..000000000
--- 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 b861fff20..000000000
--- 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 f013f8327..000000000
--- 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 cebc2091f..000000000
--- 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 257c4185e..000000000
--- 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 bcc07ba35..000000000
--- 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 9ff3ca74e..000000000
--- 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 fb854ba15..000000000
--- 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 3705decea..000000000
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugTarget.java
+++ /dev/null
@@ -1,571 +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.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;
- }
-}
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 b235690f3..000000000
--- 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.