Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.core.externaltools/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.core.externaltools/pom.xml4
-rw-r--r--org.eclipse.core.variables/pom.xml2
-rw-r--r--org.eclipse.debug.core/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunch.java123
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunchConfigurationDelegate.java22
-rw-r--r--org.eclipse.debug.core/pom.xml6
-rw-r--r--org.eclipse.debug.examples.core/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.debug.examples.core/pom.xml4
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/ClockControl.java14
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/LengthControl.java4
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/MidiLaunch.java26
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/MidiLaunchDelegate.java20
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/SequencerControl.java50
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TempoControl.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/midi/launcher/TimeControl.java12
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/DebugCorePlugin.java18
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDALineBreakpoint.java50
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDARunToLineBreakpoint.java16
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/breakpoints/PDAWatchpoint.java44
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/IPDAEventListener.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAArray.java8
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAArrayEntry.java8
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDADebugElement.java42
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAMemoryBlock.java4
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackFrame.java36
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackValue.java16
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAValue.java22
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAVariable.java18
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/WordStructureDelegate.java6
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAChildrenCommand.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAClearBreakpointCommand.java6
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommand.java18
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommandResult.java6
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADataCommand.java12
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADropFrameCommand.java14
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalCommand.java16
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalResultEvent.java12
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvent.java36
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEventStopCommand.java18
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAExitedEvent.java8
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommand.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommandResult.java6
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAGroupsCommand.java8
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDANoSuchLabelEvent.java12
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPopDataCommand.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPushDataCommand.java8
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommand.java8
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersEvent.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARestartCommand.java6
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumeCommand.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumedEvent.java8
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARunControlEvent.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetBreakpointCommand.java8
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetDataCommand.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetVarCommand.java14
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommand.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommand.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommandResult.java6
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStartedEvent.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepCommand.java12
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepReturnCommand.java14
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendCommand.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendedEvent.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminateCommand.java6
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminatedEvent.java8
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAUnimplementedInstructionEvent.java14
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumeCommand.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumedEvent.java14
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMStartedEvent.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendCommand.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendedEvent.java12
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMTerminatedEvent.java8
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVarCommand.java14
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAWatchCommand.java14
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupDirector.java8
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupParticipant.java10
-rw-r--r--org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourcePathComputerDelegate.java10
-rw-r--r--org.eclipse.debug.examples.memory/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.debug.examples.memory/pom.xml4
-rw-r--r--org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/MemoryViewSamplePlugin.java2
-rw-r--r--org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleDebugTarget.java4
-rw-r--r--org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleMemoryBlock.java6
-rw-r--r--org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleStackFrame.java4
-rw-r--r--org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleThread.java4
-rw-r--r--org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/engine/SampleEngine.java12
-rw-r--r--org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/engine/SampleMemoryUnit.java2
-rwxr-xr-xorg.eclipse.debug.examples.mixedmode/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.debug.examples.mixedmode/pom.xml4
-rwxr-xr-xorg.eclipse.debug.examples.mixedmode/src/org/eclipse/debug/internal/examples/mixedmode/Activator.java2
-rw-r--r--org.eclipse.debug.examples.mixedmode/src/org/eclipse/debug/internal/examples/mixedmode/DoNothingLaunchConfigurationDelegate.java2
-rw-r--r--org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.debug.examples.ui/pom.xml4
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/CheckboxModelProxyFactory.java4
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlCellModifier.java8
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEditor.java4
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java20
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlLabelProvider.java4
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiAdapterFactory.java22
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiStepOverHandler.java2
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnFactory.java4
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnPresentation.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java12
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java24
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerModelProxyFactory.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnFactory.java4
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnPresentation.java8
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackContentProvider.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java4
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackModelProxy.java10
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/TempoSliderDetailPane.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/ExampleLaunchStatusHandler.java2
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java36
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiTabGroup.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/AddPDAMemoryBlockAction.java10
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/CommandAdapterFactory.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/ModelProxyFactory.java2
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetContentProvider.java4
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetProxy.java2
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDARestartDebugCommand.java4
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAThreadEventHandler.java20
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java32
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDARunToLineAdapter.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTarget.java40
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistant.java16
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java10
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAScanner.java16
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDASourceViewerConfiguration.java10
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PopFrameActionDelegate.java12
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java8
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/WordFinder.java34
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDALaunchShortcut.java4
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java32
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDATabGroup.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/presentation/PDAModelPresentation.java26
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/AbstractDataStackViewHandler.java18
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CheckboxView.java8
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java22
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushHandler.java2
-rw-r--r--org.eclipse.debug.tests/.classpath2
-rw-r--r--org.eclipse.debug.tests/.settings/org.eclipse.jdt.core.prefs16
-rw-r--r--org.eclipse.debug.tests/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.debug.tests/pom.xml6
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/AbstractDebugTest.java95
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/TestUtil.java225
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/breakpoint/BreakpointOrderingTests.java5
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ConsoleManagerTests.java47
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ConsoleTests.java58
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/TestHelper.java49
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/expressions/ExpressionManagerTests.java10
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/AbstractLaunchTest.java5
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/AcceleratorSubstitutionTests.java5
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/ArgumentParsingTests.java5
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchFavoriteTests.java2
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchGroupTests.java39
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/SourceLookupFacilityTests.java5
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/statushandlers/StatusHandlerTests.java5
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/stepfilters/StepFiltersTests.java5
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/view/memory/MemoryRenderingTests.java5
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/CheckTests.java7
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/ChildrenUpdateTests.java8
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/ColumnPresentationTests.java13
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/ContentTests.java7
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/DeltaTests.java7
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/FilterTests.java7
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/FilterTransformTests.java5
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/JFaceViewerTopIndexTests.java7
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/LazyTests.java7
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/PerformanceTests.java7
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/PopupTests.java7
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/PresentationContextTests.java5
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/SelectionTests.java7
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/StateTests.java7
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/UpdateTests.java7
-rw-r--r--org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/VirtualViewerLazyModeTests.java7
-rw-r--r--org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--org.eclipse.debug.ui/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.debug.ui/pom.xml6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerManager.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchConfigurationTabExtension.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/MultipleInputDialog.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariableValueEditorManager.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AddToFavoritesAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConfigureColumnsAction.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SelectAllAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.java14
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsActionDelegate.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SelectBreakpointWorkingsetDialog.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveExpressionAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/OtherBreakpointCategory.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java20
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextManager.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextSourceProvider.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java30
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/SuspendTriggerAdapterFactory.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/RegisterGroupProxy.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/CommonTabLite.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/GroupLaunchConfigurationSelectionDialog.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/GroupLaunchConfigurationTabGroup.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpointsPage.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsSelectionPage.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ImportLaunchConfigurationsWizardPage.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorProjectPromptStatusHandler.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeleteLaunchConfigurationAction.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchDelegatesStatusHandler.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java36
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java22
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupExtension.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java18
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties18
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutExtension.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java23
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SaveScopeResourcesHandler.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectFavoritesDialog.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchModesDialog.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchersDialog.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/WorkingSetsFilter.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/MemoryRenderingManager.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/RenderingBindings.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java16
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementLabelProvider.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionContentProvider.java16
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java18
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchersPreferencePage.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ViewManagementPreferencePage.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/BasicContainerContentProvider.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/ResolveDuplicatesHandler.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerAction.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerViewer.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupFacility.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupManager.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupPanel.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIUtils.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveFilter.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveSourceContainerBrowser.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerBrowser.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ProjectSourceContainerBrowser.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkingSetSourceContainerBrowser.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringVariablePresentationManager.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableModel.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ChildrenRequestMonitor.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ModelNode.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/TreeViewerDropDown.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/FilterTransform.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/HasChildrenUpdate.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java20
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java119
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelLabelProvider.java14
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java14
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualTree.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/EventHandlerModelProxy.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchProxy.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ThreadEventHandler.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextManager.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java32
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainer.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerManager.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointSetOrganizer.java18
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointTypeOrganizer.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetCache.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetElementAdapter.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsContentProvider.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDropAdapter.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsViewer.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/WorkingSetBreakpointOrganizer.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleLineNotifier.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleTerminateAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsoleManager.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementHelper.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DecorationManager.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewBreadcrumb.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewCopyToClipboardActionDelegate.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryBlockAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryView.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewIdRegistry.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewUtil.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ResetMemoryBlockAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/SynchronizeInfo.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneRenderingMgr.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneSelectionProvider.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AbstractVirtualContentTableModel.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncCopyTableRenderingAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncPrintTableRenderingAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncVirtualContentTableViewer.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressDialog.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/MemorySegment.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentProvider.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLine.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingModel.java14
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/LogicalStructureCache.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AbstractDetailPane.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchHistoryAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/BreakpointTypesContribution.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchShortcutsAction.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/WorkingSetSourceContainer.java2
-rw-r--r--org.eclipse.ui.console/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.ui.console/pom.xml4
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/AbstractConsole.java86
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java70
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsole.java24
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleConstants.java44
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleDocumentPartitioner.java42
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleFactory.java14
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleListener.java10
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleManager.java60
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsolePageParticipant.java54
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleView.java52
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IHyperlink.java8
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IHyperlink2.java6
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsole.java324
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleInputStream.java436
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java320
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IPatternMatchListener.java66
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IPatternMatchListenerDelegate.java42
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsole.java88
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java36
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/PatternMatchEvent.java86
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsole.java752
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsolePage.java299
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java1142
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/actions/ClearOutputAction.java12
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/actions/CloseConsoleAction.java16
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocument.java30
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocumentAdapter.java506
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDropDownAction.java38
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java136
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleHyperlinkPosition.java2
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java274
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.java22
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePageParticipantExtension.java62
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePatternMatcher.java236
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleResourceBundleMessages.java30
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleTypePropertyTester.java14
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleView.java325
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleViewConsoleFactory.java40
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java2
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java22
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/HyperlinkUpdater.java6
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IInternalConsoleConstants.java2
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePage.java178
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartition.java348
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java456
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsoleViewer.java214
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/OpenConsoleAction.java172
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListener.java70
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListenerExtension.java202
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java2
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ScrollLockAction.java10
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ShowConsoleAction.java16
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/WordWrapAction.java2
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.java4
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsUtil.java34
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/OpenExternalToolsConfigurations.java2
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsImages.java42
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.java6
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolsHelpContextIds.java10
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IPreferenceConstants.java4
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.java4
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/VariableMessages.java4
-rw-r--r--org.eclipse.ui.externaltools/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.java4
-rw-r--r--org.eclipse.ui.externaltools/pom.xml4
-rw-r--r--pom.xml4
432 files changed, 5840 insertions, 5397 deletions
diff --git a/org.eclipse.core.externaltools/META-INF/MANIFEST.MF b/org.eclipse.core.externaltools/META-INF/MANIFEST.MF
index a431bb41a..83109043c 100644
--- a/org.eclipse.core.externaltools/META-INF/MANIFEST.MF
+++ b/org.eclipse.core.externaltools/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-SymbolicName: org.eclipse.core.externaltools;singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.1.100.qualifier
Bundle-Activator: org.eclipse.core.externaltools.internal.ExternalToolsCore
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.debug.core;bundle-version="[3.9.0,4.0.0)",
diff --git a/org.eclipse.core.externaltools/pom.xml b/org.eclipse.core.externaltools/pom.xml
index ffe2d03da..f93e7d8a8 100644
--- a/org.eclipse.core.externaltools/pom.xml
+++ b/org.eclipse.core.externaltools/pom.xml
@@ -14,10 +14,10 @@
<parent>
<artifactId>eclipse.platform.debug</artifactId>
<groupId>eclipse.platform.debug</groupId>
- <version>4.7.1-SNAPSHOT</version>
+ <version>4.8.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.core</groupId>
<artifactId>org.eclipse.core.externaltools</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.core.variables/pom.xml b/org.eclipse.core.variables/pom.xml
index f327bc612..40689dabd 100644
--- a/org.eclipse.core.variables/pom.xml
+++ b/org.eclipse.core.variables/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>eclipse.platform.debug</artifactId>
<groupId>eclipse.platform.debug</groupId>
- <version>4.7.1-SNAPSHOT</version>
+ <version>4.8.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.core</groupId>
<artifactId>org.eclipse.core.variables</artifactId>
diff --git a/org.eclipse.debug.core/META-INF/MANIFEST.MF b/org.eclipse.debug.core/META-INF/MANIFEST.MF
index 5e1017435..ed8865310 100644
--- a/org.eclipse.debug.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.debug.core; singleton:=true
-Bundle-Version: 3.11.0.qualifier
+Bundle-Version: 3.11.100.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.debug.core.DebugPlugin
Bundle-Vendor: %providerName
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunch.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunch.java
index e611a4686..d46953cf4 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunch.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunch.java
@@ -46,8 +46,8 @@ public class GroupLaunch extends Launch implements ILaunchesListener2 {
private boolean fLaunched = false;
/**
- * A map of all our sub-launches and the current processes that belong
- * to each one.
+ * A map of all our sub-launches and the current processes that belong to
+ * each one.
*/
private Map<ILaunch, IProcess[]> subLaunches = new HashMap<ILaunch, IProcess[]>();
@@ -66,21 +66,25 @@ public class GroupLaunch extends Launch implements ILaunchesListener2 {
* @param subLaunch
*/
public void addSubLaunch(ILaunch subLaunch) {
- subLaunches.put(subLaunch, new IProcess[] {});
+ synchronized (subLaunches) {
+ subLaunches.put(subLaunch, new IProcess[] {});
+ }
}
private boolean isChild(ILaunch launch) {
- for (ILaunch subLaunch : subLaunches.keySet()) {
- if (subLaunch == launch) {
- return true;
+ synchronized (subLaunches) {
+ for (ILaunch subLaunch : subLaunches.keySet()) {
+ if (subLaunch == launch) {
+ return true;
+ }
}
+ return false;
}
- return false;
}
/**
- * Override default behavior by querying all sub-launches to see if they
- * are terminated
+ * Override default behavior by querying all sub-launches to see if they are
+ * terminated
*
* @see org.eclipse.debug.core.Launch#isTerminated()
*/
@@ -90,14 +94,16 @@ public class GroupLaunch extends Launch implements ILaunchesListener2 {
return true;
}
- if (subLaunches.size() == 0) {
- return fLaunched; // in case we're done launching and there is
- // nobody -> terminated
- }
+ synchronized (subLaunches) {
+ if (subLaunches.size() == 0) {
+ return fLaunched; // in case we're done launching and there is
+ // nobody -> terminated
+ }
- for (ILaunch launch : subLaunches.keySet()) {
- if (!launch.isTerminated()) {
- return false;
+ for (ILaunch launch : subLaunches.keySet()) {
+ if (!launch.isTerminated()) {
+ return false;
+ }
}
}
return fLaunched; // we're done only if we're already done launching.
@@ -113,16 +119,18 @@ public class GroupLaunch extends Launch implements ILaunchesListener2 {
*/
@Override
public boolean canTerminate() {
- if (subLaunches.size() == 0) {
- return false;
- }
+ synchronized (subLaunches) {
+ if (subLaunches.size() == 0) {
+ return false;
+ }
- for (ILaunch launch : subLaunches.keySet()) {
- if (launch.canTerminate()) {
- return true;
+ for (ILaunch launch : subLaunches.keySet()) {
+ if (launch.canTerminate()) {
+ return true;
+ }
}
+ return false;
}
- return false;
}
/**
@@ -139,12 +147,14 @@ public class GroupLaunch extends Launch implements ILaunchesListener2 {
// group when children disappear even if launching has not finished yet.
markLaunched();
- for (ILaunch launch : subLaunches.keySet()) {
- if (launch.canTerminate()) {
- try {
- launch.terminate();
- } catch (DebugException e) {
- status.merge(e.getStatus());
+ synchronized (subLaunches) {
+ for (ILaunch launch : subLaunches.keySet()) {
+ if (launch.canTerminate()) {
+ try {
+ launch.terminate();
+ } catch (DebugException e) {
+ status.merge(e.getStatus());
+ }
}
}
}
@@ -171,13 +181,16 @@ public class GroupLaunch extends Launch implements ILaunchesListener2 {
return;
}
- // Remove sub launch, keeping the processes of the terminated launch
- // to show the association and to keep the console content accessible
- if (subLaunches.remove(launch) != null) {
- // terminate ourselves if this is the last sub launch
- if (subLaunches.size() == 0 && fLaunched) {
- fTerminated = true;
- fireTerminate();
+ synchronized (subLaunches) {
+ // Remove sub launch, keeping the processes of the terminated launch
+ // to show the association and to keep the console content
+ // accessible
+ if (subLaunches.remove(launch) != null) {
+ // terminate ourselves if this is the last sub launch
+ if (subLaunches.size() == 0 && fLaunched) {
+ fTerminated = true;
+ fireTerminate();
+ }
}
}
}
@@ -188,25 +201,27 @@ public class GroupLaunch extends Launch implements ILaunchesListener2 {
return;
}
- // add/remove processes
- if (isChild(launch)) {
- // Remove old processes
- IProcess[] oldProcesses = subLaunches.get(launch);
- IProcess[] newProcesses = launch.getProcesses();
-
- // avoid notifications when processes have not changed.
- if (!Arrays.equals(oldProcesses, newProcesses)) {
- for (IProcess oldProcess : oldProcesses) {
- removeProcess(oldProcess);
- }
-
- // Add new processes
- for (IProcess newProcess : newProcesses) {
- addProcess(newProcess);
+ synchronized (subLaunches) {
+ // add/remove processes
+ if (isChild(launch)) {
+ // Remove old processes
+ IProcess[] oldProcesses = subLaunches.get(launch);
+ IProcess[] newProcesses = launch.getProcesses();
+
+ // avoid notifications when processes have not changed.
+ if (!Arrays.equals(oldProcesses, newProcesses)) {
+ for (IProcess oldProcess : oldProcesses) {
+ removeProcess(oldProcess);
+ }
+
+ // Add new processes
+ for (IProcess newProcess : newProcesses) {
+ addProcess(newProcess);
+ }
+
+ // Replace the processes of the changed launch
+ subLaunches.put(launch, newProcesses);
}
-
- // Replace the processes of the changed launch
- subLaunches.put(launch, newProcesses);
}
}
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunchConfigurationDelegate.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunchConfigurationDelegate.java
index fbd3397d4..c948c63b3 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunchConfigurationDelegate.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/groups/GroupLaunchConfigurationDelegate.java
@@ -147,8 +147,10 @@ public class GroupLaunchConfigurationDelegate extends LaunchConfigurationDelegat
private boolean launchChild(SubMonitor monitor, final GroupLaunch group, GroupLaunchElement le, final ILaunchConfiguration child, final String localMode, boolean lastConfig) throws CoreException {
final Set<ILaunch> running = le.adoptIfRunning ? findRunningLaunch(le.name) : Collections.emptySet();
ILaunch subLaunch = running.stream().findFirst().orElse(null);
+ boolean launched = false;
if (subLaunch == null) {
subLaunch = child.launch(localMode, monitor);
+ launched = true;
}
group.addSubLaunch(subLaunch);
@@ -159,11 +161,13 @@ public class GroupLaunchConfigurationDelegate extends LaunchConfigurationDelegat
// So, fake another event now.
group.launchChanged(subLaunch);
- // give handler a chance to perform additional actions after
- // launching each of the members.
- IStatusHandler postLaunchHandler = DebugPlugin.getDefault().getStatusHandler(GROUP_ELEMENT_STARTED);
- postLaunchHandler.handleStatus(GROUP_ELEMENT_STARTED, new ILaunch[] {
- group, subLaunch });
+ if (launched) {
+ // give handler a chance to perform additional actions after
+ // launching each of the members.
+ IStatusHandler postLaunchHandler = DebugPlugin.getDefault().getStatusHandler(GROUP_ELEMENT_STARTED);
+ postLaunchHandler.handleStatus(GROUP_ELEMENT_STARTED, new ILaunch[] {
+ group, subLaunch });
+ }
// if this is the last child, mark the group as "launching finished", so
// that from now on the last terminating child will also terminate the
@@ -172,7 +176,13 @@ public class GroupLaunchConfigurationDelegate extends LaunchConfigurationDelegat
group.markLaunched();
}
- return postLaunchAction(subLaunch, le, monitor);
+ // in case we adopted the launch, and did not launch outselves, don't
+ // execute the post launch action!
+ if (launched) {
+ return postLaunchAction(subLaunch, le, monitor);
+ } else {
+ return true;
+ }
}
private boolean postLaunchAction(ILaunch subLaunch, GroupLaunchElement le, IProgressMonitor monitor) {
diff --git a/org.eclipse.debug.core/pom.xml b/org.eclipse.debug.core/pom.xml
index 0c518a089..05b173188 100644
--- a/org.eclipse.debug.core/pom.xml
+++ b/org.eclipse.debug.core/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2016 Eclipse Foundation and others.
+ Copyright (c) 2012, 2017 Eclipse Foundation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
@@ -14,10 +14,10 @@
<parent>
<artifactId>eclipse.platform.debug</artifactId>
<groupId>eclipse.platform.debug</groupId>
- <version>4.7.1-SNAPSHOT</version>
+ <version>4.8.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.debug</groupId>
<artifactId>org.eclipse.debug.core</artifactId>
- <version>3.11.0-SNAPSHOT</version>
+ <version>3.11.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.debug.examples.core/META-INF/MANIFEST.MF b/org.eclipse.debug.examples.core/META-INF/MANIFEST.MF
index 62626c322..b4b7e0fd4 100644
--- a/org.eclipse.debug.examples.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.examples.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.debug.examples.core;singleton:=true
-Bundle-Version: 1.4.0.qualifier
+Bundle-Version: 1.4.100.qualifier
Bundle-Activator: org.eclipse.debug.examples.core.pda.DebugCorePlugin
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources,
diff --git a/org.eclipse.debug.examples.core/pom.xml b/org.eclipse.debug.examples.core/pom.xml
index e0236b3b8..b935c211a 100644
--- a/org.eclipse.debug.examples.core/pom.xml
+++ b/org.eclipse.debug.examples.core/pom.xml
@@ -14,10 +14,10 @@
<parent>
<artifactId>eclipse.platform.debug</artifactId>
<groupId>eclipse.platform.debug</groupId>
- <version>4.7.1-SNAPSHOT</version>
+ <version>4.8.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.debug</groupId>
<artifactId>org.eclipse.debug.examples.core</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</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
index 242236705..7f00c883a 100644
--- 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -18,7 +18,7 @@ import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
/**
* Controls the location of the sequencer in microseconds.
- *
+ *
* @since 1.0
*/
public class ClockControl extends TimeControl {
@@ -29,7 +29,7 @@ public class ClockControl extends TimeControl {
public ClockControl(MidiLaunch launch) {
super("Time" , launch); //$NON-NLS-1$
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.examples.core.midi.launcher.TimeControl#getTimeValue()
*/
@@ -73,13 +73,13 @@ public class ClockControl extends TimeControl {
return e.getStatus();
}
}
-
+
/**
* Returns a float for the string.
- *
+ *
* @param value string
* @return float
- * @throws CoreException if not a valid value
+ * @throws CoreException if not a valid value
*/
protected long getLong(String value) throws CoreException {
try {
@@ -92,6 +92,6 @@ public class ClockControl extends TimeControl {
}
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
index 3ab8d18c4..173dad87c 100644
--- 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -13,7 +13,7 @@ package org.eclipse.debug.examples.core.midi.launcher;
/**
* Describes the length of the sequence in microseconds.
- *
+ *
* @since 1.0
*/
public class LengthControl extends TimeControl {
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
index 674e2fc49..fd637904d 100644
--- 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -22,16 +22,16 @@ 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
*/
@@ -39,24 +39,24 @@ public class MidiLaunch extends Launch implements ISuspendResume {
/**
* 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
@@ -67,7 +67,7 @@ public class MidiLaunch extends Launch implements ISuspendResume {
/**
* Returns the file format of the sequence.
- *
+ *
* @return file format
*/
public MidiFileFormat getFormat() {
@@ -75,7 +75,7 @@ public class MidiLaunch extends Launch implements ISuspendResume {
}
/**
* Returns the sequencer used to play MIDI files.
- *
+ *
* @return the sequencer used to play MIDI files
*/
public Sequencer getSequencer() {
@@ -161,13 +161,13 @@ public class MidiLaunch extends Launch implements ISuspendResume {
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
index 65123a55c..fdad7c253 100644
--- 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -35,7 +35,7 @@ import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
/**
* Creates and starts a MIDI sequencer.
- *
+ *
* @since 1.0
*/
public class MidiLaunchDelegate extends LaunchConfigurationDelegate {
@@ -45,25 +45,25 @@ public class MidiLaunchDelegate extends LaunchConfigurationDelegate {
* (value <code>midi.launchType</code>)
*/
public static final String ID_MIDI_LAUNCH_CONFIGURATION_TYPE = "midi.launchType"; //$NON-NLS-1$
-
+
/**
* Launch configuration attribute for the MIDI file to play
* (value <code>midi.file</code>)
*/
public static final String ATTR_MIDI_FILE = "midi.file"; //$NON-NLS-1$
-
+
/**
* Launch configuration attribute for the MIDI launcher. Specifies whether to throw
* an exception when present. Value is one of <code>HANDLED</code> or <code>UNHANDLED</code>.
*/
public static final String ATTR_THROW_EXCEPTION = "throw.exception"; //$NON-NLS-1$
-
+
/**
* Possible values for the <code>ATTR_THROW_EXCEPTION</code>.
*/
public static final String HANDLED = "HANDLED"; //$NON-NLS-1$
public static final String UNHANDLED = "UNHANDLED"; //$NON-NLS-1$
-
+
/* (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)
*/
@@ -124,7 +124,7 @@ public class MidiLaunchDelegate extends LaunchConfigurationDelegate {
/**
* Throws an exception with a new status containing the given
* message and optional exception.
- *
+ *
* @param message error message
* @param e underlying exception
* @throws CoreException
@@ -132,7 +132,7 @@ public class MidiLaunchDelegate extends LaunchConfigurationDelegate {
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)
*/
@@ -148,7 +148,7 @@ public class MidiLaunchDelegate extends LaunchConfigurationDelegate {
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
index c5b51ea6a..11fa41510 100644
--- 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -18,21 +18,21 @@ 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.
*/
@@ -40,10 +40,10 @@ public abstract class SequencerControl {
fName = name;
fLaunch = launch;
}
-
+
/**
* Returns the launch this control is associated with.
- *
+ *
* @return MIDI launch
*/
public MidiLaunch getLaunch() {
@@ -52,64 +52,64 @@ public abstract class SequencerControl {
/**
* 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)
*/
@@ -118,7 +118,7 @@ public abstract class SequencerControl {
if (obj != null) {
if (getClass().equals(obj.getClass())) {
return ((SequencerControl)obj).getSequencer().equals(getSequencer());
-
+
}
}
return false;
@@ -130,5 +130,5 @@ public abstract class SequencerControl {
@Override
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
index 2980adc83..e16f002d7 100644
--- 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -18,7 +18,7 @@ import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
/**
* Controls the tempo of a sequencer.
- *
+ *
* @since 1.0
*/
public class TempoControl extends SequencerControl {
@@ -77,14 +77,14 @@ public class TempoControl extends SequencerControl {
/**
* Returns a float for the string.
- *
+ *
* @param value string
* @return float
- * @throws CoreException if not a valid value
+ * @throws CoreException if not a valid value
*/
protected float getFloat(String value) throws CoreException {
try {
- return Float.parseFloat(value);
+ return Float.parseFloat(value);
} catch (NumberFormatException e) {
throw new CoreException(new Status(IStatus.ERROR, DebugCorePlugin.PLUGIN_ID, "Tempo must be a number", e)); //$NON-NLS-1$
}
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
index 4bcb85ac6..cbc4c4cca 100644
--- 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -14,7 +14,7 @@ import org.eclipse.core.runtime.IStatus;
/**
* Displays a time value based on underlying microsecond value
- *
+ *
* @since 1.0
*/
public abstract class TimeControl extends SequencerControl {
@@ -22,14 +22,14 @@ 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()
*/
@@ -57,10 +57,10 @@ public abstract class TimeControl extends SequencerControl {
}
return clock.toString();
}
-
+
/**
* Provided by subclasses for the control.
- *
+ *
* @return time in microseconds
*/
protected abstract long getTimeValue();
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
index 759f1088a..870d8870d 100644
--- 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
@@ -30,13 +30,13 @@ public class DebugCorePlugin extends Plugin {
private static DebugCorePlugin plugin;
//Resource bundle.
private ResourceBundle resourceBundle;
-
+
/**
- * Unique identifier for the PDA debug model (value
+ * Unique identifier for the PDA debug model (value
* <code>pda.debugModel</code>).
*/
public static final String ID_PDA_DEBUG_MODEL = "pda.debugModel"; //$NON-NLS-1$
-
+
/**
* Name of the string substitution variable that resolves to the
* location of a local Perl executable (value <code>perlExecutable</code>).
@@ -45,21 +45,21 @@ public class DebugCorePlugin extends Plugin {
/**
* 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.
+ * to a Perl program in the workspace.
*/
public static final String ATTR_PDA_PROGRAM = ID_PDA_DEBUG_MODEL + ".ATTR_PDA_PROGRAM"; //$NON-NLS-1$
-
+
/**
* Identifier for the PDA launch configuration type
* (value <code>pda.launchType</code>)
*/
public static final String ID_PDA_LAUNCH_CONFIGURATION_TYPE = "pda.launchType"; //$NON-NLS-1$
-
+
/**
* Plug-in identifier.
*/
public static final String PLUGIN_ID = "org.eclipse.debug.examples.core"; //$NON-NLS-1$
-
+
/**
* The constructor.
*/
@@ -118,7 +118,7 @@ public class DebugCorePlugin extends Plugin {
}
return resourceBundle;
}
-
+
/**
* Return a <code>java.io.File</code> object that corresponds to the specified
* <code>IPath</code> in the plug-in directory, or <code>null</code> if none.
@@ -131,5 +131,5 @@ public class DebugCorePlugin extends Plugin {
} 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
index 325402c7f..99775760d 100644
--- 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
@@ -35,10 +35,10 @@ 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,
@@ -47,13 +47,13 @@ public class PDALineBreakpoint extends LineBreakpoint implements IPDAEventListen
*/
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
@@ -72,7 +72,7 @@ public class PDALineBreakpoint extends LineBreakpoint implements IPDAEventListen
};
run(getMarkerRule(resource), runnable);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IBreakpoint#getModelIdentifier()
*/
@@ -80,21 +80,21 @@ public class PDALineBreakpoint extends LineBreakpoint implements IPDAEventListen
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
*/
@@ -103,26 +103,26 @@ public class PDALineBreakpoint extends LineBreakpoint implements IPDAEventListen
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
+//# // 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
*/
@@ -133,12 +133,12 @@ public class PDALineBreakpoint extends LineBreakpoint implements IPDAEventListen
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
*/
@@ -146,18 +146,18 @@ public class PDALineBreakpoint extends LineBreakpoint implements IPDAEventListen
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.
*/
@@ -171,9 +171,9 @@ public class PDALineBreakpoint extends LineBreakpoint implements IPDAEventListen
}
/* (non-Javadoc)
- *
+ *
* Subclasses should override to handle their breakpoint specific event.
- *
+ *
* @see org.eclipse.debug.examples.core.pda.model.IPDAEventListener#handleEvent(java.lang.String)
*/
@Override
@@ -185,10 +185,10 @@ public class PDALineBreakpoint extends LineBreakpoint implements IPDAEventListen
}
}
}
-
+
/**
* Determines if this breakpoint was hit and notifies the thread.
- *
+ *
* @param event breakpoint event
*/
private void handleHit(PDARunControlEvent event) {
@@ -205,5 +205,5 @@ public class PDALineBreakpoint extends LineBreakpoint implements IPDAEventListen
} 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
index 2d406d9d2..584965ecf 100644
--- 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
@@ -24,12 +24,12 @@ 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
@@ -48,22 +48,22 @@ public class PDARunToLineBreakpoint extends PDALineBreakpoint {
fSourceFile = resource;
}
};
- run(getMarkerRule(resource), runnable);
+ run(getMarkerRule(resource), runnable);
}
-
+
/**
* Returns whether this breakpoint is a run-to-line breakpoint
- *
+ *
* @return whether this breakpoint is a run-to-line breakpoint
*/
@Override
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() {
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
index ce7c15226..b81992bed 100644
--- 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
@@ -31,10 +31,10 @@ 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"; //$NON-NLS-1$
public static final String MODIFICATION = "MODIFICATION"; //$NON-NLS-1$
@@ -54,7 +54,7 @@ public class PDAWatchpoint extends PDALineBreakpoint implements IWatchpoint {
* 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
@@ -79,7 +79,7 @@ public class PDAWatchpoint extends PDALineBreakpoint implements IWatchpoint {
}
};
run(getMarkerRule(resource), runnable);
- }
+ }
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IWatchpoint#isAccess()
@@ -110,7 +110,7 @@ public class PDAWatchpoint extends PDALineBreakpoint implements IWatchpoint {
*/
@Override
public void setModification(boolean modification) throws CoreException {
- setAttribute(MODIFICATION, modification);
+ setAttribute(MODIFICATION, modification);
}
/* (non-Javadoc)
@@ -128,10 +128,10 @@ public class PDAWatchpoint extends PDALineBreakpoint implements IWatchpoint {
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
@@ -140,10 +140,10 @@ public class PDAWatchpoint extends PDALineBreakpoint implements IWatchpoint {
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
*/
@@ -153,32 +153,32 @@ public class PDAWatchpoint extends PDALineBreakpoint implements IWatchpoint {
/**
* 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)
*/
@@ -190,10 +190,10 @@ public class PDAWatchpoint extends PDALineBreakpoint implements IWatchpoint {
}
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)
*/
@@ -201,7 +201,7 @@ public class PDAWatchpoint extends PDALineBreakpoint implements IWatchpoint {
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)
*/
@@ -214,10 +214,10 @@ public class PDAWatchpoint extends PDALineBreakpoint implements IWatchpoint {
}
}
}
-
+
/**
* Determines if this breakpoint was hit and notifies the thread.
- *
+ *
* @param event breakpoint event
*/
private void handleHit(PDARunControlEvent event) {
@@ -237,5 +237,5 @@ public class PDAWatchpoint extends PDALineBreakpoint implements IWatchpoint {
}
}
}
- }
+ }
}
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
index 257c4185e..a076a450b 100644
--- 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
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -17,7 +17,7 @@ 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
@@ -32,11 +32,11 @@ import org.eclipse.debug.examples.core.pda.protocol.PDAEvent;
* @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
index effe377c2..cd0473edf 100644
--- 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
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2013 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -20,8 +20,8 @@ public class PDAArray extends PDAValue {
/**
* An array splits a value into its words
*
- * @param value existing value
- * @throws DebugException
+ * @param value existing value
+ * @throws DebugException
*/
public PDAArray(PDAValue value) throws DebugException {
super(value.getVariable(), value.getValueString());
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
index 2c9dd55cb..234d76ed8 100644
--- 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
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2013 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -17,13 +17,13 @@ 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
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
index f07fac187..f0c60b11d 100644
--- 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
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -29,7 +29,7 @@ public class PDADebugElement extends DebugElement {
/**
* Constructs a new debug element in the given target.
- *
+ *
* @param target debug target
*/
public PDADebugElement(IDebugTarget target) {
@@ -43,68 +43,68 @@ public class PDADebugElement extends DebugElement {
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/PDAMemoryBlock.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAMemoryBlock.java
index 394c7c1da..c72c040b2 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAMemoryBlock.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAMemoryBlock.java
@@ -18,13 +18,13 @@ import org.eclipse.debug.core.model.IMemoryBlock;
* Example memory block
*/
public class PDAMemoryBlock extends PDADebugElement implements IMemoryBlock {
-
+
/**
* The bytes
*/
private byte[] fBytes = null;
private long fStart, fLength;
-
+
/**
* Constructs a new memory block
*/
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
index 24dfefcd2..a74b7f0b6 100644
--- 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
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -24,17 +24,17 @@ import org.eclipse.debug.examples.core.pda.protocol.PDAFrameData;
* PDA stack frame.
*/
public class PDAStackFrame extends PDADebugElement implements IStackFrame {
-
+
private PDAThread fThread;
private String fName;
private int fPC;
private IPath fFilePath;
private int fId;
-
+
/**
* Constructs a stack frame in the given thread with the given
* frame data.
- *
+ *
* @param thread
* @param data frame data
* @param id stack frame id (0 is the bottom of the stack)
@@ -45,10 +45,10 @@ public class PDAStackFrame extends PDADebugElement implements IStackFrame {
fThread = thread;
init(data);
}
-
+
/**
* Initializes this frame based on its data
- *
+ *
* @param data
*/
private void init(PDAFrameData data) {
@@ -61,7 +61,7 @@ public class PDAStackFrame extends PDADebugElement implements IStackFrame {
}
fThread.setVariables(this, vars);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IStackFrame#getThread()
*/
@@ -97,7 +97,7 @@ public class PDAStackFrame extends PDADebugElement implements IStackFrame {
public int getCharStart() throws DebugException {
return -1;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IStackFrame#getCharEnd()
*/
@@ -231,11 +231,11 @@ public class PDAStackFrame extends PDADebugElement implements IStackFrame {
public void terminate() throws DebugException {
getThread().terminate();
}
-
+
/**
* Returns the name of the source file this stack frame is associated
* with.
- *
+ *
* @return the name of the source file this stack frame is associated
* with
*/
@@ -249,7 +249,7 @@ public class PDAStackFrame extends PDADebugElement implements IStackFrame {
public boolean equals(Object obj) {
if (obj instanceof PDAStackFrame) {
PDAStackFrame sf = (PDAStackFrame)obj;
- return sf.getThread().equals(getThread()) &&
+ return sf.getThread().equals(getThread()) &&
sf.getSourceName().equals(getSourceName()) &&
sf.fId == fId;
}
@@ -262,25 +262,25 @@ public class PDAStackFrame extends PDADebugElement implements IStackFrame {
public int hashCode() {
return getSourceName().hashCode() + fId;
}
-
+
/**
* Returns this stack frame's unique identifier within its thread
- *
+ *
* @return this stack frame's unique identifier within its thread
*/
protected int getIdentifier() {
return fId;
}
-
+
/**
* Returns the stack frame's thread's unique identifier
- *
+ *
* @return this stack frame's thread's unique identifier
- *
+ *
* @since 3.5
*/
protected int getThreadIdentifier() {
return fThread.getIdentifier();
}
-
+
}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackValue.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackValue.java
index 4fc8e5289..d0920b45a 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackValue.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAStackValue.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -24,10 +24,10 @@ public class PDAStackValue extends PDADebugElement implements IValue {
final private PDAThread fThread;
final private String fValue;
final private int fIndex;
-
+
/**
* Constructs a value that appears on the data stack
- *
+ *
* @param target debug target
* @param value value on the stack
* @param index index on the stack
@@ -38,11 +38,11 @@ public class PDAStackValue extends PDADebugElement implements IValue {
fValue = value;
fIndex = index;
}
-
+
public PDAThread getThread() {
return fThread;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IValue#getValueString()
*/
@@ -84,8 +84,8 @@ public class PDAStackValue extends PDADebugElement implements IValue {
*/
@Override
public boolean equals(Object obj) {
- return obj instanceof PDAStackValue &&
- ((PDAStackValue)obj).fValue.equals(fValue) &&
+ return obj instanceof PDAStackValue &&
+ ((PDAStackValue)obj).fValue.equals(fValue) &&
((PDAStackValue)obj).fIndex == fIndex;
}
/*
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAValue.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAValue.java
index 620f7ac83..6559f2ccd 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAValue.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAValue.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2013 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -22,16 +22,16 @@ import org.eclipse.debug.examples.core.pda.protocol.PDAListResult;
* Value of a PDA variable.
*/
public class PDAValue extends PDADebugElement implements IValue {
-
+
final private PDAVariable fVariable;
final private String fValue;
-
+
public PDAValue(PDAVariable variable, String value) {
super(variable.getStackFrame().getPDADebugTarget());
fVariable = variable;
fValue = value;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IValue#getReferenceTypeName()
*/
@@ -66,7 +66,7 @@ public class PDAValue extends PDADebugElement implements IValue {
PDAStackFrame frame = fVariable.getStackFrame();
PDAListResult result = (PDAListResult) sendCommand(
new PDAChildrenCommand(frame.getThreadIdentifier(), frame.getIdentifier(), fVariable.getName()) );
-
+
IVariable[] children = new IVariable[result.fValues.length];
for(int i = 0; i < result.fValues.length; i++) {
children[i] = new PDAVariable(frame, result.fValues[i]);
@@ -81,8 +81,8 @@ public class PDAValue extends PDADebugElement implements IValue {
if (getVariables().length != 0) {
return true;
}
- // Value with multiple words can be show as an array using logical
- // structures. If the value has multiple words, it needs to indicate
+ // Value with multiple words can be show as an array using logical
+ // structures. If the value has multiple words, it needs to indicate
// that it has children even if logical structures are not turned on.
return fValue.split("\\W+").length > 1; //$NON-NLS-1$
}
@@ -102,12 +102,12 @@ public class PDAValue extends PDADebugElement implements IValue {
public int hashCode() {
return fValue.hashCode();
}
-
+
/**
* Returns the variable that this value was created for.
- *
+ *
* @return The variable that this value was created for.
- *
+ *
* @since 3.5
*/
public PDAVariable getVariable() {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAVariable.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAVariable.java
index 3745028e1..33e033602 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAVariable.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/PDAVariable.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2013 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -25,15 +25,15 @@ import org.eclipse.debug.examples.core.pda.protocol.PDAVarCommand;
* A variable in a PDA stack frame
*/
public class PDAVariable extends PDADebugElement implements IVariable {
-
+
// name & stack frmae
private String fName;
private PDAStackFrame fFrame;
-
+
/**
* Constructs a variable contained in the given stack frame
* with the given name.
- *
+ *
* @param frame owning stack frame
* @param name variable name
*/
@@ -42,7 +42,7 @@ public class PDAVariable extends PDADebugElement implements IVariable {
fFrame = frame;
fName = name;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IVariable#getValue()
*/
@@ -52,7 +52,7 @@ public class PDAVariable extends PDADebugElement implements IVariable {
fFrame.getThreadIdentifier(), getStackFrame().getIdentifier(), getName()));
return new PDAValue(this, result.fResponseText);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IVariable#getName()
*/
@@ -110,10 +110,10 @@ public class PDAVariable extends PDADebugElement implements IVariable {
public boolean verifyValue(IValue value) throws DebugException {
return false;
}
-
+
/**
* Returns the stack frame owning this variable.
- *
+ *
* @return the stack frame owning this variable
*/
public PDAStackFrame getStackFrame() {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/WordStructureDelegate.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/WordStructureDelegate.java
index 2d218e08f..583ecc1fd 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/WordStructureDelegate.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/model/WordStructureDelegate.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2013 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -46,7 +46,7 @@ public class WordStructureDelegate implements ILogicalStructureTypeDelegate {
public IValue getLogicalStructure(IValue value) throws CoreException {
//#ifdef ex6
//# // TODO: Exercise 6 - create an array from the given value
-//# return null;
+//# return null;
//#else
return new PDAArray((PDAValue)value);
//#endif
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAChildrenCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAChildrenCommand.java
index 9d9339b75..24fc3e3af 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAChildrenCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAChildrenCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,12 +13,12 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Retrieves data stack information
- *
+ * Retrieves data stack information
+ *
* <pre>
* C: children {thread_id} {frame_id} {variable_name}
* R: {child variable 1}|{child variable 2}|{child variable 3}|...|
- *
+ *
* Errors:
* error: invalid thread
* </pre>
@@ -28,7 +28,7 @@ public class PDAChildrenCommand extends PDACommand {
public PDAChildrenCommand(int threadId, int frameId, String name ) {
super("children " + threadId + " " + frameId + " " + name); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
return new PDAListResult(resultText);
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAClearBreakpointCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAClearBreakpointCommand.java
index 20eba643f..8d3f9a5f5 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAClearBreakpointCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAClearBreakpointCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -14,7 +14,7 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
* Clears any breakpoint set on given line
- *
+ *
* <pre>
* C: clear {line}
* R: ok
@@ -25,7 +25,7 @@ public class PDAClearBreakpointCommand extends PDACommand {
public PDAClearBreakpointCommand(int line) {
super("clear " + line); //$NON-NLS-1$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
return new PDACommandResult(resultText);
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommand.java
index 9aa2bfb15..52d44fb05 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -12,29 +12,29 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Base class for PDA commands. Sub-classes should format the request string
+ * Base class for PDA commands. Sub-classes should format the request string
* and implement the method to create the proper result object.
*/
abstract public class PDACommand {
final private String fRequest;
-
+
public PDACommand(String request) {
fRequest = request;
}
-
+
/**
- * Returns the request to be sent to PDA.
+ * Returns the request to be sent to PDA.
*/
public String getRequest() {
return fRequest;
}
/**
- * Returns the command result based on the given PDA response. This command
- * uses the class type parameter as the return type to allow the compiler to
- * enforce the correct command result. This class must be implemented by
- * each command to create the concrete result type.
+ * Returns the command result based on the given PDA response. This command
+ * uses the class type parameter as the return type to allow the compiler to
+ * enforce the correct command result. This class must be implemented by
+ * each command to create the concrete result type.
*/
abstract public PDACommandResult createResult(String resultText);
}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommandResult.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommandResult.java
index 9991b0115..1de9e136b 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommandResult.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDACommandResult.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -13,14 +13,14 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Basic command result object. This command result simply allows access to the
+ * Basic command result object. This command result simply allows access to the
* PDA response. Sub-classes may override to optionally parse the response text
* and return higher-level objects.
*/
public class PDACommandResult {
final public String fResponseText;
-
+
public PDACommandResult(String response) {
fResponseText = response;
}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADataCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADataCommand.java
index e82630f1a..d83b78c06 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADataCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADataCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,13 +13,13 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Return the contents of the data stack; reply is the data from oldest to newest
- * as a single string
- *
+ * Return the contents of the data stack; reply is the data from oldest to newest
+ * as a single string
+ *
* <pre>
* C: data {thread_id}
* R: {value 1}|{value 2}|{value 3}|...|
- *
+ *
* Errors:
* error: invalid thread
* </pre>
@@ -29,7 +29,7 @@ public class PDADataCommand extends PDACommand {
public PDADataCommand(int threadId) {
super("data " + threadId); //$NON-NLS-1$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
return new PDAListResult(resultText);
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADropFrameCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADropFrameCommand.java
index 9777ff94c..c051f010a 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADropFrameCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDADropFrameCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,22 +13,22 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Pops the top stack frame off the call stack setting the instruction pointer to
- * the calling statement in the calling frame
- *
+ * Pops the top stack frame off the call stack setting the instruction pointer to
+ * the calling statement in the calling frame
+ *
* <pre>
* If VM running:
* C: drop {thread_id}
* R: ok
* E: resumed {thread_id} drop
* E: suspended {thread_id} drop
- *
+ *
* If VM suspended:
* C: drop {thread_id}
* R: ok
* E: vmresumed drop
* E: vmsuspended {thread_id} drop
- *
+ *
* Errors:
* error: invalid thread
* </pre>
@@ -38,7 +38,7 @@ public class PDADropFrameCommand extends PDACommand {
public PDADropFrameCommand(int threadId) {
super("drop " + threadId); //$NON-NLS-1$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
return new PDACommandResult(resultText);
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalCommand.java
index 499a9dd0a..2c341dadd 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,31 +13,31 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Causes the interperter to execute the given set of instructions. At the end
+ * Causes the interperter to execute the given set of instructions. At the end
* of the evaluation the top value is poped off the stack and returned in the
* evaluation result.
- *
+ *
* <pre>
* C: eval {thread_id} {instruction}%20{parameter}|{instruction}%20{parameter}|...
* R: ok
* E: resumed {thread_id} client
* E: evalresult result
* E: suspended {thread_id} eval
- *
+ *
* Errors:
* error: invalid thread
* error: cannot evaluate while vm is suspended
- * error: thread running
+ * error: thread running
* </pre>
- *
- * Where event_name could be <code>unimpinstr</code> or <code>nosuchlabel</code>.
+ *
+ * Where event_name could be <code>unimpinstr</code> or <code>nosuchlabel</code>.
*/
public class PDAEvalCommand extends PDACommand {
public PDAEvalCommand(int threadId, String operation) {
super("eval " + threadId + " " + operation); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
return new PDACommandResult(resultText);
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalResultEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalResultEvent.java
index d8dc61ef5..993786e62 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalResultEvent.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvalResultEvent.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -12,21 +12,21 @@
package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Eval result event generated when an evaluation has completed.
- *
+ * Eval result event generated when an evaluation has completed.
+ *
* <pre>
* E: evalresult {result}
* </pre>
*/
public class PDAEvalResultEvent extends PDAEvent {
-
+
public final String fResult;
-
+
public PDAEvalResultEvent(String message) {
super(message);
fResult = message.substring(getName(message).length() + 1);
}
-
+
public static boolean isEventMessage(String message) {
return message.startsWith("evalresult"); //$NON-NLS-1$
}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvent.java
index ab841bf13..94bc59110 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvent.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEvent.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -16,60 +16,60 @@ package org.eclipse.debug.examples.core.pda.protocol;
public class PDAEvent {
public final String fMessage;
public final String fName;
-
+
public PDAEvent(String message) {
fMessage = message;
fName = getName(message);
}
-
+
protected String getName(String message) {
int nameEnd = message.indexOf(' ');
nameEnd = nameEnd == -1 ? message.length() : nameEnd;
return message.substring(0, nameEnd);
}
-
+
public static PDAEvent parseEvent(String message) {
if (PDAEvalResultEvent.isEventMessage(message)) {
return new PDAEvalResultEvent(message);
- }
+ }
else if (PDAExitedEvent.isEventMessage(message)) {
return new PDAExitedEvent(message);
- }
+ }
else if (PDANoSuchLabelEvent.isEventMessage(message)) {
return new PDANoSuchLabelEvent(message);
- }
+ }
else if (PDARegistersEvent.isEventMessage(message)) {
return new PDARegistersEvent(message);
- }
+ }
else if (PDAResumedEvent.isEventMessage(message)) {
return new PDAResumedEvent(message);
- }
+ }
else if (PDAStartedEvent.isEventMessage(message)) {
return new PDAStartedEvent(message);
- }
+ }
else if (PDASuspendedEvent.isEventMessage(message)) {
return new PDASuspendedEvent(message);
- }
+ }
else if (PDATerminatedEvent.isEventMessage(message)) {
return new PDATerminatedEvent(message);
- }
+ }
else if (PDAUnimplementedInstructionEvent.isEventMessage(message)) {
return new PDAUnimplementedInstructionEvent(message);
- }
+ }
else if (PDAVMResumedEvent.isEventMessage(message)) {
return new PDAVMResumedEvent(message);
- }
+ }
else if (PDAVMStartedEvent.isEventMessage(message)) {
return new PDAVMStartedEvent(message);
- }
+ }
else if (PDAVMSuspendedEvent.isEventMessage(message)) {
return new PDAVMSuspendedEvent(message);
- }
+ }
else if (PDAExitedEvent.isEventMessage(message)) {
return new PDAExitedEvent(message);
- }
+ }
else {
return new PDAEvent(message);
- }
+ }
}
}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEventStopCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEventStopCommand.java
index b96060fda..d6e30dfb1 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEventStopCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAEventStopCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,35 +13,35 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Optionally stop the interpreter when an error event <code>event_name</code>
+ * Optionally stop the interpreter when an error event <code>event_name</code>
* is encountered; <code>{0|1}</code> specifies stop (<code>1</code>) or
* continue (<code>0</code>). The possible events are <code>unimpinstr</code> and
* <code>nosuchlabel</code>. Reply is <code>ok</code>. When an event is encountered,
- * the interpreter sends the error event (for example <code>unimlpemented instruction
- * foo</code>) and corresponding suspend event (for example <code>suspended event
+ * the interpreter sends the error event (for example <code>unimlpemented instruction
+ * foo</code>) and corresponding suspend event (for example <code>suspended event
* unimpinstr</code>).
- *
+ *
* <pre>
* C: eventstop {event_name} {0|1}
* R: ok
* ...
* E: suspended event {event_name}
* </pre>
- *
- * Where event_name could be <code>unimpinstr</code> or <code>nosuchlabel</code>.
+ *
+ * Where event_name could be <code>unimpinstr</code> or <code>nosuchlabel</code>.
*/
public class PDAEventStopCommand extends PDACommand {
public static final int UNIMPINSTR = 0;
public static final int NOSUCHLABEL = 1;
-
+
public PDAEventStopCommand(int event, boolean enable) {
super("eventstop " + //$NON-NLS-1$
(event == UNIMPINSTR ? "unimpinstr " : "nosuchlabel ") + //$NON-NLS-1$ //$NON-NLS-2$
(enable ? "1" : "0")); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAExitedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAExitedEvent.java
index 22c65c103..863b80868 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAExitedEvent.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAExitedEvent.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,17 +13,17 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
* Exited event generated when a thread has exited.
- *
+ *
* <pre>
* E: started {thread_id}
* </pre>
*/
public class PDAExitedEvent extends PDARunControlEvent {
-
+
public PDAExitedEvent(String message) {
super(message);
}
-
+
public static boolean isEventMessage(String message) {
return message.startsWith("exited"); //$NON-NLS-1$
}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommand.java
index 92fb11de8..092ff8e1f 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -14,12 +14,12 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
* Retrieves command stack frame information for frame <code>frame_number</code>
- * (stack frames are indexed from 0, 0 being the oldest).
- *
+ * (stack frames are indexed from 0, 0 being the oldest).
+ *
* <pre>
* C: stack {thread_id} {frame_number}
* R: {file}|{line}|{function}|{var_1}|{var_2}|...
- *
+ *
* Errors:
* error: invalid thread
* </pre>
@@ -29,7 +29,7 @@ public class PDAFrameCommand extends PDACommand {
public PDAFrameCommand(int threadId, int frameNum) {
super("frame " + threadId + " " + frameNum); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommandResult.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommandResult.java
index f52af48c0..6d92498c6 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommandResult.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAFrameCommandResult.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -17,12 +17,12 @@ package org.eclipse.debug.examples.core.pda.protocol;
*/
public class PDAFrameCommandResult extends PDACommandResult {
-
+
/**
* Frame data return by the frame command.
*/
final public PDAFrameData fFrame;
-
+
PDAFrameCommandResult(String response) {
super(response);
fFrame = new PDAFrameData(response);
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAGroupsCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAGroupsCommand.java
index fb405b32c..a0a0e61c1 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAGroupsCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAGroupsCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,8 +13,8 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Retrieves register groups information
- *
+ * Retrieves register groups information
+ *
* <pre>
* C: groups
* R: {group 1}|{group 2}|{group 3}|...|
@@ -26,7 +26,7 @@ public class PDAGroupsCommand extends PDACommand {
public PDAGroupsCommand() {
super("groups"); //$NON-NLS-1$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDANoSuchLabelEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDANoSuchLabelEvent.java
index d96681c5a..168ed6588 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDANoSuchLabelEvent.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDANoSuchLabelEvent.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -14,24 +14,24 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
* No Such Label event generated when the PDA program encounters an call to a
* non-existant label in a PDA program.
- *
+ *
* <pre>
* E: no such label {label}
* </pre>
*/
public class PDANoSuchLabelEvent extends PDAEvent {
-
+
public final String fLabel;
-
+
public PDANoSuchLabelEvent(String message) {
super(message);
fLabel = message.substring(getName(message).length() + 1);
}
-
+
public static boolean isEventMessage(String message) {
return message.startsWith("no such label"); //$NON-NLS-1$
}
-
+
@Override
protected String getName(String message) {
if (isEventMessage(message)) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPopDataCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPopDataCommand.java
index 1e3726c25..4a87139f8 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPopDataCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPopDataCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,12 +13,12 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Pops the top value from the data stack
- *
+ * Pops the top value from the data stack
+ *
* <pre>
* C: popdata {thread_id}
* R: ok
- *
+ *
* Errors:
* error: invalid thread
* </pre>
@@ -28,7 +28,7 @@ public class PDAPopDataCommand extends PDACommand {
public PDAPopDataCommand(int threadId) {
super("popdata " + threadId); //$NON-NLS-1$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
return new PDACommandResult(resultText);
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPushDataCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPushDataCommand.java
index fd3ccd8d1..dcbcdddac 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPushDataCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAPushDataCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -14,11 +14,11 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
* Pushes the given value on top of the data stack.
- *
+ *
* <pre>
* C: pushdata {thread_id} {value}
* R: ok
- *
+ *
* Errors:
* error: invalid thread
* </pre>
@@ -29,7 +29,7 @@ public class PDAPushDataCommand extends PDACommand {
public PDAPushDataCommand(int threadId, String value) {
super("pushdata " + threadId + " " + value); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommand.java
index 045df225d..7f046e8c6 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,8 +13,8 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Retrieves registers definition information
- *
+ * Retrieves registers definition information
+ *
* <pre>
* C: registers {group name}
* R: {register name} {true|false}|{bit field name} {start bit} {bit count} {mnemonic 1} {mnemonic 2} ...#{register name} ...
@@ -26,7 +26,7 @@ public class PDARegistersCommand extends PDACommand {
public PDARegistersCommand(String group) {
super("registers " + group); //$NON-NLS-1$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersEvent.java
index 1abada3a8..604c0c9a5 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersEvent.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARegistersEvent.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -12,19 +12,19 @@
package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Registers event generated when the registers' definitions are changed in a
+ * Registers event generated when the registers' definitions are changed in a
* program.
- *
+ *
* <pre>
* E: registers
* </pre>
*/
public class PDARegistersEvent extends PDAEvent {
-
+
public PDARegistersEvent(String message) {
super(message);
}
-
+
public static boolean isEventMessage(String message) {
return message.startsWith("registers"); //$NON-NLS-1$
}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARestartCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARestartCommand.java
index 29bfc78f3..b4dc050dc 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARestartCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARestartCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -14,7 +14,7 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
* Restarts the debug session. All threads exit and the main threads starts
- *
+ *
* <pre>
* C: restart
* E: exited 0
@@ -28,7 +28,7 @@ public class PDARestartCommand extends PDACommand {
public PDARestartCommand() {
super("restart"); //$NON-NLS-1$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumeCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumeCommand.java
index 64bac76a2..531e7278c 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumeCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumeCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,14 +13,14 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Resumes the execution of a single thread. Can be issued only if the virtual
+ * Resumes the execution of a single thread. Can be issued only if the virtual
* machine is running.
- *
+ *
* <pre>
* C: resume {thread_id}
* R: ok
* E: resumed {thread_id} client
- *
+ *
* Errors:
* error: invalid thread
* error: cannot resume thread when vm is suspended
@@ -33,7 +33,7 @@ public class PDAResumeCommand extends PDACommand {
public PDAResumeCommand(int threadId) {
super("resume " + threadId); //$NON-NLS-1$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumedEvent.java
index e8ee71750..5cbaf8342 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumedEvent.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAResumedEvent.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,17 +13,17 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
* Resumed event generated when a thread is resumed.
- *
+ *
* <pre>
* E: resumed {thread_id} [reason]
* </pre>
*/
public class PDAResumedEvent extends PDARunControlEvent {
-
+
public PDAResumedEvent(String message) {
super(message);
}
-
+
public static boolean isEventMessage(String message) {
return message.startsWith("resumed"); //$NON-NLS-1$
}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARunControlEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARunControlEvent.java
index c9e10a762..6934b4a70 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARunControlEvent.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDARunControlEvent.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -16,16 +16,16 @@ package org.eclipse.debug.examples.core.pda.protocol;
* Base class for run-control events.
*/
public class PDARunControlEvent extends PDAEvent {
-
+
public final int fThreadId;
public final String fReason;
-
+
public PDARunControlEvent(String message) {
super(message);
fThreadId = getThreadId(message);
fReason = getStateChangeReason(message);
}
-
+
protected int getThreadId(String message) {
int nameEnd = getName(message).length();
if ( Character.isDigit(message.charAt(nameEnd + 1)) ) {
@@ -57,7 +57,7 @@ public class PDARunControlEvent extends PDAEvent {
endIdx = endIdx == -1 ? message.length() : endIdx;
return message.substring(idx, endIdx);
}
-
+
@Override
protected String getName(String message) {
int nameEnd = message.indexOf(' ');
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetBreakpointCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetBreakpointCommand.java
index 4459ebc2f..d758c8622 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetBreakpointCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetBreakpointCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -14,7 +14,7 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
* Sets a breakpoint at given line
- *
+ *
* <pre>
* Suspend a single thread:
* C: set {line_number} 0
@@ -22,7 +22,7 @@ package org.eclipse.debug.examples.core.pda.protocol;
* C: resume {thread_id}
* E: resumed {thread_id} client
* E: suspended {thread_id} breakpoint line_number
- *
+ *
* Suspend the VM:
* C: set {line_number} 1
* R: ok
@@ -39,7 +39,7 @@ public class PDASetBreakpointCommand extends PDACommand {
line + " " + //$NON-NLS-1$
(stopVM ? "1" : "0")); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetDataCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetDataCommand.java
index c6f5278bc..81bbdb5f5 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetDataCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetDataCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,13 +13,13 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Sets a data value in the data stack at the given location (the data stack is
+ * Sets a data value in the data stack at the given location (the data stack is
* indexed from 0, 0 being the oldest).
- *
+ *
* <pre>
* C: setdata {thread_id} {index} {value}
* R: ok
- *
+ *
* Errors:
* error: invalid thread
* </pre>
@@ -29,7 +29,7 @@ public class PDASetDataCommand extends PDACommand {
public PDASetDataCommand(int threadId, int index, String value) {
super("setdata " + threadId + " " + index + " " + value); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetVarCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetVarCommand.java
index c32570a6a..f85a4f734 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetVarCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASetVarCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,14 +13,14 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Set the contents of variable <code>variable</code> from the control stack
- * <code>frame_number</code> to value <code>value</code> (the control stack is
- * indexed from 0, 0 being the oldest).
- *
+ * Set the contents of variable <code>variable</code> from the control stack
+ * <code>frame_number</code> to value <code>value</code> (the control stack is
+ * indexed from 0, 0 being the oldest).
+ *
* <pre>
* C: setvar {thread_id} {frame_number} {variable} {value}
* R: ok
- *
+ *
* Errors:
* error: invalid thread
* </pre>
@@ -31,7 +31,7 @@ public class PDASetVarCommand extends PDACommand {
public PDASetVarCommand(int threadId, int frame, String variable, String value) {
super("setvar " + threadId + " " + frame + " " + variable + " " + value); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommand.java
index 836f5d6a9..fc35365d3 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -16,12 +16,12 @@ package org.eclipse.debug.examples.core.pda.protocol;
* Return the contents of the control stack (program counters, function and
* variable names). The reply is control stack from oldest to newest as a single string
* <code>frame#frame#frame...#frame</code>, where each frame is a string
- * <code>"filename|pc|function name|variable name|variable name|...|variable name"</code></li>.
- *
+ * <code>"filename|pc|function name|variable name|variable name|...|variable name"</code></li>.
+ *
* <pre>
* C: stack {thread_id}
* R: {file}|{line}|{function}|{var_1}|{var_2}|...#{file}|{line}|{function}|{var_1}|{var_2}|...#...
- *
+ *
* Errors:
* error: invalid thread
* </pre>
@@ -32,7 +32,7 @@ public class PDAStackCommand extends PDACommand {
public PDAStackCommand(int threadId) {
super("stack " + threadId); //$NON-NLS-1$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommand.java
index f30db3c68..6facf5618 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,12 +13,12 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Retrieves command stack depth
- *
+ * Retrieves command stack depth
+ *
* <pre>
* C: stackdepth {thread_id}
* R: {depth}
- *
+ *
* Errors:
* error: invalid thread
* </pre>
@@ -29,7 +29,7 @@ public class PDAStackDepthCommand extends PDACommand {
public PDAStackDepthCommand(int threadId) {
super("stackdepth " + threadId); //$NON-NLS-1$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommandResult.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommandResult.java
index e5ca2b969..72a67f077 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommandResult.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStackDepthCommandResult.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -17,9 +17,9 @@ package org.eclipse.debug.examples.core.pda.protocol;
*/
public class PDAStackDepthCommandResult extends PDACommandResult {
-
+
final public int fDepth;
-
+
PDAStackDepthCommandResult(String response) {
super(response);
int depth = 1; // default to something that won't cause NPEs
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStartedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStartedEvent.java
index 39b21876a..7c260a1d2 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStartedEvent.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStartedEvent.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -12,19 +12,19 @@
package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Started event generated when a new thread is started. A started event
+ * Started event generated when a new thread is started. A started event
* is always sent for the first thread when a PDA program is started.
- *
+ *
* <pre>
* E: started {thread_id}
* </pre>
*/
public class PDAStartedEvent extends PDARunControlEvent {
-
+
public PDAStartedEvent(String message) {
super(message);
}
-
+
public static boolean isEventMessage(String message) {
return message.startsWith("started"); //$NON-NLS-1$
}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepCommand.java
index f767ba746..d394d1a43 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,21 +13,21 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Executes next instruction
- *
+ * Executes next instruction
+ *
* <pre>
* If VM running:
* C: step {thread_id}
* R: ok
* E: resumed {thread_id} step
* E: suspended {thread_id} step
- *
+ *
* If VM suspended:
* C: step {thread_id}
* R: ok
* E: vmresumed step
* E: vmsuspended {thread_id} step
- *
+ *
* Errors:
* error: invalid thread
* </pre>
@@ -38,7 +38,7 @@ public class PDAStepCommand extends PDACommand {
public PDAStepCommand(int threadId) {
super("step " + threadId); //$NON-NLS-1$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepReturnCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepReturnCommand.java
index 443513878..6a8b1c9f7 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepReturnCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAStepReturnCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,22 +13,22 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Single step forward until the next <code>return</code> op code. Stop before
- * executing the <code>return</code> .
- *
+ * Single step forward until the next <code>return</code> op code. Stop before
+ * executing the <code>return</code> .
+ *
* <pre>
* If VM running:
* C: stepreturn {thread_id}
* R: ok
* E: resumed {thread_id} client
* E: suspended {thread_id} step
- *
+ *
* If VM suspended:
* C: stepreturn {thread_id}
* R: ok
* E: vmresumed client
* E: vmsuspended {thread_id} step
- *
+ *
* Errors:
* error: invalid thread
* </pre>
@@ -39,7 +39,7 @@ public class PDAStepReturnCommand extends PDACommand {
public PDAStepReturnCommand(int threadId) {
super("stepreturn " + threadId); //$NON-NLS-1$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendCommand.java
index 2100c4b11..ecf864b22 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,14 +13,14 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Suspends execution of a single thread. Can be issued only if the virtual
+ * Suspends execution of a single thread. Can be issued only if the virtual
* machine is running.
- *
+ *
* <pre>
* C: suspend {thread_id}
* R: ok
* E: suspended {thread_id} client
- *
+ *
* Errors:
* error: invalid thread
error: vm already suspended
@@ -33,7 +33,7 @@ public class PDASuspendCommand extends PDACommand {
public PDASuspendCommand(int threadId) {
super("suspend " + threadId); //$NON-NLS-1$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendedEvent.java
index de6363391..f8d01349f 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendedEvent.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDASuspendedEvent.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,11 +13,11 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
* Suspended event generated when a thread is suspended.
- *
+ *
* <pre>
* E: suspended {thread_id} [reason]
* </pre>
- *
+ *
* <code>[reason]</code> is the cause of the suspension and it's optional:
* <ul>
* <li><code>breakpoint N</code> - a breakpoint at line <code>N</code> was hit</li>
@@ -33,11 +33,11 @@ package org.eclipse.debug.examples.core.pda.protocol;
*/
public class PDASuspendedEvent extends PDARunControlEvent {
-
+
public PDASuspendedEvent(String message) {
super(message);
}
-
+
public static boolean isEventMessage(String message) {
return message.startsWith("suspended"); //$NON-NLS-1$
}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminateCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminateCommand.java
index 4f4ad3932..93fe3860a 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminateCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminateCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -14,7 +14,7 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
* Instructs the debugger to terminate.
- *
+ *
* <pre>
* C: terminate
* R: ok
@@ -27,7 +27,7 @@ public class PDATerminateCommand extends PDACommand {
public PDATerminateCommand() {
super("terminate"); //$NON-NLS-1$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminatedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminatedEvent.java
index d3aa4a2a0..3b95f94b5 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminatedEvent.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDATerminatedEvent.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,17 +13,17 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
* Terminated event generated when the PDA program has ended execution.
- *
+ *
* <pre>
* E: termianted
* </pre>
*/
public class PDATerminatedEvent extends PDAEvent {
-
+
public PDATerminatedEvent(String message) {
super(message);
}
-
+
public static boolean isEventMessage(String message) {
return message.startsWith("terminated"); //$NON-NLS-1$
}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAUnimplementedInstructionEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAUnimplementedInstructionEvent.java
index 90e0103e9..4f866d1d8 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAUnimplementedInstructionEvent.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAUnimplementedInstructionEvent.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -12,27 +12,27 @@
package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Unimplemented Instruction event generated when the PDA program encounters
+ * Unimplemented Instruction event generated when the PDA program encounters
* an instruction that it does not recognize. This event is usually followed
* by a VM Suspended event.
- *
+ *
* <pre>
* E: unimplemented instruction {label}
* </pre>
*/
public class PDAUnimplementedInstructionEvent extends PDAEvent {
-
+
public final String fOperation;
-
+
public PDAUnimplementedInstructionEvent(String message) {
super(message);
fOperation = message.substring(getName(message).length() + 1);
}
-
+
public static boolean isEventMessage(String message) {
return message.startsWith("unimplemented instruction"); //$NON-NLS-1$
}
-
+
@Override
protected String getName(String message) {
if (isEventMessage(message)) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumeCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumeCommand.java
index 43c726ed0..8f917e2ce 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumeCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumeCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,13 +13,13 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Resumes the execution of the whole virtual machine
- *
+ * Resumes the execution of the whole virtual machine
+ *
* <pre>
* C: vmresume
* R: ok
* E: vmresumed client
- *
+ *
* Errors:
* error: vm already running
* </pre>
@@ -30,7 +30,7 @@ public class PDAVMResumeCommand extends PDACommand {
public PDAVMResumeCommand() {
super("vmresume"); //$NON-NLS-1$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumedEvent.java
index 056270d61..a679a5e0d 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumedEvent.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMResumedEvent.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -12,13 +12,13 @@
package org.eclipse.debug.examples.core.pda.protocol;
/**
- * VM Resumed event generated when the whole virtual machine is resumed. When
- * the VM is resumed all previously suspended threads are resumed as well.
- *
+ * VM Resumed event generated when the whole virtual machine is resumed. When
+ * the VM is resumed all previously suspended threads are resumed as well.
+ *
* <pre>
* E: vmresumed [reason]
* </pre>
- *
+ *
* <code>[reason]</code> is the cause of the resume: and it's optional:
* <ul>
* <li><code>step</code> - a step request has been initiated</li>
@@ -26,11 +26,11 @@ package org.eclipse.debug.examples.core.pda.protocol;
* </ul>
*/
public class PDAVMResumedEvent extends PDARunControlEvent {
-
+
public PDAVMResumedEvent(String message) {
super(message);
}
-
+
public static boolean isEventMessage(String message) {
return message.startsWith("vmresumed"); //$NON-NLS-1$
}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMStartedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMStartedEvent.java
index 27d519105..9b4520d41 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMStartedEvent.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMStartedEvent.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -12,19 +12,19 @@
package org.eclipse.debug.examples.core.pda.protocol;
/**
- * VM started event generated when the the interpreter has started (guaranteed
+ * VM started event generated when the the interpreter has started (guaranteed
* to be the first event sent)
- *
+ *
* <pre>
* E: vmstarted
* </pre>
*/
public class PDAVMStartedEvent extends PDAEvent {
-
+
public PDAVMStartedEvent(String message) {
super(message);
}
-
+
public static boolean isEventMessage(String message) {
return message.startsWith("vmstarted"); //$NON-NLS-1$
}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendCommand.java
index d65d07dd0..03be38ebf 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,13 +13,13 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Suspends the execution of the whole virtual machine
- *
+ * Suspends the execution of the whole virtual machine
+ *
* <pre>
* C: vmsuspend
* R: ok
* E: vmsuspended client
- *
+ *
* Errors:
* error: thread already suspended
* </pre>
@@ -30,7 +30,7 @@ public class PDAVMSuspendCommand extends PDACommand {
public PDAVMSuspendCommand() {
super("vmsuspend"); //$NON-NLS-1$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendedEvent.java
index eac42a107..39d52fc35 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendedEvent.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMSuspendedEvent.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,13 +13,13 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
* VM Suspended event generated when the virtual machine is suspended. If the VM
- * is suspended as a result of a thread event (e.g. thread hitting a breakpoint),
+ * is suspended as a result of a thread event (e.g. thread hitting a breakpoint),
* then the thread_id is included in the event.
- *
+ *
* <pre>
* E: vmsuspended [thread_id] {reason}
* </pre>
- *
+ *
* <code>{reason}</code> is the cause of the suspension:
* <ul>
* <li><code>breakpoint N</code> - a breakpoint at line <code>N</code> was hit</li>
@@ -34,11 +34,11 @@ package org.eclipse.debug.examples.core.pda.protocol;
* </ul>
*/
public class PDAVMSuspendedEvent extends PDARunControlEvent {
-
+
public PDAVMSuspendedEvent(String message) {
super(message);
}
-
+
public static boolean isEventMessage(String message) {
return message.startsWith("vmsuspended"); //$NON-NLS-1$
}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMTerminatedEvent.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMTerminatedEvent.java
index b73884746..5756e16d5 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMTerminatedEvent.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVMTerminatedEvent.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -12,17 +12,17 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
* Terminated event generated when the PDA program has ended execution.
- *
+ *
* <pre>
* E: termianted
* </pre>
*/
public class PDAVMTerminatedEvent extends PDAEvent {
-
+
public PDAVMTerminatedEvent(String message) {
super(message);
}
-
+
public static boolean isEventMessage(String message) {
return message.startsWith("vmterminated"); //$NON-NLS-1$
}
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVarCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVarCommand.java
index cab160251..203a9c2bf 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVarCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAVarCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,14 +13,14 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Return the contents of variable <code>variable_name</code> in the control
- * stack frame <code>frame_number</code> (stack frames are indexed from 0, 0
- * being the oldest).
- *
+ * Return the contents of variable <code>variable_name</code> in the control
+ * stack frame <code>frame_number</code> (stack frames are indexed from 0, 0
+ * being the oldest).
+ *
* <pre>
* C: var {thread_id} {frame_number} {variable_name}
* R: {variable_value}
- *
+ *
* Errors:
* error: invalid thread
* error: variable undefined
@@ -32,7 +32,7 @@ public class PDAVarCommand extends PDACommand {
public PDAVarCommand(int threadId, int frameId, String name) {
super("var " + threadId + " " + frameId + " " + name); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAWatchCommand.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAWatchCommand.java
index 1440049ff..e8038bfed 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAWatchCommand.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/protocol/PDAWatchCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -13,11 +13,11 @@ package org.eclipse.debug.examples.core.pda.protocol;
/**
- * Set a watchpoint on variable <code>variable_name</code> in function
- * <code>function</code> to magic value <code>watch_operation</code>. The magic
- * value is a bit flag corresponding to read access (1), write access (2), or
+ * Set a watchpoint on variable <code>variable_name</code> in function
+ * <code>function</code> to magic value <code>watch_operation</code>. The magic
+ * value is a bit flag corresponding to read access (1), write access (2), or
* both (3); the magic value 0 clears the watchpoint.
- *
+ *
* <pre>
* C: watch {function}::{variable_name} {watch_operation}
* R: ok
@@ -32,11 +32,11 @@ public class PDAWatchCommand extends PDACommand {
public static final int WRITE = 2;
public static final int BOTH = READ | WRITE;
public static final int NONE = 0;
-
+
public PDAWatchCommand(String function, String variable, int operation) {
super("watch " + function+ "::" + variable + " " + operation); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
-
+
@Override
public PDACommandResult createResult(String resultText) {
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupDirector.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupDirector.java
index 83b1bc57a..a5be0f045 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupDirector.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupDirector.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -16,7 +16,7 @@ import org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant;
/**
* PDA source lookup director. For PDA source lookup there is one source
- * lookup participant.
+ * lookup participant.
*/
public class PDASourceLookupDirector extends AbstractSourceLookupDirector {
/* (non-Javadoc)
@@ -25,7 +25,7 @@ public class PDASourceLookupDirector extends AbstractSourceLookupDirector {
@Override
public void initializeParticipants() {
//#ifdef ex4
-//# // TODO: Exercise 4 - add our participant to this director
+//# // TODO: Exercise 4 - add our participant to this director
//#else
addParticipants(new ISourceLookupParticipant[]{new PDASourceLookupParticipant()});
//#endif
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupParticipant.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupParticipant.java
index 7326ad37c..0d7aaa979 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupParticipant.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourceLookupParticipant.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -17,8 +17,8 @@ import org.eclipse.debug.examples.core.pda.model.PDAStackFrame;
/**
- * The PDA source lookup participant knows how to translate a
- * PDA stack frame into a source file name
+ * The PDA source lookup participant knows how to translate a
+ * PDA stack frame into a source file name
*/
public class PDASourceLookupParticipant extends AbstractSourceLookupParticipant {
/* (non-Javadoc)
@@ -28,7 +28,7 @@ public class PDASourceLookupParticipant extends AbstractSourceLookupParticipant
public String getSourceName(Object object) throws CoreException {
//#ifdef ex4
//# // TODO: Exercise 4 - return the name of the source file for the given stack frame
-//# return null;
+//# return null;
//#else
if (object instanceof PDAStackFrame) {
return ((PDAStackFrame)object).getSourceName();
diff --git a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourcePathComputerDelegate.java b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourcePathComputerDelegate.java
index 208a5a4b4..5d3143936 100644
--- a/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourcePathComputerDelegate.java
+++ b/org.eclipse.debug.examples.core/src/org/eclipse/debug/examples/core/pda/sourcelookup/PDASourcePathComputerDelegate.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -29,13 +29,13 @@ import org.eclipse.debug.examples.core.pda.DebugCorePlugin;
/**
* Computes the default source lookup path for a PDA launch configuration.
- * The default source lookup path is the folder or project containing
+ * The default source lookup path is the folder or project containing
* the PDA program being launched. If the program is not specified, the workspace
* is searched by default.
*/
public class PDASourcePathComputerDelegate implements ISourcePathComputerDelegate {
-
-
+
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.core.sourcelookup.ISourcePathComputerDelegate#computeSourceContainers(org.eclipse.debug.core.ILaunchConfiguration, org.eclipse.core.runtime.IProgressMonitor)
*/
diff --git a/org.eclipse.debug.examples.memory/META-INF/MANIFEST.MF b/org.eclipse.debug.examples.memory/META-INF/MANIFEST.MF
index d3cfb9825..7fc441a8c 100644
--- a/org.eclipse.debug.examples.memory/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.examples.memory/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.debug.examples.memory;singleton:=true
-Bundle-Version: 1.101.0.qualifier
+Bundle-Version: 1.101.100.qualifier
Bundle-ClassPath: bin/
Bundle-Activator: org.eclipse.debug.examples.internal.memory.MemoryViewSamplePlugin
Bundle-Vendor: %Bundle-Vendor
diff --git a/org.eclipse.debug.examples.memory/pom.xml b/org.eclipse.debug.examples.memory/pom.xml
index ecc75cf0e..f3e0555e8 100644
--- a/org.eclipse.debug.examples.memory/pom.xml
+++ b/org.eclipse.debug.examples.memory/pom.xml
@@ -14,10 +14,10 @@
<parent>
<artifactId>eclipse.platform.debug</artifactId>
<groupId>eclipse.platform.debug</groupId>
- <version>4.7.1-SNAPSHOT</version>
+ <version>4.8.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.debug</groupId>
<artifactId>org.eclipse.debug.examples.memory</artifactId>
- <version>1.101.0-SNAPSHOT</version>
+ <version>1.101.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/MemoryViewSamplePlugin.java b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/MemoryViewSamplePlugin.java
index 180f71173..8699d376c 100644
--- a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/MemoryViewSamplePlugin.java
+++ b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/MemoryViewSamplePlugin.java
@@ -116,7 +116,7 @@ public class MemoryViewSamplePlugin extends AbstractUIPlugin {
* Declares a workbench image given the path of the image file (relative to
* the workbench plug-in). This is a helper method that creates the image
* descriptor and passes it to the main <code>declareImage</code> method.
- *
+ *
* @param symbolicName the symbolic name of the image
* @param path the path of the image file relative to the base of the
* workbench plug-ins install directory <code>false</code> if
diff --git a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleDebugTarget.java b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleDebugTarget.java
index 4470d7e7d..8b3ff934a 100644
--- a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleDebugTarget.java
+++ b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleDebugTarget.java
@@ -47,7 +47,7 @@ public class SampleDebugTarget extends DebugElement implements IDebugTarget, IMe
/**
* Creates SampleDebugTarget
- *
+ *
* @param launch the launch this debug target belongs to
*/
public SampleDebugTarget(ILaunch launch) {
@@ -259,7 +259,7 @@ public class SampleDebugTarget extends DebugElement implements IDebugTarget, IMe
/**
* Remove the memory block from this debug session.
- *
+ *
* @param memBlk
*/
public void removeMemoryBlock(IMemoryBlock memBlk) {
diff --git a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleMemoryBlock.java b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleMemoryBlock.java
index 09c9b9ef8..6a93b4dee 100644
--- a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleMemoryBlock.java
+++ b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleMemoryBlock.java
@@ -31,7 +31,7 @@ import org.eclipse.jface.viewers.IColorProvider;
/**
* Memory Block Implementation
- *
+ *
*/
public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExtension {
@@ -45,7 +45,7 @@ public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExten
/**
* Creates memory block
- *
+ *
* @param debugTarget
* @param expression
* @param address
@@ -338,7 +338,7 @@ public class SampleMemoryBlock extends DebugElement implements IMemoryBlockExten
}
/**
- *
+ *
*/
private void fireContentChangeEvent() {
DebugEvent evt = new DebugEvent(this, DebugEvent.CHANGE);
diff --git a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleStackFrame.java b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleStackFrame.java
index 4b23904d2..17e890be9 100644
--- a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleStackFrame.java
+++ b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleStackFrame.java
@@ -21,7 +21,7 @@ import org.eclipse.debug.core.model.IVariable;
import org.eclipse.osgi.util.NLS;
/**
- *
+ *
*
*/
public class SampleStackFrame extends DebugElement implements IStackFrame {
@@ -33,7 +33,7 @@ public class SampleStackFrame extends DebugElement implements IStackFrame {
/**
* Constructs a SampleStackFrame
- *
+ *
* @param thread
* @param name
*/
diff --git a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleThread.java b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleThread.java
index 6e72a6f68..a94f295a9 100644
--- a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleThread.java
+++ b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/core/SampleThread.java
@@ -21,7 +21,7 @@ import org.eclipse.debug.core.model.IThread;
/**
* Abstract Sample Thread
- *
+ *
*/
public class SampleThread extends DebugElement implements IThread {
@@ -29,7 +29,7 @@ public class SampleThread extends DebugElement implements IThread {
/**
* Constructs SampleThread
- *
+ *
* @param target
*/
public SampleThread(SampleDebugTarget target) {
diff --git a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/engine/SampleEngine.java b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/engine/SampleEngine.java
index e96c2bcd3..7416b357f 100644
--- a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/engine/SampleEngine.java
+++ b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/engine/SampleEngine.java
@@ -41,7 +41,7 @@ public class SampleEngine {
/**
* Allow debug adapters to get memory from an address
- *
+ *
* @param address
* @param length
* @return memory byte from an address
@@ -182,7 +182,7 @@ public class SampleEngine {
/**
* Simulates evaluation of an expression. Given an expression, return ad
* address
- *
+ *
* @param expression
* @param evalContext
* @return the address the expression is evaluated to
@@ -205,7 +205,7 @@ public class SampleEngine {
/**
* Simulates checking if storage retrieval is supported
- *
+ *
* @return if the engine supports storage retrieval
*/
public boolean supportsStorageRetrieval() {
@@ -214,7 +214,7 @@ public class SampleEngine {
/**
* Simulates modifying memory using BigInteger as the address
- *
+ *
* @param address
* @param bytes
* @throws RuntimeException
@@ -319,7 +319,7 @@ public class SampleEngine {
}
/**
- *
+ *
*/
private SampleStackFrame[] createStackframes(SampleThread thread) {
SampleStackFrame[] stackframes = new SampleStackFrame[2];
@@ -339,7 +339,7 @@ public class SampleEngine {
/**
* Sets the base address of this memory block
- *
+ *
* @param mb the memory block to change base address
* @param address the new base address of the memory block
* @throws CoreException
diff --git a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/engine/SampleMemoryUnit.java b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/engine/SampleMemoryUnit.java
index 95bb97c9f..72e2c664b 100644
--- a/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/engine/SampleMemoryUnit.java
+++ b/org.eclipse.debug.examples.memory/src/org/eclipse/debug/examples/internal/memory/engine/SampleMemoryUnit.java
@@ -15,7 +15,7 @@ import org.eclipse.debug.core.model.MemoryByte;
/**
* For testing addressable size > 1. Group each addressable unit in a MemoryByte
* array.
- *
+ *
*/
public class SampleMemoryUnit {
diff --git a/org.eclipse.debug.examples.mixedmode/META-INF/MANIFEST.MF b/org.eclipse.debug.examples.mixedmode/META-INF/MANIFEST.MF
index 279575ce1..f439bc76b 100755
--- a/org.eclipse.debug.examples.mixedmode/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.examples.mixedmode/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.debug.examples.mixedmode;singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.1.100.qualifier
Bundle-Activator: org.eclipse.debug.internal.examples.mixedmode.Activator
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: org.eclipse.ui,
diff --git a/org.eclipse.debug.examples.mixedmode/pom.xml b/org.eclipse.debug.examples.mixedmode/pom.xml
index 10819e59c..bef7e38c0 100644
--- a/org.eclipse.debug.examples.mixedmode/pom.xml
+++ b/org.eclipse.debug.examples.mixedmode/pom.xml
@@ -14,10 +14,10 @@
<parent>
<artifactId>eclipse.platform.debug</artifactId>
<groupId>eclipse.platform.debug</groupId>
- <version>4.7.1-SNAPSHOT</version>
+ <version>4.8.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.debug</groupId>
<artifactId>org.eclipse.debug.examples.mixedmode</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.debug.examples.mixedmode/src/org/eclipse/debug/internal/examples/mixedmode/Activator.java b/org.eclipse.debug.examples.mixedmode/src/org/eclipse/debug/internal/examples/mixedmode/Activator.java
index 1f8428f4e..225de429b 100755
--- a/org.eclipse.debug.examples.mixedmode/src/org/eclipse/debug/internal/examples/mixedmode/Activator.java
+++ b/org.eclipse.debug.examples.mixedmode/src/org/eclipse/debug/internal/examples/mixedmode/Activator.java
@@ -56,7 +56,7 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the shared instance
- *
+ *
* @return the shared instance
*/
public static Activator getDefault() {
diff --git a/org.eclipse.debug.examples.mixedmode/src/org/eclipse/debug/internal/examples/mixedmode/DoNothingLaunchConfigurationDelegate.java b/org.eclipse.debug.examples.mixedmode/src/org/eclipse/debug/internal/examples/mixedmode/DoNothingLaunchConfigurationDelegate.java
index 73dabeae5..0b41fca33 100644
--- a/org.eclipse.debug.examples.mixedmode/src/org/eclipse/debug/internal/examples/mixedmode/DoNothingLaunchConfigurationDelegate.java
+++ b/org.eclipse.debug.examples.mixedmode/src/org/eclipse/debug/internal/examples/mixedmode/DoNothingLaunchConfigurationDelegate.java
@@ -22,7 +22,7 @@ import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
public class DoNothingLaunchConfigurationDelegate implements ILaunchConfigurationDelegate {
/**
- *
+ *
*/
public DoNothingLaunchConfigurationDelegate() {
}
diff --git a/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF b/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF
index 6e77a407f..5a0224f72 100644
--- a/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.debug.examples.ui;singleton:=true
-Bundle-Version: 1.5.0.qualifier
+Bundle-Version: 1.5.100.qualifier
Bundle-Activator: org.eclipse.debug.examples.ui.pda.DebugUIPlugin
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.11.0,4.0.0)",
org.eclipse.core.resources,
diff --git a/org.eclipse.debug.examples.ui/pom.xml b/org.eclipse.debug.examples.ui/pom.xml
index 2fd462af0..096c4be00 100644
--- a/org.eclipse.debug.examples.ui/pom.xml
+++ b/org.eclipse.debug.examples.ui/pom.xml
@@ -14,10 +14,10 @@
<parent>
<artifactId>eclipse.platform.debug</artifactId>
<groupId>eclipse.platform.debug</groupId>
- <version>4.7.1-SNAPSHOT</version>
+ <version>4.8.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.debug</groupId>
<artifactId>org.eclipse.debug.examples.ui</artifactId>
- <version>1.5.0-SNAPSHOT</version>
+ <version>1.5.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/CheckboxModelProxyFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/CheckboxModelProxyFactory.java
index ff95f9fc1..71647c06f 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/CheckboxModelProxyFactory.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/CheckboxModelProxyFactory.java
@@ -20,7 +20,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationCont
public class CheckboxModelProxyFactory implements IModelProxyFactory {
private MidiEventModelProxy fMidiEventProxy = new MidiEventModelProxy();
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory#createModelProxy(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
@@ -33,7 +33,7 @@ public class CheckboxModelProxyFactory implements IModelProxyFactory {
return fMidiEventProxy;
}
}
-
+
return null;
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlCellModifier.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlCellModifier.java
index 214aba225..0a252913e 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlCellModifier.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlCellModifier.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -17,11 +17,11 @@ import org.eclipse.jface.viewers.ICellModifier;
* A cell modifier for a sequencer control. Provides current
* values of controls and updates control values in the sequencer
* as they are changed in the UI.
- *
+ *
* @since 1.0
*/
public class ControlCellModifier implements ICellModifier {
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ICellModifier#canModify(java.lang.Object, java.lang.String)
*/
@@ -60,7 +60,7 @@ public class ControlCellModifier implements ICellModifier {
if (element instanceof SequencerControl) {
if (value instanceof String) {
SequencerControl control = (SequencerControl) element;
- control.setValue((String) value);
+ control.setValue((String) value);
}
}
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEditor.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEditor.java
index a76fc406e..ce57c5061 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEditor.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEditor.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -19,7 +19,7 @@ import org.eclipse.swt.widgets.Composite;
/**
* Provides cell editors and modifiers for sequencer controls.
- *
+ *
* @since 1.0
*/
public class ControlEditor implements IElementEditor {
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java
index 0d5d262de..7f429d225 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,7 @@ import org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler;
/**
* Listens to events from sequencer controls and fires corresponding
* deltas to update the viewer.
- *
+ *
* @since 1.0
*/
public class ControlEventHandler extends DebugEventHandler {
@@ -32,12 +32,12 @@ public class ControlEventHandler extends DebugEventHandler {
* Associated launch
*/
private MidiLaunch fLaunch;
-
+
/**
* Timer used to update clock
*/
private Timer fTimer;
-
+
/**
* @param proxy
*/
@@ -45,7 +45,7 @@ public class ControlEventHandler extends DebugEventHandler {
super(proxy);
fLaunch = proxy.getMidiLaunch();
}
-
+
protected void init() {
if (!fLaunch.isSuspended() && !fLaunch.isTerminated() && !fLaunch.isDisconnected()) {
startTimer();
@@ -59,7 +59,7 @@ public class ControlEventHandler extends DebugEventHandler {
protected boolean handlesEvent(DebugEvent event) {
return true;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler#dispose()
*/
@@ -115,8 +115,8 @@ public class ControlEventHandler extends DebugEventHandler {
fTimer = null;
}
}
-
-
-
-
+
+
+
+
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlLabelProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlLabelProvider.java
index 7daab2a8b..404281e70 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlLabelProvider.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlLabelProvider.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -18,7 +18,7 @@ import org.eclipse.jface.viewers.TreePath;
/**
* Label provider for a sequencer control.
- *
+ *
* @since 1.0
*/
public class ControlLabelProvider extends ElementLabelProvider {
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java
index 6197cda6f..76f0b1a5d 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -18,7 +18,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationCont
/**
* Provides mementos for sequencer elements.
- *
+ *
* @since 1.0
*/
public class ControlsMementoProvider extends DebugElementMementoProvider {
@@ -37,6 +37,6 @@ public class ControlsMementoProvider extends DebugElementMementoProvider {
return null;
}
-
+
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiAdapterFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiAdapterFactory.java
index db3b6ab71..8e4964aa6 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiAdapterFactory.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiAdapterFactory.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Patrick Chuong (Texas Instruments) - Checkbox support for Flexible Hierachy view (Bug 286310)
@@ -28,27 +28,27 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactor
/**
* Adapter factory for MIDI elements.
- *
+ *
* @since 1.0
*/
public class MidiAdapterFactory implements IAdapterFactory {
private static IElementContentProvider fgSequencerContentProvider = new SequencerContentProvider();
private static IElementContentProvider fgTackContentProvider = new TrackContentProvider();
-
+
private static IElementLabelProvider fgTrackLabelProvider = new TrackLabelProvider();
private static IElementLabelProvider fgControlLabelProvider = new ControlLabelProvider();
private static IElementLabelProvider fgMidiEventLabelProvdier = new MidiEventLabelProvider();
-
+
private static IColumnPresentationFactory fgSequencerColumnFactory = new SequencerColumnFactory();
private static IColumnPresentationFactory fgTrackColumnFactory = new TrackColumnFactory();
-
+
private static IModelProxyFactory fgSequencerModelProxyFactory = new SequencerModelProxyFactory();
-
+
private static IElementMementoProvider fgMementoProvider = new ControlsMementoProvider();
-
+
private static IStepOverHandler fgStepOverHandler = new MidiStepOverHandler();
-
+
private static IModelProxyFactory fgCheckboxModelProxyFactory = new CheckboxModelProxyFactory();
@SuppressWarnings("unchecked")
@@ -73,7 +73,7 @@ public class MidiAdapterFactory implements IAdapterFactory {
return (T) fgMidiEventLabelProvdier;
}
}
-
+
if (IColumnPresentationFactory.class.equals(adapterType)) {
if (adaptableObject instanceof MidiLaunch) {
return (T) fgSequencerColumnFactory;
@@ -87,7 +87,7 @@ public class MidiAdapterFactory implements IAdapterFactory {
return (T) new ControlEditor();
}
}
-
+
if (IModelProxyFactory.class.equals(adapterType)) {
if (adaptableObject instanceof MidiLaunch) {
return (T) fgSequencerModelProxyFactory;
@@ -103,7 +103,7 @@ public class MidiAdapterFactory implements IAdapterFactory {
if (IStepOverHandler.class.equals(adapterType)) {
return (T) fgStepOverHandler;
}
-
+
return null;
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiStepOverHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiStepOverHandler.java
index 30d11b260..629ce749f 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiStepOverHandler.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiStepOverHandler.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnFactory.java
index 3fdde0f0f..52ae651ae 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnFactory.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnFactory.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Patrick Chuong (Texas Instruments) - Checkbox support for Flexible Hierachy view (Bug 286310)
@@ -19,7 +19,7 @@ import org.eclipse.debug.ui.IDebugUIConstants;
/**
* Column presentation factory for a sequencer.
- *
+ *
* @since 1.0
*/
public class SequencerColumnFactory implements IColumnPresentationFactory {
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnPresentation.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnPresentation.java
index 3672fcb46..22f6244cf 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnPresentation.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnPresentation.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -14,7 +14,7 @@ import org.eclipse.debug.internal.ui.viewers.provisional.AbstractColumnPresentat
/**
* Columns for sequencer in the variables view.
- *
+ *
* @since 1.0
*/
public class SequencerColumnPresentation extends AbstractColumnPresentation {
@@ -34,7 +34,7 @@ public class SequencerColumnPresentation extends AbstractColumnPresentation {
* Column presentation ID.
*/
public static final String ID = "org.eclipse.debug.examples.ui.midi.columnPresentation"; //$NON-NLS-1$
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getAvailableColumns()
*/
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java
index 149ec9df6..234e44fac 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -26,7 +26,7 @@ import org.eclipse.debug.ui.IDebugUIConstants;
/**
* Provides content for a MIDI sequencer element (MIDI launch).
- *
+ *
* @since 1.0
*/
public class SequencerContentProvider extends ElementContentProvider {
@@ -59,10 +59,10 @@ public class SequencerContentProvider extends ElementContentProvider {
}
return EMPTY;
}
-
+
/**
* Returns the controls for this sequencer.
- *
+ *
* @param launch midi launch
* @return controls
*/
@@ -73,10 +73,10 @@ public class SequencerContentProvider extends ElementContentProvider {
new LengthControl(launch)
};
}
-
+
/**
* Returns all tracks in the sequence.
- *
+ *
* @param launch MIDI launch
*@return tracks
*/
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java
index a6b0338a9..2c8e12d20 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,7 +23,7 @@ import org.eclipse.jface.viewers.Viewer;
* Model proxy for a sequencer in the variables view. Listens
* to events from controls to update the viewer when the user
* changes a control's value.
- *
+ *
* @since 1.0
*/
public class SequencerControlsModelProxy extends EventHandlerModelProxy {
@@ -32,22 +32,22 @@ public class SequencerControlsModelProxy extends EventHandlerModelProxy {
* Associated launch
*/
private MidiLaunch fLaunch;
-
+
/**
* Event handler
*/
private ControlEventHandler fHandler;
-
+
/**
* Constructs a model proxy to update based on changes in controls
* for the associated sequencer.
- *
+ *
* @param launch MIDI launch
*/
public SequencerControlsModelProxy(MidiLaunch launch) {
fLaunch = launch;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy#installed(org.eclipse.jface.viewers.Viewer)
*/
@@ -59,13 +59,13 @@ public class SequencerControlsModelProxy extends EventHandlerModelProxy {
/**
* Returns the launch assocaited with this proxy.
- *
+ *
* @return MIDI launch
*/
protected MidiLaunch getMidiLaunch() {
return fLaunch;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.update.EventHandlerModelProxy#createEventHandlers()
*/
@@ -91,9 +91,9 @@ public class SequencerControlsModelProxy extends EventHandlerModelProxy {
}
return false;
}
-
-
-
-
+
+
+
+
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerModelProxyFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerModelProxyFactory.java
index 5955b8aa6..046e327b7 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerModelProxyFactory.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerModelProxyFactory.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -19,9 +19,9 @@ import org.eclipse.debug.internal.ui.viewers.update.LaunchProxy;
import org.eclipse.debug.ui.IDebugUIConstants;
/**
- * Factory to create a model proxy for sequencer controls in
+ * Factory to create a model proxy for sequencer controls in
* the variables view.
- *
+ *
* @since 1.0
*/
public class SequencerModelProxyFactory implements IModelProxyFactory {
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnFactory.java
index cc7727735..a2b606006 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnFactory.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnFactory.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Patrick Chuong (Texas Instruments) - Checkbox support for Flexible Hierachy view (Bug 286310)
@@ -19,7 +19,7 @@ import org.eclipse.debug.ui.IDebugUIConstants;
/**
* Column presentation factory for a track.
- *
+ *
* @since 1.0
*/
public class TrackColumnFactory implements IColumnPresentationFactory {
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnPresentation.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnPresentation.java
index bc51c663e..90e7b9eec 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnPresentation.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnPresentation.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -14,7 +14,7 @@ import org.eclipse.debug.internal.ui.viewers.provisional.AbstractColumnPresentat
/**
* Columns for sequencer in the variables view.
- *
+ *
* @since 1.0
*/
public class TrackColumnPresentation extends AbstractColumnPresentation {
@@ -31,7 +31,7 @@ public class TrackColumnPresentation extends AbstractColumnPresentation {
* All columns
*/
public static final String[] COLUMN_IDS = new String[]{COL_TICK, COL_BYTES, COL_COMMAND, COL_CHANNEL};
-
+
/**
* Initial columns
*/
@@ -41,7 +41,7 @@ public class TrackColumnPresentation extends AbstractColumnPresentation {
* Column presentation ID.
*/
public static final String ID = "org.eclipse.debug.examples.ui.midi.trackColumns"; //$NON-NLS-1$
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getAvailableColumns()
*/
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackContentProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackContentProvider.java
index 04ace9c2e..96005d0b5 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackContentProvider.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackContentProvider.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Patrick Chuong (Texas Instruments) - Checkbox support for Flexible Hierachy view (Bug 286310)
@@ -24,7 +24,7 @@ import org.eclipse.debug.ui.IDebugUIConstants;
/**
* Content provider for track in the variables view. Returns MIDI events
* in the track.
- *
+ *
* @since 1.0
*/
public class TrackContentProvider extends ElementContentProvider {
@@ -50,7 +50,7 @@ public class TrackContentProvider extends ElementContentProvider {
Track track = (Track) parent;
MidiEvent[] events= new MidiEvent[length];
for (int i = 0; i < length; i++) {
- events[i] = track.get(i+index);
+ events[i] = track.get(i+index);
}
return events;
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java
index 14c80acdf..a1b854795 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -20,7 +20,7 @@ import org.eclipse.jface.viewers.TreePath;
/**
* Provides labels for MIDI tracks.
- *
+ *
* @since 1.0
*/
public class TrackLabelProvider extends ElementLabelProvider {
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackModelProxy.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackModelProxy.java
index cb10aa824..0b701efad 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackModelProxy.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackModelProxy.java
@@ -20,23 +20,23 @@ import org.eclipse.jface.viewers.Viewer;
public class TrackModelProxy extends AbstractModelProxy {
protected Track fTrack;
-
+
public TrackModelProxy(Track track) {
fTrack = track;
}
-
+
@Override
public void installed(Viewer viewer) {
super.installed(viewer);
-
+
ModelDelta delta = new ModelDelta(fTrack, IModelDelta.NO_CHANGE);
for (int i = 0; i < fTrack.size(); ++i) {
delta.addNode(fTrack.get(i), IModelDelta.INSTALL);
}
-
+
fireModelChanged(delta);
}
-
+
@Override
public synchronized void dispose() {
super.dispose();
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java
index b34c8edc1..e6c7afb3b 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,11 +23,11 @@ import org.eclipse.ui.IWorkbenchPartSite;
/**
* A slider to control the clock position.
- *
+ *
* @since 1.0
*/
public class ClockSliderDetailPane implements IDetailPane {
-
+
private Slider fSlider;
private ClockControl fControl;
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/TempoSliderDetailPane.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/TempoSliderDetailPane.java
index bf13b8b8f..9395ff62b 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/TempoSliderDetailPane.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/TempoSliderDetailPane.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,11 +23,11 @@ import org.eclipse.ui.IWorkbenchPartSite;
/**
* A slider to control tempo.
- *
+ *
* @since 1.0
*/
public class TempoSliderDetailPane implements IDetailPane {
-
+
private Slider fSlider;
private TempoControl fControl;
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/ExampleLaunchStatusHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/ExampleLaunchStatusHandler.java
index 03b8672cc..01ee2d3bc 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/ExampleLaunchStatusHandler.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/ExampleLaunchStatusHandler.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java
index c7f1b3448..65d31bc13 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008, 2013 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -42,25 +42,25 @@ import org.eclipse.ui.dialogs.ResourceListSelectionDialog;
/**
* Tab to specify the MIDI file to play.
- *
+ *
* @since 1.0
*/
public class MidiMainTab extends AbstractLaunchConfigurationTab {
-
+
private Text fFileText;
private Button fFileButton;
-
+
private Button fExceptions;
private Button fHandled;
private Button fUnhandled;
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
*/
@Override
public void createControl(Composite parent) {
Font font = parent.getFont();
-
+
Composite comp = new Composite(parent, SWT.NONE);
setControl(comp);
GridLayout topLayout = new GridLayout();
@@ -68,15 +68,15 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
topLayout.numColumns = 3;
comp.setLayout(topLayout);
comp.setFont(font);
-
+
createVerticalSpacer(comp, 3);
-
+
Label programLabel = new Label(comp, SWT.NONE);
programLabel.setText("&Midi File:"); //$NON-NLS-1$
GridData gd = new GridData(GridData.BEGINNING);
programLabel.setLayoutData(gd);
programLabel.setFont(font);
-
+
fFileText = new Text(comp, SWT.SINGLE | SWT.BORDER);
gd = new GridData(GridData.FILL_HORIZONTAL);
fFileText.setLayoutData(gd);
@@ -87,7 +87,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
updateLaunchConfigurationDialog();
}
});
-
+
fFileButton = createPushButton(comp, "&Browse...", null); //$NON-NLS-1$
fFileButton.addSelectionListener(new SelectionAdapter() {
@Override
@@ -95,11 +95,11 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
browseMidiFiles();
}
});
-
+
new Label(comp, SWT.NONE);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 3;
-
+
Group test = new Group(comp, SWT.NONE);
test.setText("Exceptions"); //$NON-NLS-1$
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -132,7 +132,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
fUnhandled.setText("Throw an &unhandled exception during launch to open error dialog"); //$NON-NLS-1$
fUnhandled.addSelectionListener(sa);
}
-
+
/**
* Open a resource chooser to select a MIDI file
*/
@@ -145,7 +145,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
IFile file = (IFile) files[0];
fFileText.setText(file.getFullPath().toString());
}
-
+
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
@@ -197,7 +197,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
}
configuration.setAttribute(MidiLaunchDelegate.ATTR_MIDI_FILE, file);
configuration.setMappedResources(resources);
-
+
// exception handling
if (fExceptions.getSelection()) {
if (fHandled.getSelection()) {
@@ -209,7 +209,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
configuration.removeAttribute(MidiLaunchDelegate.ATTR_THROW_EXCEPTION);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
*/
@@ -217,7 +217,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
public String getName() {
return "Main"; //$NON-NLS-1$
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
*/
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiTabGroup.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiTabGroup.java
index 6678753a0..57e7f3a0f 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiTabGroup.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiTabGroup.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -17,7 +17,7 @@ import org.eclipse.debug.ui.ILaunchConfigurationTab;
/**
* Tab group for a MIDI file.
- *
+ *
* @since 1.0
*/
public class MidiTabGroup extends AbstractLaunchConfigurationTabGroup {
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/AddPDAMemoryBlockAction.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/AddPDAMemoryBlockAction.java
index 8ce7996f1..771222c8e 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/AddPDAMemoryBlockAction.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/AddPDAMemoryBlockAction.java
@@ -27,7 +27,7 @@ import org.eclipse.ui.IWorkbenchWindow;
* Action to add a memory block when a PDA debug target is selected
*/
public class AddPDAMemoryBlockAction implements IActionDelegate2{
-
+
public AddPDAMemoryBlockAction() {
}
@@ -49,12 +49,12 @@ public class AddPDAMemoryBlockAction implements IActionDelegate2{
}
}
}
-
+
}
-
+
/**
* Returns the selected debug target or <code>null</code>.
- *
+ *
* @param selection selection
* @return debug target from the selection or <code>null</code>
*/
@@ -102,5 +102,5 @@ public class AddPDAMemoryBlockAction implements IActionDelegate2{
run(action);
}
-
+
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/CommandAdapterFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/CommandAdapterFactory.java
index e3da52e57..346507e8f 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/CommandAdapterFactory.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/CommandAdapterFactory.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -16,9 +16,9 @@ import org.eclipse.debug.core.commands.IRestartHandler;
import org.eclipse.debug.examples.core.pda.model.PDADebugTarget;
/**
- * Adapter factory that provides debug command handler adapters for the
+ * Adapter factory that provides debug command handler adapters for the
* PDA debugger.
- *
+ *
* @since 3.6
*/
public class CommandAdapterFactory implements IAdapterFactory {
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/ModelProxyFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/ModelProxyFactory.java
index 4f5586ee1..d87c1460b 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/ModelProxyFactory.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/ModelProxyFactory.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetContentProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetContentProvider.java
index fad17ae43..cabfdea92 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetContentProvider.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetContentProvider.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Pawel Piech (Wind River) - ported PDA Virtual Machine to Java (Bug 261400)
@@ -37,7 +37,7 @@ public class PDADebugTargetContentProvider extends ElementContentProvider {
}
return 0;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#hasChildren(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetProxy.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetProxy.java
index 7aee1b507..6ffa7467d 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetProxy.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetProxy.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDARestartDebugCommand.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDARestartDebugCommand.java
index 41ff6c1de..246b14f4d 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDARestartDebugCommand.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDARestartDebugCommand.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -43,7 +43,7 @@ public class PDARestartDebugCommand extends AbstractDebugCommand implements IRes
@Override
protected boolean isExecutable(Object[] targets, IProgressMonitor monitor, IEnabledStateRequest request)
- throws CoreException
+ throws CoreException
{
for (int i = 0; i < targets.length; i++) {
if (((PDADebugTarget)targets[i]).isTerminated()) {
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAThreadEventHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAThreadEventHandler.java
index ed3082637..313de2c53 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAThreadEventHandler.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAThreadEventHandler.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -29,12 +29,12 @@ import org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler;
* @since 3.2
*/
public class PDAThreadEventHandler extends DebugEventHandler {
-
+
private IStackFrame fPrev = null;
-
+
/**
* Constructs and event handler for a threads in the given viewer.
- *
+ *
* @param viewer
*/
public PDAThreadEventHandler(AbstractModelProxy proxy) {
@@ -50,7 +50,7 @@ public class PDAThreadEventHandler extends DebugEventHandler {
}
fireDeltaUpdatingTopFrame(thread, IModelDelta.NO_CHANGE | extras);
}
-
+
private boolean isEqual(Object o1, Object o2) {
if (o1 == o2) {
return true;
@@ -93,7 +93,7 @@ public class PDAThreadEventHandler extends DebugEventHandler {
IThread thread = (IThread) event.getSource();
fireDeltaAndClearTopFrame(thread, IModelDelta.CONTENT);
}
-
+
private ModelDelta buildRootDelta() {
return new ModelDelta(getLaunchManager(), IModelDelta.NO_CHANGE);
}
@@ -101,7 +101,7 @@ public class PDAThreadEventHandler extends DebugEventHandler {
private ILaunchManager getLaunchManager() {
return DebugPlugin.getDefault().getLaunchManager();
}
-
+
protected ModelDelta addTarget(ModelDelta delta, IThread thread) {
ILaunch launch = thread.getLaunch();
Object[] children = launch.getChildren();
@@ -127,7 +127,7 @@ public class PDAThreadEventHandler extends DebugEventHandler {
}
fireDelta(delta);
}
-
+
private void fireDeltaUpdatingTopFrame(IThread thread, int flags) {
ModelDelta delta = buildRootDelta();
ModelDelta node = addTarget(delta, thread);
@@ -149,8 +149,8 @@ public class PDAThreadEventHandler extends DebugEventHandler {
fPrev = frame;
}
fireDelta(delta);
- }
-
+ }
+
@Override
protected boolean handlesEvent(DebugEvent event) {
return event.getSource() instanceof PDAThread;
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java
index 1486e78ff..4b5a0cc34 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2015 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -68,11 +68,11 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
public boolean canToggleLineBreakpoints(IWorkbenchPart part, ISelection selection) {
return getEditor(part) != null;
}
-
+
/**
* Returns the editor being used to edit a PDA file, associated with the
* given part, or <code>null</code> if none.
- *
+ *
* @param part workbench part
* @return the editor being used to edit a PDA file, associated with the
* given part, or <code>null</code> if none
@@ -88,9 +88,9 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
}
}
}
- return null;
+ return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleMethodBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
@@ -126,8 +126,8 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
public boolean canToggleWatchpoints(IWorkbenchPart part, ISelection selection) {
return getVariableAndFunctionName(part, selection) != null;
}
-
- protected void toggleWatchpoint(IResource resource, int lineNumber, String fcn, String var, boolean access,
+
+ protected void toggleWatchpoint(IResource resource, int lineNumber, String fcn, String var, boolean access,
boolean modification) throws CoreException
{
// look for existing watchpoint to delete
@@ -151,7 +151,7 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
/**
* Returns the variable and function names at the current line, or <code>null</code> if none.
- *
+ *
* @param part text editor
* @param selection text selection
* @return the variable and function names at the current line, or <code>null</code> if none.
@@ -168,7 +168,7 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
IRegion region = document.getLineInformationOfOffset(textSelection.getOffset());
String string = document.get(region.getOffset(), region.getLength()).trim();
if (string.startsWith("var ")) { //$NON-NLS-1$
- String varName = string.substring(4).trim();
+ String varName = string.substring(4).trim();
String fcnName = getFunctionName(document, varName, document.getLineOfOffset(textSelection.getOffset()));
return new String[] {varName, fcnName};
}
@@ -177,14 +177,14 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
} finally {
documentProvider.disconnect(this);
}
- }
+ }
return null;
}
-
+
/**
* Returns the name of the function containing the given variable defined at the given
* line number in the specified document.
- *
+ *
* @param document PDA source file
* @param varName variable name
* @param line line numbner at which the variable is defined
@@ -212,7 +212,7 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
}
return "_main_"; //$NON-NLS-1$
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#toggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
@@ -222,9 +222,9 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
toggleWatchpoints(part, selection);
} else {
toggleLineBreakpoints(part, selection);
- }
+ }
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#canToggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java
index 22243aabd..e0a1de6e8 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2015 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -50,7 +50,7 @@ public class PDAEditorAdapterFactory implements IAdapterFactory {
}
//#endif
}
- }
+ }
}
return null;
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDARunToLineAdapter.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDARunToLineAdapter.java
index 6a9eecdd9..36136b10f 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDARunToLineAdapter.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDARunToLineAdapter.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2015 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -35,7 +35,7 @@ import org.eclipse.ui.texteditor.ITextEditor;
* Run to line target for the Java debugger
*/
public class PDARunToLineAdapter implements IRunToLineTarget {
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IRunToLineTarget#runToLine(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection, org.eclipse.debug.core.model.ISuspendResume)
*/
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTarget.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTarget.java
index caa7fea92..928cc5415 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTarget.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTarget.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2008, 2015 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
@@ -41,12 +41,12 @@ public class PDAToggleWatchpointsTarget extends PDABreakpointAdapter {
final private boolean fAccessModeEnabled;
final private boolean fModificationModeEnabled;
-
+
PDAToggleWatchpointsTarget(boolean access, boolean modification) {
fAccessModeEnabled = access;
fModificationModeEnabled = modification;
}
-
+
@Override
public boolean canToggleWatchpoints(IWorkbenchPart part, ISelection selection) {
if (super.canToggleWatchpoints(part, selection)) {
@@ -59,16 +59,16 @@ public class PDAToggleWatchpointsTarget extends PDABreakpointAdapter {
}
return false;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleWatchpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
@Override
public void toggleWatchpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
String[] variableAndFunctionName = getVariableAndFunctionName(part, selection);
-
+
if (variableAndFunctionName != null && part instanceof ITextEditor && selection instanceof ITextSelection) {
- // Selection inside text editor. Create a watchpoint based on
+ // Selection inside text editor. Create a watchpoint based on
// current source line.
ITextEditor editorPart = (ITextEditor)part;
int lineNumber = ((ITextSelection)selection).getStartLine();
@@ -76,34 +76,34 @@ public class PDAToggleWatchpointsTarget extends PDABreakpointAdapter {
String var = variableAndFunctionName[0];
String fcn = variableAndFunctionName[1];
toggleWatchpoint(resource, lineNumber, fcn, var, fAccessModeEnabled, fModificationModeEnabled);
- } else if (selection instanceof IStructuredSelection &&
- ((IStructuredSelection)selection).getFirstElement() instanceof PDAVariable )
+ } else if (selection instanceof IStructuredSelection &&
+ ((IStructuredSelection)selection).getFirstElement() instanceof PDAVariable )
{
- // Selection is inside a variables view. Create a watchpoint
+ // Selection is inside a variables view. Create a watchpoint
// using information from the variable. Retrieving information
- // from the model requires performing source lookup which should be
+ // from the model requires performing source lookup which should be
// done on a background thread.
final PDAVariable var = (PDAVariable)((IStructuredSelection)selection).getFirstElement();
final PDAStackFrame frame = var.getStackFrame();
- final Shell shell = part.getSite().getShell();
-
+ final Shell shell = part.getSite().getShell();
+
new Job("Toggle PDA Watchpoint") { //$NON-NLS-1$
{ setSystem(true); }
-
+
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
IFile file = getResource(var.getStackFrame());
String varName = var.getName();
int line = findLine(file, varName);
- toggleWatchpoint(file, line, frame.getName(), varName,
+ toggleWatchpoint(file, line, frame.getName(), varName,
fAccessModeEnabled, fModificationModeEnabled);
} catch (final CoreException e) {
// Need to switch back to the UI thread to show the error
// dialog.
new WorkbenchJob(shell.getDisplay(), "Toggle PDA Watchpoint") { //$NON-NLS-1$
{ setSystem(true); }
-
+
@Override
public IStatus runInUIThread(IProgressMonitor submonitor) {
ErrorDialog.openError(shell, "Failed to create PDA watchpoint", "Failed to create PDA watchpoint.\n", e.getStatus()); //$NON-NLS-1$ //$NON-NLS-2$
@@ -125,7 +125,7 @@ public class PDAToggleWatchpointsTarget extends PDABreakpointAdapter {
}
return null;
}
-
+
private int findLine(IFile file, String var) throws CoreException {
int lineNum = 0;
try (BufferedReader reader = new BufferedReader(new InputStreamReader(file.getContents()))) {
@@ -145,7 +145,7 @@ public class PDAToggleWatchpointsTarget extends PDABreakpointAdapter {
}
return lineNum;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#toggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
@@ -155,9 +155,9 @@ public class PDAToggleWatchpointsTarget extends PDABreakpointAdapter {
toggleWatchpoints(part, selection);
} else {
toggleLineBreakpoints(part, selection);
- }
+ }
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#canToggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistant.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistant.java
index a051aa268..d91dbbecd 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistant.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistant.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -19,17 +19,17 @@ import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.swt.widgets.Shell;
public class PDAContentAssistant extends ContentAssistant {
-
+
public PDAContentAssistant() {
super();
-
- PDAContentAssistProcessor processor= new PDAContentAssistProcessor();
+
+ PDAContentAssistProcessor processor= new PDAContentAssistProcessor();
setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
-
+
enableAutoActivation(false);
enableAutoInsert(false);
-
- setInformationControlCreator(getInformationControlCreator());
+
+ setInformationControlCreator(getInformationControlCreator());
}
private IInformationControlCreator getInformationControlCreator() {
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java
index 6ab57fdc9..aafe0e0ec 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2013 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -22,7 +22,7 @@ import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
* PDA editor
*/
public class PDAEditor extends AbstractDecoratedTextEditor {
-
+
/**
* Creates a PDE editor
*/
@@ -44,6 +44,6 @@ public class PDAEditor extends AbstractDecoratedTextEditor {
action.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
setAction("ContentAssistProposal", action); //$NON-NLS-1$
}
-
-
+
+
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAScanner.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAScanner.java
index f2e864c7a..21565dc70 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAScanner.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAScanner.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2013 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -24,7 +24,7 @@ import org.eclipse.jface.text.rules.WordRule;
* PDA editor keyword scanner.
*/
public class PDAScanner extends BufferedRuleBasedScanner {
-
+
/**
* PDA keywods
*/
@@ -32,7 +32,7 @@ public class PDAScanner extends BufferedRuleBasedScanner {
"add", "branch_not_zero", "call", "dec", "dup", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
"halt", "output", "pop", "push", "return", "var" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
};
-
+
/**
* Detects potential keywords
*/
@@ -54,12 +54,12 @@ public class PDAScanner extends BufferedRuleBasedScanner {
return Character.isLetter(c) || c == '_';
}
}
-
+
/**
* Detects PDA branch labels
*/
class PDALabelDetector extends PDAWordDetector {
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.text.rules.IWordDetector#isWordStart(char)
*/
@@ -67,7 +67,7 @@ public class PDAScanner extends BufferedRuleBasedScanner {
public boolean isWordStart(char c) {
return c == ':';
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.text.rules.IWordDetector#isWordPart(char)
*/
@@ -90,7 +90,7 @@ public class PDAScanner extends BufferedRuleBasedScanner {
}
// labels
token = new Token(new TextAttribute(DebugUIPlugin.getDefault().getColor(DebugUIPlugin.LABEL)));
- WordRule labels = new WordRule(new PDALabelDetector(), token);
+ WordRule labels = new WordRule(new PDALabelDetector(), token);
setRules(new IRule[]{keywords, labels});
}
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDASourceViewerConfiguration.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDASourceViewerConfiguration.java
index 676906253..28839915b 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDASourceViewerConfiguration.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDASourceViewerConfiguration.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -41,7 +41,7 @@ public class PDASourceViewerConfiguration extends TextSourceViewerConfiguration
public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
return new AnnotationHover();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.text.source.SourceViewerConfiguration#getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer)
*/
@@ -62,6 +62,6 @@ public class PDASourceViewerConfiguration extends TextSourceViewerConfiguration
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
return new PDAContentAssistant();
}
-
-
+
+
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PopFrameActionDelegate.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PopFrameActionDelegate.java
index 7fb40ed11..8383300de 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PopFrameActionDelegate.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PopFrameActionDelegate.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -25,7 +25,7 @@ import org.eclipse.ui.IWorkbenchPart;
public class PopFrameActionDelegate implements IObjectActionDelegate, IActionDelegate2 {
-
+
private PDAThread fThread = null;
/* (non-Javadoc)
@@ -41,7 +41,7 @@ public class PopFrameActionDelegate implements IObjectActionDelegate, IActionDel
@Override
public void run(IAction action) {
//#ifdef ex5
-//# // TODO: Exercise 5 - pop the top frame
+//# // TODO: Exercise 5 - pop the top frame
//#else
try {
fThread.popFrame();
@@ -61,7 +61,7 @@ public class PopFrameActionDelegate implements IObjectActionDelegate, IActionDel
if (element instanceof PDAStackFrame) {
PDAStackFrame frame = (PDAStackFrame) element;
//#ifdef ex5
-//# // TODO: Exercise 5 - enable the action if the frame's thread supports it
+//# // TODO: Exercise 5 - enable the action if the frame's thread supports it
//#else
fThread = (PDAThread) frame.getThread();
try {
@@ -71,7 +71,7 @@ public class PopFrameActionDelegate implements IObjectActionDelegate, IActionDel
return;
//#endif
}
-
+
}
action.setEnabled(false);
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java
index cbd294fe8..a51fe8d98 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2013 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -44,7 +44,7 @@ public class TextHover implements ITextHover {
if (varName.startsWith("$") && varName.length() > 1) { //$NON-NLS-1$
varName = varName.substring(1);
}
-
+
PDAStackFrame frame = null;
IAdaptable debugContext = DebugUITools.getDebugContext();
if (debugContext instanceof PDAStackFrame) {
@@ -81,7 +81,7 @@ public class TextHover implements ITextHover {
}
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.text.ITextHover#getHoverRegion(org.eclipse.jface.text.ITextViewer, int)
*/
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/WordFinder.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/WordFinder.java
index e60d98203..54c451c60 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/WordFinder.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/WordFinder.java
@@ -1,17 +1,17 @@
/*******************************************************************************
* Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Bjorn Freeman-Benson - initial API and implementation
*******************************************************************************/
package org.eclipse.debug.examples.ui.pda.editor;
-
+
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
@@ -21,50 +21,50 @@ import org.eclipse.jface.text.Region;
* Looks for an identifier in a source file
*/
public class WordFinder {
-
+
/**
* Returns the region in the given document that contains an identifier, or
* <code>null</code> if none.
- *
+ *
* @param document document to search
* @param offset offset at which to look for an identifier
* @return region containing an identifier, or <code>null</code>
*/
public static IRegion findWord(IDocument document, int offset) {
-
+
int start= -1;
int end= -1;
-
-
+
+
try {
-
+
int pos= offset;
char c;
-
+
while (pos >= 0) {
c= document.getChar(pos);
if (!Character.isJavaIdentifierPart(c))
break;
--pos;
}
-
+
start= pos;
-
+
pos= offset;
int length= document.getLength();
-
+
while (pos < length) {
c= document.getChar(pos);
if (!Character.isJavaIdentifierPart(c))
break;
++pos;
}
-
+
end= pos;
-
+
} catch (BadLocationException x) {
}
-
+
if (start > -1 && end > -1) {
if (start == offset && end == offset)
return new Region(offset, 0);
@@ -73,7 +73,7 @@ public class WordFinder {
else
return new Region(start + 1, end - start - 1);
}
-
+
return null;
}
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDALaunchShortcut.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDALaunchShortcut.java
index 08d4ecefa..794c7d490 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDALaunchShortcut.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDALaunchShortcut.java
@@ -41,7 +41,7 @@ public class PDALaunchShortcut implements ILaunchShortcut {
IFile file = (IFile) ((IStructuredSelection)selection).getFirstElement();
// check for an existing launch config for the pda file
- String path = file.getFullPath().toString();
+ String path = file.getFullPath().toString();
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType type = launchManager.getLaunchConfigurationType(DebugCorePlugin.ID_PDA_LAUNCH_CONFIGURATION_TYPE);
try {
@@ -57,7 +57,7 @@ public class PDALaunchShortcut implements ILaunchShortcut {
} catch (CoreException e) {
return;
}
-
+
try {
// create a new configuration for the pda file
ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, file.getName());
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java
index 4fad594f8..4d8333ef6 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java
@@ -45,17 +45,17 @@ import org.eclipse.ui.dialogs.ResourceListSelectionDialog;
* Tab to specify the PDA program to run/debug.
*/
public class PDAMainTab extends AbstractLaunchConfigurationTab {
-
+
private Text fProgramText;
private Button fProgramButton;
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
*/
@Override
public void createControl(Composite parent) {
Font font = parent.getFont();
-
+
Composite comp = new Composite(parent, SWT.NONE);
setControl(comp);
GridLayout topLayout = new GridLayout();
@@ -63,15 +63,15 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
topLayout.numColumns = 3;
comp.setLayout(topLayout);
comp.setFont(font);
-
+
createVerticalSpacer(comp, 3);
-
+
Label programLabel = new Label(comp, SWT.NONE);
programLabel.setText("&Program:"); //$NON-NLS-1$
GridData gd = new GridData(GridData.BEGINNING);
programLabel.setLayoutData(gd);
programLabel.setFont(font);
-
+
fProgramText = new Text(comp, SWT.SINGLE | SWT.BORDER);
gd = new GridData(GridData.FILL_HORIZONTAL);
fProgramText.setLayoutData(gd);
@@ -82,7 +82,7 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
updateLaunchConfigurationDialog();
}
});
-
+
fProgramButton = createPushButton(comp, "&Browse...", null); //$NON-NLS-1$
fProgramButton.addSelectionListener(new SelectionAdapter() {
@Override
@@ -91,9 +91,9 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
}
});
}
-
+
/**
- * Open a resource chooser to select a PDA program
+ * Open a resource chooser to select a PDA program
*/
protected void browsePDAFiles() {
ResourceListSelectionDialog dialog = new ResourceListSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), IResource.FILE);
@@ -104,7 +104,7 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
IFile file = (IFile) files[0];
fProgramText.setText(file.getFullPath().toString());
}
-
+
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
@@ -118,7 +118,7 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
@Override
public void initializeFrom(ILaunchConfiguration configuration) {
//#ifdef ex1
-//# // TODO: Exercise 1 - retrieve the program path attribute from the launch configuration
+//# // TODO: Exercise 1 - retrieve the program path attribute from the launch configuration
//# String program = null;
//# if (program != null) {
//# fProgramText.setText(program);
@@ -146,11 +146,11 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
}
//#ifdef ex1
//# // TODO: Exercise 1 - update the launch configuration with the path to
-//# // currently specified program
+//# // currently specified program
//#else
configuration.setAttribute(DebugCorePlugin.ATTR_PDA_PROGRAM, program);
//#endif
-
+
// perform resource mapping for contextual launch
IResource[] resources = null;
if (program!= null) {
@@ -162,7 +162,7 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
}
configuration.setMappedResources(resources);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
*/
@@ -170,7 +170,7 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
public String getName() {
return "Main"; //$NON-NLS-1$
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
*/
@@ -182,7 +182,7 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
String text = fProgramText.getText();
//#ifdef ex1
//# // TODO: Exercise 1 - validate the currently specified program exists and is not
-//# // empty, providing the user with feedback.
+//# // empty, providing the user with feedback.
//#else
if (text.length() > 0) {
IPath path = new Path(text);
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDATabGroup.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDATabGroup.java
index 38e42d4e0..c8bdf2851 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDATabGroup.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDATabGroup.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -28,7 +28,7 @@ public class PDATabGroup extends AbstractLaunchConfigurationTabGroup {
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
//#ifdef ex1
//# // TODO: Exercise 1 - add the PDA main tab, source lookup tab and common
-//# // tab to the tab group
+//# // tab to the tab group
//#else
setTabs(new ILaunchConfigurationTab[] {
new PDAMainTab(),
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/presentation/PDAModelPresentation.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/presentation/PDAModelPresentation.java
index 821446167..6e952420c 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/presentation/PDAModelPresentation.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/presentation/PDAModelPresentation.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2013 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -59,10 +59,10 @@ public class PDAModelPresentation extends LabelProvider implements IDebugModelPr
}
return null;
}
-
+
/**
* Returns a label for the given watchpoint.
- *
+ *
* @param watchpoint
* @return a label for the given watchpoint
*/
@@ -78,11 +78,11 @@ public class PDAModelPresentation extends LabelProvider implements IDebugModelPr
return label;
} catch (CoreException e) {
return null;
- }
+ }
}
/**
* Returns a label for the given debug target
- *
+ *
* @param target debug target
* @return a label for the given debug target
*/
@@ -100,14 +100,14 @@ public class PDAModelPresentation extends LabelProvider implements IDebugModelPr
} catch (CoreException e) {
}
return "PDA"; //$NON-NLS-1$
-
+
}
-
+
/**
* Returns a label for the given stack frame
- *
+ *
* @param frame a stack frame
- * @return a label for the given stack frame
+ * @return a label for the given stack frame
*/
private String getStackFrameText(PDAStackFrame frame) {
try {
@@ -117,10 +117,10 @@ public class PDAModelPresentation extends LabelProvider implements IDebugModelPr
return null;
}
-
+
/**
* Returns a label for the given thread
- *
+ *
* @param thread a thread
* @return a label for the given thread
*/
@@ -158,7 +158,7 @@ public class PDAModelPresentation extends LabelProvider implements IDebugModelPr
}
return label;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDebugModelPresentation#computeDetail(org.eclipse.debug.core.model.IValue, org.eclipse.debug.ui.IValueDetailListener)
*/
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/AbstractDataStackViewHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/AbstractDataStackViewHandler.java
index 73d061936..40fdec65d 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/AbstractDataStackViewHandler.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/AbstractDataStackViewHandler.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
@@ -32,22 +32,22 @@ abstract public class AbstractDataStackViewHandler extends AbstractHandler {
IWorkbenchPart part = HandlerUtil.getActivePartChecked(event);
if (part instanceof DataStackView) {
DataStackView view = (DataStackView)part;
-
+
ISelection selection = DebugUITools.getDebugContextForEventChecked(event);
if (selection instanceof IStructuredSelection) {
Object element = ((IStructuredSelection)selection).getFirstElement();
-
+
PDAThread thread = null;
if (element instanceof PDAThread) {
thread = (PDAThread)element;
} else if (element instanceof PDAStackFrame) {
thread = (PDAThread)((PDAStackFrame)element).getThread();
- }
+ }
if (element != null) {
doExecute(
- view,
- thread,
+ view,
+ thread,
HandlerUtil.getCurrentSelectionChecked(event));
}
}
@@ -56,10 +56,10 @@ abstract public class AbstractDataStackViewHandler extends AbstractHandler {
}
return null;
}
-
+
/**
- * Performs the actual handler operation.
- *
+ * Performs the actual handler operation.
+ *
* @param view The view that the handler was invoked in.
* @param target The current active debug target.
* @param selection The current selection in view.
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CheckboxView.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CheckboxView.java
index a66daf7e2..918a02cff 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CheckboxView.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CheckboxView.java
@@ -16,19 +16,19 @@ import org.eclipse.swt.SWT;
public class CheckboxView extends VariablesView {
public static String ID = "CHECKBOX_VIEW_ID"; //$NON-NLS-1$
-
+
@Override
protected int getViewerStyle() {
return SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.VIRTUAL | SWT.FULL_SELECTION | SWT.CHECK;
}
-
+
@Override
protected String getHelpContextId() {
return ID;
}
-
+
@Override
- protected String getPresentationContextId() {
+ protected String getPresentationContextId() {
return ID;
}
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java
index 78bc82bc8..73162e43a 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java
@@ -1,10 +1,10 @@
/*******************************************************************************
* Copyright (c) 2005, 2013 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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
@@ -37,12 +37,12 @@ import org.eclipse.ui.progress.UIJob;
/**
- * View of the PDA VM data stack
+ * View of the PDA VM data stack
*/
public class DataStackView extends AbstractDebugView implements IDebugContextListener {
-
+
private PDAThread fThread;
-
+
class StackViewContentProvider implements ITreeContentProvider {
/* (non-Javadoc)
@@ -100,9 +100,9 @@ public class DataStackView extends AbstractDebugView implements IDebugContextLis
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
-
+
}
-
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.AbstractDebugView#createViewer(org.eclipse.swt.widgets.Composite)
*/
@@ -149,14 +149,14 @@ public class DataStackView extends AbstractDebugView implements IDebugContextLis
DebugUITools.getDebugContextManager().getContextService(getSite().getWorkbenchWindow()).removeDebugContextListener(this);
super.dispose();
}
-
+
@Override
public void debugContextChanged(final DebugContextEvent event) {
new UIJob(getSite().getShell().getDisplay(), "DataStackView update") { //$NON-NLS-1$
{
setSystem(true);
}
-
+
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
if (getViewer() != null) { // runs asynchronously, view may be disposed
@@ -166,13 +166,13 @@ public class DataStackView extends AbstractDebugView implements IDebugContextLis
}
}.schedule();
}
-
+
/**
* Updates the view for the selected thread (if suspended)
*/
private void update(ISelection context) {
fThread = null;
-
+
if (context instanceof IStructuredSelection) {
Object element = ((IStructuredSelection)context).getFirstElement();
if (element instanceof PDAThread) {
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushHandler.java
index 88ef28b26..314f2e441 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushHandler.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushHandler.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Wind River Systems - initial API and implementation
* IBM Corporation - bug fixing
diff --git a/org.eclipse.debug.tests/.classpath b/org.eclipse.debug.tests/.classpath
index 098194ca4..eca7bdba8 100644
--- a/org.eclipse.debug.tests/.classpath
+++ b/org.eclipse.debug.tests/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/org.eclipse.debug.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.debug.tests/.settings/org.eclipse.jdt.core.prefs
index 854ba028d..89f76dbc2 100644
--- a/org.eclipse.debug.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.debug.tests/.settings/org.eclipse.jdt.core.prefs
@@ -11,14 +11,17 @@ org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -72,14 +75,16 @@ 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=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=error
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
@@ -102,6 +107,9 @@ org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
+org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
@@ -123,7 +131,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,HIGH
org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,EXPERIMENTAL,CONTEXTLAUNCHING
diff --git a/org.eclipse.debug.tests/META-INF/MANIFEST.MF b/org.eclipse.debug.tests/META-INF/MANIFEST.MF
index 5471362ea..421235395 100644
--- a/org.eclipse.debug.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.debug.tests;singleton:=true
-Bundle-Version: 3.10.101.qualifier
+Bundle-Version: 3.11.0.qualifier
Bundle-Activator: org.eclipse.debug.tests.TestsPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
@@ -17,7 +17,7 @@ Require-Bundle: org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
org.eclipse.ui.console;bundle-version="[3.7.0,4.0.0)",
org.eclipse.text
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Vendor: %providerName
Export-Package: org.eclipse.debug.tests,
org.eclipse.debug.tests.breakpoint,
diff --git a/org.eclipse.debug.tests/pom.xml b/org.eclipse.debug.tests/pom.xml
index 26e984884..a3f12aedd 100644
--- a/org.eclipse.debug.tests/pom.xml
+++ b/org.eclipse.debug.tests/pom.xml
@@ -5,7 +5,7 @@
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/org/documents/edl-v10.php
-
+
Contributors:
Igor Fedorenko - initial implementation
-->
@@ -14,11 +14,11 @@
<parent>
<artifactId>eclipse.platform.debug</artifactId>
<groupId>eclipse.platform.debug</groupId>
- <version>4.7.1-SNAPSHOT</version>
+ <version>4.8.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.debug</groupId>
<artifactId>org.eclipse.debug.tests</artifactId>
- <version>3.10.101-SNAPSHOT</version>
+ <version>3.11.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
<code.ignoredWarnings>${tests.ignoredWarnings}</code.ignoredWarnings>
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AbstractDebugTest.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AbstractDebugTest.java
new file mode 100644
index 000000000..39e3134d3
--- /dev/null
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/AbstractDebugTest.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Andrey Loskutov and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Andrey Loskutov <loskutov@gmx.de> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.tests;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.intro.IIntroManager;
+import org.eclipse.ui.intro.IIntroPart;
+import org.eclipse.ui.progress.UIJob;
+
+import junit.framework.TestCase;
+
+public class AbstractDebugTest extends TestCase {
+
+ private static boolean welcomeClosed;
+
+ public AbstractDebugTest() {
+ super();
+ }
+
+ public AbstractDebugTest(String name) {
+ super(name);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ TestUtil.log(IStatus.INFO, getName(), "setUp");
+ assertWelcomeScreenClosed();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ TestUtil.log(IStatus.INFO, getName(), "tearDown");
+ TestUtil.cleanUp(getName());
+ super.tearDown();
+ }
+
+ /**
+ * Ensure the welcome screen is closed because in 4.x the debug perspective
+ * opens a giant fast-view causing issues
+ *
+ * @throws Exception
+ */
+ protected final void assertWelcomeScreenClosed() throws Exception {
+ if (!welcomeClosed && PlatformUI.isWorkbenchRunning()) {
+ final IWorkbench wb = PlatformUI.getWorkbench();
+ if (wb == null) {
+ return;
+ }
+ // In UI thread we don't need to run a job
+ if (Display.getCurrent() != null) {
+ closeIntro(wb);
+ return;
+ }
+
+ UIJob job = new UIJob("close welcome screen for debug test suite") {
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ closeIntro(wb);
+ return Status.OK_STATUS;
+ }
+
+ };
+ job.setPriority(Job.INTERACTIVE);
+ job.setSystem(true);
+ job.schedule();
+ }
+ }
+
+ private static void closeIntro(final IWorkbench wb) {
+ IWorkbenchWindow window = wb.getActiveWorkbenchWindow();
+ if (window != null) {
+ IIntroManager im = wb.getIntroManager();
+ IIntroPart intro = im.getIntro();
+ if (intro != null) {
+ welcomeClosed = im.closeIntro(intro);
+ }
+ }
+ }
+}
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/TestUtil.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/TestUtil.java
new file mode 100644
index 000000000..fba4831a7
--- /dev/null
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/TestUtil.java
@@ -0,0 +1,225 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Google, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Stefan Xenos (Google) - Initial implementation
+ * Andrey Loskutov (loskutov@gmx.de) - many different extensions
+ *******************************************************************************/
+package org.eclipse.debug.tests;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadInfo;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.swt.widgets.Display;
+import org.junit.Assert;
+
+public class TestUtil {
+
+ /**
+ * Call this in the tearDown method of every test to clean up state that can
+ * otherwise leak through SWT between tests.
+ */
+ public static void cleanUp(String owner) {
+ // Ensure that the Thread.interrupted() flag didn't leak.
+ Assert.assertFalse("The main thread should not be interrupted at the end of a test", Thread.interrupted());
+
+ // Wait for any outstanding jobs to finish. Protect against deadlock by
+ // terminating the wait after a timeout.
+ boolean timedOut = waitForJobs(owner, 5, 5000);
+ if (timedOut) {
+ // We don't expect any extra jobs run during the test: try to cancel them
+ log(IStatus.INFO, owner, "Trying to cancel running jobs: " + getRunningOrWaitingJobs(null));
+ getRunningOrWaitingJobs(null).forEach(job -> job.cancel());
+ waitForJobs(owner, 5, 1000);
+ }
+
+ // Ensure that the Thread.interrupted() flag didn't leak.
+ Assert.assertFalse("The main thread should not be interrupted at the end of a test", Thread.interrupted());
+ }
+
+ public static void log(int severity, String owner, String message, Throwable... optionalError) {
+ message = "[" + owner + "] " + message;
+ Throwable error = null;
+ if (optionalError != null && optionalError.length > 0) {
+ error = optionalError[0];
+ }
+ Status status = new Status(severity, TestsPlugin.getDefault().getBundle().getSymbolicName(), message, error);
+ TestsPlugin.getDefault().getLog().log(status);
+ }
+
+ /**
+ * Process all queued UI events. If called from background thread, does
+ * nothing.
+ */
+ public static void runEventLoop() {
+ Display display = Display.getCurrent();
+ if (display != null && !display.isDisposed()) {
+ while (display.readAndDispatch()) {
+ // Keep pumping events until the queue is empty
+ }
+ }
+ }
+
+ /**
+ * Process all queued UI events. If called from background thread, just
+ * waits
+ */
+ public static void processUIEvents(final long millis) throws Exception {
+ long start = System.currentTimeMillis();
+ while (System.currentTimeMillis() - start < millis) {
+ Display display = Display.getCurrent();
+ if (display != null && !display.isDisposed()) {
+ while (display.readAndDispatch()) {
+ // loop until the queue is empty
+ }
+ } else {
+ Thread.sleep(10);
+ }
+ }
+ }
+
+ /**
+ * Utility for waiting until the execution of jobs of any family has
+ * finished or timeout is reached. If no jobs are running, the method waits
+ * given minimum wait time. While this method is waiting for jobs, UI events
+ * are processed.
+ *
+ * @param owner name of the caller which will be logged as prefix if the
+ * wait times out
+ * @param minTimeMs minimum wait time in milliseconds
+ * @param maxTimeMs maximum wait time in milliseconds
+ * @return true if the method timed out, false if all the jobs terminated
+ * before the timeout
+ */
+ public static boolean waitForJobs(String owner, long minTimeMs, long maxTimeMs) {
+ return waitForJobs(owner, minTimeMs, maxTimeMs, (Object[]) null);
+ }
+
+ /**
+ * Utility for waiting until the execution of jobs of any family has finished or timeout is reached. If no jobs are running, the method waits
+ * given minimum wait time. While this method is waiting for jobs, UI events are processed.
+ *
+ * @param owner
+ * name of the caller which will be logged as prefix if the wait times out
+ * @param minTimeMs
+ * minimum wait time in milliseconds
+ * @param maxTimeMs
+ * maximum wait time in milliseconds
+ * @param excludedFamilies
+ * optional list of job families to NOT wait for
+ *
+ * @return true if the method timed out, false if all the jobs terminated before the timeout
+ */
+ public static boolean waitForJobs(String owner, long minTimeMs, long maxTimeMs, Object... excludedFamilies) {
+ if (maxTimeMs < minTimeMs) {
+ throw new IllegalArgumentException("Max time is smaller as min time!");
+ }
+ final long start = System.currentTimeMillis();
+ while (System.currentTimeMillis() - start < minTimeMs) {
+ runEventLoop();
+ try {
+ Thread.sleep(Math.min(10, minTimeMs));
+ } catch (InterruptedException e) {
+ // Uninterruptable
+ }
+ }
+ while (!Job.getJobManager().isIdle()) {
+ List<Job> jobs = getRunningOrWaitingJobs(null, excludedFamilies);
+ if (jobs.isEmpty()) {
+ // only uninteresting jobs running
+ break;
+ }
+
+ if (!Collections.disjoint(runningJobs, jobs)) {
+ // There is a job which runs already quite some time, don't wait for it to avoid test timeouts
+ dumpRunningOrWaitingJobs(owner, jobs);
+ return true;
+ }
+
+ if (System.currentTimeMillis() - start >= maxTimeMs) {
+ dumpRunningOrWaitingJobs(owner, jobs);
+ return true;
+ }
+ runEventLoop();
+ try {
+ Thread.sleep(10);
+ } catch (InterruptedException e) {
+ // Uninterruptable
+ }
+ }
+ runningJobs.clear();
+ return false;
+ }
+
+ static Set<Job> runningJobs = new LinkedHashSet<>();
+
+ private static void dumpRunningOrWaitingJobs(String owner, List<Job> jobs) {
+ String message = "Some job is still running or waiting to run: " + dumpRunningOrWaitingJobs(jobs);
+ log(IStatus.ERROR, owner, message);
+ }
+
+ private static String dumpRunningOrWaitingJobs(List<Job> jobs) {
+ if (jobs.isEmpty()) {
+ return "";
+ }
+ // clear "old" running jobs, we only remember most recent
+ runningJobs.clear();
+ StringBuilder sb = new StringBuilder();
+ for (Job job : jobs) {
+ runningJobs.add(job);
+ sb.append("\n'").append(job.toString()).append("'/");
+ sb.append(job.getClass().getName());
+ Thread thread = job.getThread();
+ if (thread != null) {
+ ThreadInfo[] threadInfos = ManagementFactory.getThreadMXBean().getThreadInfo(new long[] { thread.getId() }, true, true);
+ if (threadInfos[0] != null) {
+ sb.append("\nthread info: ").append(threadInfos[0]);
+ }
+ }
+ sb.append(", ");
+ }
+ sb.setLength(sb.length() - 2);
+ return sb.toString();
+ }
+
+ public static List<Job> getRunningOrWaitingJobs(Object jobFamily, Object... excludedFamilies) {
+ List<Job> running = new ArrayList<>();
+ Job[] jobs = Job.getJobManager().find(jobFamily);
+ for (Job job : jobs) {
+ if (isRunningOrWaitingJob(job) && !belongsToFamilies(job, excludedFamilies)) {
+ running.add(job);
+ }
+ }
+ return running;
+ }
+
+ private static boolean isRunningOrWaitingJob(Job job) {
+ int state = job.getState();
+ return (state == Job.RUNNING || state == Job.WAITING);
+ }
+
+ private static boolean belongsToFamilies(Job job, Object... excludedFamilies) {
+ if (excludedFamilies == null || excludedFamilies.length == 0) {
+ return false;
+ }
+ for (Object family : excludedFamilies) {
+ if (job.belongsTo(family)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+}
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/breakpoint/BreakpointOrderingTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/breakpoint/BreakpointOrderingTests.java
index 94b162520..66b924b3f 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/breakpoint/BreakpointOrderingTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/breakpoint/BreakpointOrderingTests.java
@@ -12,8 +12,6 @@ package org.eclipse.debug.tests.breakpoint;
import java.util.List;
-import junit.framework.TestCase;
-
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRunnable;
@@ -26,6 +24,7 @@ import org.eclipse.debug.core.model.IBreakpoint;
import org.eclipse.debug.core.model.ILineBreakpoint;
import org.eclipse.debug.core.model.IValue;
import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsComparator;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.debug.tests.TestsPlugin;
import org.eclipse.debug.ui.IDebugModelPresentation;
import org.eclipse.debug.ui.IValueDetailListener;
@@ -42,7 +41,7 @@ import org.eclipse.ui.IEditorInput;
*
* Using a special Comparator which sorts breakpoint texts like file:1, file:2 and file:11 in a numerical ordering.
*/
-public class BreakpointOrderingTests extends TestCase {
+public class BreakpointOrderingTests extends AbstractDebugTest {
public BreakpointOrderingTests(String name) {
super(name);
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ConsoleManagerTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ConsoleManagerTests.java
index fb0a025ec..5ae877f15 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ConsoleManagerTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ConsoleManagerTests.java
@@ -16,6 +16,8 @@ import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
+import org.eclipse.debug.tests.AbstractDebugTest;
+import org.eclipse.debug.tests.TestUtil;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.swt.SWT;
@@ -24,7 +26,6 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewReference;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.console.ConsolePlugin;
@@ -34,14 +35,11 @@ import org.eclipse.ui.console.IConsoleView;
import org.eclipse.ui.part.IPageBookViewPage;
import org.eclipse.ui.part.MessagePage;
-import junit.framework.TestCase;
-
/**
* Tests console manager
*/
-public class ConsoleManagerTests extends TestCase {
+public class ConsoleManagerTests extends AbstractDebugTest {
- private static final String INTROVIEW_ID = "org.eclipse.ui.internal.introview"; //$NON-NLS-1$
private ExecutorService executorService;
private IConsoleManager manager;
private int count;
@@ -59,8 +57,7 @@ public class ConsoleManagerTests extends TestCase {
executorService = Executors.newFixedThreadPool(count);
manager = ConsolePlugin.getDefault().getConsoleManager();
IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- hideWelcomePage(activePage);
- TestHelper.processUIEvents(100);
+ TestUtil.processUIEvents(100);
consoles = new ConsoleMock[count];
for (int i = 0; i < count; i++) {
final ConsoleMock console = new ConsoleMock(i + 1);
@@ -71,7 +68,7 @@ public class ConsoleManagerTests extends TestCase {
IViewPart consoleView = activePage.showView("org.eclipse.ui.console.ConsoleView"); //$NON-NLS-1$
activePage.activate(consoleView);
- TestHelper.processUIEvents(100);
+ TestUtil.processUIEvents(100);
// The test is unstable ("show" event on the the first console seem to
// be not always sent), so make sure console view has shown at least
@@ -79,8 +76,8 @@ public class ConsoleManagerTests extends TestCase {
firstConsole = new ConsoleMock(0);
manager.addConsoles(new ConsoleMock[] { firstConsole });
manager.showConsoleView(firstConsole);
- TestHelper.waitForJobs();
- TestHelper.processUIEvents(100);
+ TestUtil.waitForJobs(getName(), 200, 5000);
+ TestUtil.processUIEvents(100);
ConsoleMock.allShownConsoles.set(0);
}
@@ -89,24 +86,10 @@ public class ConsoleManagerTests extends TestCase {
executorService.shutdownNow();
manager.removeConsoles(consoles);
manager.removeConsoles(new ConsoleMock[] { firstConsole });
- TestHelper.processUIEvents(100);
+ TestUtil.processUIEvents(100);
super.tearDown();
}
- private void hideWelcomePage(IWorkbenchPage activePage) {
- IViewReference[] refs = activePage.getViewReferences();
- IViewPart intro = null;
- for (IViewReference ref : refs) {
- if (INTROVIEW_ID.equals(ref.getId())) {
- intro = ref.getView(false);
- }
- }
- if (intro != null) {
- activePage.hideView(intro);
- TestHelper.processUIEvents(100);
- }
- }
-
/**
* The test triggers {@link #count} simultaneous calls to the
* {@link IConsoleManager#showConsoleView(IConsole)} and checks if all of
@@ -123,15 +106,15 @@ public class ConsoleManagerTests extends TestCase {
showConsole(console);
}
System.out.println("All tasks scheduled, processing UI events now..."); //$NON-NLS-1$
- TestHelper.processUIEvents(1000);
+ TestUtil.processUIEvents(1000);
// Console manager starts a job with delay, let wait for him a bit
System.out.println("Waiting on jobs now..."); //$NON-NLS-1$
- TestHelper.waitForJobs();
+ TestUtil.waitForJobs(getName(), 200, 5000);
// Give UI a chance to proceed pending console manager jobs
System.out.println("Done with jobs, processing UI events again..."); //$NON-NLS-1$
- TestHelper.processUIEvents(3000);
+ TestUtil.processUIEvents(3000);
executorService.shutdown();
@@ -139,7 +122,7 @@ public class ConsoleManagerTests extends TestCase {
boolean OK = waitForExecutorService();
if (!OK) {
System.out.println("Timed out..."); //$NON-NLS-1$
- TestHelper.processUIEvents(10000);
+ TestUtil.processUIEvents(10000);
// timeout?
assertTrue("Timeout occurred while waiting on console to be shown", //$NON-NLS-1$
@@ -151,12 +134,12 @@ public class ConsoleManagerTests extends TestCase {
assertEquals("Only " + shown + " consoles were shown from " + count, count, shown); //$NON-NLS-1$ //$NON-NLS-2$
}
- private boolean waitForExecutorService() throws InterruptedException {
+ private boolean waitForExecutorService() throws Exception {
for (int i = 0; i < 60; i++) {
if (executorService.awaitTermination(1, TimeUnit.SECONDS)) {
return true;
}
- TestHelper.processUIEvents(100);
+ TestUtil.processUIEvents(100);
}
return false;
}
@@ -172,7 +155,7 @@ public class ConsoleManagerTests extends TestCase {
latch.await(1, TimeUnit.MINUTES);
System.out.println("Requesting to show: " + console); //$NON-NLS-1$
manager.showConsoleView(console);
- TestHelper.waitForJobs();
+ TestUtil.waitForJobs(getName(), 200, 5000);
} catch (InterruptedException e) {
e.printStackTrace();
Thread.interrupted();
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ConsoleTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ConsoleTests.java
index e63525306..98272afdb 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ConsoleTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ConsoleTests.java
@@ -14,15 +14,27 @@ package org.eclipse.debug.tests.console;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
+import org.eclipse.core.commands.Command;
+import org.eclipse.debug.tests.AbstractDebugTest;
+import org.eclipse.debug.tests.TestUtil;
import org.eclipse.jface.text.IDocument;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
import org.eclipse.ui.console.IConsoleConstants;
+import org.eclipse.ui.console.IConsoleManager;
+import org.eclipse.ui.console.IOConsole;
import org.eclipse.ui.console.IOConsoleOutputStream;
import org.eclipse.ui.console.MessageConsole;
import junit.framework.TestCase;
-public class ConsoleTests extends TestCase {
+public class ConsoleTests extends AbstractDebugTest {
public ConsoleTests() {
super("ConsoleTests"); //$NON-NLS-1$
@@ -41,21 +53,21 @@ public class ConsoleTests extends TestCase {
MessageConsole console = new MessageConsole("Test Console", //$NON-NLS-1$
IConsoleConstants.MESSAGE_CONSOLE_TYPE, null, StandardCharsets.UTF_8.name(), true);
IDocument document = console.getDocument();
- TestHelper.waitForJobs();
+ TestUtil.waitForJobs(getName(), 200, 5000);
TestCase.assertEquals("Document should be empty", "", document.get()); //$NON-NLS-1$ //$NON-NLS-2$
try (IOConsoleOutputStream outStream = console.newOutputStream()) {
outStream.write(testStringBuffer, 0, 6);
// half of ö (\u00f6) is written so we don't expect this char in
// output but all previous chars can be decoded
- TestHelper.waitForJobs();
+ TestUtil.waitForJobs(getName(), 200, 5000);
TestCase.assertEquals("First 4 chars should be written", testString.substring(0, 4), document.get()); //$NON-NLS-1$
outStream.write(testStringBuffer, 6, 6);
// all remaining bytes are written so we expect the whole string
// including the ö (\u00f6) which was at buffer boundary
- TestHelper.waitForJobs();
+ TestUtil.waitForJobs(getName(), 200, 5000);
TestCase.assertEquals("whole test string should be written", testString, document.get()); //$NON-NLS-1$
}
- TestHelper.waitForJobs();
+ TestUtil.waitForJobs(getName(), 200, 5000);
// after closing the stream, the document content should still be the
// same
TestCase.assertEquals("closing the stream should not alter the document", testString, document.get()); //$NON-NLS-1$
@@ -68,15 +80,15 @@ public class ConsoleTests extends TestCase {
MessageConsole console = new MessageConsole("Test Console 2", //$NON-NLS-1$
IConsoleConstants.MESSAGE_CONSOLE_TYPE, null, StandardCharsets.UTF_8.name(), true);
IDocument document = console.getDocument();
- TestHelper.waitForJobs();
+ TestUtil.waitForJobs(getName(), 200, 5000);
TestCase.assertEquals("Document should be empty", "", document.get()); //$NON-NLS-1$ //$NON-NLS-2$
try (IOConsoleOutputStream outStream = console.newOutputStream()) {
outStream.write(testStringBuffer);
// everything but pending \r should be written
- TestHelper.waitForJobs();
+ TestUtil.waitForJobs(getName(), 200, 5000);
TestCase.assertEquals("First char should be written", testString.substring(0, 1), document.get()); //$NON-NLS-1$
}
- TestHelper.waitForJobs();
+ TestUtil.waitForJobs(getName(), 200, 5000);
// after closing the stream, the document content should still be the
// same
TestCase.assertEquals("closing the stream should write the pending \\r", testString, document.get()); //$NON-NLS-1$
@@ -142,4 +154,34 @@ public class ConsoleTests extends TestCase {
}
}
+ /**
+ * Validate that we can use find and replace after opening a console in the
+ * Console View.
+ *
+ * @see <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=268608">bug
+ * 268608</a>
+ */
+ public void testFindReplaceIsEnabledOnConsoleOpen() throws Exception {
+ IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ IViewPart consoleView = activePage.showView(IConsoleConstants.ID_CONSOLE_VIEW);
+
+ IOConsole console = new IOConsole("Test Console 7", IConsoleConstants.MESSAGE_CONSOLE_TYPE, null, true); //$NON-NLS-1$
+ console.getDocument().set("some text"); //$NON-NLS-1$
+
+ IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();
+ IConsole[] consoles = { console };
+
+ try {
+ consoleManager.addConsoles(consoles);
+ consoleManager.showConsoleView(console);
+ TestUtil.waitForJobs(getName(), 100, 3000);
+
+ ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class);
+ Command command = commandService.getCommand(IWorkbenchCommandConstants.EDIT_FIND_AND_REPLACE);
+ TestCase.assertTrue("expected FindReplace command to be enabled after opening console", command.isEnabled());
+ } finally {
+ consoleManager.removeConsoles(consoles);
+ activePage.hideView(consoleView);
+ }
+ }
}
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/TestHelper.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/TestHelper.java
deleted file mode 100644
index 981459a79..000000000
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/TestHelper.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2017 Andreas Loth and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Andreas Loth - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.tests.console;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-
-
-public final class TestHelper {
-
- private TestHelper() {
- throw new AssertionError("No instances of this utility class!"); //$NON-NLS-1$
- }
-
- public static void processUIEvents(final long millis) {
- long start = System.currentTimeMillis();
- while (System.currentTimeMillis() - start < millis) {
- while (PlatformUI.getWorkbench().getDisplay().readAndDispatch()) {
- // loop untile the queue is empty
- }
- }
- }
-
- public static void waitForJobs() throws InterruptedException {
- if (Display.getCurrent() == null) {
- Thread.sleep(200);
- } else {
- processUIEvents(200);
- }
- while (!Job.getJobManager().isIdle()) {
- if (Display.getCurrent() == null) {
- Thread.sleep(200);
- } else {
- processUIEvents(200);
- }
- }
- }
-
-}
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/expressions/ExpressionManagerTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/expressions/ExpressionManagerTests.java
index 962c0bd68..626466eb6 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/expressions/ExpressionManagerTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/expressions/ExpressionManagerTests.java
@@ -13,8 +13,6 @@ package org.eclipse.debug.tests.expressions;
import java.util.ArrayList;
import java.util.List;
-import junit.framework.TestCase;
-
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IExpressionListener;
import org.eclipse.debug.core.IExpressionManager;
@@ -23,11 +21,12 @@ import org.eclipse.debug.core.model.IExpression;
import org.eclipse.debug.core.model.IWatchExpression;
import org.eclipse.debug.internal.core.ExpressionManager;
import org.eclipse.debug.internal.core.IExpressionsListener2;
+import org.eclipse.debug.tests.AbstractDebugTest;
/**
* Tests expression manager and listener call backs
*/
-public class ExpressionManagerTests extends TestCase {
+public class ExpressionManagerTests extends AbstractDebugTest {
class SinlgeListener implements IExpressionListener {
@@ -154,14 +153,11 @@ public class ExpressionManagerTests extends TestCase {
return DebugPlugin.getDefault().getExpressionManager();
}
- /* (non-Javadoc)
- * @see junit.framework.TestCase#tearDown()
- */
@Override
protected void tearDown() throws Exception {
// remove all expressions from the manager
- super.tearDown();
getManager().removeExpressions(getManager().getExpressions());
+ super.tearDown();
}
/**
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/AbstractLaunchTest.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/AbstractLaunchTest.java
index 6de7f9768..74f3cc141 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/AbstractLaunchTest.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/AbstractLaunchTest.java
@@ -18,13 +18,12 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
-
-import junit.framework.TestCase;
+import org.eclipse.debug.tests.AbstractDebugTest;
/**
* Common function for launch related tests.
*/
-public abstract class AbstractLaunchTest extends TestCase {
+public abstract class AbstractLaunchTest extends AbstractDebugTest {
/**
* Constructs a test with the given name.
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/AcceleratorSubstitutionTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/AcceleratorSubstitutionTests.java
index edb3091a9..379e836b7 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/AcceleratorSubstitutionTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/AcceleratorSubstitutionTests.java
@@ -10,9 +10,8 @@
*******************************************************************************/
package org.eclipse.debug.tests.launching;
-import junit.framework.TestCase;
-
import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.tests.AbstractDebugTest;
/**
* Tests accelerator adjustments for DBCS languages.
@@ -20,7 +19,7 @@ import org.eclipse.debug.internal.ui.DebugUIPlugin;
*
* @since 3.3
*/
-public class AcceleratorSubstitutionTests extends TestCase {
+public class AcceleratorSubstitutionTests extends AbstractDebugTest {
/**
* Constructor
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/ArgumentParsingTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/ArgumentParsingTests.java
index d5e85e50e..a662ef3a7 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/ArgumentParsingTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/ArgumentParsingTests.java
@@ -25,15 +25,14 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.URIUtil;
import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.osgi.service.environment.Constants;
-import junit.framework.TestCase;
-
/**
* Tests {@link org.eclipse.debug.core.DebugPlugin#parseArguments(String)} and
* {@link org.eclipse.debug.core.DebugPlugin#renderArguments(String[], int[])}.
*/
-public class ArgumentParsingTests extends TestCase {
+public class ArgumentParsingTests extends AbstractDebugTest {
private void execute1Arg(String cmdLine) throws Exception {
execute1Arg(cmdLine, cmdLine);
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchFavoriteTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchFavoriteTests.java
index 688710202..6ddbf214e 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchFavoriteTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchFavoriteTests.java
@@ -74,12 +74,12 @@ public class LaunchFavoriteTests extends AbstractLaunchTest {
*/
@Override
protected void tearDown() throws Exception {
- super.tearDown();
// delete the configuration used during this test
ILaunchConfiguration configuration = getLaunchConfiguration();
if (configuration.exists()) {
configuration.delete();
}
+ super.tearDown();
}
/**
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchGroupTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchGroupTests.java
index a15ddbdf5..14ff10660 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchGroupTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/launching/LaunchGroupTests.java
@@ -20,6 +20,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
@@ -35,6 +36,7 @@ import org.eclipse.debug.internal.core.groups.GroupLaunchConfigurationDelegate;
import org.eclipse.debug.internal.core.groups.GroupLaunchElement;
import org.eclipse.debug.internal.core.groups.GroupLaunchElement.GroupElementPostLaunchAction;
import org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory;
+import org.eclipse.debug.tests.TestUtil;
import org.eclipse.debug.ui.IDebugUIConstants;
public class LaunchGroupTests extends AbstractLaunchTest {
@@ -77,7 +79,20 @@ public class LaunchGroupTests extends AbstractLaunchTest {
protected void tearDown() throws Exception {
// make sure listener is removed
getLaunchManager().removeLaunchListener(lcListener);
-
+ ILaunch[] launches = getLaunchManager().getLaunches();
+ for (ILaunch launch : launches) {
+ try {
+ if (!launch.isTerminated()) {
+ IProcess[] processes = launch.getProcesses();
+ for (IProcess process : processes) {
+ process.terminate();
+ }
+ launch.terminate();
+ }
+ } catch (Exception e) {
+ TestUtil.log(IStatus.ERROR, getName(), "Error terminating launch: " + launch, e);
+ }
+ }
super.tearDown();
}
@@ -170,8 +185,7 @@ public class LaunchGroupTests extends AbstractLaunchTest {
}
}
} catch (Exception e) {
- // uh oh
- e.printStackTrace();
+ TestUtil.log(IStatus.ERROR, getName(), e.getMessage(), e);
}
}
@@ -193,7 +207,6 @@ public class LaunchGroupTests extends AbstractLaunchTest {
assertTrue("history[2] should be Test1", history[2].contentsEqual(t1)); //$NON-NLS-1$
}
-
public void testAdopt() throws Exception {
final ILaunchConfiguration t1 = getLaunchConfiguration("Test1"); //$NON-NLS-1$
final ILaunchConfiguration grp = createLaunchGroup(DEF_GRP_NAME, createLaunchGroupElement(t1, GroupElementPostLaunchAction.NONE, null, false), createLaunchGroupElement(t1, GroupElementPostLaunchAction.NONE, null, true));
@@ -221,16 +234,19 @@ public class LaunchGroupTests extends AbstractLaunchTest {
final ILaunchConfiguration grp = createLaunchGroup(DEF_GRP_NAME, createLaunchGroupElement(t1, GroupElementPostLaunchAction.NONE, null, false));
final ILaunchConfiguration grp2 = createLaunchGroup("Group 2", createLaunchGroupElement(grp, GroupElementPostLaunchAction.NONE, null, false)); //$NON-NLS-1$
- final ILaunchConfiguration grp3 = createLaunchGroup("Group 3", createLaunchGroupElement(grp2, GroupElementPostLaunchAction.NONE, null, false), createLaunchGroupElement(t1, GroupElementPostLaunchAction.NONE, null, true)); //$NON-NLS-1$
+ final ILaunchConfiguration grp3 = createLaunchGroup("Group 3", createLaunchGroupElement(grp2, GroupElementPostLaunchAction.NONE, null, false), createLaunchGroupElement(t1, GroupElementPostLaunchAction.DELAY, 10, true)); //$NON-NLS-1$
// attention: need to do this before launching!
LaunchHistory runHistory = getRunLaunchHistory();
lcToCount = t1;
getLaunchManager().addLaunchListener(lcListener);
+
+ long startTime = System.currentTimeMillis();
grp3.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
ILaunchConfiguration[] history = runHistory.getHistory();
+ assertTrue("post launch should not be run", (System.currentTimeMillis() - startTime) < 9_000); //$NON-NLS-1$
assertEquals(4, history.length);
assertTrue("history[0] should be Group 3", history[0].contentsEqual(grp3)); //$NON-NLS-1$
assertTrue("history[1] should be Group 2", history[1].contentsEqual(grp2)); //$NON-NLS-1$
@@ -260,8 +276,10 @@ public class LaunchGroupTests extends AbstractLaunchTest {
try {
// wait some time before causing the group to continue
Thread.sleep(2000);
- attachListener.getStream().write("TestOutput"); //$NON-NLS-1$
- finished.set(true);
+ synchronized (finished) {
+ attachListener.getStream().write("TestOutput"); //$NON-NLS-1$
+ finished.set(true);
+ }
} catch (Exception e) {
e.printStackTrace();
}
@@ -273,7 +291,12 @@ public class LaunchGroupTests extends AbstractLaunchTest {
// launching the group must block until the output is produced
grp.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
- getLaunchManager().removeLaunchListener(attachListener);
+
+ synchronized (finished) {
+ // if the output appeared we have to wait for the thread to finish
+ // setting state.
+ getLaunchManager().removeLaunchListener(attachListener);
+ }
assertTrue("thread did not finish", finished.get()); //$NON-NLS-1$
assertTrue("output was not awaited", (System.currentTimeMillis() - start) >= 2000); //$NON-NLS-1$
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/SourceLookupFacilityTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/SourceLookupFacilityTests.java
index f644e1bd8..48e9a4c4f 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/SourceLookupFacilityTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/sourcelookup/SourceLookupFacilityTests.java
@@ -17,16 +17,15 @@ import java.util.LinkedHashMap;
import org.eclipse.debug.core.model.IStackFrame;
import org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility;
import org.eclipse.debug.internal.ui.sourcelookup.SourceLookupResult;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.debug.ui.sourcelookup.ISourceLookupResult;
-import junit.framework.TestCase;
-
/**
* Tests {@link SourceLookupFacility}
*
* @since 3.9.200
*/
-public class SourceLookupFacilityTests extends TestCase {
+public class SourceLookupFacilityTests extends AbstractDebugTest {
/**
* {@link IStackFrame} to be reused
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/statushandlers/StatusHandlerTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/statushandlers/StatusHandlerTests.java
index c425ac0c0..0b3d339f0 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/statushandlers/StatusHandlerTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/statushandlers/StatusHandlerTests.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.debug.tests.statushandlers;
-import junit.framework.TestCase;
-
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.preferences.InstanceScope;
@@ -19,12 +17,13 @@ import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IStatusHandler;
import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
import org.eclipse.debug.internal.core.Preferences;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.debug.tests.TestsPlugin;
/**
* Tests status handlers
*/
-public class StatusHandlerTests extends TestCase {
+public class StatusHandlerTests extends AbstractDebugTest {
/**
* Status for which a handler is registered.
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/stepfilters/StepFiltersTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/stepfilters/StepFiltersTests.java
index d93ec822a..b5ef0bd49 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/stepfilters/StepFiltersTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/stepfilters/StepFiltersTests.java
@@ -7,15 +7,14 @@
*******************************************************************************/
package org.eclipse.debug.tests.stepfilters;
-import junit.framework.TestCase;
-
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.model.IStepFilter;
+import org.eclipse.debug.tests.AbstractDebugTest;
/**
* Tests step filters
*/
-public class StepFiltersTests extends TestCase {
+public class StepFiltersTests extends AbstractDebugTest {
public void testStepFitlersExtension_01() {
IStepFilter[] stepFilters = DebugPlugin.getStepFilters("com.example.lalala.model"); //$NON-NLS-1$
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/view/memory/MemoryRenderingTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/view/memory/MemoryRenderingTests.java
index 9db3804da..f7fc4e354 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/view/memory/MemoryRenderingTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/view/memory/MemoryRenderingTests.java
@@ -10,9 +10,8 @@
*******************************************************************************/
package org.eclipse.debug.tests.view.memory;
-import junit.framework.TestCase;
-
import org.eclipse.debug.core.model.IMemoryBlock;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.memory.IMemoryRenderingBindingsListener;
import org.eclipse.debug.ui.memory.IMemoryRenderingManager;
@@ -21,7 +20,7 @@ import org.eclipse.debug.ui.memory.IMemoryRenderingType;
/**
* Tests memory rendering manager
*/
-public class MemoryRenderingTests extends TestCase {
+public class MemoryRenderingTests extends AbstractDebugTest {
public MemoryRenderingTests(String name) {
super(name);
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/CheckTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/CheckTests.java
index a4a3df63e..c4e66873a 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/CheckTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/CheckTests.java
@@ -11,12 +11,11 @@
*******************************************************************************/
package org.eclipse.debug.tests.viewer.model;
-import junit.framework.TestCase;
-
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.swt.layout.FillLayout;
@@ -32,7 +31,7 @@ import org.eclipse.ui.PlatformUI;
*
* @since 3.6
*/
-abstract public class CheckTests extends TestCase {
+abstract public class CheckTests extends AbstractDebugTest {
Display fDisplay;
Shell fShell;
ITreeModelViewer fViewer;
@@ -47,6 +46,7 @@ abstract public class CheckTests extends TestCase {
*/
@Override
protected void setUp() throws Exception {
+ super.setUp();
fDisplay = PlatformUI.getWorkbench().getDisplay();
fShell = new Shell(fDisplay);
fShell.setMaximized(true);
@@ -76,6 +76,7 @@ abstract public class CheckTests extends TestCase {
Thread.sleep(0);
}
}
+ super.tearDown();
}
@Override
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/ChildrenUpdateTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/ChildrenUpdateTests.java
index 300cbe8bf..3608d6bd8 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/ChildrenUpdateTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/ChildrenUpdateTests.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.debug.tests.viewer.model;
-import junit.framework.TestCase;
-
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.viewers.model.ChildrenUpdate;
import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
@@ -23,6 +21,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationCont
import org.eclipse.debug.internal.ui.viewers.model.provisional.IStateUpdateListener;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -38,13 +37,10 @@ import org.eclipse.swt.widgets.Display;
*
* @since 3.3
*/
-public class ChildrenUpdateTests extends TestCase {
+public class ChildrenUpdateTests extends AbstractDebugTest {
class BogusModelContentProvider extends TreeModelContentProvider {
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.ModelContentProvider#getViewer()
- */
@Override
protected IInternalTreeModelViewer getViewer() {
return new IInternalTreeModelViewer(){
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/ColumnPresentationTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/ColumnPresentationTests.java
index 9fed7b530..672fa36f5 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/ColumnPresentationTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/ColumnPresentationTests.java
@@ -13,14 +13,13 @@ package org.eclipse.debug.tests.viewer.model;
import java.util.Arrays;
-import junit.framework.TestCase;
-
import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation2;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.TreePath;
@@ -38,7 +37,7 @@ import org.eclipse.ui.XMLMemento;
/**
* Tests to verify that the viewer properly handles initial columns width.
*/
-public class ColumnPresentationTests extends TestCase implements ITestModelUpdatesListenerConstants {
+public class ColumnPresentationTests extends AbstractDebugTest implements ITestModelUpdatesListenerConstants {
private Display fDisplay;
private Shell fShell;
private TreeModelViewer fViewer;
@@ -49,20 +48,16 @@ public class ColumnPresentationTests extends TestCase implements ITestModelUpdat
super(name);
}
- /**
- * @throws java.lang.Exception
- */
@Override
protected void setUp() throws Exception {
+ super.setUp();
createViewer();
}
- /**
- * @throws java.lang.Exception
- */
@Override
protected void tearDown() throws Exception {
destroyViewer();
+ super.tearDown();
}
void createViewer() {
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/ContentTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/ContentTests.java
index 7275130a1..016df79fe 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/ContentTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/ContentTests.java
@@ -15,8 +15,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import junit.framework.TestCase;
-
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckUpdate;
@@ -26,6 +24,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.swt.layout.FillLayout;
@@ -39,7 +38,7 @@ import org.eclipse.ui.PlatformUI;
*
* @since 3.6
*/
-abstract public class ContentTests extends TestCase implements ITestModelUpdatesListenerConstants {
+abstract public class ContentTests extends AbstractDebugTest implements ITestModelUpdatesListenerConstants {
Display fDisplay;
Shell fShell;
@@ -55,6 +54,7 @@ abstract public class ContentTests extends TestCase implements ITestModelUpdates
*/
@Override
protected void setUp() throws Exception {
+ super.setUp();
fDisplay = PlatformUI.getWorkbench().getDisplay();
fShell = new Shell(fDisplay);
fShell.setMaximized(true);
@@ -84,6 +84,7 @@ abstract public class ContentTests extends TestCase implements ITestModelUpdates
Thread.sleep(0);
}
}
+ super.tearDown();
}
@Override
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/DeltaTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/DeltaTests.java
index 97a577af1..43b150bf2 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/DeltaTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/DeltaTests.java
@@ -14,13 +14,12 @@ package org.eclipse.debug.tests.viewer.model;
import java.util.Arrays;
import java.util.List;
-import junit.framework.TestCase;
-
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ITreeSelection;
@@ -34,7 +33,7 @@ import org.eclipse.ui.PlatformUI;
* Tests to verify that the viewer property retrieves and processes the
* model deltas generated by the test model.
*/
-abstract public class DeltaTests extends TestCase implements ITestModelUpdatesListenerConstants {
+abstract public class DeltaTests extends AbstractDebugTest implements ITestModelUpdatesListenerConstants {
Display fDisplay;
Shell fShell;
ITreeModelViewer fViewer;
@@ -49,6 +48,7 @@ abstract public class DeltaTests extends TestCase implements ITestModelUpdatesLi
*/
@Override
protected void setUp() throws Exception {
+ super.setUp();
fDisplay = PlatformUI.getWorkbench().getDisplay();
fShell = new Shell(fDisplay);
fShell.setMaximized(true);
@@ -79,6 +79,7 @@ abstract public class DeltaTests extends TestCase implements ITestModelUpdatesLi
Thread.sleep(0);
}
}
+ super.tearDown();
}
@Override
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/FilterTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/FilterTests.java
index 4659ec17a..bd4a39efe 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/FilterTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/FilterTests.java
@@ -13,14 +13,13 @@ package org.eclipse.debug.tests.viewer.model;
import java.util.regex.Pattern;
-import junit.framework.TestCase;
-
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewerFilter;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.jface.viewers.ITreeSelection;
import org.eclipse.jface.viewers.TreePath;
@@ -38,7 +37,7 @@ import org.eclipse.ui.PlatformUI;
*
* @since 3.8
*/
-abstract public class FilterTests extends TestCase implements ITestModelUpdatesListenerConstants {
+abstract public class FilterTests extends AbstractDebugTest implements ITestModelUpdatesListenerConstants {
Display fDisplay;
Shell fShell;
@@ -54,6 +53,7 @@ abstract public class FilterTests extends TestCase implements ITestModelUpdatesL
*/
@Override
protected void setUp() throws Exception {
+ super.setUp();
fDisplay = PlatformUI.getWorkbench().getDisplay();
fShell = new Shell(fDisplay);
fShell.setMaximized(true);
@@ -83,6 +83,7 @@ abstract public class FilterTests extends TestCase implements ITestModelUpdatesL
Thread.sleep(0);
}
}
+ super.tearDown();
}
@Override
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/FilterTransformTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/FilterTransformTests.java
index dc52f8b2f..a70173c62 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/FilterTransformTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/FilterTransformTests.java
@@ -10,16 +10,15 @@
*******************************************************************************/
package org.eclipse.debug.tests.viewer.model;
-import junit.framework.TestCase;
-
import org.eclipse.debug.internal.ui.viewers.model.FilterTransform;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.jface.viewers.TreePath;
/**
* Tests the virtual viewer's filter transform
* @since 3.3
*/
-public class FilterTransformTests extends TestCase {
+public class FilterTransformTests extends AbstractDebugTest {
public Object root;
public Object element0;
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/JFaceViewerTopIndexTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/JFaceViewerTopIndexTests.java
index cc557cb60..1f14448eb 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/JFaceViewerTopIndexTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/JFaceViewerTopIndexTests.java
@@ -13,8 +13,6 @@
*******************************************************************************/
package org.eclipse.debug.tests.viewer.model;
-import junit.framework.TestCase;
-
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
@@ -23,6 +21,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDeltaVisito
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.swt.SWT;
@@ -34,7 +33,7 @@ import org.eclipse.ui.PlatformUI;
/**
* @since 3.6
*/
-public class JFaceViewerTopIndexTests extends TestCase implements ITestModelUpdatesListenerConstants {
+public class JFaceViewerTopIndexTests extends AbstractDebugTest implements ITestModelUpdatesListenerConstants {
Display fDisplay;
Shell fShell;
@@ -50,6 +49,7 @@ public class JFaceViewerTopIndexTests extends TestCase implements ITestModelUpda
*/
@Override
protected void setUp() throws Exception {
+ super.setUp();
fDisplay = PlatformUI.getWorkbench().getDisplay();
fShell = new Shell(fDisplay);
fShell.setSize(300, 80);
@@ -77,6 +77,7 @@ public class JFaceViewerTopIndexTests extends TestCase implements ITestModelUpda
Thread.sleep(0);
}
}
+ super.tearDown();
}
@Override
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/LazyTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/LazyTests.java
index a19ae733a..97c7c7e23 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/LazyTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/LazyTests.java
@@ -11,12 +11,11 @@
*******************************************************************************/
package org.eclipse.debug.tests.viewer.model;
-import junit.framework.TestCase;
-
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TreePath;
@@ -32,7 +31,7 @@ import org.eclipse.ui.PlatformUI;
*
* @since 3.6
*/
-abstract public class LazyTests extends TestCase implements ITestModelUpdatesListenerConstants {
+abstract public class LazyTests extends AbstractDebugTest implements ITestModelUpdatesListenerConstants {
Display fDisplay;
Shell fShell;
@@ -48,6 +47,7 @@ abstract public class LazyTests extends TestCase implements ITestModelUpdatesLis
*/
@Override
protected void setUp() throws Exception {
+ super.setUp();
fDisplay = PlatformUI.getWorkbench().getDisplay();
fShell = new Shell(fDisplay);
fShell.setMaximized(true);
@@ -76,6 +76,7 @@ abstract public class LazyTests extends TestCase implements ITestModelUpdatesLis
Thread.sleep(0);
}
}
+ super.tearDown();
}
@Override
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/PerformanceTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/PerformanceTests.java
index 6193f56ae..d38581ffd 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/PerformanceTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/PerformanceTests.java
@@ -11,13 +11,12 @@
*******************************************************************************/
package org.eclipse.debug.tests.viewer.model;
-import junit.framework.TestCase;
-
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.TreeSelection;
@@ -33,7 +32,7 @@ import org.eclipse.ui.PlatformUI;
/**
* Tests to measure the performance of the viewer updates.
*/
-abstract public class PerformanceTests extends TestCase implements ITestModelUpdatesListenerConstants {
+abstract public class PerformanceTests extends AbstractDebugTest implements ITestModelUpdatesListenerConstants {
Display fDisplay;
Shell fShell;
ITreeModelViewer fViewer;
@@ -48,6 +47,7 @@ abstract public class PerformanceTests extends TestCase implements ITestModelUpd
*/
@Override
protected void setUp() throws Exception {
+ super.setUp();
fDisplay = PlatformUI.getWorkbench().getDisplay();
fShell = new Shell(fDisplay);
fShell.setMaximized(true);
@@ -78,6 +78,7 @@ abstract public class PerformanceTests extends TestCase implements ITestModelUpd
Thread.sleep(0);
}
}
+ super.tearDown();
}
@Override
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/PopupTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/PopupTests.java
index 973a5a883..08503024e 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/PopupTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/PopupTests.java
@@ -16,12 +16,11 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import junit.framework.TestCase;
-
import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ITreeSelection;
@@ -39,7 +38,7 @@ import org.eclipse.ui.PlatformUI;
*
* @since 3.6
*/
-abstract public class PopupTests extends TestCase implements ITestModelUpdatesListenerConstants {
+abstract public class PopupTests extends AbstractDebugTest implements ITestModelUpdatesListenerConstants {
Display fDisplay;
Shell fShell;
ITreeModelViewer fViewer;
@@ -54,6 +53,7 @@ abstract public class PopupTests extends TestCase implements ITestModelUpdatesLi
*/
@Override
protected void setUp() throws Exception {
+ super.setUp();
fDisplay = PlatformUI.getWorkbench().getDisplay();
fShell = new Shell(fDisplay);
fShell.setMaximized(true);
@@ -88,6 +88,7 @@ abstract public class PopupTests extends TestCase implements ITestModelUpdatesLi
Thread.sleep(0);
}
}
+ super.tearDown();
}
/**
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/PresentationContextTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/PresentationContextTests.java
index d89a54f03..6c47190ba 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/PresentationContextTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/PresentationContextTests.java
@@ -11,10 +11,9 @@
*******************************************************************************/
package org.eclipse.debug.tests.viewer.model;
-import junit.framework.TestCase;
-
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.ui.IPersistableElement;
import org.eclipse.ui.XMLMemento;
@@ -23,7 +22,7 @@ import org.eclipse.ui.XMLMemento;
*
* @since 3.4
*/
-public class PresentationContextTests extends TestCase {
+public class PresentationContextTests extends AbstractDebugTest {
public PresentationContextTests(String name) {
super(name);
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/SelectionTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/SelectionTests.java
index f41b285c9..8cdc499c6 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/SelectionTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/SelectionTests.java
@@ -14,13 +14,12 @@ package org.eclipse.debug.tests.viewer.model;
import java.util.ArrayList;
import java.util.List;
-import junit.framework.TestCase;
-
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
@@ -34,7 +33,7 @@ import org.eclipse.ui.PlatformUI;
/**
* Tests to verify that the viewer properly handles selection changes.
*/
-abstract public class SelectionTests extends TestCase implements ITestModelUpdatesListenerConstants {
+abstract public class SelectionTests extends AbstractDebugTest implements ITestModelUpdatesListenerConstants {
Display fDisplay;
Shell fShell;
ITreeModelViewer fViewer;
@@ -49,6 +48,7 @@ abstract public class SelectionTests extends TestCase implements ITestModelUpdat
*/
@Override
protected void setUp() throws Exception {
+ super.setUp();
fDisplay = PlatformUI.getWorkbench().getDisplay();
fShell = new Shell(fDisplay);
fShell.setMaximized(true);
@@ -78,6 +78,7 @@ abstract public class SelectionTests extends TestCase implements ITestModelUpdat
Thread.sleep(0);
}
}
+ super.tearDown();
}
private static class SelectionListener implements ISelectionChangedListener {
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/StateTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/StateTests.java
index 0e60a1d25..19a7dff88 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/StateTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/StateTests.java
@@ -15,13 +15,12 @@ import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
-import junit.framework.TestCase;
-
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.debug.internal.ui.viewers.model.IInternalTreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.jface.viewers.ITreeSelection;
import org.eclipse.jface.viewers.TreePath;
@@ -37,7 +36,7 @@ import org.eclipse.ui.PlatformUI;
*
* @since 3.6
*/
-abstract public class StateTests extends TestCase implements ITestModelUpdatesListenerConstants {
+abstract public class StateTests extends AbstractDebugTest implements ITestModelUpdatesListenerConstants {
Display fDisplay;
Shell fShell;
ITreeModelViewer fViewer;
@@ -52,6 +51,7 @@ abstract public class StateTests extends TestCase implements ITestModelUpdatesLi
*/
@Override
protected void setUp() throws Exception {
+ super.setUp();
fDisplay = PlatformUI.getWorkbench().getDisplay();
fShell = new Shell(fDisplay);
@@ -82,6 +82,7 @@ abstract public class StateTests extends TestCase implements ITestModelUpdatesLi
Thread.sleep(0);
}
}
+ super.tearDown();
}
@Override
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/UpdateTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/UpdateTests.java
index 5aa42493b..48e3c71f4 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/UpdateTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/UpdateTests.java
@@ -16,8 +16,6 @@ import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
-import junit.framework.TestCase;
-
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate;
@@ -26,6 +24,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDeltaVisito
import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.debug.tests.viewer.model.TestModel.TestElement;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.swt.layout.FillLayout;
@@ -40,7 +39,7 @@ import org.junit.Assert;
*
* @since 3.6
*/
-abstract public class UpdateTests extends TestCase implements ITestModelUpdatesListenerConstants {
+abstract public class UpdateTests extends AbstractDebugTest implements ITestModelUpdatesListenerConstants {
Display fDisplay;
Shell fShell;
ITreeModelViewer fViewer;
@@ -55,6 +54,7 @@ abstract public class UpdateTests extends TestCase implements ITestModelUpdatesL
*/
@Override
protected void setUp() throws Exception {
+ super.setUp();
fDisplay = PlatformUI.getWorkbench().getDisplay();
fShell = new Shell(fDisplay);
fShell.setMaximized(true);
@@ -84,6 +84,7 @@ abstract public class UpdateTests extends TestCase implements ITestModelUpdatesL
Thread.sleep(0);
}
}
+ super.tearDown();
}
@Override
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/VirtualViewerLazyModeTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/VirtualViewerLazyModeTests.java
index a695acf5d..ac85112e6 100644
--- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/VirtualViewerLazyModeTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/viewer/model/VirtualViewerLazyModeTests.java
@@ -11,11 +11,10 @@
*******************************************************************************/
package org.eclipse.debug.tests.viewer.model;
-import junit.framework.TestCase;
-
import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualTreeModelViewer;
+import org.eclipse.debug.tests.AbstractDebugTest;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
@@ -29,7 +28,7 @@ import org.eclipse.ui.PlatformUI;
*
* @since 3.6
*/
-public class VirtualViewerLazyModeTests extends TestCase {
+public class VirtualViewerLazyModeTests extends AbstractDebugTest {
Display fDisplay;
Shell fShell;
ITreeModelViewer fViewer;
@@ -44,6 +43,7 @@ public class VirtualViewerLazyModeTests extends TestCase {
*/
@Override
protected void setUp() throws Exception {
+ super.setUp();
fDisplay = PlatformUI.getWorkbench().getDisplay();
fShell = new Shell(fDisplay/*, SWT.ON_TOP | SWT.SHELL_TRIM*/);
fShell.setMaximized(true);
@@ -80,6 +80,7 @@ public class VirtualViewerLazyModeTests extends TestCase {
Thread.sleep(0);
}
}
+ super.tearDown();
}
public void test() {
diff --git a/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs
index 1d1c1c0e3..ab2cbd1a8 100644
--- a/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs
@@ -91,7 +91,7 @@ org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
@@ -107,6 +107,9 @@ org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
+org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
diff --git a/org.eclipse.debug.ui/META-INF/MANIFEST.MF b/org.eclipse.debug.ui/META-INF/MANIFEST.MF
index a55ecbdba..96a9a5ea2 100644
--- a/org.eclipse.debug.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.debug.ui; singleton:=true
-Bundle-Version: 3.12.0.qualifier
+Bundle-Version: 3.12.100.qualifier
Bundle-Activator: org.eclipse.debug.internal.ui.DebugUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.debug.ui/pom.xml b/org.eclipse.debug.ui/pom.xml
index fd2fa7047..789f8620e 100644
--- a/org.eclipse.debug.ui/pom.xml
+++ b/org.eclipse.debug.ui/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2016 Eclipse Foundation and others.
+ Copyright (c) 2012, 2017 Eclipse Foundation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
@@ -14,11 +14,11 @@
<parent>
<artifactId>eclipse.platform.debug</artifactId>
<groupId>eclipse.platform.debug</groupId>
- <version>4.7.1-SNAPSHOT</version>
+ <version>4.8.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.debug</groupId>
<artifactId>org.eclipse.debug.ui</artifactId>
- <version>3.12.0-SNAPSHOT</version>
+ <version>3.12.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>
<code.ignoredWarnings>-warn:+resource,-deprecation,unavoidableGenericProblems</code.ignoredWarnings>
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java
index c0ab0687c..330000891 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ColorManager.java
@@ -35,7 +35,7 @@ public class ColorManager {
return fgColorManager;
}
- protected Map<RGB, Color> fColorTable = new HashMap<RGB, Color>(10);
+ protected Map<RGB, Color> fColorTable = new HashMap<>(10);
public Color getColor(RGB rgb) {
Color color= fColorTable.get(rgb);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
index a8ae9ca77..62affedc8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
@@ -215,7 +215,7 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener,
*
* @since 3.3
*/
- private Set<ISaveParticipant> fSaveParticipants = new HashSet<ISaveParticipant>();
+ private Set<ISaveParticipant> fSaveParticipants = new HashSet<>();
/**
* Theme listener.
@@ -507,7 +507,7 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener,
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
- Hashtable<String, String> props = new Hashtable<String, String>(2);
+ Hashtable<String, String> props = new Hashtable<>(2);
props.put(org.eclipse.osgi.service.debug.DebugOptions.LISTENER_SYMBOLICNAME, getUniqueIdentifier());
context.registerService(DebugOptionsListener.class.getName(), this, props);
ResourcesPlugin.getWorkspace().addSaveParticipant(getUniqueIdentifier(),
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java
index c25826f35..67b7d592b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java
@@ -61,7 +61,7 @@ public class DefaultLabelProvider implements ILabelProvider {
/**
* Maps image descriptors to images.
*/
- private Map<ImageDescriptor, Image> fImages = new HashMap<ImageDescriptor, Image>();
+ private Map<ImageDescriptor, Image> fImages = new HashMap<>();
/**
* @see ILabelProvider#getImage(Object)
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java
index e80176e86..beb7193f2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DelegatingModelPresentation.java
@@ -59,11 +59,11 @@ public class DelegatingModelPresentation implements IDebugModelPresentation, IDe
* A mapping of attribute ids to their values
* @see IDebugModelPresentation#setAttribute
*/
- private HashMap<String, Object> fAttributes = new HashMap<String, Object>(3);
+ private HashMap<String, Object> fAttributes = new HashMap<>(3);
/**
* A table of label providers keyed by debug model identifiers.
*/
- private HashMap<String, IDebugModelPresentation> fLabelProviders = new HashMap<String, IDebugModelPresentation>(5);
+ private HashMap<String, IDebugModelPresentation> fLabelProviders = new HashMap<>(5);
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDebugEditorPresentation#removeAnnotations(org.eclipse.ui.IEditorPart, org.eclipse.debug.core.model.IThread)
@@ -328,7 +328,7 @@ public class DelegatingModelPresentation implements IDebugModelPresentation, IDe
* @since 3.0
*/
public Map<String, Object> getAttributeMap() {
- return new HashMap<String, Object>(fAttributes);
+ return new HashMap<>(fAttributes);
}
/**
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerManager.java
index fb3cfeda1..580b284f4 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/InstructionPointerManager.java
@@ -50,12 +50,12 @@ public class InstructionPointerManager{
/**
* Set containing all instruction pointer contexts this class manages
*/
- private Set<InstructionPointerContext> fIPCSet = new HashSet<InstructionPointerContext>();
+ private Set<InstructionPointerContext> fIPCSet = new HashSet<>();
/**
* Maps ITextEditors to the set of instruction pointer contexts that are displayed in the editor
*/
- private Map<ITextEditor, Set<InstructionPointerContext>> fEditorMap = new HashMap<ITextEditor, Set<InstructionPointerContext>>();
+ private Map<ITextEditor, Set<InstructionPointerContext>> fEditorMap = new HashMap<>();
/**
* Part listener added to editors that contain annotations. Allows instruction pointer contexts to
@@ -144,7 +144,7 @@ public class InstructionPointerManager{
// Add the IPC to the set and map
Set<InstructionPointerContext> editorIPCs = fEditorMap.get(textEditor);
if (editorIPCs == null){
- editorIPCs = new HashSet<InstructionPointerContext>();
+ editorIPCs = new HashSet<>();
fEditorMap.put(textEditor, editorIPCs);
} else {
editorIPCs.remove(ipc);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchConfigurationTabExtension.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchConfigurationTabExtension.java
index f951538ef..f6290f533 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchConfigurationTabExtension.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LaunchConfigurationTabExtension.java
@@ -104,7 +104,7 @@ public final class LaunchConfigurationTabExtension {
*/
public Set<String> getDelegateSet() {
if(fDelegates == null) {
- fDelegates = new HashSet<String>();
+ fDelegates = new HashSet<>();
IConfigurationElement[] children = fElement.getChildren(IConfigurationElementConstants.ASSOCIATED_DELEGATE);
String id = null;
for(int i = 0; i < children.length; i++) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java
index 355fdf203..0cbd81106 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java
@@ -57,7 +57,7 @@ public class LazyModelPresentation implements IDebugModelPresentation, IDebugEdi
* A temporary mapping of attribute ids to their values
* @see IDebugModelPresentation#setAttribute
*/
- protected HashMap<String, Object> fAttributes = new HashMap<String, Object>(3);
+ protected HashMap<String, Object> fAttributes = new HashMap<>(3);
/**
* The config element that defines the extension
@@ -385,7 +385,7 @@ public class LazyModelPresentation implements IDebugModelPresentation, IDebugEdi
* @since 3.0
*/
public Map<String, Object> getAttributeMap() {
- return new HashMap<String, Object>(fAttributes);
+ return new HashMap<>(fAttributes);
}
/**
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/MultipleInputDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/MultipleInputDialog.java
index 871301813..4cbc8648d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/MultipleInputDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/MultipleInputDialog.java
@@ -47,10 +47,10 @@ public class MultipleInputDialog extends Dialog {
protected Composite panel;
- protected List<FieldSummary> fieldList = new ArrayList<FieldSummary>();
- protected List<Text> controlList = new ArrayList<Text>();
- protected List<Validator> validators = new ArrayList<Validator>();
- protected Map<Object, String> valueMap = new HashMap<Object, String>();
+ protected List<FieldSummary> fieldList = new ArrayList<>();
+ protected List<Text> controlList = new ArrayList<>();
+ protected List<Validator> validators = new ArrayList<>();
+ protected Map<Object, String> valueMap = new HashMap<>();
private String title;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariableValueEditorManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariableValueEditorManager.java
index 26bf56f98..8a921aed9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariableValueEditorManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/VariableValueEditorManager.java
@@ -37,7 +37,7 @@ public class VariableValueEditorManager {
* which are replaced by IVariableValueEditors as the editors
* are instantiated (editors are loaded lazily, then cached).
*/
- private Map<String, Object> fEditorMap = new HashMap<String, Object>();
+ private Map<String, Object> fEditorMap = new HashMap<>();
/**
* The singleton instance of this manager.
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AddToFavoritesAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AddToFavoritesAction.java
index 5c896783e..94dc038dd 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AddToFavoritesAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AddToFavoritesAction.java
@@ -175,7 +175,7 @@ public class AddToFavoritesAction extends SelectionListenerAction {
try {
List<String> list = getLaunchConfiguration().getAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, (List<String>) null);
if (list == null) {
- list = new ArrayList<String>();
+ list = new ArrayList<>();
}
list.add(getGroup().getIdentifier());
ILaunchConfigurationWorkingCopy copy = getLaunchConfiguration().getWorkingCopy();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConfigureColumnsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConfigureColumnsAction.java
index 3359d8888..10ab2e5d4 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConfigureColumnsAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ConfigureColumnsAction.java
@@ -67,7 +67,7 @@ public class ConfigureColumnsAction extends Action implements IUpdate {
class ColumnLabelProvider extends LabelProvider {
- private Map<ImageDescriptor, Image> fImages = new HashMap<ImageDescriptor, Image>();
+ private Map<ImageDescriptor, Image> fImages = new HashMap<>();
@Override
public Image getImage(Object element) {
@@ -129,7 +129,7 @@ public class ConfigureColumnsAction extends Action implements IUpdate {
ActionMessages.ConfigureColumnsAction_1);
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.CONFIGURE_COLUMNS_DIALOG);
String[] visibleColumns = fViewer.getVisibleColumns();
- List<String> initialSelection = new ArrayList<String>(visibleColumns.length);
+ List<String> initialSelection = new ArrayList<>(visibleColumns.length);
for (int i = 0; i < visibleColumns.length; i++) {
initialSelection.add(visibleColumns[i]);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java
index 58c975542..1f2d34370 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/LaunchShortcutAction.java
@@ -97,7 +97,7 @@ public class LaunchShortcutAction extends Action {
if(!types.isEmpty()) {
LaunchingResourceManager lrm = DebugUIPlugin.getDefault().getLaunchingResourceManager();
IStructuredSelection selection = SelectedResourceManager.getDefault().getCurrentSelection();
- ArrayList<LaunchShortcutExtension> shortcuts = new ArrayList<LaunchShortcutExtension>();
+ ArrayList<LaunchShortcutExtension> shortcuts = new ArrayList<>();
shortcuts.add(fShortcut);
IResource resource = SelectedResourceManager.getDefault().getSelectedResource();
if(resource == null) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java
index 7580f42c1..befa450fc 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java
@@ -72,7 +72,7 @@ public class RelaunchActionDelegate extends AbstractDebugActionDelegate {
if (s.isEmpty()) {
return s;
}
- Set<ILaunch> dups = new LinkedHashSet<ILaunch>();
+ Set<ILaunch> dups = new LinkedHashSet<>();
Iterator<?> iterator = s.iterator();
while (iterator.hasNext()) {
Object object = iterator.next();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java
index 67b35642f..d77d2f8c2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RemoveAllTerminatedAction.java
@@ -43,7 +43,7 @@ public class RemoveAllTerminatedAction extends AbstractRemoveAllActionDelegate i
}
public static void removeTerminatedLaunches(ILaunch[] elements) {
- List<ILaunch> removed = new ArrayList<ILaunch>();
+ List<ILaunch> removed = new ArrayList<>();
for (int i = 0; i < elements.length; i++) {
ILaunch launch = elements[i];
if (launch.isTerminated()) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SelectAllAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SelectAllAction.java
index f1b6c19e7..44f87c6d0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SelectAllAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/SelectAllAction.java
@@ -65,7 +65,7 @@ public abstract class SelectAllAction extends AbstractRemoveAllActionDelegate {
}
Viewer viewer = ((IDebugView) getView()).getViewer();
if (viewer instanceof TreeViewer) {
- ArrayList<TreeItem> allVisible= new ArrayList<TreeItem>();
+ ArrayList<TreeItem> allVisible= new ArrayList<>();
Tree tree= ((TreeViewer) viewer).getTree();
collectExpandedAndVisible(tree.getItems(), allVisible);
tree.setSelection(allVisible.toArray(new TreeItem[allVisible.size()]));
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.java
index ec665cd6a..c422d04df 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.java
@@ -80,7 +80,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM
*/
public static String DEFAULT_TOGGLE_TARGET_ID = "default"; //$NON-NLS-1$
- private static Set<String> DEFAULT_TOGGLE_TARGET_ID_SET = new TreeSet<String>();
+ private static Set<String> DEFAULT_TOGGLE_TARGET_ID_SET = new TreeSet<>();
static {
DEFAULT_TOGGLE_TARGET_ID_SET.add(DEFAULT_TOGGLE_TARGET_ID);
}
@@ -442,7 +442,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM
* Maps the IDs of toggle targets to the factory that can create them.
* There can currently only be one factory for a given toggle target.
*/
- private Map<String, IToggleBreakpointsTargetFactory> fFactoriesByTargetID = new HashMap<String, IToggleBreakpointsTargetFactory>();
+ private Map<String, IToggleBreakpointsTargetFactory> fFactoriesByTargetID = new HashMap<>();
/**
* List of listeners to changes in the preferred toggle targets list.
@@ -453,7 +453,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM
* Initializes the collection of known factories from extension point contributions.
*/
private void initializeFactories() {
- fKnownFactories = new LinkedHashMap<String, IToggleBreakpointsTargetFactory>();
+ fKnownFactories = new LinkedHashMap<>();
fKnownFactories.put(DEFAULT_TOGGLE_TARGET_ID, new ToggleBreakpointsTargetAdapterFactory());
IExtensionPoint ep = Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_TOGGLE_BREAKPOINTS_TARGET_FACTORIES);
IConfigurationElement[] elements = ep.getConfigurationElements();
@@ -492,7 +492,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM
if (fKnownFactories == null) {
initializeFactories();
}
- Set<IToggleBreakpointsTargetFactory> set = new HashSet<IToggleBreakpointsTargetFactory>();
+ Set<IToggleBreakpointsTargetFactory> set = new HashSet<>();
for (Entry<String, IToggleBreakpointsTargetFactory> entry : fKnownFactories.entrySet()) {
IToggleBreakpointsTargetFactory factory = entry.getValue();
if (factory instanceof ToggleTargetFactory &&
@@ -516,7 +516,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM
* @return Set of toggle target IDs or an empty set
*/
private Set<String> getEnabledTargetIDs(Set<IToggleBreakpointsTargetFactory> factoriesToQuery, IWorkbenchPart part, ISelection selection) {
- Set<String> idsForSelection = new TreeSet<String>();
+ Set<String> idsForSelection = new TreeSet<>();
for (IToggleBreakpointsTargetFactory factory : factoriesToQuery) {
for(String targetID : factory.getToggleTargets(part, selection)) {
fFactoriesByTargetID.put(targetID, factory);
@@ -618,7 +618,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM
* @see #storePreferredTargets()
*/
private void loadPreferredTargets() {
- fPreferredTargets = new HashMap<Set<String>, String>();
+ fPreferredTargets = new HashMap<>();
String preferenceValue = Platform.getPreferencesService().getString(
DebugUIPlugin.getUniqueIdentifier(),
PREF_TARGETS,
@@ -632,7 +632,7 @@ public class ToggleBreakpointsTargetManager implements IToggleBreakpointsTargetM
String token = entryTokenizer.nextToken();
int valueStart = token.indexOf(':');
StringTokenizer keyTokenizer = new StringTokenizer(token.substring(0,valueStart),","); //$NON-NLS-1$
- Set<String> keys = new TreeSet<String>();
+ Set<String> keys = new TreeSet<>();
while (keyTokenizer.hasMoreTokens()){
keys.add(keyTokenizer.nextToken());
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsActionDelegate.java
index 975c9880d..c2133acc8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsActionDelegate.java
@@ -92,12 +92,12 @@ public class CopyBreakpointsActionDelegate extends VirtualCopyToClipboardActionD
if (fStamp == LocalSelectionTransfer.getTransfer().getSelectionSetTime()) {
ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
if (selection instanceof IStructuredSelection) {
- Set<IBreakpoint> removed = new HashSet<IBreakpoint>();
+ Set<IBreakpoint> removed = new HashSet<>();
for (int i = 0; i < breakpoints.length; i++) {
removed.add(breakpoints[i]);
}
boolean modified = false;
- List<Object> remain = new ArrayList<Object>();
+ List<Object> remain = new ArrayList<>();
IStructuredSelection ss = (IStructuredSelection) selection;
Iterator<?> iterator = ss.iterator();
while (iterator.hasNext()) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java
index 681249d75..44876edb6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java
@@ -132,7 +132,7 @@ public class GroupBreakpointsByAction extends AbstractBreakpointsViewAction impl
}
public List<IAction> getActions(int accel) {
- List<IAction> actions = new ArrayList<IAction>();
+ List<IAction> actions = new ArrayList<>();
IBreakpointOrganizer[] organizers = BreakpointOrganizerManager.getDefault().getOrganizers();
for (int i = 0; i < organizers.length; i++) {
IBreakpointOrganizer organizer = organizers[i];
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java
index acc4754b7..f3b604566 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java
@@ -68,7 +68,7 @@ public class GroupBreakpointsByDialog extends TrayDialog {
private TreeViewer fSelectedViewer;
private SelectedOrganizerProvider fSelectedOrganizersProvider= new SelectedOrganizerProvider();
- private List<Object> fResult = new ArrayList<Object>();
+ private List<Object> fResult = new ArrayList<>();
private Button fAddButton;
private Button fRemoveButton;
@@ -411,7 +411,7 @@ public class GroupBreakpointsByDialog extends TrayDialog {
* that are available but not currently selected.
*/
private class AvailableOrganizersProvider implements IStructuredContentProvider {
- protected List<IBreakpointOrganizer> availableOrganziers = new ArrayList<IBreakpointOrganizer>();
+ protected List<IBreakpointOrganizer> availableOrganziers = new ArrayList<>();
public void addAvailable(IBreakpointOrganizer organizer) {
availableOrganziers.add(organizer);
@@ -437,7 +437,7 @@ public class GroupBreakpointsByDialog extends TrayDialog {
* appear in the breakpoints view.
*/
private class SelectedOrganizerProvider implements ITreeContentProvider {
- protected List<Object> selectedOrganizers = new ArrayList<Object>();
+ protected List<Object> selectedOrganizers = new ArrayList<>();
public void addSelected(IBreakpointOrganizer organizer) {
selectedOrganizers.add(organizer);
@@ -501,7 +501,7 @@ public class GroupBreakpointsByDialog extends TrayDialog {
* Label provider which provides text and images for breakpoint container factories
*/
private class BreakpointOrganzierLabelProvider extends LabelProvider {
- private HashMap<ImageDescriptor, Image> fImageCache = new HashMap<ImageDescriptor, Image>();
+ private HashMap<ImageDescriptor, Image> fImageCache = new HashMap<>();
@Override
public String getText(Object element) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java
index 6a3bfa55b..81cafc354 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java
@@ -69,7 +69,7 @@ public class RemoveFromWorkingSetAction extends BreakpointSelectionAction {
* @return
*/
protected BreakpointSetElement[] getRemovableBreakpoints(IStructuredSelection selection) {
- List<BreakpointSetElement> res = new ArrayList<BreakpointSetElement>();
+ List<BreakpointSetElement> res = new ArrayList<>();
if (selection instanceof ITreeSelection) {
ITreeSelection tSel = (ITreeSelection)selection;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SelectBreakpointWorkingsetDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SelectBreakpointWorkingsetDialog.java
index 6680193d7..c857d3fc9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SelectBreakpointWorkingsetDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/SelectBreakpointWorkingsetDialog.java
@@ -68,7 +68,7 @@ public class SelectBreakpointWorkingsetDialog extends AbstractDebugCheckboxSelec
*/
private IWorkingSet[] getBreakpointWorkingSets() {
IWorkingSet[] ws = PlatformUI.getWorkbench().getWorkingSetManager().getAllWorkingSets();
- ArrayList<IWorkingSet> list = new ArrayList<IWorkingSet>();
+ ArrayList<IWorkingSet> list = new ArrayList<>();
for(int i = 0; i < ws.length; i++) {
if(IDebugUIConstants.BREAKPOINT_WORKINGSET_ID.equals(ws[i].getId())) {
list.add(ws[i]);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.java
index 70b7fa67f..167077731 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.java
@@ -60,8 +60,8 @@ public class RemoveBreakpointAction extends AbstractSelectionActionDelegate {
IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
@Override
public void run(IProgressMonitor monitor) {
- ArrayList<IBreakpoint> breakpointsToDelete = new ArrayList<IBreakpoint>();
- ArrayList<IWorkingSet> groupsToDelete = new ArrayList<IWorkingSet>();
+ ArrayList<IBreakpoint> breakpointsToDelete = new ArrayList<>();
+ ArrayList<IWorkingSet> groupsToDelete = new ArrayList<>();
boolean deleteAll = false;
boolean deleteContainer = false;
boolean prompted = false;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.java
index d4ba34a0e..a981d0df4 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.java
@@ -58,7 +58,7 @@ public class ShowSupportedBreakpointsAction extends ToggleFilterAction implement
/**
* The list of identifiers for the current state
*/
- private List<IDebugTarget> fDebugTargets= new ArrayList<IDebugTarget>(2);
+ private List<IDebugTarget> fDebugTargets= new ArrayList<>(2);
/**
* A viewer filter that selects breakpoints that have
@@ -146,7 +146,7 @@ public class ShowSupportedBreakpointsAction extends ToggleFilterAction implement
}
if (debugTargets.size() == fDebugTargets.size()) {
- List<IDebugTarget> copy= new ArrayList<IDebugTarget>(debugTargets.size());
+ List<IDebugTarget> copy= new ArrayList<>(debugTargets.size());
for (IDebugTarget target : fDebugTargets) {
Iterator<IDebugTarget> newDebugTargets= debugTargets.iterator();
while (newDebugTargets.hasNext()) {
@@ -186,7 +186,7 @@ public class ShowSupportedBreakpointsAction extends ToggleFilterAction implement
}
protected List<IDebugTarget> getDebugTargets(IStructuredSelection ss) {
- List<IDebugTarget> debugTargets= new ArrayList<IDebugTarget>(2);
+ List<IDebugTarget> debugTargets= new ArrayList<>(2);
Iterator<?> i= ss.iterator();
while (i.hasNext()) {
Object next= i.next();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveExpressionAction.java
index 25c40ec5c..1b2e92367 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveExpressionAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/RemoveExpressionAction.java
@@ -33,7 +33,7 @@ public class RemoveExpressionAction extends AbstractSelectionActionDelegate {
protected IExpression[] getExpressions() {
TreeSelection selection = (TreeSelection) getSelection();
TreePath[] paths = selection.getPaths();
- List<IExpression> expressions = new ArrayList<IExpression>();
+ List<IExpression> expressions = new ArrayList<>();
for (int i = paths.length-1; i >=0; i--) {
TreePath path = paths[i];
Object segment = path.getFirstSegment();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionAction.java
index 0f61d579a..bf50966bd 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionAction.java
@@ -61,7 +61,7 @@ public abstract class WatchExpressionAction implements IViewActionDelegate {
}
protected IWatchExpression[] getSelectedExpressions() {
- List<Object> list = new LinkedList<Object>();
+ List<Object> list = new LinkedList<>();
IStructuredSelection currentSelection = getCurrentSelection();
if (currentSelection == null) {
return EMPTY_EXPRESSION_ARRAY;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/OtherBreakpointCategory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/OtherBreakpointCategory.java
index 58d1d7b2d..95da0c7f4 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/OtherBreakpointCategory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/OtherBreakpointCategory.java
@@ -33,7 +33,7 @@ import org.eclipse.ui.model.IWorkbenchAdapter;
*/
public class OtherBreakpointCategory extends PlatformObject implements IWorkbenchAdapter {
- private static Map<IBreakpointOrganizer, IAdaptable[]> fOthers = new HashMap<IBreakpointOrganizer, IAdaptable[]>();
+ private static Map<IBreakpointOrganizer, IAdaptable[]> fOthers = new HashMap<>();
private IBreakpointOrganizer fOrganizer;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java
index f2799ff61..3ac0ecd2b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java
@@ -39,7 +39,7 @@ public class DebugCommandService implements IDebugContextListener {
/**
* Maps command types to actions to update
*/
- private Map<Class<?>, List<IEnabledTarget>> fCommandUpdates = new HashMap<Class<?>, List<IEnabledTarget>>();
+ private Map<Class<?>, List<IEnabledTarget>> fCommandUpdates = new HashMap<>();
/**
* Window this service is for.
@@ -54,7 +54,7 @@ public class DebugCommandService implements IDebugContextListener {
/**
* Service per window
*/
- private static Map<IWorkbenchWindow, DebugCommandService> fgServices = new HashMap<IWorkbenchWindow, DebugCommandService>();
+ private static Map<IWorkbenchWindow, DebugCommandService> fgServices = new HashMap<>();
/**
* Returns the service for a window.
@@ -117,7 +117,7 @@ public class DebugCommandService implements IDebugContextListener {
Job.getJobManager().cancel(commandType);
List<IEnabledTarget> actions = fCommandUpdates.get(commandType);
if (actions == null) {
- actions = new ArrayList<IEnabledTarget>();
+ actions = new ArrayList<>();
fCommandUpdates.put(commandType, actions);
}
actions.add(action);
@@ -144,7 +144,7 @@ public class DebugCommandService implements IDebugContextListener {
Map<Class<?>, List<IEnabledTarget>> commands = null;
synchronized (fCommandUpdates) {
commands = fCommandUpdates;
- fCommandUpdates = new HashMap<Class<?>, List<IEnabledTarget>>(commands.size());
+ fCommandUpdates = new HashMap<>(commands.size());
}
if (context instanceof IStructuredSelection && !context.isEmpty()) {
Object[] elements = ((IStructuredSelection)context).toArray();
@@ -243,7 +243,7 @@ public class DebugCommandService implements IDebugContextListener {
* @return map of command handlers to associated elements or <code>null</code>
*/
private Map<IDebugCommandHandler, List<Object>> collate(Object[] elements, Class<?> handlerType) {
- Map<IDebugCommandHandler, List<Object>> map = new HashMap<IDebugCommandHandler, List<Object>>();
+ Map<IDebugCommandHandler, List<Object>> map = new HashMap<>();
for (int i = 0; i < elements.length; i++) {
Object element = elements[i];
IDebugCommandHandler handler = getHandler(element, handlerType);
@@ -252,7 +252,7 @@ public class DebugCommandService implements IDebugContextListener {
} else {
List<Object> list = map.get(handler);
if (list == null) {
- list = new ArrayList<Object>();
+ list = new ArrayList<>();
map.put(handler, list);
}
list.add(element);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java
index b0d0713bf..488c31653 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java
@@ -61,7 +61,7 @@ public class TerminateAndRelaunchAction extends DebugCommandAction {
ISelection context = super.getContext();
if (context instanceof IStructuredSelection && !context.isEmpty()) {
IStructuredSelection ss = (IStructuredSelection)context;
- Set<ILaunch> launches = new HashSet<ILaunch>(ss.size());
+ Set<ILaunch> launches = new HashSet<>(ss.size());
for (Iterator<Object> itr = ss.iterator(); itr.hasNext();) {
ILaunch launch = DebugUIPlugin.getLaunch(itr.next());
if (launch != null) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java
index b56924351..0758f9b28 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java
@@ -93,12 +93,12 @@ public class LaunchingResourceManager implements IPropertyChangeListener, IWindo
* The map of ToolBars that have mouse tracker listeners associated with them:
* stored as Map<IWorkbenchWindow, ToolBar>
*/
- private HashMap<IWorkbenchWindow, ToolBar> fToolbars = new HashMap<IWorkbenchWindow, ToolBar>();
+ private HashMap<IWorkbenchWindow, ToolBar> fToolbars = new HashMap<>();
/**
* the map of current labels
*/
- private HashMap<ILaunchGroup, String> fCurrentLabels = new HashMap<ILaunchGroup, String>();
+ private HashMap<ILaunchGroup, String> fCurrentLabels = new HashMap<>();
/**
* The selection has changed and we need to update the labels
@@ -108,19 +108,19 @@ public class LaunchingResourceManager implements IPropertyChangeListener, IWindo
/**
* Set of windows that have been opened and that we have registered selection listeners with
*/
- private HashSet<IWorkbenchWindow> fWindows = new HashSet<IWorkbenchWindow>();
+ private HashSet<IWorkbenchWindow> fWindows = new HashSet<>();
/**
* Cache of IResource -> ILaunchConfiguration[] used during a tooltip update job.
* The cache is cleared after each tooltip update job is complete.
*/
- private HashMap<IResource, ILaunchConfiguration[]> fConfigCache = new HashMap<IResource, ILaunchConfiguration[]>();
+ private HashMap<IResource, ILaunchConfiguration[]> fConfigCache = new HashMap<>();
/**
* Cache of IResource -> LaunchShortcutExtension used during a tooltip update job.
* The cache is cleared after each tooltip update job is complete.
*/
- private HashMap<IResource, List<LaunchShortcutExtension>> fExtCache = new HashMap<IResource, List<LaunchShortcutExtension>>();
+ private HashMap<IResource, List<LaunchShortcutExtension>> fExtCache = new HashMap<>();
/**
* Constant denoting the empty string;
@@ -379,7 +379,7 @@ public class LaunchingResourceManager implements IPropertyChangeListener, IWindo
* @since 3.4
*/
protected List<LaunchShortcutExtension> pruneShortcuts(List<LaunchShortcutExtension> shortcuts, IResource resource, String mode) {
- List<LaunchShortcutExtension> list = new ArrayList<LaunchShortcutExtension>(shortcuts);
+ List<LaunchShortcutExtension> list = new ArrayList<>(shortcuts);
if(resource == null) {
LaunchShortcutExtension ext = null;
for (ListIterator<LaunchShortcutExtension> iter = list.listIterator(); iter.hasNext();) {
@@ -406,7 +406,7 @@ public class LaunchingResourceManager implements IPropertyChangeListener, IWindo
*/
public IResource getLaunchableResource(List<LaunchShortcutExtension> shortcuts, IStructuredSelection selection) {
if(selection != null && !selection.isEmpty()) {
- ArrayList<IResource> resources = new ArrayList<IResource>();
+ ArrayList<IResource> resources = new ArrayList<>();
IResource resource = null;
Object o = selection.getFirstElement();
for (LaunchShortcutExtension ext : shortcuts) {
@@ -437,9 +437,9 @@ public class LaunchingResourceManager implements IPropertyChangeListener, IWindo
* @since 3.4
*/
public List<LaunchShortcutExtension> getShortcutsForSelection(IStructuredSelection selection, String mode) {
- ArrayList<LaunchShortcutExtension> list = new ArrayList<LaunchShortcutExtension>();
+ ArrayList<LaunchShortcutExtension> list = new ArrayList<>();
List<LaunchShortcutExtension> sc = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchShortcuts();
- List<IEditorInput> ctxt = new ArrayList<IEditorInput>();
+ List<IEditorInput> ctxt = new ArrayList<>();
// work around to bug in Structured Selection that returns actual underlying array in selection
// @see bug 211646
ctxt.addAll(selection.toList());
@@ -475,7 +475,7 @@ public class LaunchingResourceManager implements IPropertyChangeListener, IWindo
* @since 3.4
*/
public List<ILaunchConfiguration> getParticipatingLaunchConfigurations(IStructuredSelection selection, IResource resource, List<LaunchShortcutExtension> shortcuts, String mode) {
- List<ILaunchConfiguration> configs = new ArrayList<ILaunchConfiguration>();
+ List<ILaunchConfiguration> configs = new ArrayList<>();
int voteDefault = 0;
if(selection != null) {
Object o = selection.getFirstElement();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextManager.java
index 61c2e9a7c..0ba312b73 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextManager.java
@@ -34,7 +34,7 @@ import org.eclipse.ui.services.IEvaluationService;
public class DebugContextManager implements IDebugContextManager {
private static DebugContextManager fgDefault;
- private Map<IWorkbenchWindow, DebugWindowContextService> fServices = new HashMap<IWorkbenchWindow, DebugWindowContextService>();
+ private Map<IWorkbenchWindow, DebugWindowContextService> fServices = new HashMap<>();
private ListenerList<IDebugContextListener> fGlobalListeners = new ListenerList<>();
/**
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextSourceProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextSourceProvider.java
index 57f07a8e7..0b990b4f3 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextSourceProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugContextSourceProvider.java
@@ -55,7 +55,7 @@ public class DebugContextSourceProvider extends AbstractSourceProvider implement
@Override
public void debugContextChanged(DebugContextEvent event) {
- final Map<String, ISelection> values = new HashMap<String, ISelection>(1);
+ final Map<String, ISelection> values = new HashMap<>(1);
values.put(IDebugUIConstants.DEBUG_CONTEXT_SOURCE_NAME, event.getContext());
// make sure fireSourceChanged is called on the UI thread
if (Display.getCurrent() == null) {
@@ -83,7 +83,7 @@ public class DebugContextSourceProvider extends AbstractSourceProvider implement
@Override
public Map getCurrentState() {
- Map<String, ISelection> currentState = new HashMap<String, ISelection>(1);
+ Map<String, ISelection> currentState = new HashMap<>(1);
currentState.put(IDebugUIConstants.DEBUG_CONTEXT_SOURCE_NAME, fDebugContextService.getActiveContext());
return currentState;
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java
index 264bad35e..abf7ce7f1 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java
@@ -68,33 +68,33 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I
* Map of debug model identifier to associated contexts as defined
* by <code>debugModelContextBindings</code> extensions.
*/
- private Map<String, List<String>> fModelToContextIds = new HashMap<String, List<String>>();
+ private Map<String, List<String>> fModelToContextIds = new HashMap<>();
/**
* Map of launch objects to enabled model ids
*/
- private Map<ILaunch, Set<String>> fLaunchToModelIds = new HashMap<ILaunch, Set<String>>();
+ private Map<ILaunch, Set<String>> fLaunchToModelIds = new HashMap<>();
/**
* Map of launch objects to context activations
*/
- private Map<ILaunch, List<IContextActivation>> fLanuchToContextActivations = new HashMap<ILaunch, List<IContextActivation>>();
+ private Map<ILaunch, List<IContextActivation>> fLanuchToContextActivations = new HashMap<>();
/**
* A list of activity pattern bindings for debug models.
*/
- private List<IActivityPatternBinding> fModelPatternBindings = new ArrayList<IActivityPatternBinding>();
+ private List<IActivityPatternBinding> fModelPatternBindings = new ArrayList<>();
/**
* Map of debug model ids to associated activity ids.
*/
- private Map<String, Set<String>> fModelToActivities = new HashMap<String, Set<String>>();
+ private Map<String, Set<String>> fModelToActivities = new HashMap<>();
/**
* A set of debug model ids for which activities have been enabled.
* Cleared when enabled activities change.
*/
- private Set<String> fModelsEnabledForActivities = new HashSet<String>();
+ private Set<String> fModelsEnabledForActivities = new HashSet<>();
// extension point
public static final String ID_DEBUG_MODEL_CONTEXT_BINDINGS= "debugModelContextBindings"; //$NON-NLS-1$
@@ -145,7 +145,7 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I
if (modelIdentifier != null && contextId != null) {
List<String> contextIds = fModelToContextIds.get(modelIdentifier);
if (contextIds == null) {
- contextIds = new ArrayList<String>();
+ contextIds = new ArrayList<>();
fModelToContextIds.put(modelIdentifier, contextIds);
}
contextIds.add(contextId);
@@ -205,11 +205,11 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I
if (launch == null || launch.isTerminated()) {
return;
}
- List<String> toEnable = new ArrayList<String>(modelIds.length);
+ List<String> toEnable = new ArrayList<>(modelIds.length);
synchronized (this) {
Set<String> alreadyEnabled = fLaunchToModelIds.get(launch);
if (alreadyEnabled == null) {
- alreadyEnabled = new HashSet<String>();
+ alreadyEnabled = new HashSet<>();
fLaunchToModelIds.put(launch, alreadyEnabled);
}
for (int i = 0; i < modelIds.length; i++) {
@@ -242,7 +242,7 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I
// if there are no contexts for a model, the base debug context should
// be activated (i.e. a debug model with no org.eclipse.ui.contexts and
// associated org.eclipse.debug.ui.modelContextBindings)
- contextIds = new ArrayList<String>();
+ contextIds = new ArrayList<>();
contextIds.add(DEBUG_CONTEXT);
fModelToContextIds.put(modelId, contextIds);
}
@@ -285,7 +285,7 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I
private synchronized void addActivation(ILaunch launch, IContextActivation activation) {
List<IContextActivation> activations = fLanuchToContextActivations.get(launch);
if (activations == null) {
- activations = new ArrayList<IContextActivation>();
+ activations = new ArrayList<>();
fLanuchToContextActivations.put(launch, activations);
}
activations.add(activation);
@@ -391,7 +391,7 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I
* @return associated workbench contexts
*/
public List<String> getWorkbenchContextsForDebugContext(Object target) {
- List<String> workbenchContexts = new ArrayList<String>();
+ List<String> workbenchContexts = new ArrayList<>();
String[] modelIds = getDebugModelIds(target);
if (modelIds != null) {
for (int i = 0; i < modelIds.length; i++) {
@@ -425,7 +425,7 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I
Set<String> ids = fModelToActivities.get(id);
if (ids == null) {
// first time the model has been seen, perform pattern matching
- ids = new HashSet<String>();
+ ids = new HashSet<>();
fModelToActivities.put(id, ids);
for (IActivityPatternBinding binding : fModelPatternBindings) {
String regex = binding.getPattern().pattern();
@@ -437,7 +437,7 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I
}
if (!ids.isEmpty()) {
if (activities == null) {
- activities = new HashSet<String>();
+ activities = new HashSet<>();
}
activities.addAll(ids);
}
@@ -448,7 +448,7 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I
IWorkbenchActivitySupport activitySupport = PlatformUI.getWorkbench().getActivitySupport();
Set<String> enabledActivityIds = activitySupport.getActivityManager().getEnabledActivityIds();
if (!enabledActivityIds.containsAll(activities)) {
- enabledActivityIds = new HashSet<String>(enabledActivityIds);
+ enabledActivityIds = new HashSet<>(enabledActivityIds);
enabledActivityIds.addAll(activities);
activitySupport.setEnabledActivityIds(activities);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java
index c02a87ede..501e59c3b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java
@@ -46,11 +46,11 @@ import org.eclipse.ui.services.IEvaluationService;
public class DebugWindowContextService implements IDebugContextService, IPartListener2, IDebugContextListener {
private Map<String, ListenerList<IDebugContextListener>> fListenersByPartId = new HashMap<>();
- private Map<String, IDebugContextProvider> fProvidersByPartId = new HashMap<String, IDebugContextProvider>();
+ private Map<String, IDebugContextProvider> fProvidersByPartId = new HashMap<>();
private Map<String, ListenerList<IDebugContextListener>> fPostListenersByPartId = new HashMap<>();
private IWorkbenchWindow fWindow;
- private List<IDebugContextProvider> fProviders = new ArrayList<IDebugContextProvider>();
+ private List<IDebugContextProvider> fProviders = new ArrayList<>();
private DebugContextSourceProvider fSourceProvider;
@@ -243,7 +243,7 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis
if (part != null) {
id = getCombinedPartId(part);
ListenerList<IDebugContextListener> listenerList = fListenersByPartId.get(id);
- return listenerList != null ? listenerList : new ListenerList<IDebugContextListener>();
+ return listenerList != null ? listenerList : new ListenerList<>();
} else {
ListenerList<IDebugContextListener> listenerList = fListenersByPartId.get(null);
ListenerList<IDebugContextListener> retVal = new ListenerList<>();
@@ -280,11 +280,11 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis
if (part != null) {
id = getCombinedPartId(part);
ListenerList<IDebugContextListener> listenerList = fPostListenersByPartId.get(id);
- return listenerList != null ? listenerList : new ListenerList<IDebugContextListener>();
+ return listenerList != null ? listenerList : new ListenerList<>();
} else {
ListenerList<IDebugContextListener> retVal = fPostListenersByPartId.get(null);
if (retVal == null) {
- retVal = new ListenerList<IDebugContextListener>();
+ retVal = new ListenerList<>();
}
outer: for (Iterator<String> itr = fPostListenersByPartId.keySet().iterator(); itr.hasNext();) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/SuspendTriggerAdapterFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/SuspendTriggerAdapterFactory.java
index d7dde2afc..b7d85cff6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/SuspendTriggerAdapterFactory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/SuspendTriggerAdapterFactory.java
@@ -24,7 +24,7 @@ import org.eclipse.debug.ui.contexts.ISuspendTrigger;
*/
public class SuspendTriggerAdapterFactory implements IAdapterFactory {
- private Map<Object, LaunchSuspendTrigger> fSuspendTriggers = new HashMap<Object, LaunchSuspendTrigger>();
+ private Map<Object, LaunchSuspendTrigger> fSuspendTriggers = new HashMap<>();
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java
index 47b0ed4db..0c347426d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java
@@ -354,7 +354,7 @@ public class MemoryBlockContentAdapter extends AsynchronousContentAdapter {
// if debug adapter did not return enough memory, create dummy memory
if (memoryBuffer.length < reqNumBytes) {
- ArrayList<MemoryByte> newBuffer = new ArrayList<MemoryByte>();
+ ArrayList<MemoryByte> newBuffer = new ArrayList<>();
for (int i = 0; i < memoryBuffer.length; i++) {
newBuffer.add(memoryBuffer[i]);
@@ -391,7 +391,7 @@ public class MemoryBlockContentAdapter extends AsynchronousContentAdapter {
}
private Object[] organizeLines(long numberOfLines, MemoryByte[] memoryBuffer, BigInteger address, boolean manageDelta, MemoryViewPresentationContext context) {
- Vector<MemorySegment> lineCache = new Vector<MemorySegment>();
+ Vector<MemorySegment> lineCache = new Vector<>();
IMemoryRendering rendering = context.getRendering();
if (!(rendering instanceof AbstractAsyncTableRendering)) {
return lineCache.toArray();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/RegisterGroupProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/RegisterGroupProxy.java
index f70f5bfdb..ae5f9109b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/RegisterGroupProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/RegisterGroupProxy.java
@@ -402,7 +402,7 @@ public class RegisterGroupProxy implements IModelProxyFactory, IColumnPresentati
public void compareElements(IElementCompareRequest[] requests) {
IElementMementoProvider provider = ViewerAdapterService.getMementoProvider(fFrame);
if (provider != null) {
- List<IElementCompareRequest> others = new ArrayList<IElementCompareRequest>(requests.length);
+ List<IElementCompareRequest> others = new ArrayList<>(requests.length);
for (int i = 0; i < requests.length; i++) {
IElementCompareRequest request = requests[i];
if (request.getElement().equals(this)) {
@@ -432,7 +432,7 @@ public class RegisterGroupProxy implements IModelProxyFactory, IColumnPresentati
public void encodeElements(IElementMementoRequest[] requests) {
IElementMementoProvider provider = ViewerAdapterService.getMementoProvider(fFrame);
if (provider != null) {
- List<IElementMementoRequest> others = new ArrayList<IElementMementoRequest>(requests.length);
+ List<IElementMementoRequest> others = new ArrayList<>(requests.length);
for (int i = 0; i < requests.length; i++) {
IElementMementoRequest request = requests[i];
if (request.getElement().equals(this)) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/CommonTabLite.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/CommonTabLite.java
index a0f0f37bd..3d0b75ac7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/CommonTabLite.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/CommonTabLite.java
@@ -318,7 +318,7 @@ class CommonTabLite extends AbstractLaunchConfigurationTab {
}
}
if (!groups.isEmpty()) {
- List<LaunchGroupExtension> list = new ArrayList<LaunchGroupExtension>();
+ List<LaunchGroupExtension> list = new ArrayList<>();
Iterator<String> iterator = groups.iterator();
while (iterator.hasNext()) {
String id = iterator.next();
@@ -375,7 +375,7 @@ class CommonTabLite extends AbstractLaunchConfigurationTab {
boolean run = config.getAttribute(IDebugUIConstants.ATTR_RUN_FAVORITE, false);
if (debug || run) {
// old attributes
- List<LaunchGroupExtension> groups = new ArrayList<LaunchGroupExtension>();
+ List<LaunchGroupExtension> groups = new ArrayList<>();
int num = 0;
if (debug) {
groups.add(getLaunchConfigurationManager().getLaunchGroup(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP));
@@ -405,7 +405,7 @@ class CommonTabLite extends AbstractLaunchConfigurationTab {
for (int i = 0; i < checked.length; i++) {
LaunchGroupExtension group = (LaunchGroupExtension)checked[i];
if (groups == null) {
- groups = new ArrayList<String>();
+ groups = new ArrayList<>();
}
groups.add(group.getIdentifier());
}
@@ -524,7 +524,7 @@ class CommonTabLite extends AbstractLaunchConfigurationTab {
@Override
public Object[] getElements(Object inputElement) {
ILaunchGroup[] groups = DebugUITools.getLaunchGroups();
- List<ILaunchGroup> possibleGroups = new ArrayList<ILaunchGroup>();
+ List<ILaunchGroup> possibleGroups = new ArrayList<>();
ILaunchConfiguration configuration = (ILaunchConfiguration)inputElement;
for (int i = 0; i < groups.length; i++) {
ILaunchGroup extension = groups[i];
@@ -550,7 +550,7 @@ class CommonTabLite extends AbstractLaunchConfigurationTab {
*/
class FavoritesLabelProvider implements ITableLabelProvider {
- private Map<Object, Image> fImages = new HashMap<Object, Image>();
+ private Map<Object, Image> fImages = new HashMap<>();
@Override
public Image getColumnImage(Object element, int columnIndex) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/GroupLaunchConfigurationSelectionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/GroupLaunchConfigurationSelectionDialog.java
index 34fbfca6a..3b951a736 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/GroupLaunchConfigurationSelectionDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/GroupLaunchConfigurationSelectionDialog.java
@@ -317,7 +317,7 @@ class GroupLaunchConfigurationSelectionDialog extends TitleAreaDialog implements
}
public ILaunchConfiguration[] getSelectedLaunchConfigurations() {
- List<ILaunchConfiguration> configs = new ArrayList<ILaunchConfiguration>();
+ List<ILaunchConfiguration> configs = new ArrayList<>();
if (fSelection != null && !fSelection.isEmpty()) {
for (Iterator<?> iter = ((IStructuredSelection) fSelection).iterator(); iter.hasNext();) {
Object selection = iter.next();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/GroupLaunchConfigurationTabGroup.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/GroupLaunchConfigurationTabGroup.java
index 285909910..074ee4441 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/GroupLaunchConfigurationTabGroup.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/groups/GroupLaunchConfigurationTabGroup.java
@@ -261,7 +261,7 @@ public class GroupLaunchConfigurationTabGroup extends AbstractLaunchConfiguratio
}
static class GroupLaunchTab extends AbstractLaunchConfigurationTab {
protected CheckboxTreeViewer treeViewer;
- protected List<GroupLaunchElement> input = new ArrayList<GroupLaunchElement>();
+ protected List<GroupLaunchElement> input = new ArrayList<>();
/**
* copy of the initial state of the configuration used for cycle
@@ -400,7 +400,7 @@ public class GroupLaunchConfigurationTabGroup extends AbstractLaunchConfiguratio
*/
private int[] getMultiSelectionIndices() {
StructuredSelection sel = (StructuredSelection) treeViewer.getSelection();
- List<Integer> indices = new ArrayList<Integer>();
+ List<Integer> indices = new ArrayList<>();
for (Iterator<?> iter = sel.iterator(); iter.hasNext(); ) {
GroupLaunchElement el = (GroupLaunchElement) iter.next();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java
index 506d73f44..5429f3f6c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java
@@ -146,7 +146,7 @@ public class EmbeddedBreakpointsViewer {
Object[] items = fSelection.toArray();
fViewer.setGrayedElements(new Object[] {});
fViewer.setCheckedElements(new Object[] {});
- ArrayList<IBreakpoint> list = new ArrayList<IBreakpoint>();
+ ArrayList<IBreakpoint> list = new ArrayList<>();
for(int i = 0; i < items.length; i++) {
Object item = items[i];
IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(item, IBreakpoint.class);
@@ -181,7 +181,7 @@ public class EmbeddedBreakpointsViewer {
*/
public IStructuredSelection getCheckedElements() {
Object[] list = fViewer.getCheckedElements();
- Vector<Object> selected = new Vector<Object>();
+ Vector<Object> selected = new Vector<>();
for(int i = 0; i < list.length; i++) {
if(!selected.contains(list[i])) {
selected.addElement(list[i]);
@@ -204,7 +204,7 @@ public class EmbeddedBreakpointsViewer {
* @return a list of widget occurrences to update or an empty list
*/
private Widget[] searchItems(Object element) {
- ArrayList<TreeItem> list = new ArrayList<TreeItem>();
+ ArrayList<TreeItem> list = new ArrayList<>();
TreeItem[] items = fTree.getItems();
for (int i = 0; i < items.length; i++) {
findAllOccurrences(items[i], element, list);
@@ -246,7 +246,7 @@ public class EmbeddedBreakpointsViewer {
}
}
else if (obj instanceof BreakpointContainer) {
- ArrayList<IBreakpoint> bps = new ArrayList<IBreakpoint>();
+ ArrayList<IBreakpoint> bps = new ArrayList<>();
getBreakpointsFromContainers((BreakpointContainer)obj, bps);
for(int j = 0; j < bps.size(); j++) {
updateCheckedState(bps.get(j), enable);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpointsPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpointsPage.java
index 7044a3c65..5a595d853 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpointsPage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpointsPage.java
@@ -315,7 +315,7 @@ public class WizardExportBreakpointsPage extends WizardPage implements Listener
}
// collect breakpoints
Object[] elements = fTView.getCheckedElements().toArray();
- List<IBreakpoint> breakpoints = new ArrayList<IBreakpoint>();
+ List<IBreakpoint> breakpoints = new ArrayList<>();
for (int i = 0; i < elements.length; i++) {
Object object = elements[i];
if (object instanceof IBreakpoint) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsSelectionPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsSelectionPage.java
index 9374cea50..1a2381b0a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsSelectionPage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardImportBreakpointsSelectionPage.java
@@ -68,7 +68,7 @@ public class WizardImportBreakpointsSelectionPage extends WizardPage {
if(!fIsVisible) {
return null;
}
- List<IMarker> markers = new ArrayList<IMarker>();
+ List<IMarker> markers = new ArrayList<>();
List<IBreakpoint> breakpoints = fTView.getCheckedElements().toList();
for(int i = 0; i < breakpoints.size(); i++) {
markers.add(breakpoints.get(i).getMarker());
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java
index 6af48f78d..ecd53cdb3 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java
@@ -340,7 +340,7 @@ public class ExportLaunchConfigurationsWizardPage extends WizardPage {
file = launchConfig.getFileStore();
if (file == null) {
if (errors == null) {
- errors = new ArrayList<IStatus>(configs.length);
+ errors = new ArrayList<>(configs.length);
}
errors.add(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), MessageFormat.format(WizardMessages.ExportLaunchConfigurationsWizardPage_19, new Object[] { launchConfig.getName() }), null));
} else {
@@ -390,14 +390,14 @@ public class ExportLaunchConfigurationsWizardPage extends WizardPage {
}
catch (IOException e ) {
if (errors == null) {
- errors = new ArrayList<IStatus>(configs.length);
+ errors = new ArrayList<>(configs.length);
}
errors.add(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(),
e.getMessage(), e));
}
catch (CoreException e) {
if (errors == null) {
- errors = new ArrayList<IStatus>(configs.length);
+ errors = new ArrayList<>(configs.length);
}
errors.add(e.getStatus());
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ImportLaunchConfigurationsWizardPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ImportLaunchConfigurationsWizardPage.java
index 5e4b35728..4cd723ce9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ImportLaunchConfigurationsWizardPage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ImportLaunchConfigurationsWizardPage.java
@@ -172,7 +172,7 @@ public class ImportLaunchConfigurationsWizardPage extends WizardResourceImportPa
File config, newconfig = null;
boolean owall = false, nowall = false;
MessageDialog dialog = null;
- final List<File> filesToImport = new ArrayList<File>();
+ final List<File> filesToImport = new ArrayList<>();
for (Iterator<?> iter = items.iterator(); iter.hasNext();) {
config = (File) ((DebugFileSystemElement) iter.next()).getFileSystemObject();
newconfig = new File(new Path(LaunchManager.LOCAL_LAUNCH_CONFIGURATION_CONTAINER_PATH.toOSString()).append(config.getName()).toOSString());
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorProjectPromptStatusHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorProjectPromptStatusHandler.java
index af014e1ed..eae89d3d4 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorProjectPromptStatusHandler.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CompileErrorProjectPromptStatusHandler.java
@@ -39,7 +39,7 @@ public class CompileErrorProjectPromptStatusHandler implements IStatusHandler {
@Override
public Object handleStatus(IStatus status, Object source) throws CoreException {
ILaunchConfiguration config = null;
- List<Object> projects = new ArrayList<Object>();
+ List<Object> projects = new ArrayList<>();
if (source instanceof List) {
List<?> args = (List<?>) source;
Iterator<?> iterator = args.iterator();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeleteLaunchConfigurationAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeleteLaunchConfigurationAction.java
index 5897781f6..0c1eebba3 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeleteLaunchConfigurationAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DeleteLaunchConfigurationAction.java
@@ -18,10 +18,13 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
/**
* Deletes the selected launch configuration(s).
@@ -49,7 +52,7 @@ public class DeleteLaunchConfigurationAction extends AbstractLaunchConfiguration
IStructuredSelection selection = getStructuredSelection();
// Make the user confirm the deletion
String dialogMessage = selection.size() > 1 ? LaunchConfigurationsMessages.LaunchConfigurationDialog_Do_you_wish_to_delete_the_selected_launch_configurations__1 : LaunchConfigurationsMessages.LaunchConfigurationDialog_Do_you_wish_to_delete_the_selected_launch_configuration__2; //
- return MessageDialog.openQuestion(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Confirm_Launch_Configuration_Deletion_3, dialogMessage);
+ return MessageDialog.open(MessageDialog.QUESTION, getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Confirm_Launch_Configuration_Deletion_3, dialogMessage, SWT.NONE, LaunchConfigurationsMessages.LaunchConfigurationSelectionDialog_deleteButtonLabel, IDialogConstants.CANCEL_LABEL) == Window.OK;
}
/**
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchDelegatesStatusHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchDelegatesStatusHandler.java
index d93229262..946804f88 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchDelegatesStatusHandler.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchDelegatesStatusHandler.java
@@ -44,7 +44,7 @@ public class DuplicateLaunchDelegatesStatusHandler implements IStatusHandler {
ILaunchConfiguration config = (ILaunchConfiguration) infos[0];
String mode = (String) infos[1];
Shell shell = DebugUIPlugin.getShell();
- HashSet<String> modes = new HashSet<String>();
+ HashSet<String> modes = new HashSet<>();
modes.add(mode);
modes.addAll(config.getModes());
SelectLaunchersDialog sldd = new SelectLaunchersDialog(shell,
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java
index 5b6487a35..1f226d786 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java
@@ -304,7 +304,7 @@ public class FavoritesDialog extends TrayDialog {
protected List<ILaunchConfiguration> getFavorites() {
if (fFavorites == null) {
ILaunchConfiguration[] favs = getInitialFavorites();
- fFavorites = new ArrayList<ILaunchConfiguration>(favs.length);
+ fFavorites = new ArrayList<>(favs.length);
addAll(favs, fFavorites);
}
return fFavorites;
@@ -421,7 +421,7 @@ public class FavoritesDialog extends TrayDialog {
try {
List<String> groups = configuration.getAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, (List<String>) null);
if (groups == null) {
- groups = new ArrayList<String>();
+ groups = new ArrayList<>();
}
if (!groups.contains(groupId)) {
groups.add(groupId);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java
index 3f90d858c..e49911c38 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java
@@ -61,7 +61,7 @@ public class LaunchConfigurationComparator extends WorkbenchViewerComparator {
*/
private Map<ILaunchConfigurationType, Integer> getCategories() {
if (fgCategories == null) {
- fgCategories = new HashMap<ILaunchConfigurationType, Integer>();
+ fgCategories = new HashMap<>();
List<ILaunchConfigurationType> types = Arrays.asList(DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes());
Collections.sort(types, new Comparator<ILaunchConfigurationType>() {
@Override
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java
index 9db8d18b8..dcf018cc0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java
@@ -158,7 +158,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
/**
* The list of registered implementors of <code>ILaunchHistoryChangedListener</code>
*/
- protected List<ILaunchHistoryChangedListener> fLaunchHistoryChangedListeners = new ArrayList<ILaunchHistoryChangedListener>(3);
+ protected List<ILaunchHistoryChangedListener> fLaunchHistoryChangedListeners = new ArrayList<>(3);
/**
* Launch shortcuts
@@ -238,7 +238,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
if (activitySupport == null) {
return configurations;
}
- List<ILaunchConfiguration> filteredConfigs = new ArrayList<ILaunchConfiguration>();
+ List<ILaunchConfiguration> filteredConfigs = new ArrayList<>();
ILaunchConfigurationType type = null;
LaunchConfigurationTypeContribution contribution = null;
ILaunchConfiguration configuration = null;
@@ -270,7 +270,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
if(as == null) {
return delegates;
}
- HashSet<ILaunchDelegate> set = new HashSet<ILaunchDelegate>();
+ HashSet<ILaunchDelegate> set = new HashSet<>();
for(int i = 0; i < delegates.length; i++) {
//filter by capabilities
if(!WorkbenchActivityHelper.filterItem(new LaunchDelegateContribution(delegates[i]))) {
@@ -581,7 +581,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
* @return list of configurations under the element
*/
private ILaunchConfiguration[] getLaunchConfigurations(Element root) {
- List<ILaunchConfiguration> configs = new ArrayList<ILaunchConfiguration>();
+ List<ILaunchConfiguration> configs = new ArrayList<>();
NodeList nodes = root.getChildNodes();
int length = nodes.getLength();
for (int i = 0; i < length; i++) {
@@ -646,7 +646,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
IConfigurationElement[] infos = extensionPoint.getConfigurationElements();
// Load the configuration elements into a Map
- fLaunchShortcuts = new ArrayList<LaunchShortcutExtension>(infos.length);
+ fLaunchShortcuts = new ArrayList<>(infos.length);
for (int i = 0; i < infos.length; i++) {
fLaunchShortcuts.add(new LaunchShortcutExtension(infos[i]));
}
@@ -664,7 +664,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
IConfigurationElement[] infos= extensionPoint.getConfigurationElements();
// Load the configuration elements into a Map
- fLaunchGroups = new HashMap<String, LaunchGroupExtension>(infos.length);
+ fLaunchGroups = new HashMap<>(infos.length);
LaunchGroupExtension ext = null;
for (int i = 0; i < infos.length; i++) {
ext = new LaunchGroupExtension(infos[i]);
@@ -692,9 +692,9 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
* @since 3.3
*/
public List<LaunchShortcutExtension> getLaunchShortcuts(IResource resource) {
- List<LaunchShortcutExtension> list = new ArrayList<LaunchShortcutExtension>();
+ List<LaunchShortcutExtension> list = new ArrayList<>();
List<LaunchShortcutExtension> sc = getLaunchShortcuts();
- List<IResource> ctxt = new ArrayList<IResource>();
+ List<IResource> ctxt = new ArrayList<>();
if(resource != null) {
ctxt.add(resource);
}
@@ -723,12 +723,12 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
*/
public String[] getApplicableConfigurationTypes(IResource resource) {
List<LaunchShortcutExtension> exts = getLaunchShortcuts();
- List<IResource> list = new ArrayList<IResource>();
+ List<IResource> list = new ArrayList<>();
list.add(resource);
IEvaluationContext context = DebugUIPlugin.createEvaluationContext(list);
context.setAllowPluginActivation(true);
context.addVariable("selection", list); //$NON-NLS-1$
- HashSet<String> contributedTypeIds = new HashSet<String>();
+ HashSet<String> contributedTypeIds = new HashSet<>();
for (Iterator<LaunchShortcutExtension> iter = exts.listIterator(); iter.hasNext();) {
LaunchShortcutExtension ext = iter.next();
try {
@@ -742,7 +742,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
iter.remove();
}
}
- List<String> typeIds = new ArrayList<String>();
+ List<String> typeIds = new ArrayList<>();
LaunchManager lm = (LaunchManager) DebugPlugin.getDefault().getLaunchManager();
for (String id : contributedTypeIds) {
ILaunchConfigurationType type = lm.getLaunchConfigurationType(id);
@@ -765,7 +765,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
* @since 3.3
*/
public ILaunchConfiguration[] getApplicableLaunchConfigurations(String[] types, IResource resource) {
- ArrayList<ILaunchConfiguration> list = new ArrayList<ILaunchConfiguration>();
+ ArrayList<ILaunchConfiguration> list = new ArrayList<>();
try {
if(resource != null) {
String[] ctypes = types;
@@ -773,7 +773,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
ctypes = getApplicableConfigurationTypes(resource);
}
//copy into collection for hashcode matching
- HashSet<String> typeset = new HashSet<String>(ctypes.length);
+ HashSet<String> typeset = new HashSet<>(ctypes.length);
for(int i = 0; i < ctypes.length; i++) {
typeset.add(ctypes[i]);
}
@@ -845,7 +845,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
* @return List
*/
protected List<LaunchShortcutExtension> filterShortcuts(List<LaunchShortcutExtension> unfiltered, String category) {
- List<LaunchShortcutExtension> filtered = new ArrayList<LaunchShortcutExtension>(unfiltered.size());
+ List<LaunchShortcutExtension> filtered = new ArrayList<>(unfiltered.size());
for (LaunchShortcutExtension extension : unfiltered) {
if (category == null) {
if (extension.getCategory() == null) {
@@ -872,13 +872,13 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
@Deprecated
public List<LaunchShortcutExtension> getLaunchShortcuts(String perpsective, String category) {
if (fLaunchShortcutsByPerspective == null) {
- fLaunchShortcutsByPerspective = new HashMap<String, List<LaunchShortcutExtension>>(10);
+ fLaunchShortcutsByPerspective = new HashMap<>(10);
}
for (LaunchShortcutExtension ext : getLaunchShortcuts()) {
for (String id : ext.getPerspectives()) {
List<LaunchShortcutExtension> list = fLaunchShortcutsByPerspective.get(id);
if (list == null) {
- list = new ArrayList<LaunchShortcutExtension>(4);
+ list = new ArrayList<>(4);
fLaunchShortcutsByPerspective.put(id, list);
}
list.add(ext);
@@ -902,7 +902,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
*/
public ILaunchConfiguration getMRUConfiguration(List<ILaunchConfiguration> configurations, ILaunchGroup group, IResource resource) {
if(group != null) {
- ArrayList<ILaunchConfiguration> candidates = new ArrayList<ILaunchConfiguration>();
+ ArrayList<ILaunchConfiguration> candidates = new ArrayList<>();
LaunchHistory history = getLaunchHistory(group.getIdentifier());
if(history != null) {
ILaunchConfiguration[] configs = history.getCompleteLaunchHistory();
@@ -1055,7 +1055,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
if (fLaunchHistories == null) {
fRestoring = true;
ILaunchGroup[] groups = getLaunchGroups();
- fLaunchHistories = new HashMap<String, LaunchHistory>(groups.length);
+ fLaunchHistories = new HashMap<>(groups.length);
ILaunchGroup extension = null;
for (int i = 0; i < groups.length; i++) {
extension = groups[i];
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java
index 5741f17d7..fbb86f71d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java
@@ -75,7 +75,7 @@ public class LaunchConfigurationPresentationManager {
*/
private Hashtable<String, Hashtable<String, LaunchConfigurationTabExtension>> fContributedTabs;
- private static Set<String> ALL_MODES = new HashSet<String>(1);
+ private static Set<String> ALL_MODES = new HashSet<>(1);
static {
ALL_MODES.add("*"); //$NON-NLS-1$
@@ -105,7 +105,7 @@ public class LaunchConfigurationPresentationManager {
*/
private void initializeTabGroupExtensions() {
if(fTabGroupExtensions == null) {
- fTabGroupExtensions = new Hashtable<String, Map<Set<String>, LaunchConfigurationTabGroupExtension>>();
+ fTabGroupExtensions = new Hashtable<>();
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_LAUNCH_CONFIGURATION_TAB_GROUPS);
IConfigurationElement[] groups = extensionPoint.getConfigurationElements();
LaunchConfigurationTabGroupExtension group = null;
@@ -117,7 +117,7 @@ public class LaunchConfigurationPresentationManager {
typeId = group.getTypeIdentifier();
map = fTabGroupExtensions.get(typeId);
if (map == null) {
- map = new Hashtable<Set<String>, LaunchConfigurationTabGroupExtension>();
+ map = new Hashtable<>();
fTabGroupExtensions.put(typeId, map);
}
modes = group.getModes();
@@ -156,7 +156,7 @@ public class LaunchConfigurationPresentationManager {
* @since 3.3
*/
private void initializeContributedTabExtensions() {
- fContributedTabs = new Hashtable<String, Hashtable<String, LaunchConfigurationTabExtension>>();
+ fContributedTabs = new Hashtable<>();
IExtensionPoint epoint = Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_LAUNCH_TABS);
IConfigurationElement[] elements = epoint.getConfigurationElements();
LaunchConfigurationTabExtension tab = null;
@@ -165,7 +165,7 @@ public class LaunchConfigurationPresentationManager {
tab = new LaunchConfigurationTabExtension(elements[i]);
element = fContributedTabs.get(tab.getTabGroupId());
if(element == null) {
- element = new Hashtable<String, LaunchConfigurationTabExtension>();
+ element = new Hashtable<>();
element.put(tab.getIdentifier(), tab);
fContributedTabs.put(tab.getTabGroupId(), element);
}
@@ -182,7 +182,7 @@ public class LaunchConfigurationPresentationManager {
* @exception CoreException if an exception occurs creating the group
*/
public ILaunchConfigurationTabGroup getTabGroup(ILaunchConfigurationType type, String mode) throws CoreException {
- HashSet<String> modes = new HashSet<String>();
+ HashSet<String> modes = new HashSet<>();
modes.add(mode);
LaunchConfigurationTabGroupExtension ext = getExtension(type.getIdentifier(), modes);
if (ext == null) {
@@ -201,7 +201,7 @@ public class LaunchConfigurationPresentationManager {
* @throws CoreException
*/
public ILaunchConfigurationTabGroup getTabGroup(ILaunchConfiguration config, String mode) throws CoreException {
- HashSet<String> modes = new HashSet<String>();
+ HashSet<String> modes = new HashSet<>();
modes.add(mode);
LaunchConfigurationTabGroupExtension ext = getExtension(config.getType().getIdentifier(), modes);
if (ext == null) {
@@ -250,7 +250,7 @@ public class LaunchConfigurationPresentationManager {
if(as == null || config == null) {
return tabs;
}
- HashSet<LaunchConfigurationTabExtension> set = new HashSet<LaunchConfigurationTabExtension>();
+ HashSet<LaunchConfigurationTabExtension> set = new HashSet<>();
for(int i = 0; i < tabs.length; i ++) {
//filter capabilities
if(!WorkbenchActivityHelper.filterItem(new LaunchTabContribution(tabs[i]))) {
@@ -316,7 +316,7 @@ public class LaunchConfigurationPresentationManager {
* @since 2.1
*/
public String getHelpContext(ILaunchConfigurationType type, String mode) throws CoreException {
- HashSet<String> modes = new HashSet<String>();
+ HashSet<String> modes = new HashSet<>();
modes.add(mode);
LaunchConfigurationTabGroupExtension ext = getExtension(type.getIdentifier(), modes);
if (ext == null) {
@@ -335,7 +335,7 @@ public class LaunchConfigurationPresentationManager {
* @return the description of the given configuration type, possible <code>null</code>
*/
public String getDescription(ILaunchConfigurationType configType, String mode) {
- HashSet<String> modes = new HashSet<String>();
+ HashSet<String> modes = new HashSet<>();
modes.add(mode);
LaunchConfigurationTabGroupExtension extension = getExtension(configType.getAttribute(IConfigurationElementConstants.ID), modes);
return (extension != null ? extension.getDescription(modes) : null);
@@ -348,7 +348,7 @@ public class LaunchConfigurationPresentationManager {
* @return sorted list of launch mode names
*/
public List<String> getLaunchModeNames(Set<String> modes) {
- List<String> names = new ArrayList<String>();
+ List<String> names = new ArrayList<>();
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
for (String id : modes) {
ILaunchMode mode = manager.getLaunchMode(id);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupExtension.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupExtension.java
index e761b30f4..b315b9c00 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupExtension.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupExtension.java
@@ -95,8 +95,8 @@ public class LaunchConfigurationTabGroupExtension {
*/
protected List<Set<String>> getModes() {
if (fModes == null) {
- fModes = new ArrayList<Set<String>>();
- fPerspectives = new Hashtable<Set<String>, String>();
+ fModes = new ArrayList<>();
+ fPerspectives = new Hashtable<>();
IConfigurationElement[] modes = fConfig.getChildren(IConfigurationElementConstants.LAUNCH_MODE);
if (modes.length > 0) {
IConfigurationElement element = null;
@@ -105,7 +105,7 @@ public class LaunchConfigurationTabGroupExtension {
for (int i = 0; i < modes.length; i++) {
element = modes[i];
mode = element.getAttribute(IConfigurationElementConstants.MODE);
- mset = new HashSet<String>();
+ mset = new HashSet<>();
mset.add(mode);
fModes.add(mset);
perspective = element.getAttribute(IConfigurationElementConstants.PERSPECTIVE);
@@ -184,7 +184,7 @@ public class LaunchConfigurationTabGroupExtension {
public String getDescription(Set<String> modes) {
String description = null;
if(fDescriptions == null) {
- fDescriptions = new HashMap<Set<String>, String>();
+ fDescriptions = new HashMap<>();
IConfigurationElement[] children = fConfig.getChildren(IConfigurationElementConstants.LAUNCH_MODE);
IConfigurationElement child = null;
String mode = null;
@@ -193,7 +193,7 @@ public class LaunchConfigurationTabGroupExtension {
child = children[i];
mode = child.getAttribute(IConfigurationElementConstants.MODE);
if(mode != null) {
- set = new HashSet<String>();
+ set = new HashSet<>();
set.add(mode);
}
description = child.getAttribute(IConfigurationElementConstants.DESCRIPTION);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
index 2bb34429e..04a53eb57 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
@@ -599,7 +599,7 @@ public class LaunchConfigurationTabGroupViewer {
* @since 3.3
*/
private Set<String> getCurrentModeSet() {
- Set<String> set = new HashSet<String>();
+ Set<String> set = new HashSet<>();
ILaunchConfigurationWorkingCopy config = getWorkingCopy();
if(config != null) {
try {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java
index 36917839b..5c9be7d4d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupWrapper.java
@@ -48,9 +48,9 @@ public class LaunchConfigurationTabGroupWrapper implements ILaunchConfigurationT
private ArrayList<LaunchConfigurationTabExtension> extList = null;
public TabCollector(List<ILaunchConfigurationTab> tabs, List<LaunchConfigurationTabExtension> exts) {
- tabList = new ArrayList<ILaunchConfigurationTab>(tabs);
- extList = new ArrayList<LaunchConfigurationTabExtension>(exts);
- idSet = new HashSet<String>(tabList.size() + extList.size());
+ tabList = new ArrayList<>(tabs);
+ extList = new ArrayList<>(exts);
+ idSet = new HashSet<>(tabList.size() + extList.size());
}
/**
@@ -169,7 +169,7 @@ public class LaunchConfigurationTabGroupWrapper implements ILaunchConfigurationT
public ILaunchConfigurationTab[] getTabs() {
if(fTabs == null) {
try {
- fTabs = new ArrayList<ILaunchConfigurationTab>();
+ fTabs = new ArrayList<>();
LaunchConfigurationTabExtension[] ext = LaunchConfigurationPresentationManager.getDefault().getTabExtensions(fGroupId, fConfig, fMode);
//if there are no extensions bypass and do a raw copy into
if(ext.length > 0) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java
index 9285425c9..14a06251d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java
@@ -141,7 +141,7 @@ public class LaunchConfigurationTreeContentProvider implements ITreeContentProvi
* @return the given types minus any types that should not be visible.
*/
private List<ILaunchConfigurationType> filterTypes(ILaunchConfigurationType[] allTypes) {
- List<ILaunchConfigurationType> filteredTypes = new ArrayList<ILaunchConfigurationType>();
+ List<ILaunchConfigurationType> filteredTypes = new ArrayList<>();
String mode = getMode();
LaunchConfigurationTypeContribution contribution;
for (int i = 0; i < allTypes.length; i++) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java
index 856fd6214..b6bcae62b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java
@@ -59,7 +59,7 @@ public class LaunchConfigurationViewer extends TreeViewer {
if(!selection.isEmpty()) {
int[] indices = collectIndices(selection.getFirstElement());
updateCode.run();
- ArrayList<Object> set = new ArrayList<Object>();
+ ArrayList<Object> set = new ArrayList<>();
Object o = null;
for (Iterator<?> iter = selection.iterator(); iter.hasNext();) {
o = iter.next();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
index 5c6d458fb..22d5bef2d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
@@ -634,7 +634,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
* @since 3.2
*/
private ViewerFilter[] createViewerFilters() {
- ArrayList<ViewerFilter> filters = new ArrayList<ViewerFilter>();
+ ArrayList<ViewerFilter> filters = new ArrayList<>();
fClosedProjectFilter = new ClosedProjectFilter();
if(DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_CLOSED)) {
filters.add(fClosedProjectFilter);
@@ -1215,7 +1215,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
if(value == null) {
value = IInternalDebugCoreConstants.EMPTY_STRING;
}
- ArrayList<String> list = new ArrayList<String>();
+ ArrayList<String> list = new ArrayList<>();
String[] persisted = value.split(DELIMITER);
for(int i = 0; i < persisted.length; i++) {
list.add(persisted[i]);
@@ -1252,7 +1252,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
if(value != null) {
String[] nodes = value.split(DELIMITER);
TreeItem[] items = fLaunchConfigurationView.getTreeViewer().getTree().getItems();
- HashSet<Object> toexpand = new HashSet<Object>();
+ HashSet<Object> toexpand = new HashSet<>();
// if we have a selection make sure it is expanded
if(fInitialSelection != null && !fInitialSelection.isEmpty()) {
Object obj = fInitialSelection.getFirstElement();
@@ -1512,8 +1512,9 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
null,
buffer.toString(),
MessageDialog.QUESTION,
- new String[] {LaunchConfigurationsMessages.LaunchConfigurationDialog_Yes_32,
- LaunchConfigurationsMessages.LaunchConfigurationDialog_No_33},
+ new String[] {
+ LaunchConfigurationsMessages.LaunchConfigurationDialog_Discard_Button,
+ LaunchConfigurationsMessages.LaunchConfigurationDialog_Dont_Discard_Button },
1);
int val = IDialogConstants.NO_ID;
if (dialog.open() == 0) {
@@ -1547,9 +1548,10 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
null,
message,
MessageDialog.QUESTION,
- new String[] {LaunchConfigurationsMessages.LaunchConfigurationDialog_Yes_32,
- LaunchConfigurationsMessages.LaunchConfigurationDialog_No_33,
- LaunchConfigurationsMessages.LaunchConfigurationsDialog_c_ancel},
+ new String[] {
+ LaunchConfigurationsMessages.LaunchConfigurationDialog_Save_Button,
+ LaunchConfigurationsMessages.LaunchConfigurationDialog_Dont_Save_Button,
+ LaunchConfigurationsMessages.LaunchConfigurationsDialog_c_ancel },
0);
int ret = dialog.open();
int val = IDialogConstants.CANCEL_ID;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
index e0fef6ca0..7e7b5dddd 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -77,12 +77,14 @@ public class LaunchConfigurationsMessages extends NLS {
public static String LaunchConfigurationDialog_Launch_Configuration_Error_46;
public static String LaunchConfigurationDialog_Launch_Configurations_18;
public static String LaunchConfigurationDialog_Name_required_for_launch_configuration_11;
- public static String LaunchConfigurationDialog_No_33;
public static String LaunchConfigurationDialog_Ready_to_launch_2;
public static String LaunchConfigurationDialog_The_configuration___29;
public static String LaunchConfigurationDialog_The_configuration___35;
public static String LaunchConfigurationDialog_unspecified_28;
- public static String LaunchConfigurationDialog_Yes_32;
+ public static String LaunchConfigurationDialog_Save_Button;
+ public static String LaunchConfigurationDialog_Dont_Save_Button;
+ public static String LaunchConfigurationDialog_Discard_Button;
+ public static String LaunchConfigurationDialog_Dont_Discard_Button;
public static String LaunchConfigurationDialog_Do_you_wish_to_delete_the_selected_launch_configurations__1;
public static String LaunchConfigurationDialog_Do_you_wish_to_delete_the_selected_launch_configuration__2;
public static String LaunchConfigurationDialog_Confirm_Launch_Configuration_Deletion_3;
@@ -93,6 +95,7 @@ public class LaunchConfigurationsMessages extends NLS {
public static String LaunchConfigurationsDialog_Information_3;
public static String LaunchConfigurationSelectionDialog_0;
public static String LaunchConfigurationSelectionDialog_1;
+ public static String LaunchConfigurationSelectionDialog_deleteButtonLabel;
public static String LaunchConfigurationTabGroupViewer_14;
@@ -169,6 +172,7 @@ public class LaunchConfigurationsMessages extends NLS {
public static String PerspectiveManager_15;
public static String PerspectiveManager_suspend_description;
public static String PerspectiveManager_launch_description;
+ public static String PerspectiveManager_switch;
public static String DebugModePromptStatusHandler_0;
public static String DebugModePromptStatusHandler_1;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
index 8c5151b19..fff4d4cca 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2000, 2016 IBM Corporation and others.
+# Copyright (c) 2000, 2017 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -81,7 +81,6 @@ LaunchConfigurationFilteredTree_save_changes=Save Changes
LaunchConfigurationFilteredTree_search_with_changes=You cannot perform a text search when the current configuration has pending changes.\n\nDo you want to save the changes and continue searching?
LaunchConfigurationFilteredTree_search_with_errors=You cannot perform a text search when the current configuration has errors.\n\nDo you want to discard the changes and continue searching?
LaunchConfigurationDialog_Name_required_for_launch_configuration_11=A name is required for the configuration
-LaunchConfigurationDialog_No_33=No
LaunchConfigurationEditDialog_0=Modify configuration and continue.
LaunchConfigurationEditDialog_1=Con&tinue
LaunchConfigurationDialog_Ready_to_launch_2=Ready to launch
@@ -89,7 +88,10 @@ LaunchConfigurationDialog_The_configuration___29=The configuration "{0}" has uns
LaunchConfigurationDialog_The_configuration___35=The configuration "{0}" has unsaved changes that CANNOT be saved because of the following error:\n\n
LaunchConfigurationFilteredTree_discard_changes=Discard Changes
LaunchConfigurationDialog_unspecified_28=unspecified
-LaunchConfigurationDialog_Yes_32=Yes
+LaunchConfigurationDialog_Save_Button=&Save
+LaunchConfigurationDialog_Dont_Save_Button=Do&n't Save
+LaunchConfigurationDialog_Discard_Button=&Discard
+LaunchConfigurationDialog_Dont_Discard_Button=Do&n't Discard
LaunchConfigurationDialog_Do_you_wish_to_delete_the_selected_launch_configurations__1=Do you wish to delete the selected launch configurations?
LaunchConfigurationDialog_Do_you_wish_to_delete_the_selected_launch_configuration__2=Do you wish to delete the selected launch configuration?
LaunchConfigurationDialog_Confirm_Launch_Configuration_Deletion_3=Confirm Launch Configuration Deletion
@@ -106,6 +108,7 @@ LaunchConfigurationSelectionDialog_0=Select Configuration
LaunchConfigurationSelectionDialog_1=&Select a configuration to launch:
LaunchConfigurationView_0=Filter matched {0} of {1} items
LaunchConfigurationsDialog_c_ancel=Cancel
+LaunchConfigurationSelectionDialog_deleteButtonLabel=&Delete
# {0} is substituted with a launch mode - possible values include run, debug, profile, or
# any label of a contributed ILaunchMode.
@@ -183,10 +186,11 @@ FavoritesDialog_8=Updating Favorites...
OrganizeFavoritesAction_0=Organize Fa&vorites...
PerspectiveManager_12=Confirm Perspective Switch
-PerspectiveManager_13=This kind of launch is configured to open the {0} perspective when it suspends. Do you want to open this perspective now?
-PerspectiveManager_15=This kind of launch is associated with the {0} perspective. Do you want to open this perspective now?
-PerspectiveManager_suspend_description=This kind of launch is configured to open the {0} perspective when it suspends.\n\n{1}\n\nDo you want to open this perspective now?
-PerspectiveManager_launch_description=This kind of launch is associated with the {0} perspective.\n\n{1}\n\nDo you want to open this perspective now?
+PerspectiveManager_13=This kind of launch is configured to open the {0} perspective when it suspends. Do you want to switch to this perspective now?
+PerspectiveManager_15=This kind of launch is associated with the {0} perspective. Do you want to switch to this perspective now?
+PerspectiveManager_suspend_description=This kind of launch is configured to open the {0} perspective when it suspends.\n\n{1}\n\nDo you want to switch to this perspective now?
+PerspectiveManager_launch_description=This kind of launch is associated with the {0} perspective.\n\n{1}\n\nDo you want to switch to this perspective now?
+PerspectiveManager_switch=&Switch
DebugModePromptStatusHandler_0=Breakpoints in Workspace
DebugModePromptStatusHandler_1=There are breakpoints enabled in the workspace. Would you rather launch in debug mode?
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java
index cd3978fd9..d5926d7bb 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java
@@ -38,7 +38,7 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe
/**
* Listing of the complete launch history, which includes favorites in the launched ordering
*/
- private Vector<ILaunchConfiguration> fCompleteHistory = new Vector<ILaunchConfiguration>();
+ private Vector<ILaunchConfiguration> fCompleteHistory = new Vector<>();
/**
* The launch group this history is provided for
@@ -48,7 +48,7 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe
/**
* Ordered listing of the favorites of this history
*/
- private Vector<ILaunchConfiguration> fFavorites = new Vector<ILaunchConfiguration>();
+ private Vector<ILaunchConfiguration> fFavorites = new Vector<>();
/**
* A new saved flag to prevent save participants from serializing unchanged launch histories.
@@ -59,7 +59,7 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe
/**
* List of instances of this launch history
*/
- private static List<LaunchHistory> fgLaunchHistoryInstances = new ArrayList<LaunchHistory>();
+ private static List<LaunchHistory> fgLaunchHistoryInstances = new ArrayList<>();
/**
* Creates a new launch history for the given launch group
@@ -200,7 +200,7 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe
* @return launch history
*/
public synchronized ILaunchConfiguration[] getHistory() {
- Vector<ILaunchConfiguration> history = new Vector<ILaunchConfiguration>();
+ Vector<ILaunchConfiguration> history = new Vector<>();
try {
for (ILaunchConfiguration config : fCompleteHistory) {
if(config.exists() && !fFavorites.contains(config) &&
@@ -227,7 +227,7 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe
* @since 3.3
*/
public synchronized ILaunchConfiguration[] getCompleteLaunchHistory() {
- Vector<ILaunchConfiguration> history = new Vector<ILaunchConfiguration>();
+ Vector<ILaunchConfiguration> history = new Vector<>();
try {
for (ILaunchConfiguration config : fCompleteHistory) {
if(config.exists() && DebugUIPlugin.doLaunchConfigurationFiltering(config) &&
@@ -256,7 +256,7 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe
* @param favorites
*/
public synchronized void setFavorites(ILaunchConfiguration[] favorites) {
- fFavorites = new Vector<ILaunchConfiguration>(Arrays.asList(favorites));
+ fFavorites = new Vector<>(Arrays.asList(favorites));
setSaved(false);
fireLaunchHistoryChanged();
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutExtension.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutExtension.java
index 011adc02a..ab2435180 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutExtension.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutExtension.java
@@ -197,7 +197,7 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib
return null;
}
IConfigurationElement[] labels = context.getChildren(IConfigurationElementConstants.CONTEXT_LABEL);
- fContextLabels = new ArrayList<Pair>(labels.length);
+ fContextLabels = new ArrayList<>(labels.length);
for (int i = 0; i < labels.length; i++) {
fContextLabels.add(new Pair(labels[i].getAttribute(IConfigurationElementConstants.MODE),
labels[i].getAttribute(IConfigurationElementConstants.LABEL)));
@@ -220,7 +220,7 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib
*/
public Set<String> getAssociatedConfigurationTypes() {
if(fAssociatedTypes == null) {
- fAssociatedTypes = new HashSet<String>();
+ fAssociatedTypes = new HashSet<>();
IConfigurationElement[] children = fConfig.getChildren(IConfigurationElementConstants.CONFIGURATION_TYPES);
String id = null;
for (int i = 0; i < children.length; i++) {
@@ -246,7 +246,7 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib
return null;
}
if(fDescriptions == null) {
- fDescriptions = new HashMap<String, String>();
+ fDescriptions = new HashMap<>();
//get the description for the main element first
String descr = fConfig.getAttribute(IConfigurationElementConstants.DESCRIPTION);
if(descr != null) {
@@ -386,7 +386,7 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib
public List<String> getPerspectives() {
if (fPerspectives == null) {
IConfigurationElement[] perspectives = getConfigurationElement().getChildren(IConfigurationElementConstants.PERSPECTIVE);
- fPerspectives = new ArrayList<String>(perspectives.length);
+ fPerspectives = new ArrayList<>(perspectives.length);
for (int i = 0; i < perspectives.length; i++) {
fPerspectives.add(perspectives[i].getAttribute(IConfigurationElementConstants.ID));
}
@@ -445,7 +445,7 @@ public class LaunchShortcutExtension implements ILaunchShortcut2, IPluginContrib
return Collections.EMPTY_SET;
}
StringTokenizer tokenizer= new StringTokenizer(modes, ","); //$NON-NLS-1$
- fModes = new HashSet<String>(tokenizer.countTokens());
+ fModes = new HashSet<>(tokenizer.countTokens());
while (tokenizer.hasMoreTokens()) {
fModes.add(tokenizer.nextToken().trim());
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java
index 320225b9b..2ff5205c2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
@@ -49,6 +50,7 @@ import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.debug.ui.contexts.ISuspendTrigger;
import org.eclipse.debug.ui.contexts.ISuspendTriggerListener;
import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
@@ -109,7 +111,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe
public PerspectiveContext(ILaunchConfigurationType type, ILaunchDelegate delegate, Set<String> modes) {
fType = type;
fDelegate = delegate;
- fPerspectives = new HashMap<Set<String>, String>();
+ fPerspectives = new HashMap<>();
fPerspectives.put(modes, null);
}
@@ -176,7 +178,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe
*/
public void setPerspective(Set<String> modes, String pid) {
if(fPerspectives == null) {
- fPerspectives = new HashMap<Set<String>, String>();
+ fPerspectives = new HashMap<>();
}
fPerspectives.put(modes, pid);
}
@@ -274,7 +276,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe
* Maps each launch to its perspective context activation. These
* are disabled when a launch terminates.
*/
- private Map<ILaunch, IContextActivation[]> fLaunchToContextActivations = new HashMap<ILaunch, IContextActivation[]>();
+ private Map<ILaunch, IContextActivation[]> fLaunchToContextActivations = new HashMap<>();
/**
* Called by the debug ui plug-in on startup.
@@ -675,7 +677,10 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe
message = LaunchConfigurationsMessages.PerspectiveManager_15;
}
}
- MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoQuestion(shell, LaunchConfigurationsMessages.PerspectiveManager_12, MessageFormat.format(message, args), null, false, DebugUIPlugin.getDefault().getPreferenceStore(), preferenceKey);
+ LinkedHashMap<String, Integer> buttonLabelToId = new LinkedHashMap<>();
+ buttonLabelToId.put(LaunchConfigurationsMessages.PerspectiveManager_switch, IDialogConstants.YES_ID);
+ buttonLabelToId.put(IDialogConstants.NO_LABEL, IDialogConstants.NO_ID);
+ MessageDialogWithToggle dialog = MessageDialogWithToggle.open(MessageDialog.QUESTION, shell, LaunchConfigurationsMessages.PerspectiveManager_12, MessageFormat.format(message, args), null, false, DebugUIPlugin.getDefault().getPreferenceStore(), preferenceKey, SWT.NONE, buttonLabelToId);
boolean answer = (dialog.getReturnCode() == IDialogConstants.YES_ID);
synchronized (this) {
fPrompting= false;
@@ -810,7 +815,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe
* @since 3.0
*/
public String getLaunchPerspective(ILaunchConfigurationType type, String mode) {
- HashSet<String> modes = new HashSet<String>();
+ HashSet<String> modes = new HashSet<>();
modes.add(mode);
return getLaunchPerspective(type, modes, null);
}
@@ -832,7 +837,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe
* @since 3.0
*/
public void setLaunchPerspective(ILaunchConfigurationType type, String mode, String perspective) {
- HashSet<String> modes = new HashSet<String>();
+ HashSet<String> modes = new HashSet<>();
modes.add(mode);
setLaunchPerspective(type, modes, null, perspective);
}
@@ -990,7 +995,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe
*/
private void initPerspectives() {
if(fPerspectiveContexts == null) {
- fPerspectiveContexts = new HashSet<PerspectiveContext>();
+ fPerspectiveContexts = new HashSet<>();
String xml = DebugUIPlugin.getDefault().getPreferenceStore().getString(IInternalDebugUIConstants.PREF_LAUNCH_PERSPECTIVES);
if (xml != null && xml.length() > 0) {
try {
@@ -1035,7 +1040,7 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe
* @since 3.3
*/
private Set<String> parseModes(String modes) {
- HashSet<String> modeset = new HashSet<String>();
+ HashSet<String> modeset = new HashSet<>();
String[] ms = modes.split(","); //$NON-NLS-1$
for(int i = 0; i < ms.length; i++) {
modeset.add(ms[i].trim());
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SaveScopeResourcesHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SaveScopeResourcesHandler.java
index 6a4644363..1ca859063 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SaveScopeResourcesHandler.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SaveScopeResourcesHandler.java
@@ -228,7 +228,7 @@ public class SaveScopeResourcesHandler implements IStatusHandler {
* @return the list of dirty editors for this launch to save, never null
*/
protected IResource[] getScopedDirtyResources(IProject[] projects) {
- HashSet<IResource> dirtyres = new HashSet<IResource>();
+ HashSet<IResource> dirtyres = new HashSet<>();
IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
for(int l = 0; l < windows.length; l++) {
IWorkbenchPage[] pages = windows[l].getPages();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectFavoritesDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectFavoritesDialog.java
index 91f5917b7..07f8366db 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectFavoritesDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectFavoritesDialog.java
@@ -49,7 +49,7 @@ public class SelectFavoritesDialog extends AbstractDebugCheckboxSelectionDialog
DebugUIPlugin.log(e);
return new ILaunchConfiguration[0];
}
- List<ILaunchConfiguration> list = new ArrayList<ILaunchConfiguration>(all.length);
+ List<ILaunchConfiguration> list = new ArrayList<>(all.length);
ViewerFilter filter = new LaunchGroupFilter(fHistory.getLaunchGroup());
for (int i = 0; i < all.length; i++) {
if (filter.select(null, null, all[i])) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchModesDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchModesDialog.java
index 446120abd..d842ed3b9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchModesDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchModesDialog.java
@@ -46,7 +46,7 @@ public class SelectLaunchModesDialog extends AbstractDebugListSelectionDialog{
@Override
public String getText(Object element) {
Set<?> vals = (Set<?>) element;
- Set<String> modes = new HashSet<String>(vals.size());
+ Set<String> modes = new HashSet<>(vals.size());
for (Object o : vals) {
modes.add((String) o);
}
@@ -77,7 +77,7 @@ public class SelectLaunchModesDialog extends AbstractDebugListSelectionDialog{
super(parentShell);
super.setTitle(LaunchConfigurationsMessages.SelectLaunchOptionsDialog_3);
setShellStyle(getShellStyle() | SWT.RESIZE);
- fValidModes = new ArrayList<Set<String>>();
+ fValidModes = new ArrayList<>();
Set<Set<String>> modes = configuration.getType().getSupportedModeCombinations();
for (Set<String> modeset : modes) {
if(modeset.contains(mode)) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchersDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchersDialog.java
index 1b2fc499a..18ff7463c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchersDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchersDialog.java
@@ -257,7 +257,7 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog {
* @return the complete set of modes that the associated launch configuration is concerned with
*/
protected Set<String> getCurrentModeSet() {
- Set<String> modes = new HashSet<String>();
+ Set<String> modes = new HashSet<>();
try {
modes = fConfiguration.getModes();
modes.add(fLaunchMode);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/WorkingSetsFilter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/WorkingSetsFilter.java
index 1daa57c66..015971bb6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/WorkingSetsFilter.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/WorkingSetsFilter.java
@@ -61,7 +61,7 @@ public class WorkingSetsFilter extends ViewerFilter {
return true;
}
//remove breakpoint working sets
- ArrayList<IWorkingSet> ws = new ArrayList<IWorkingSet>();
+ ArrayList<IWorkingSet> ws = new ArrayList<>();
for (int i = 0; i < wsets.length; i++) {
if(!IDebugUIConstants.BREAKPOINT_WORKINGSET_ID.equals(wsets[i].getId())) {
ws.add(wsets[i]);
@@ -89,7 +89,7 @@ public class WorkingSetsFilter extends ViewerFilter {
* @since 3.2
*/
public static boolean workingSetContains(IWorkingSet[] wsets, IResource res) {
- ArrayList<IResource> parents = new ArrayList<IResource>();
+ ArrayList<IResource> parents = new ArrayList<>();
parents.add(res);
while(res != null) {
res = res.getParent();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/MemoryRenderingManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/MemoryRenderingManager.java
index a487ca913..2715fae46 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/MemoryRenderingManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/MemoryRenderingManager.java
@@ -39,10 +39,10 @@ import org.eclipse.debug.ui.memory.IMemoryRenderingType;
public class MemoryRenderingManager extends AbstractMemoryRenderingBindingsProvider implements IMemoryRenderingManager {
// map of rendering type ids to valid rendering types
- private Map<String, MemoryRenderingType> fRenderingTypes = new HashMap<String, MemoryRenderingType>();
+ private Map<String, MemoryRenderingType> fRenderingTypes = new HashMap<>();
// list of renderingBindings
- private List<RenderingBindings> fBindings = new ArrayList<RenderingBindings>();
+ private List<RenderingBindings> fBindings = new ArrayList<>();
// singleton manager
private static MemoryRenderingManager fgDefault;
@@ -114,7 +114,7 @@ public class MemoryRenderingManager extends AbstractMemoryRenderingBindingsProvi
*/
@Override
public IMemoryRenderingType[] getDefaultRenderingTypes(IMemoryBlock block) {
- List<IMemoryRenderingType> allTypes = new ArrayList<IMemoryRenderingType>();
+ List<IMemoryRenderingType> allTypes = new ArrayList<>();
Iterator<RenderingBindings> iterator = fBindings.iterator();
while (iterator.hasNext()) {
RenderingBindings binding = iterator.next();
@@ -152,7 +152,7 @@ public class MemoryRenderingManager extends AbstractMemoryRenderingBindingsProvi
*/
@Override
public IMemoryRenderingType[] getRenderingTypes(IMemoryBlock block) {
- List<IMemoryRenderingType> allTypes = new ArrayList<IMemoryRenderingType>();
+ List<IMemoryRenderingType> allTypes = new ArrayList<>();
for (RenderingBindings binding : fBindings) {
IMemoryRenderingType[] renderingTypes = binding.getRenderingTypes(block);
for (int i = 0; i < renderingTypes.length; i++) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/RenderingBindings.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/RenderingBindings.java
index a7adf3f97..a19c58ad5 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/RenderingBindings.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/RenderingBindings.java
@@ -79,7 +79,7 @@ class RenderingBindings extends AbstractMemoryRenderingBindingsProvider implemen
private IMemoryRenderingType[] getBindings() {
if (fRenderingTypes == null) {
String ids = fConfigurationElement.getAttribute(ATTR_RENDERING_IDS);
- List<IMemoryRenderingType> list = new ArrayList<IMemoryRenderingType>();
+ List<IMemoryRenderingType> list = new ArrayList<>();
IMemoryRenderingManager manager = getManager();
if (ids != null) {
String[] strings = ids.split(","); //$NON-NLS-1$
@@ -109,7 +109,7 @@ class RenderingBindings extends AbstractMemoryRenderingBindingsProvider implemen
private IMemoryRenderingType[] getDefaultBindings() {
if (fDefaultTypes == null) {
String ids = fConfigurationElement.getAttribute(ATTR_DEFAULT_IDS);
- List<IMemoryRenderingType> list = new ArrayList<IMemoryRenderingType>();
+ List<IMemoryRenderingType> list = new ArrayList<>();
IMemoryRenderingManager manager = getManager();
if (ids != null) {
String[] strings = ids.split(","); //$NON-NLS-1$
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java
index b7bb3427e..7451758d6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java
@@ -419,7 +419,7 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende
private NextPageAction fNextAction;
private PrevPageAction fPrevAction;
- private ArrayList<IContextActivation> fContext = new ArrayList<IContextActivation>();
+ private ArrayList<IContextActivation> fContext = new ArrayList<>();
private AbstractHandler fGoToAddressHandler;
private AbstractHandler fNextPageHandler;
@@ -822,7 +822,7 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende
private void addMenuListener(IMenuListener menuListener) {
if (fMenuListeners == null) {
- fMenuListeners = new ArrayList<IMenuListener>();
+ fMenuListeners = new ArrayList<>();
}
if (!fMenuListeners.contains(menuListener)) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java
index c1791ef95..4f18828f7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java
@@ -87,7 +87,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
/**
* Model proxy of the input
*/
- final private List<BreakpointManagerProxy> fProxies = new ArrayList<BreakpointManagerProxy>(1);
+ final private List<BreakpointManagerProxy> fProxies = new ArrayList<>(1);
/**
* Element comparator, use to compare the ordering of elements for the model
@@ -379,7 +379,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
}
synchronized(this) {
- Set<IBreakpoint> existingBreakpoints = new HashSet<IBreakpoint>(Arrays.asList(fContainer.getBreakpoints()));
+ Set<IBreakpoint> existingBreakpoints = new HashSet<>(Arrays.asList(fContainer.getBreakpoints()));
// Bug 310879
// Process breakpoints in two passes: first remove breakpoints, then add new ones.
@@ -427,7 +427,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
}
IBreakpoint[] breakpoints = thread.getBreakpoints();
- Set<IBreakpoint> bpsSet = new HashSet<IBreakpoint>(breakpoints.length * 4 / 3);
+ Set<IBreakpoint> bpsSet = new HashSet<>(breakpoints.length * 4 / 3);
for (int i = 0; i< breakpoints.length; i++) {
bpsSet.add(breakpoints[i]);
}
@@ -553,8 +553,8 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
ModelDelta delta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
// If the change caused a breakpoint to be added (installed) or remove (un-installed) update accordingly.
- List<IBreakpoint> removed = new ArrayList<IBreakpoint>();
- List<IBreakpoint> added = new ArrayList<IBreakpoint>();
+ List<IBreakpoint> removed = new ArrayList<>();
+ List<IBreakpoint> added = new ArrayList<>();
List<IBreakpoint> filteredAsList = Arrays.asList(filteredBreakpoints);
for (int i = 0; i < breakpoints.length; i++) {
IBreakpoint bp = breakpoints[i];
@@ -821,7 +821,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
protected IBreakpoint[] filterBreakpoints(DefaultBreakpointsViewInput input, IStructuredSelection selectionFilter, IBreakpoint[] breakpoints) {
if (selectionFilter != null && !selectionFilter.isEmpty()) {
List<IDebugTarget> targets = getDebugTargets(selectionFilter);
- ArrayList<IBreakpoint> retVal = new ArrayList<IBreakpoint>();
+ ArrayList<IBreakpoint> retVal = new ArrayList<>();
if (targets != null) {
for (int i = 0; i < breakpoints.length; ++i) {
if (supportsBreakpoint(targets, breakpoints[i])) {
@@ -869,7 +869,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
* @return list of IDebugTarget object.
*/
protected List<IDebugTarget> getDebugTargets(IStructuredSelection ss) {
- List<IDebugTarget> debugTargets = new ArrayList<IDebugTarget>(2);
+ List<IDebugTarget> debugTargets = new ArrayList<>(2);
if (ss != null) {
Iterator<?> i = ss.iterator();
while (i.hasNext()) {
@@ -919,7 +919,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
* @param context Presentation context that was disposed.
*/
protected void contextDisposed(IPresentationContext context) {
- List<InputData> removed = new ArrayList<InputData>(1);
+ List<InputData> removed = new ArrayList<>(1);
synchronized (fInputToData) {
for (Iterator<Entry<DefaultBreakpointsViewInput, InputData>> itr = fInputToData.entrySet().iterator(); itr.hasNext();) {
Map.Entry<DefaultBreakpointsViewInput, InputData> entry = itr.next();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementLabelProvider.java
index 938267dca..78134aa0c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementLabelProvider.java
@@ -136,7 +136,7 @@ public abstract class ElementLabelProvider implements IElementLabelProvider {
* Queue of label updates
*/
class LabelUpdater implements Runnable {
- LinkedList<ILabelUpdate> fQueue = new LinkedList<ILabelUpdate>();
+ LinkedList<ILabelUpdate> fQueue = new LinkedList<>();
public synchronized boolean queue(ILabelUpdate[] updates) {
if (fQueue == null) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionContentProvider.java
index 946ce92e3..c0fbfaa3d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionContentProvider.java
@@ -89,8 +89,8 @@ public class ExpressionContentProvider extends VariableContentProvider {
@Override
public void update(IChildrenCountUpdate[] updates) {
// See if we can delegate to a model specific content provider
- Map<IElementContentProvider, List<IViewerUpdate>> delegateMap = new HashMap<IElementContentProvider, List<IViewerUpdate>>();
- List<IViewerUpdate> notDelegated = new ArrayList<IViewerUpdate>();
+ Map<IElementContentProvider, List<IViewerUpdate>> delegateMap = new HashMap<>();
+ List<IViewerUpdate> notDelegated = new ArrayList<>();
findDelegates(delegateMap, notDelegated, updates);
// Batch the updates and send them to the delegates
@@ -109,8 +109,8 @@ public class ExpressionContentProvider extends VariableContentProvider {
@Override
public void update(IHasChildrenUpdate[] updates) {
// See if we can delegate to a model specific content provider
- Map<IElementContentProvider, List<IViewerUpdate>> delegateMap = new HashMap<IElementContentProvider, List<IViewerUpdate>>();
- List<IViewerUpdate> notDelegated = new ArrayList<IViewerUpdate>();
+ Map<IElementContentProvider, List<IViewerUpdate>> delegateMap = new HashMap<>();
+ List<IViewerUpdate> notDelegated = new ArrayList<>();
findDelegates(delegateMap, notDelegated, updates);
// Batch the updates and send them to the delegates
@@ -129,8 +129,8 @@ public class ExpressionContentProvider extends VariableContentProvider {
@Override
public void update(IChildrenUpdate[] updates) {
// See if we can delegate to a model specific content provider
- Map<IElementContentProvider, List<IViewerUpdate>> delegateMap = new HashMap<IElementContentProvider, List<IViewerUpdate>>();
- List<IViewerUpdate> notDelegated = new ArrayList<IViewerUpdate>();
+ Map<IElementContentProvider, List<IViewerUpdate>> delegateMap = new HashMap<>();
+ List<IViewerUpdate> notDelegated = new ArrayList<>();
findDelegates(delegateMap, notDelegated, updates);
// Batch the updates and send them to the delegates
@@ -160,7 +160,7 @@ public class ExpressionContentProvider extends VariableContentProvider {
if (delegate != null){
List<IViewerUpdate> updateList = delegateMap.get(delegate);
if (updateList == null){
- updateList = new ArrayList<IViewerUpdate>();
+ updateList = new ArrayList<>();
delegateMap.put(delegate, updateList);
}
((ViewerUpdateMonitor)updates[i]).setDelegated(true);
@@ -179,7 +179,7 @@ public class ExpressionContentProvider extends VariableContentProvider {
IErrorReportingExpression expression = (IErrorReportingExpression) parent;
if (expression.hasErrors()) {
String[] messages = expression.getErrorMessages();
- LinkedHashSet<ErrorMessageElement> set = new LinkedHashSet<ErrorMessageElement>(messages.length);
+ LinkedHashSet<ErrorMessageElement> set = new LinkedHashSet<>(messages.length);
for (int i = 0; i < messages.length; i++) {
set.add(new ErrorMessageElement(messages[i]));
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java
index 3cd8291c2..a3a8a6530 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java
@@ -199,7 +199,7 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement
*/
@Override
protected Control createContents(Composite parent) {
- fFieldEditors = new ArrayList<FieldEditor>();
+ fFieldEditors = new ArrayList<>();
Composite comp = SWTFactory.createComposite(parent, parent.getFont(), 1, 1, GridData.FILL_HORIZONTAL);
//filtering options
Group group = SWTFactory.createGroup(comp, DebugPreferencesMessages.LaunchingPreferencePage_32, 1, 1, GridData.FILL_HORIZONTAL);
@@ -301,7 +301,7 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement
ILaunchManager lmanager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfiguration[] configurations = lmanager.getMigrationCandidates();
//separate the private from the public
- List<ILaunchConfiguration> pub = new ArrayList<ILaunchConfiguration>();
+ List<ILaunchConfiguration> pub = new ArrayList<>();
for(int i = 0; i < configurations.length; i++) {
if(DebugUITools.isPrivate(configurations[i])) {
//auto-migrate private ones
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java
index dc38f56b3..9489da718 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java
@@ -176,7 +176,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I
children[i].dispose();
}
if(fgCurrentWorkingContext == null) {
- fgCurrentWorkingContext = new HashSet<Object>();
+ fgCurrentWorkingContext = new HashSet<>();
}
fgCurrentWorkingContext.clear();
if(!selection.isEmpty()) {
@@ -404,7 +404,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I
IStructuredSelection ss = (IStructuredSelection) fTreeViewer.getSelection();
if(ss != null && !ss.isEmpty()) {
Object o = null;
- Set<String> tmp = new HashSet<String>();
+ Set<String> tmp = new HashSet<>();
String id = null;
ILaunchConfigurationType type = null;
LaunchDelegate delegate = null;
@@ -473,7 +473,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I
protected Set<Set<String>> collectCommonModeSets(Object[] selection) {
//prep selection context, remove types from the equation
- HashSet<ILaunchDelegate> delegates = new HashSet<ILaunchDelegate>();
+ HashSet<ILaunchDelegate> delegates = new HashSet<>();
Object o = null;
for(int i = 0; i < selection.length; i++) {
o = selection[i];
@@ -489,9 +489,9 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I
}
}
//compare the listing of delegates to find common mode sets
- HashSet<Set<String>> common = new HashSet<Set<String>>();
+ HashSet<Set<String>> common = new HashSet<>();
List<Set<String>> modes = null;
- HashSet<Set<String>> pruned = new HashSet<Set<String>>();
+ HashSet<Set<String>> pruned = new HashSet<>();
for (ILaunchDelegate delegate : delegates) {
modes = delegate.getModes();
for (Set<String> fmodes : modes) {
@@ -566,7 +566,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I
}
for(int j = 0; j < delegates.length; j++) {
ILaunchDelegate delegate = (ILaunchDelegate) delegates[j];
- modes = new HashSet<Set<String>>(delegate.getModes());
+ modes = new HashSet<>(delegate.getModes());
for (Set<String> modeset : modes) {
fgChangeSet.add(new PerspectiveChange(type, delegate, modeset, pm.getDefaultLaunchPerspective(type, delegate, modeset)));
}
@@ -586,10 +586,10 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I
@Override
public void init(IWorkbench workbench) {
setPreferenceStore(DebugUIPlugin.getDefault().getPreferenceStore());
- fgChangeSet = new HashSet<PerspectiveChange>();
+ fgChangeSet = new HashSet<>();
//init the labels mapping and the list of labels
- fgPerspectiveIdMap = new HashMap<String, String>();
- ArrayList<String> labels = new ArrayList<String>();
+ fgPerspectiveIdMap = new HashMap<>();
+ ArrayList<String> labels = new ArrayList<>();
labels.add(DebugPreferencesMessages.PerspectivePreferencePage_4);
IPerspectiveRegistry registry = PlatformUI.getWorkbench().getPerspectiveRegistry();
IPerspectiveDescriptor[] descriptors = registry.getPerspectives();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchersPreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchersPreferencePage.java
index 779e7c664..c872ff102 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchersPreferencePage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchersPreferencePage.java
@@ -285,8 +285,8 @@ public class LaunchersPreferencePage extends PreferencePage implements IWorkbenc
setPreferenceStore(DebugUIPlugin.getDefault().getPreferenceStore());
LaunchManager lm = (LaunchManager) DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType[] types = lm.getLaunchConfigurationTypes();
- fDuplicates = new HashMap<ILaunchConfigurationType, Set<DuplicateDelegate>>();
- fDupeSelections = new HashMap<DuplicateDelegate, ILaunchDelegate>();
+ fDuplicates = new HashMap<>();
+ fDupeSelections = new HashMap<>();
ILaunchDelegate[] delegates = null;
Set<Set<String>> modes = null;
Set<String> modeset = null;
@@ -301,7 +301,7 @@ public class LaunchersPreferencePage extends PreferencePage implements IWorkbenc
if(delegates.length > 1) {
tmp = fDuplicates.get(types[i]);
if(tmp == null) {
- tmp = new HashSet<DuplicateDelegate>();
+ tmp = new HashSet<>();
}
dd = new DuplicateDelegate(types[i], delegates, modeset);
tmp.add(dd);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java
index 1293d661b..50cff0042 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java
@@ -77,7 +77,7 @@ public class RunDebugPropertiesPage extends PropertyPage {
/**
* Set of configurations to be deleted
*/
- private Set<ILaunchConfigurationWorkingCopy> fDeletedConfigurations = new HashSet<ILaunchConfigurationWorkingCopy>();
+ private Set<ILaunchConfigurationWorkingCopy> fDeletedConfigurations = new HashSet<>();
/**
* Set of original default candidates for the resource
@@ -87,7 +87,7 @@ public class RunDebugPropertiesPage extends PropertyPage {
/**
* Holds configurations that need to be saved when the page closes
*/
- private Set<ILaunchConfigurationWorkingCopy> fChangedConfigurations = new HashSet<ILaunchConfigurationWorkingCopy>();
+ private Set<ILaunchConfigurationWorkingCopy> fChangedConfigurations = new HashSet<>();
/**
* List of the applicable launch config types for the backing resource
@@ -253,7 +253,7 @@ public class RunDebugPropertiesPage extends PropertyPage {
protected ILaunchConfigurationType[] collectTypeCandidates() {
if(fTypeCandidates == null) {
String[] types = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getApplicableConfigurationTypes(getResource());
- fTypeCandidates = new ArrayList<ILaunchConfigurationType>(types.length);
+ fTypeCandidates = new ArrayList<>(types.length);
for(int i = 0; i < types.length; i++) {
fTypeCandidates.add(DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType(types[i]));
}
@@ -279,7 +279,7 @@ public class RunDebugPropertiesPage extends PropertyPage {
*/
protected Set<ILaunchConfiguration> collectConfigCandidates(IResource resource) {
if(fOriginalCandidates == null) {
- fOriginalCandidates = new HashSet<ILaunchConfiguration>();
+ fOriginalCandidates = new HashSet<>();
try {
ILaunchConfiguration[] configs = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getApplicableLaunchConfigurations(null, resource);
for(int i = 0; i < configs.length; i++) {
@@ -357,7 +357,7 @@ public class RunDebugPropertiesPage extends PropertyPage {
* @return the names of the original launch configurations
*/
private Set<String> getConfigurationNames() {
- Set<String> names = new HashSet<String>();
+ Set<String> names = new HashSet<>();
for(ILaunchConfiguration config : fOriginalCandidates) {
names.add(config.getName());
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java
index 4669c79e6..90eccc775 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java
@@ -483,7 +483,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor
/**
* The content provider stores variable wrappers for use during editing.
*/
- private List<VariableWrapper> fWorkingSet = new ArrayList<VariableWrapper>();
+ private List<VariableWrapper> fWorkingSet = new ArrayList<>();
@Override
public Object[] getElements(Object inputElement) {
@@ -517,8 +517,8 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor
public void saveChanges() {
IStringVariableManager manager = getVariableManager();
Iterator<VariableWrapper> iterator = fWorkingSet.iterator();
- List<IValueVariable> remove = new ArrayList<IValueVariable>();
- List<IValueVariable> add = new ArrayList<IValueVariable>();
+ List<IValueVariable> remove = new ArrayList<>();
+ List<IValueVariable> add = new ArrayList<>();
while (iterator.hasNext()) {
VariableWrapper variable = iterator.next();
if (!variable.isReadOnly()) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ViewManagementPreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ViewManagementPreferencePage.java
index 5d90deeec..7af71fa5d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ViewManagementPreferencePage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/ViewManagementPreferencePage.java
@@ -191,7 +191,7 @@ public class ViewManagementPreferencePage extends PreferencePage implements IWor
@Override
public boolean performOk() {
Object[] descriptors = fPerspectiveViewer.getCheckedElements();
- Set<String> perspectives = new HashSet<String>();
+ Set<String> perspectives = new HashSet<>();
for (int i = 0; i < descriptors.length; i++) {
perspectives.add( ((IPerspectiveDescriptor)descriptors[i]).getId() );
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java
index cfcd7fb9c..c1b7f707d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java
@@ -166,7 +166,7 @@ public class AddSourceContainerDialog extends TitleAreaDialog {
* @return the list of source container types that have browsers
*/
private ISourceContainerType[] filterTypes(ISourceContainerType[] types){
- ArrayList<ISourceContainerType> validTypes = new ArrayList<ISourceContainerType>();
+ ArrayList<ISourceContainerType> validTypes = new ArrayList<>();
for (int i=0; i< types.length; i++) {
ISourceContainerType type = types[i];
if (fDirector.supportsSourceContainerType(type)) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/BasicContainerContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/BasicContainerContentProvider.java
index 07bd44dbf..4ea4c50a2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/BasicContainerContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/BasicContainerContentProvider.java
@@ -43,7 +43,7 @@ public class BasicContainerContentProvider implements ITreeContentProvider {
return allProjects;
}
- ArrayList<IProject> accessibleProjects = new ArrayList<IProject>();
+ ArrayList<IProject> accessibleProjects = new ArrayList<>();
for (int i = 0; i < allProjects.length; i++) {
if (allProjects[i].isOpen()) {
accessibleProjects.add(allProjects[i]);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/ResolveDuplicatesHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/ResolveDuplicatesHandler.java
index bfb8acef4..97d8a578b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/ResolveDuplicatesHandler.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/ResolveDuplicatesHandler.java
@@ -65,7 +65,7 @@ public class ResolveDuplicatesHandler implements IStatusHandler {
* @return the filtered list, may be empty
*/
private List<Object> removeSourceNotFoundEditors(List<?> sources) {
- List<Object> filteredList = new ArrayList<Object>();
+ List<Object> filteredList = new ArrayList<>();
for (Object obj : sources) {
if (!(obj instanceof CommonSourceNotFoundEditor)) {
filteredList.add(obj);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerAction.java
index b6c5f552e..6712d2fab 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerAction.java
@@ -76,7 +76,7 @@ public abstract class SourceContainerAction extends SelectionListenerAction {
* @return targets for an action
*/
protected List<ISourceContainer> getOrderedSelection() {
- List<ISourceContainer> targets = new ArrayList<ISourceContainer>();
+ List<ISourceContainer> targets = new ArrayList<>();
List<Object> selection = ((IStructuredSelection) getViewer().getSelection()).toList();
ISourceContainer[] entries = getViewer().getEntries();
for (int i = 0; i < entries.length; i++) {
@@ -93,7 +93,7 @@ public abstract class SourceContainerAction extends SelectionListenerAction {
*/
protected List<ISourceContainer> getEntriesAsList() {
ISourceContainer[] entries = getViewer().getEntries();
- List<ISourceContainer> list = new ArrayList<ISourceContainer>(entries.length);
+ List<ISourceContainer> list = new ArrayList<>(entries.length);
for (int i = 0; i < entries.length; i++) {
list.add(entries[i]);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerViewer.java
index b44bcef08..224d5fa21 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerViewer.java
@@ -47,7 +47,7 @@ public class SourceContainerViewer extends TreeViewer {
/**
* The source container entries displayed in this viewer
*/
- protected List<ISourceContainer> fEntries = new ArrayList<ISourceContainer>();
+ protected List<ISourceContainer> fEntries = new ArrayList<>();
class ContentProvider implements ITreeContentProvider {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupFacility.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupFacility.java
index 20ed4bbf0..da64c41f2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupFacility.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupFacility.java
@@ -96,7 +96,7 @@ public class SourceLookupFacility implements IPageListener, IPartListener2, IPro
*/
LRU(int size) {
fSize = size;
- fEntryStack = new ArrayList<Object>();
+ fEntryStack = new ArrayList<>();
}
/*
@@ -201,7 +201,7 @@ public class SourceLookupFacility implements IPageListener, IPartListener2, IPro
* Constructs a source lookup facility.
*/
private SourceLookupFacility() {
- fEditorsByPage = new HashMap<IWorkbenchPage, IEditorPart>();
+ fEditorsByPage = new HashMap<>();
DebugUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
DebugPlugin.getDefault().addDebugEventListener(this);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupManager.java
index 8e0896a3d..050ef64c0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupManager.java
@@ -31,7 +31,7 @@ public class SourceLookupManager implements IWindowListener {
/**
* Services per window
*/
- private Map<IWorkbenchWindow, SourceLookupService> fServices = new HashMap<IWorkbenchWindow, SourceLookupService>();
+ private Map<IWorkbenchWindow, SourceLookupService> fServices = new HashMap<>();
private SourceLookupManager() {
IWorkbench workbench = PlatformUI.getWorkbench();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupPanel.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupPanel.java
index 936f7f78f..f1ecde19a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupPanel.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupPanel.java
@@ -50,7 +50,7 @@ public class SourceLookupPanel extends AbstractLaunchConfigurationTab implements
//the duplicates checkbox
protected Button fDuplicatesButton;
//the source actions - up, down, add, remove, restore
- protected List<SourceContainerAction> fActions = new ArrayList<SourceContainerAction>(6);
+ protected List<SourceContainerAction> fActions = new ArrayList<>(6);
//the director that will be used by the tab to manage/store the containers
protected ISourceLookupDirector fLocator;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIUtils.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIUtils.java
index b5282e70f..14a5f2837 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIUtils.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIUtils.java
@@ -59,7 +59,7 @@ public class SourceLookupUIUtils {
IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), CONTAINER_PRESENTATION_EXTENSION);
//read in SourceContainer presentation extensions
IConfigurationElement[] sourceContainerPresentationExtensions =extensionPoint.getConfigurationElements();
- fSourceContainerPresentationHashtable = new Hashtable<String, IConfigurationElement>();
+ fSourceContainerPresentationHashtable = new Hashtable<>();
for (int i = 0; i < sourceContainerPresentationExtensions.length; i++) {
fSourceContainerPresentationHashtable.put(
sourceContainerPresentationExtensions[i].getAttribute(CONTAINER_ID_ATTRIBUTE),
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveFilter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveFilter.java
index e851b1ee9..2fd6976f7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveFilter.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveFilter.java
@@ -66,7 +66,7 @@ public class ArchiveFilter extends ViewerFilter {
BusyIndicator.showWhile(DebugUIPlugin.getStandardDisplay(), new Runnable() {
@Override
public void run() {
- fArchives = new HashSet<IResource>();
+ fArchives = new HashSet<>();
traverse(ResourcesPlugin.getWorkspace().getRoot(), fArchives);
}
});
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveSourceContainerBrowser.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveSourceContainerBrowser.java
index 278be8224..5390153fe 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveSourceContainerBrowser.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ArchiveSourceContainerBrowser.java
@@ -65,7 +65,7 @@ public class ArchiveSourceContainerBrowser extends AbstractSourceContainerBrowse
*/
protected List<ISourceContainer> getSelectedJars(ISourceLookupDirector director) {
ISourceContainer[] containers = director.getSourceContainers();
- List<ISourceContainer> jars = new ArrayList<ISourceContainer>();
+ List<ISourceContainer> jars = new ArrayList<>();
for (int i = 0; i < containers.length; i++) {
ISourceContainer container = containers[i];
if (container.getType().getId().equals(ArchiveSourceContainer.TYPE_ID)) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerBrowser.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerBrowser.java
index d17c7f59a..3ce6f9e75 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerBrowser.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/FolderSourceContainerBrowser.java
@@ -39,7 +39,7 @@ public class FolderSourceContainerBrowser extends AbstractSourceContainerBrowser
if (dialog.open() == Window.OK) {
Object[] selection= ((ElementTreeSelectionDialog)dialog).getResult();
- ArrayList<ISourceContainer> containers = new ArrayList<ISourceContainer>();
+ ArrayList<ISourceContainer> containers = new ArrayList<>();
for (int i= 0; i < selection.length; i++) {
if(selection[i] instanceof IFolder) {
containers.add(new FolderSourceContainer((IFolder)selection[i], dialog.isSearchSubfolders()));
@@ -70,7 +70,7 @@ public class FolderSourceContainerBrowser extends AbstractSourceContainerBrowser
if (dialog.open() == Window.OK) {
container.dispose();
Object[] selection= ((ElementTreeSelectionDialog)dialog).getResult();
- ArrayList<ISourceContainer> list = new ArrayList<ISourceContainer>();
+ ArrayList<ISourceContainer> list = new ArrayList<>();
for (int i= 0; i < selection.length; i++) {
if(selection[i] instanceof IFolder) {
list.add(new FolderSourceContainer((IFolder)selection[i], dialog.isSearchSubfolders()));
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ProjectSourceContainerBrowser.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ProjectSourceContainerBrowser.java
index 1ee731607..5c80a2856 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ProjectSourceContainerBrowser.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/ProjectSourceContainerBrowser.java
@@ -47,7 +47,7 @@ public class ProjectSourceContainerBrowser extends AbstractSourceContainerBrowse
SourceLookupUIMessages.projectSelection_chooseLabel);
if(dialog.open() == Window.OK){
Object[] elements= ((ListSelectionDialog)dialog).getResult();
- ArrayList<ISourceContainer> res = new ArrayList<ISourceContainer>();
+ ArrayList<ISourceContainer> res = new ArrayList<>();
for (int i= 0; i < elements.length; i++) {
if(!(elements[i] instanceof IProject)) {
continue;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkingSetSourceContainerBrowser.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkingSetSourceContainerBrowser.java
index b05280c0f..9dc2b66bf 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkingSetSourceContainerBrowser.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/browsers/WorkingSetSourceContainerBrowser.java
@@ -37,7 +37,7 @@ public class WorkingSetSourceContainerBrowser extends AbstractSourceContainerBro
*/
@Override
public ISourceContainer[] addSourceContainers(Shell shell, ISourceLookupDirector director) {
- ArrayList<ISourceContainer> containers = new ArrayList<ISourceContainer>();
+ ArrayList<ISourceContainer> containers = new ArrayList<>();
IWorkingSetSelectionDialog dialog = PlatformUI.getWorkbench().getWorkingSetManager().createWorkingSetSelectionDialog(shell, true);
if (dialog.open() == Window.OK) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringVariablePresentationManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringVariablePresentationManager.java
index cbda799de..d28b7085b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringVariablePresentationManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringVariablePresentationManager.java
@@ -93,7 +93,7 @@ public class StringVariablePresentationManager {
* Load extensions
*/
private void initialize() {
- fConfigurations = new HashMap<String, IConfigurationElement>();
+ fConfigurations = new HashMap<>();
IExtensionPoint point= Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), EXTENSION_POINT_STRING_VARIABLE_PRESENTATIONS);
IConfigurationElement elements[]= point.getConfigurationElements();
for (int i = 0; i < elements.length; i++) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java
index 2920ebf81..487a90747 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java
@@ -45,7 +45,7 @@ import org.eclipse.jface.viewers.ViewerSorter;
public abstract class AsynchronousModel {
private ModelNode fRoot; // root node
- private Map<Object, ModelNode[]> fElementToNodes = new HashMap<Object, ModelNode[]>(); // map
+ private Map<Object, ModelNode[]> fElementToNodes = new HashMap<>(); // map
// of
// element
// to
@@ -53,7 +53,7 @@ public abstract class AsynchronousModel {
// tree
// nodes
// (list)
- private Map<Object, IModelProxy> fModelProxies = new HashMap<Object, IModelProxy>(); // map
+ private Map<Object, IModelProxy> fModelProxies = new HashMap<>(); // map
// of
// installed
// model
@@ -95,12 +95,12 @@ public abstract class AsynchronousModel {
/**
* List of requests currently being performed.
*/
- private List<IStatusMonitor> fPendingUpdates = new ArrayList<IStatusMonitor>();
+ private List<IStatusMonitor> fPendingUpdates = new ArrayList<>();
/**
* List of pending viewer updates
*/
- private List<IStatusMonitor> fViewerUpdates = new ArrayList<IStatusMonitor>();
+ private List<IStatusMonitor> fViewerUpdates = new ArrayList<>();
/**
* Constructs a new empty tree model
@@ -393,7 +393,7 @@ public abstract class AsynchronousModel {
protected Object[] filter(Object parent, Object[] elements) {
ViewerFilter[] filters = getViewer().getFilters();
if (filters != null) {
- ArrayList<Object> filtered = new ArrayList<Object>(elements.length);
+ ArrayList<Object> filtered = new ArrayList<>(elements.length);
for (int i = 0; i < elements.length; i++) {
boolean add = true;
for (int j = 0; j < filters.length; j++) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableModel.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableModel.java
index 31d58fbc7..06016b5dc 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableModel.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableModel.java
@@ -57,9 +57,9 @@ public class AsynchronousTableModel extends AsynchronousModel {
synchronized (this) {
ModelNode[] childrenNodes = getRootNode().getChildrenNodes();
if (childrenNodes == null) {
- kids = new ArrayList<Object>(elements.length);
+ kids = new ArrayList<>(elements.length);
} else {
- kids = new ArrayList<Object>(elements.length + childrenNodes.length);
+ kids = new ArrayList<>(elements.length + childrenNodes.length);
for (int i = 0; i < childrenNodes.length; i++) {
kids.add(childrenNodes[i].getElement());
}
@@ -100,9 +100,9 @@ public class AsynchronousTableModel extends AsynchronousModel {
synchronized (this) {
ModelNode[] childrenNodes = getRootNode().getChildrenNodes();
if (childrenNodes == null) {
- kids = new ArrayList<Object>(elements.length);
+ kids = new ArrayList<>(elements.length);
} else {
- kids = new ArrayList<Object>(elements.length + childrenNodes.length);
+ kids = new ArrayList<>(elements.length + childrenNodes.length);
for (int i = 0; i < childrenNodes.length; i++) {
kids.add(childrenNodes[i].getElement());
}
@@ -142,7 +142,7 @@ public class AsynchronousTableModel extends AsynchronousModel {
synchronized (this) {
ModelNode[] childrenNodes = getRootNode().getChildrenNodes();
if (childrenNodes != null) {
- kids = new ArrayList<Object>(childrenNodes.length);
+ kids = new ArrayList<>(childrenNodes.length);
for (int i = 0; i < childrenNodes.length; i++) {
kids.add(childrenNodes[i].getElement());
}
@@ -180,7 +180,7 @@ public class AsynchronousTableModel extends AsynchronousModel {
remove(new Object[]{element});
return;
}
- List<ModelNode> list = new ArrayList<ModelNode>();
+ List<ModelNode> list = new ArrayList<>();
synchronized (this) {
ModelNode[] nodes = getNodes(element);
for (int i = 0; i < nodes.length; i++) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java
index bcc728fbb..88485ce2e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableViewer.java
@@ -152,7 +152,7 @@ public class AsynchronousTableViewer extends AsynchronousViewer implements Liste
@Override
protected List getSelectionFromWidget() {
TableItem[] selection = fTable.getSelection();
- List<Object> datas = new ArrayList<Object>(selection.length);
+ List<Object> datas = new ArrayList<>(selection.length);
for (int i = 0; i < selection.length; i++) {
datas.add(selection[i].getData());
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java
index ce0f0bb47..93d281e20 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousViewer.java
@@ -82,21 +82,21 @@ public abstract class AsynchronousViewer extends StructuredViewer implements Lis
* use the method <code>getImage(...)</code> to cache images for
* image descriptors. The images are disposed when this viewer is disposed.
*/
- private Map<ImageDescriptor, Image> fImageCache = new HashMap<ImageDescriptor, Image>();
+ private Map<ImageDescriptor, Image> fImageCache = new HashMap<>();
/**
* Cache of the fonts used for elements in this tree viewer. Label updates
* use the method <code>getFont(...)</code> to cache fonts for
* FontData objects. The fonts are disposed with the viewer.
*/
- private Map<FontData, Font> fFontCache = new HashMap<FontData, Font>();
+ private Map<FontData, Font> fFontCache = new HashMap<>();
/**
* Cache of the colors used for elements in this tree viewer. Label updates
* use the method <code>getColor(...)</code> to cache colors for
* RGB values. The colors are disposed with the viewer.
*/
- private Map<RGB, Color> fColorCache = new HashMap<RGB, Color>();
+ private Map<RGB, Color> fColorCache = new HashMap<>();
/**
* The context in which this viewer is being used - i.e. what part it is contained
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ChildrenRequestMonitor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ChildrenRequestMonitor.java
index 9f6515481..25cf98bb0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ChildrenRequestMonitor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ChildrenRequestMonitor.java
@@ -32,7 +32,7 @@ class ChildrenRequestMonitor extends AsynchronousRequestMonitor implements IChil
/**
* Collection of children retrieved
*/
- private List<Object> fChildren = new ArrayList<Object>();
+ private List<Object> fChildren = new ArrayList<>();
/**
* Constucts a monitor to retrieve and update the children of the given
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ModelNode.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ModelNode.java
index 816aa70d4..e334ec853 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ModelNode.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/ModelNode.java
@@ -93,7 +93,7 @@ public class ModelNode {
* @return
*/
public synchronized TreePath getTreePath() {
- List<Object> path = new ArrayList<Object>();
+ List<Object> path = new ArrayList<>();
ModelNode node = this;
while (node != null) {
path.add(0, node.getElement());
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java
index fb83b9a8f..fa503d9c1 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java
@@ -93,7 +93,7 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
*/
public BreadcrumbViewer(Composite parent, int style) {
fStyle = style;
- fBreadcrumbItems = new ArrayList<BreadcrumbItem>();
+ fBreadcrumbItems = new ArrayList<>();
fMenuListeners= new ListenerList<>();
fContainer= new Composite(parent, SWT.NONE);
@@ -362,7 +362,7 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
}
protected TreePath getTreePathFromItem(BreadcrumbItem item) {
- List<Object> elements = new ArrayList<Object>(fBreadcrumbItems.size());
+ List<Object> elements = new ArrayList<>(fBreadcrumbItems.size());
for (int i = 0; i < fBreadcrumbItems.size(); i++) {
elements.add( fBreadcrumbItems.get(i).getData() );
if (fBreadcrumbItems.get(i).equals(item)) {
@@ -385,7 +385,7 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
return Collections.EMPTY_LIST;
}
- ArrayList<Object> result = new ArrayList<Object>();
+ ArrayList<Object> result = new ArrayList<>();
result.add(fSelectedItem.getData());
return result;
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/TreeViewerDropDown.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/TreeViewerDropDown.java
index 2c3afc4a6..a0b978763 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/TreeViewerDropDown.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/TreeViewerDropDown.java
@@ -114,7 +114,7 @@ public abstract class TreeViewerDropDown {
return;
}
- List<Object> pathElements = new LinkedList<Object>();
+ List<Object> pathElements = new LinkedList<>();
while(item != null) {
Object data = item.getData();
if (data == null) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java
index 84f75aff8..86f697ee6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java
@@ -176,7 +176,7 @@ class ChildrenCountUpdate extends ViewerUpdateMonitor implements IChildrenCountU
return true;
} else if (getElementContentProvider().equals(request.getElementContentProvider())) {
if (fBatchedRequests == null) {
- fBatchedRequests = new ArrayList<ViewerUpdateMonitor>(4);
+ fBatchedRequests = new ArrayList<>(4);
fBatchedRequests.add(this);
}
fBatchedRequests.add(request);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/FilterTransform.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/FilterTransform.java
index 5e207da8b..287092b64 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/FilterTransform.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/FilterTransform.java
@@ -82,7 +82,7 @@ public class FilterTransform {
}
if (children == null) {
- children = new HashMap<Object, Node>();
+ children = new HashMap<>();
}
Object element = path.getSegment(pathIndex);
Node node = children.get(element);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/HasChildrenUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/HasChildrenUpdate.java
index 059f4570a..52346e79f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/HasChildrenUpdate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/HasChildrenUpdate.java
@@ -87,7 +87,7 @@ class HasChildrenUpdate extends ViewerUpdateMonitor implements IHasChildrenUpdat
return true;
} else if (getElementContentProvider().equals(request.getElementContentProvider())) {
if (fBatchedRequests == null) {
- fBatchedRequests = new ArrayList<ViewerUpdateMonitor>();
+ fBatchedRequests = new ArrayList<>();
fBatchedRequests.add(this);
}
fBatchedRequests.add(request);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java
index 0aa7c1160..d3fdd8215 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java
@@ -90,25 +90,25 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
* Map of columns presentation id to its visible columns id's (String[])
* When a columns presentation is not in the map, default settings are used.
*/
- private final Map<String, String[]> fVisibleColumns = new HashMap<String, String[]>();
+ private final Map<String, String[]> fVisibleColumns = new HashMap<>();
/**
* Map of column id's to persisted sizes
*/
- private final Map<Object, Integer> fColumnSizes = new HashMap<Object, Integer>();
+ private final Map<Object, Integer> fColumnSizes = new HashMap<>();
/**
* Map of column presentation id's to an array of integers representing the column order
* for that presentation, or <code>null</code> if default.
*/
- private final Map<String, int[]> fColumnOrder = new HashMap<String, int[]>();
+ private final Map<String, int[]> fColumnOrder = new HashMap<>();
/**
* Map of column presentation id to whether columns should be displayed
* for that presentation (the user can toggle columns on/off when a
* presentation is optional.
*/
- private final Map<String, Boolean> fShowColumns = new HashMap<String, Boolean>();
+ private final Map<String, Boolean> fShowColumns = new HashMap<>();
/**
* Item's tree path cache
@@ -1647,7 +1647,7 @@ public class InternalTreeModelViewer extends TreeViewer implements IInternalTree
public boolean saveElementState(TreePath path, ModelDelta delta, int flagsToSave) {
Tree tree = (Tree) getControl();
TreeItem[] selection = tree.getSelection();
- Set<TreeItem> set = new HashSet<TreeItem>();
+ Set<TreeItem> set = new HashSet<>();
for (int i = 0; i < selection.length; i++) {
set.add(selection[i]);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java
index fafeebd65..ddf1c1f42 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java
@@ -128,7 +128,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
* tree may contain the same element in several places, so the map values
* are lists.
*/
- private Map<Object, List<VirtualItem>> fItemsMap = new HashMap<Object, List<VirtualItem>>();
+ private Map<Object, List<VirtualItem>> fItemsMap = new HashMap<>();
/**
* Whether to notify the content provider when an element is unmapped.
@@ -173,14 +173,14 @@ public class InternalVirtualTreeModelViewer extends Viewer
* Map of columns presentation id to its visible columns id's (String[])
* When a columns presentation is not in the map, default settings are used.
*/
- private Map<String, String[]> fVisibleColumns = new HashMap<String, String[]>();
+ private Map<String, String[]> fVisibleColumns = new HashMap<>();
/**
* Map of column presentation id to whether columns should be displayed
* for that presentation (the user can toggle columns on/off when a
* presentation is optional.
*/
- private Map<String, Boolean> fShowColumns = new HashMap<String, Boolean>();
+ private Map<String, Boolean> fShowColumns = new HashMap<>();
/**
* Runnable for validating the virtual tree. It is scheduled to run in the
@@ -305,7 +305,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
@Override
public void remove(final Object parentOrTreePath, final int index) {
- final List<TreePath> oldSelection = new LinkedList<TreePath>(Arrays.asList(((TreeSelection) getSelection()).getPaths()));
+ final List<TreePath> oldSelection = new LinkedList<>(Arrays.asList(((TreeSelection) getSelection()).getPaths()));
preservingSelection(new Runnable() {
@Override
public void run() {
@@ -716,7 +716,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
}
private TreePath getTreePathFromItem(VirtualItem item) {
- List<Object> segments = new LinkedList<Object>();
+ List<Object> segments = new LinkedList<>();
while (item.getParent() != null) {
segments.add(0, item.getData());
item = item.getParent();
@@ -750,7 +750,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
// one.
List<VirtualItem> itemsList = fItemsMap.remove(element);
if (itemsList == null) {
- itemsList = new ArrayList<VirtualItem>(1);
+ itemsList = new ArrayList<>(1);
}
if (!itemsList.contains(item)) {
@@ -879,7 +879,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
private void internalSetSelection(ISelection selection, boolean reveal) {
if (selection instanceof ITreeSelection) {
TreePath[] paths = ((ITreeSelection) selection).getPaths();
- List<VirtualItem> newSelection = new ArrayList<VirtualItem>(paths.length);
+ List<VirtualItem> newSelection = new ArrayList<>(paths.length);
for (int i = 0; i < paths.length; ++i) {
// Use internalExpand since item may not yet be created. See
// 1G6B1AR.
@@ -928,8 +928,8 @@ public class InternalVirtualTreeModelViewer extends Viewer
return TreeSelection.EMPTY;
}
VirtualItem[] items = fTree.getSelection();
- ArrayList<TreePath> list = new ArrayList<TreePath>(items.length);
- Map<VirtualItem, TreePath> map = new LinkedHashMap<VirtualItem, TreePath>(items.length * 4 / 3);
+ ArrayList<TreePath> list = new ArrayList<>(items.length);
+ Map<VirtualItem, TreePath> map = new LinkedHashMap<>(items.length * 4 / 3);
for (int i = 0; i < items.length; i++) {
TreePath path = null;
if (items[i].getData() != null) {
@@ -1464,7 +1464,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
public boolean saveElementState(TreePath path, ModelDelta delta, int flagsToSave) {
VirtualTree tree = getTree();
VirtualItem[] selection = tree.getSelection();
- Set<VirtualItem> set = new HashSet<VirtualItem>();
+ Set<VirtualItem> set = new HashSet<>();
for (int i = 0; i < selection.length; i++) {
set.add(selection[i]);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java
index 24e0b712d..589a4f493 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java
@@ -53,6 +53,7 @@ import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.progress.WorkbenchJob;
/**
* Content provider for a virtual tree.
@@ -77,7 +78,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
* Used to install different model proxy instances for one element depending
* on the tree path.
*/
- private Map<TreePath, IModelProxy> fTreeModelProxies = new HashMap<TreePath, IModelProxy>(); // tree
+ private Map<TreePath, IModelProxy> fTreeModelProxies = new HashMap<>(); // tree
// model
// proxy
// by
@@ -89,7 +90,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
* Used to install a single model proxy which is responsible for all
* instances of an element in the model tree.
*/
- private Map<Object, IModelProxy> fModelProxies = new HashMap<Object, IModelProxy>(); // model
+ private Map<Object, IModelProxy> fModelProxies = new HashMap<>(); // model
// proxy
// by
// element
@@ -118,15 +119,15 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
/**
* Map of updates in progress: element path -> list of requests
*/
- private Map<TreePath, List<ViewerUpdateMonitor>> fRequestsInProgress = new HashMap<TreePath, List<ViewerUpdateMonitor>>();
+ private Map<TreePath, List<ViewerUpdateMonitor>> fRequestsInProgress = new HashMap<>();
/**
* Map of dependent requests waiting for parent requests to complete:
* element path -> list of requests
*/
- private Map<TreePath, List<ViewerUpdateMonitor>> fWaitingRequests = new HashMap<TreePath, List<ViewerUpdateMonitor>>();
+ private Map<TreePath, List<ViewerUpdateMonitor>> fWaitingRequests = new HashMap<>();
- private List<ViewerUpdateMonitor> fCompletedUpdates = new ArrayList<ViewerUpdateMonitor>();
+ private List<ViewerUpdateMonitor> fCompletedUpdates = new ArrayList<>();
private Runnable fCompletedUpdatesRunnable;
@@ -158,6 +159,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
if (fViewer == null) {
return;
}
+ fDelayedDoModelChangeJob.shutdown();
Assert.isTrue( getViewer().getDisplay().getThread() == Thread.currentThread() );
@@ -382,6 +384,92 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
}
}
+ private static class DelayedDoModelChange {
+ public final IModelDelta delta;
+ public final IModelProxy proxy;
+
+ public DelayedDoModelChange(final IModelDelta delta, final IModelProxy proxy) {
+ this.delta = delta;
+ this.proxy = proxy;
+ }
+ }
+
+ private class DelayedDoModelChangedJob extends WorkbenchJob {
+
+ // queue of submitted deltas to process
+ private final List<DelayedDoModelChange> fQueue = new ArrayList<>();
+ private boolean shutdown;
+
+ public DelayedDoModelChangedJob() {
+ super("Delayed model change job"); //$NON-NLS-1$
+ setSystem(true);
+ setUser(false);
+ }
+
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ List<DelayedDoModelChange> currentBatch = new ArrayList<>();
+ synchronized (fQueue) {
+ if (shutdown || fQueue.isEmpty()) {
+ return Status.OK_STATUS;
+ }
+ currentBatch = new ArrayList<>(fQueue);
+ fQueue.clear();
+ }
+ if (DebugUIPlugin.DEBUG_CONTENT_PROVIDER) {
+ DebugUIPlugin.trace("Delayed batch size: " + currentBatch.size()); //$NON-NLS-1$
+ }
+ for (Iterator<DelayedDoModelChange> iterator = currentBatch.iterator(); iterator.hasNext();) {
+ DelayedDoModelChange change = iterator.next();
+ if (monitor.isCanceled()) {
+ restoreQueue(currentBatch);
+ return Status.CANCEL_STATUS;
+ }
+ if (!change.proxy.isDisposed()) {
+ doModelChanged(change.delta, change.proxy);
+ }
+ iterator.remove();
+ }
+ return Status.OK_STATUS;
+ }
+
+ private void restoreQueue(List<DelayedDoModelChange> currentBatch) {
+ synchronized (fQueue) {
+ currentBatch.addAll(fQueue);
+ fQueue.clear();
+ fQueue.addAll(currentBatch);
+ }
+ }
+
+ public void runDelayed(final IModelDelta delta, final IModelProxy proxy) {
+ synchronized (fQueue) {
+ if (shutdown) {
+ return;
+ }
+ fQueue.add(new DelayedDoModelChange(delta, proxy));
+ if (DebugUIPlugin.DEBUG_CONTENT_PROVIDER) {
+ DebugUIPlugin.trace("Delayed queue size: " + fQueue.size()); //$NON-NLS-1$
+ }
+ }
+ schedule(50);
+ }
+
+ public void shutdown() {
+ synchronized (fQueue) {
+ shutdown = true;
+ fQueue.clear();
+ }
+ cancel();
+ }
+
+ @Override
+ public boolean belongsTo(Object family) {
+ return family == TreeModelContentProvider.this || family == TreeModelContentProvider.class;
+ }
+ }
+
+ private final DelayedDoModelChangedJob fDelayedDoModelChangeJob = new DelayedDoModelChangedJob();
+
@Override
public void modelChanged(final IModelDelta delta, final IModelProxy proxy) {
Display display = null;
@@ -400,12 +488,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
doModelChanged(delta, proxy);
}
else {
- fViewer.getDisplay().asyncExec(new Runnable() {
- @Override
- public void run() {
- doModelChanged(delta, proxy);
- }
- });
+ fDelayedDoModelChangeJob.runDelayed(delta, proxy);
}
}
}
@@ -469,7 +552,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
* @return corresponding tree path
*/
TreePath getFullTreePath(IModelDelta node) {
- ArrayList<Object> list = new ArrayList<Object>();
+ ArrayList<Object> list = new ArrayList<>();
while (node.getParentDelta() != null) {
list.add(0, node.getElement());
node = node.getParentDelta();
@@ -485,7 +568,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
* @return corresponding tree path
*/
TreePath getViewerTreePath(IModelDelta node) {
- ArrayList<Object> list = new ArrayList<Object>();
+ ArrayList<Object> list = new ArrayList<>();
IModelDelta parentDelta = node.getParentDelta();
while (parentDelta != null) {
list.add(0, node.getElement());
@@ -624,7 +707,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
List<ViewerUpdateMonitor> requests = fRequestsInProgress.get(update.getSchedulingPath());
if (requests == null) {
- requests = new ArrayList<ViewerUpdateMonitor>();
+ requests = new ArrayList<>();
fRequestsInProgress.put(update.getSchedulingPath(), requests);
}
requests.add(update);
@@ -783,7 +866,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
}
}
}
- List<TreePath> purge = new ArrayList<TreePath>();
+ List<TreePath> purge = new ArrayList<>();
for (TreePath entryPath : fWaitingRequests.keySet()) {
if (entryPath.startsWith(path, null)) {
purge.add(entryPath);
@@ -808,7 +891,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
TreePath schedulingPath = update.getSchedulingPath();
List<ViewerUpdateMonitor> requests = fWaitingRequests.get(schedulingPath);
if (requests == null) {
- requests = new LinkedList<ViewerUpdateMonitor>();
+ requests = new LinkedList<>();
requests.add(update);
fWaitingRequests.put(schedulingPath, requests);
@@ -1019,7 +1102,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
childrenUpdate.cancel();
iterator.remove();
if (reCreate == null) {
- reCreate = new ArrayList<IChildrenUpdate>();
+ reCreate = new ArrayList<>();
}
reCreate.add(childrenUpdate);
if (DebugUIPlugin.DEBUG_CONTENT_PROVIDER && DebugUIPlugin.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
@@ -1728,7 +1811,7 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon
}
jobCompletedUpdates = fCompletedUpdates;
fCompletedUpdatesRunnable = null;
- fCompletedUpdates = new ArrayList<ViewerUpdateMonitor>();
+ fCompletedUpdates = new ArrayList<>();
}
// necessary to check if viewer is disposed
try {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelLabelProvider.java
index 705b10734..19d2b3eb2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelLabelProvider.java
@@ -61,21 +61,21 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
* use the method <code>getImage(...)</code> to cache images for
* image descriptors. The images are disposed with this label provider.
*/
- private Map<ImageDescriptor, Image> fImageCache = new HashMap<ImageDescriptor, Image>();
+ private Map<ImageDescriptor, Image> fImageCache = new HashMap<>();
/**
* Cache of the fonts used for elements in this label provider. Label updates
* use the method <code>getFont(...)</code> to cache fonts for
* FontData objects. The fonts are disposed with this label provider.
*/
- private Map<FontData, Font> fFontCache = new HashMap<FontData, Font>();
+ private Map<FontData, Font> fFontCache = new HashMap<>();
/**
* Cache of the colors used for elements in this label provider. Label updates
* use the method <code>getColor(...)</code> to cache colors for
* RGB values. The colors are disposed with this label provider.
*/
- private Map<RGB, Color> fColorCache = new HashMap<RGB, Color>();
+ private Map<RGB, Color> fColorCache = new HashMap<>();
/**
* Label listeners
@@ -86,7 +86,7 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
* Updates waiting to be sent to the label provider. The map contains
* lists of updates, keyed using the provider.
*/
- private Map<IElementLabelProvider, List<ILabelUpdate>> fPendingUpdates = new HashMap<IElementLabelProvider, List<ILabelUpdate>>();
+ private Map<IElementLabelProvider, List<ILabelUpdate>> fPendingUpdates = new HashMap<>();
/**
* A runnable that will send the label update requests.
@@ -98,7 +98,7 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
/**
* List of updates in progress
*/
- private List<ILabelUpdate> fUpdatesInProgress = new ArrayList<ILabelUpdate>();
+ private List<ILabelUpdate> fUpdatesInProgress = new ArrayList<>();
/**
* Delta visitor actively cancels the outstanding label updates for
@@ -273,7 +273,7 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
if (presentation != null) {
List<ILabelUpdate> updates = fPendingUpdates.get(presentation);
if (updates == null) {
- updates = new LinkedList<ILabelUpdate>();
+ updates = new LinkedList<>();
fPendingUpdates.put(presentation, updates);
}
updates.add(new LabelUpdate(fViewer.getInput(), elementPath, this, visibleColumns, fViewer.getPresentationContext()));
@@ -398,7 +398,7 @@ public class TreeModelLabelProvider extends ColumnLabelProvider
}
if (fComplete == null) {
- fComplete = new LinkedList<ILabelUpdate>();
+ fComplete = new LinkedList<>();
fViewer.getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java
index 6368a43df..f894f9e51 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerStateTracker.java
@@ -148,7 +148,7 @@ class ViewerStateTracker {
/**
* Map of viewer states keyed by viewer input mementos
*/
- private Map<String, ModelDelta> fViewerStates = new LRUMap<String, ModelDelta>(20);
+ private Map<String, ModelDelta> fViewerStates = new LRUMap<>(20);
/**
* Pending viewer state to be restored
@@ -175,7 +175,7 @@ class ViewerStateTracker {
/**
* Set of IMementoManager's that are currently saving state
*/
- private Set<IElementMementoCollector> fPendingStateSaves = new HashSet<IElementMementoCollector>();
+ private Set<IElementMementoCollector> fPendingStateSaves = new HashSet<>();
/**
* Used to queue a viewer input for state restore
@@ -213,7 +213,7 @@ class ViewerStateTracker {
/**
* Compare requests that are currently running.
*/
- private Map<CompareRequestKey, ElementCompareRequest> fCompareRequestsInProgress = new LinkedHashMap<CompareRequestKey, ElementCompareRequest>();
+ private Map<CompareRequestKey, ElementCompareRequest> fCompareRequestsInProgress = new LinkedHashMap<>();
/**
@@ -641,7 +641,7 @@ class ViewerStateTracker {
private ModelDelta findSubDeltaParent(ModelDelta destinationDeltaRoot, IModelDelta subDelta) {
// Create a path of elements to the sub-delta.
- LinkedList<IModelDelta> deltaPath = new LinkedList<IModelDelta>();
+ LinkedList<IModelDelta> deltaPath = new LinkedList<>();
IModelDelta delta = subDelta;
while (delta.getParentDelta() != null) {
delta = delta.getParentDelta();
@@ -699,7 +699,7 @@ class ViewerStateTracker {
/**
* list of memento fRequests
*/
- private List<IElementMementoRequest> fRequests = new ArrayList<IElementMementoRequest>();
+ private List<IElementMementoRequest> fRequests = new ArrayList<>();
/**
* Flag indicating whether the encoding of delta has been canceled.
@@ -779,7 +779,7 @@ class ViewerStateTracker {
public void processReqeusts() {
Assert.isTrue( fContentProvider.getViewer().getDisplay().getThread() == Thread.currentThread() );
- Map<IElementMementoProvider, List<IElementMementoRequest>> providers = new HashMap<IElementMementoProvider, List<IElementMementoRequest>>();
+ Map<IElementMementoProvider, List<IElementMementoRequest>> providers = new HashMap<>();
for (IElementMementoRequest request : fRequests) {
notifyStateUpdate(input, TreeModelContentProvider.UPDATE_BEGINS, request);
IElementMementoProvider provider = ViewerAdapterService.getMementoProvider(request.getElement());
@@ -788,7 +788,7 @@ class ViewerStateTracker {
}
List<IElementMementoRequest> reqs = providers.get(provider);
if (reqs == null) {
- reqs = new ArrayList<IElementMementoRequest>();
+ reqs = new ArrayList<>();
providers.put(provider, reqs);
}
reqs.add(request);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
index 3510c9dd6..be623e7d4 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
@@ -169,7 +169,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
void setItemsToCopy(Set<VirtualItem> itemsToCopy) {
fItemsToCopy = itemsToCopy;
- fItemsToValidate = new HashSet<VirtualItem>();
+ fItemsToValidate = new HashSet<>();
for (VirtualItem itemToCopy : itemsToCopy) {
while (itemToCopy != null) {
fItemsToValidate.add(itemToCopy);
@@ -202,7 +202,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
// Parse selected items from client viewer and add them to the virtual viewer selection.
listener.fSelectionRootDepth = Integer.MAX_VALUE;
TreeItem[] selection = getSelectedItems(clientViewer);
- Set<VirtualItem> vSelection = new HashSet<VirtualItem>(selection.length * 4 / 3);
+ Set<VirtualItem> vSelection = new HashSet<>(selection.length * 4 / 3);
for (int i = 0; i < selection.length; i++) {
TreePath parentPath = fClientViewer.getTreePathFromItem(selection[i].getParentItem());
listener.fSelectionRootDepth = Math.min(parentPath.getSegmentCount() + 1, listener.fSelectionRootDepth);
@@ -221,7 +221,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
}
}
validator.setItemsToCopy(vSelection);
- listener.fItemsToUpdate = new HashSet<VirtualItem>(vSelection);
+ listener.fItemsToUpdate = new HashSet<>(vSelection);
virtualViewer.getTree().validate();
return virtualViewer;
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java
index 1835c308f..f107d0cc3 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java
@@ -127,7 +127,7 @@ public class VirtualFindAction extends Action implements IUpdate {
private static class FindLabelProvider extends LabelProvider {
private VirtualTreeModelViewer fVirtualViewer;
- private Map<VirtualItem, String> fTextCache = new HashMap<VirtualItem, String>();
+ private Map<VirtualItem, String> fTextCache = new HashMap<>();
public FindLabelProvider(VirtualTreeModelViewer viewer, List<VirtualItem> items) {
fVirtualViewer = viewer;
@@ -217,7 +217,7 @@ public class VirtualFindAction extends Action implements IUpdate {
VirtualItem root = virtualViewer.getTree();
if (!monitor.isCanceled()) {
- List<VirtualItem> list = new ArrayList<VirtualItem>();
+ List<VirtualItem> list = new ArrayList<>();
collectAllChildren(root, list);
FindLabelProvider labelProvider = new FindLabelProvider(virtualViewer, list);
VirtualItem result = performFind(list, labelProvider);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java
index 219b1e1b9..0cf593864 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java
@@ -175,11 +175,11 @@ public class ModelDelta implements IModelDelta {
private void mapNodes() {
if (fNodesList == null) {
- fNodesMap = new HashMap<Object, Object>(1);
+ fNodesMap = new HashMap<>(1);
return;
}
// Create a map with capacity for all child nodes.
- fNodesMap = new HashMap<Object, Object>(fNodesList.size() * 4 / 3);
+ fNodesMap = new HashMap<>(fNodesList.size() * 4 / 3);
for (int i = 0; i < fNodesList.size(); i++) {
mapNode( fNodesList.get(i) );
}
@@ -298,7 +298,7 @@ public class ModelDelta implements IModelDelta {
private void addDelta(ModelDelta delta) {
if (fNodesList == null) {
- fNodesList = new ArrayList<ModelDelta>(4);
+ fNodesList = new ArrayList<>(4);
}
fNodesList.add(delta);
fNodes = null;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java
index 0a73045fd..2db4c188d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java
@@ -45,7 +45,7 @@ public class PresentationContext implements IPresentationContext {
final private String fId;
final private ListenerList<IPropertyChangeListener> fListeners = new ListenerList<>();
- final private Map<String, Object> fProperties = new HashMap<String, Object>();
+ final private Map<String, Object> fProperties = new HashMap<>();
private IWorkbenchWindow fWindow;
private IWorkbenchPart fPart;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java
index 7f6c66fcb..f6cb5c99e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java
@@ -97,7 +97,7 @@ public class VirtualItem {
* keeps the items sorted while allowing indexes (keys) to be modified as
* child items are inserted and removed.
*/
- private Map<Index, VirtualItem> fItems = new TreeMap<Index, VirtualItem>();
+ private Map<Index, VirtualItem> fItems = new TreeMap<>();
/**
* Flag indicating whether this item has child items.
@@ -120,7 +120,7 @@ public class VirtualItem {
* The data held by this item. It includes the element as well as the item
* display attributes.
*/
- private Map<String, Object> fData = new HashMap<String, Object>(1);
+ private Map<String, Object> fData = new HashMap<>(1);
/**
* Flag indicating that the item needs to have it's label updated.
@@ -513,7 +513,7 @@ public class VirtualItem {
private void ensureItems() {
if (fItems == null) {
- fItems = new HashMap<Index, VirtualItem>(Math.max(1, Math.min(fItemCount, 16)));
+ fItems = new HashMap<>(Math.max(1, Math.min(fItemCount, 16)));
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualTree.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualTree.java
index d6442c9c6..b84d47aa2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualTree.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualTree.java
@@ -58,7 +58,7 @@ public class VirtualTree extends VirtualItem {
/**
* Set of listeners of the virtual tree.
*/
- private Set<IVirtualItemListener> fVirtualItemListeners = new HashSet<IVirtualItemListener>(1);
+ private Set<IVirtualItemListener> fVirtualItemListeners = new HashSet<>(1);
/**
* The currently selected items. This array contains only
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java
index 9e80c07a0..04b7a5156 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java
@@ -68,7 +68,7 @@ public class BreakpointManagerProxy extends AbstractModelProxy {
/**
* List of posted deltas ready to be fired.
*/
- private List<DeltaInfo> fPendingDeltas = new LinkedList<DeltaInfo>();
+ private List<DeltaInfo> fPendingDeltas = new LinkedList<>();
/**
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/EventHandlerModelProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/EventHandlerModelProxy.java
index 00c770bf9..cce0299d7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/EventHandlerModelProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/EventHandlerModelProxy.java
@@ -29,7 +29,7 @@ public abstract class EventHandlerModelProxy extends AbstractModelProxy implemen
/**
* Map of elements to timer tasks
*/
- private Map<Object, PendingSuspendTask> fTimerTasks = new HashMap<Object, PendingSuspendTask>();
+ private Map<Object, PendingSuspendTask> fTimerTasks = new HashMap<>();
/**
* Timer for timer tasks
@@ -40,7 +40,7 @@ public abstract class EventHandlerModelProxy extends AbstractModelProxy implemen
* Map of event source to resume events with a pending suspend that timed
* out.
*/
- private Map<Object, DebugEvent> fPendingSuspends = new HashMap<Object, DebugEvent>();
+ private Map<Object, DebugEvent> fPendingSuspends = new HashMap<>();
/**
* Event handlers for specific elements
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchProxy.java
index b3b90db6a..502b58292 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchProxy.java
@@ -39,7 +39,7 @@ public class LaunchProxy extends AbstractModelProxy implements ILaunchesListener
* Set of launch's previous children. When a child is added,
* its model proxy is installed.
*/
- private Set<Object> fPrevChildren = new HashSet<Object>();
+ private Set<Object> fPrevChildren = new HashSet<>();
/**
* Constructs a new model proxy for the given launch.
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ThreadEventHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ThreadEventHandler.java
index 9afed3627..dece8b1d9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ThreadEventHandler.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ThreadEventHandler.java
@@ -38,12 +38,12 @@ public class ThreadEventHandler extends DebugEventHandler {
* to select a thread when another is resumed. Threads
* are added in the order they suspend.
*/
- private Set<IThread> fThreadQueue = new LinkedHashSet<IThread>();
+ private Set<IThread> fThreadQueue = new LinkedHashSet<>();
/**
* Map of previous TOS per thread
*/
- private Map<IThread, IStackFrame> fLastTopFrame = new HashMap<IThread, IStackFrame>();
+ private Map<IThread, IStackFrame> fLastTopFrame = new HashMap<>();
/**
* Constructs and event handler for a threads in the given viewer.
*
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextManager.java
index d4a931e03..1f7879e8c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextManager.java
@@ -29,7 +29,7 @@ public class ViewContextManager implements IWindowListener {
/**
* Map of services
*/
- private Map<IWorkbenchWindow, ViewContextService> fWindowToService = new HashMap<IWorkbenchWindow, ViewContextService>();
+ private Map<IWorkbenchWindow, ViewContextService> fWindowToService = new HashMap<>();
// singleton manager
private static ViewContextManager fgManager;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java
index 125f973c1..5d4f44c5f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java
@@ -75,12 +75,12 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
/**
* Maps the perspectives in this window to its last activated workbench context
*/
- private final Map<IPerspectiveDescriptor, String> fPerspectiveToActiveContext = new HashMap<IPerspectiveDescriptor, String>();
+ private final Map<IPerspectiveDescriptor, String> fPerspectiveToActiveContext = new HashMap<>();
/**
* Map of the perspectives to all workbench contexts activated in that perspective
*/
- private final Map<IPerspectiveDescriptor, Set<String>> fPerspectiveToActivatedContexts = new HashMap<IPerspectiveDescriptor, Set<String>>();
+ private final Map<IPerspectiveDescriptor, Set<String>> fPerspectiveToActivatedContexts = new HashMap<>();
/**
* Map of context id's to context view bindings
@@ -90,7 +90,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
/**
* List of perspectives that debugging is allowed in
*/
- private Set<String> fEnabledPerspectives = new HashSet<String>();
+ private Set<String> fEnabledPerspectives = new HashSet<>();
/**
* Whether to ignore perspective change call backs (set to
@@ -143,7 +143,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
private static Set<String> fgBaseDebugViewIds = null;
static {
- fgBaseDebugViewIds = new HashSet<String>();
+ fgBaseDebugViewIds = new HashSet<>();
fgBaseDebugViewIds.add(IDebugUIConstants.ID_DEBUG_VIEW);
fgBaseDebugViewIds.add(IDebugUIConstants.ID_VARIABLE_VIEW);
fgBaseDebugViewIds.add(IDebugUIConstants.ID_BREAKPOINT_VIEW);
@@ -166,7 +166,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
// all bindings including inherited bindings, top down in activation order
private String[] fAllViewBindingIds = null;
// associated binding to activate
- private final Map<String, ViewBinding> fAllViewIdToBindings = new HashMap<String, ViewBinding>();
+ private final Map<String, ViewBinding> fAllViewIdToBindings = new HashMap<>();
// all context id's in this context hierarchy (top down order)
private String[] fAllConetxtIds = null;
@@ -273,8 +273,8 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
*/
private synchronized void initializeChain() {
if (fAllViewBindingIds == null) {
- List<String> orderedIds = new ArrayList<String>();
- List<DebugContextViewBindings> contexts = new ArrayList<DebugContextViewBindings>();
+ List<String> orderedIds = new ArrayList<>();
+ List<DebugContextViewBindings> contexts = new ArrayList<>();
DebugContextViewBindings context = this;
while (context != null) {
contexts.add(0, context);
@@ -371,15 +371,15 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
/**
* Set of perspectives this view was opened in by the user
*/
- private final Set<String> fUserOpened = new HashSet<String>();
+ private final Set<String> fUserOpened = new HashSet<>();
/**
* Set of perspectives this view was closed in by the user
*/
- private final Set<String> fUserClosed = new HashSet<String>();
+ private final Set<String> fUserClosed = new HashSet<>();
/**
* Set of perspectives this view was auto-opened by view management.
*/
- private final Set<String> fAutoOpened = new HashSet<String>();
+ private final Set<String> fAutoOpened = new HashSet<>();
public ViewBinding(IConfigurationElement element) {
fElement = element;
@@ -659,7 +659,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
* Loads extensions which map context id's to view bindings.
*/
private void loadContextToViewExtensions() {
- fContextIdsToBindings = new HashMap<String, DebugContextViewBindings>();
+ fContextIdsToBindings = new HashMap<>();
IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), ID_CONTEXT_VIEW_BINDINGS);
IConfigurationElement[] configurationElements = extensionPoint.getConfigurationElements();
for (int i = 0; i < configurationElements.length; i++) {
@@ -757,7 +757,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
* @return list
*/
public static Set<String> parseList(String listString) {
- Set<String> list = new HashSet<String>(10);
+ Set<String> list = new HashSet<>(10);
StringTokenizer tokenizer = new StringTokenizer(listString, ","); //$NON-NLS-1$
while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken();
@@ -775,7 +775,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
* @since 3.5
*/
public static Set<String> getDefaultEnabledPerspectives() {
- Set<String> perspectives = new HashSet<String>(4);
+ Set<String> perspectives = new HashSet<>(4);
IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), ID_CONTEXT_VIEW_BINDINGS);
IConfigurationElement[] configurationElements = extensionPoint.getConfigurationElements();
for (int i = 0; i < configurationElements.length; i++) {
@@ -880,7 +880,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
if (activePerspective != null) {
Set<String> contexts = fPerspectiveToActivatedContexts.get(activePerspective);
if (contexts == null) {
- contexts = new HashSet<String>();
+ contexts = new HashSet<>();
fPerspectiveToActivatedContexts.put(activePerspective, contexts);
}
contexts.add(contextId);
@@ -1016,7 +1016,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
return Collections.EMPTY_SET; // disposed
}
- TreeSet<String> viewIds = new TreeSet<String>();
+ TreeSet<String> viewIds = new TreeSet<>();
for (int i = 0; i < contextsIds.size(); i++) {
DebugContextViewBindings bindings= fContextIdsToBindings.get(contextsIds.get(i));
if (bindings != null) {
@@ -1130,7 +1130,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
Document document = DebugPlugin.newDocument();
Element root = document.createElement(XML_ELEMENT_VIEW_BINDINGS);
document.appendChild(root);
- Set<String> done = new HashSet<String>();
+ Set<String> done = new HashSet<>();
for (DebugContextViewBindings binding : fContextIdsToBindings.values()) {
binding.saveBindings(document, root, done);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainer.java
index a1df06ca9..2ba8f6976 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainer.java
@@ -39,12 +39,12 @@ public class BreakpointContainer extends ElementContentProvider implements IAdap
/**
* Child breakpoints - inserting new element into this collection should use the insertBreakpoint method
*/
- final private List<IBreakpoint> fBreakpoints = new ArrayList<IBreakpoint>();
+ final private List<IBreakpoint> fBreakpoints = new ArrayList<>();
/**
* Child containers - inserting new element into this container should use the insertChildContainer method
*/
- final private List<BreakpointContainer> fChildContainers = new ArrayList<BreakpointContainer>();
+ final private List<BreakpointContainer> fChildContainers = new ArrayList<>();
/**
* The category for this container
@@ -452,7 +452,7 @@ public class BreakpointContainer extends ElementContentProvider implements IAdap
*/
static public void removeBreakpoint(BreakpointContainer container, IBreakpoint breakpoint, ModelDelta containerDelta) {
container.removeBreakpoint(breakpoint, containerDelta);
- List<IBreakpoint> breakpoints = new ArrayList<IBreakpoint>();
+ List<IBreakpoint> breakpoints = new ArrayList<>();
breakpoints.add(breakpoint);
updateSelfAndAncestorsBreakpointCache(container.getParent(), breakpoints, false);
}
@@ -471,7 +471,7 @@ public class BreakpointContainer extends ElementContentProvider implements IAdap
}
if (container.fChildContainers.size() == 0) {
- List<IBreakpoint> breakpoints = new ArrayList<IBreakpoint>();
+ List<IBreakpoint> breakpoints = new ArrayList<>();
Iterator<IBreakpoint> iterator = container.fBreakpoints.iterator();
while (iterator.hasNext()) {
IBreakpoint obj = iterator.next();
@@ -590,7 +590,7 @@ public class BreakpointContainer extends ElementContentProvider implements IAdap
if (containers.length == 0) {
return new BreakpointContainer[]{this};
}
- ArrayList<BreakpointContainer> list = new ArrayList<BreakpointContainer>();
+ ArrayList<BreakpointContainer> list = new ArrayList<>();
for (int i = 0; i < containers.length; i++) {
BreakpointContainer container = containers[i];
BreakpointContainer[] subcontainers = container.getContainers(breakpoint);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerManager.java
index a83b56c86..0546c1797 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerManager.java
@@ -42,7 +42,7 @@ public class BreakpointOrganizerManager {
private static BreakpointOrganizerManager fgManager;
// map for lookup by id
- private Map<String, IBreakpointOrganizer> fOrganizers = new HashMap<String, IBreakpointOrganizer>();
+ private Map<String, IBreakpointOrganizer> fOrganizers = new HashMap<>();
// cached sorted list by label
private List<IBreakpointOrganizer> fSorted = null;
@@ -119,7 +119,7 @@ public class BreakpointOrganizerManager {
public IBreakpointOrganizer[] getOrganizers() {
if (fSorted == null) {
Collection<IBreakpointOrganizer> collection = fOrganizers.values();
- fSorted = new ArrayList<IBreakpointOrganizer>();
+ fSorted = new ArrayList<>();
fSorted.addAll(collection);
Collections.sort(fSorted, new Comparator<Object>() {
@Override
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointSetOrganizer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointSetOrganizer.java
index 46ebc1f89..6162a4054 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointSetOrganizer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointSetOrganizer.java
@@ -81,7 +81,7 @@ public class BreakpointSetOrganizer extends AbstractBreakpointOrganizerDelegate
*/
@Override
public IAdaptable[] getCategories(IBreakpoint breakpoint) {
- List<IAdaptable> result = new ArrayList<IAdaptable>();
+ List<IAdaptable> result = new ArrayList<>();
IWorkingSet[] workingSets = fWorkingSetManager.getWorkingSets();
for (int i = 0; i < workingSets.length; i++) {
IWorkingSet set = workingSets[i];
@@ -174,7 +174,7 @@ public class BreakpointSetOrganizer extends AbstractBreakpointOrganizerDelegate
*/
@Override
public void breakpointsAdded(IBreakpoint[] breakpoints) {
- Map<IWorkingSet, List<IBreakpoint>> setToBreakpoints = new HashMap<IWorkingSet, List<IBreakpoint>>();
+ Map<IWorkingSet, List<IBreakpoint>> setToBreakpoints = new HashMap<>();
for (int i = 0; i < breakpoints.length; i++) {
IMarker marker = breakpoints[i].getMarker();
String[] names = getWorkingsetAttributeFromMarker(marker, IInternalDebugUIConstants.WORKING_SET_NAME);
@@ -202,7 +202,7 @@ public class BreakpointSetOrganizer extends AbstractBreakpointOrganizerDelegate
private void queueToSet(IBreakpoint breakpoint, IWorkingSet set, Map<IWorkingSet, List<IBreakpoint>> queue) {
List<IBreakpoint> list = queue.get(set);
if (list == null) {
- list = new ArrayList<IBreakpoint>();
+ list = new ArrayList<>();
queue.put(set, list);
}
list.add(breakpoint);
@@ -218,8 +218,8 @@ public class BreakpointSetOrganizer extends AbstractBreakpointOrganizerDelegate
private void addBreakpointsToSet(IBreakpoint[] breakpoints, IWorkingSet set) {
if (set != null) {
IAdaptable[] elements = set.getElements();
- Set<IAdaptable> collection = new HashSet<IAdaptable>(elements.length);
- List<IAdaptable> list = new ArrayList<IAdaptable>(elements.length + breakpoints.length);
+ Set<IAdaptable> collection = new HashSet<>(elements.length);
+ List<IAdaptable> list = new ArrayList<>(elements.length + breakpoints.length);
for(int i = 0; i < elements.length; i++) {
collection.add(elements[i]);
list.add(elements[i]);
@@ -276,7 +276,7 @@ public class BreakpointSetOrganizer extends AbstractBreakpointOrganizerDelegate
}
}
if (update) {
- List<IAdaptable> newElements = new ArrayList<IAdaptable>(elements.length);
+ List<IAdaptable> newElements = new ArrayList<>(elements.length);
for (int i = 0; i < elements.length; i++) {
IAdaptable adaptable = elements[i];
if (adaptable != null) {
@@ -411,7 +411,7 @@ public class BreakpointSetOrganizer extends AbstractBreakpointOrganizerDelegate
if (category instanceof WorkingSetCategory) {
IWorkingSet set = ((WorkingSetCategory) category).getWorkingSet();
IAdaptable[] elements = set.getElements();
- List<IAdaptable> list = new ArrayList<IAdaptable>();
+ List<IAdaptable> list = new ArrayList<>();
for (int i = 0; i < elements.length; i++) {
IAdaptable adaptable = elements[i];
if (!adaptable.equals(breakpoint)) {
@@ -432,7 +432,7 @@ public class BreakpointSetOrganizer extends AbstractBreakpointOrganizerDelegate
@Override
public IAdaptable[] getCategories() {
IWorkingSet[] workingSets = fWorkingSetManager.getWorkingSets();
- List<IAdaptable> all = new ArrayList<IAdaptable>();
+ List<IAdaptable> all = new ArrayList<>();
for (int i = 0; i < workingSets.length; i++) {
IWorkingSet set = workingSets[i];
if (IDebugUIConstants.BREAKPOINT_WORKINGSET_ID.equals(set
@@ -462,7 +462,7 @@ public class BreakpointSetOrganizer extends AbstractBreakpointOrganizerDelegate
if (category instanceof WorkingSetCategory) {
IWorkingSet set = ((WorkingSetCategory) category).getWorkingSet();
IAdaptable[] elements = set.getElements();
- List<IAdaptable> list = new ArrayList<IAdaptable>(elements.length);
+ List<IAdaptable> list = new ArrayList<>(elements.length);
for (int i = 0; i < elements.length; i++) {
list.add(elements[i]);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointTypeOrganizer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointTypeOrganizer.java
index f071ae559..bff86d06f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointTypeOrganizer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointTypeOrganizer.java
@@ -27,7 +27,7 @@ import org.eclipse.debug.ui.IBreakpointTypeCategory;
*/
public class BreakpointTypeOrganizer extends AbstractBreakpointOrganizerDelegate {
- private Map<String, IAdaptable[]> fTypes = new HashMap<String, IAdaptable[]>();
+ private Map<String, IAdaptable[]> fTypes = new HashMap<>();
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IBreakpointOrganizerDelegate#getCategories(org.eclipse.debug.core.model.IBreakpoint)
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetCache.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetCache.java
index 2b021c97e..5720696d6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetCache.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetCache.java
@@ -43,7 +43,7 @@ public class BreakpointWorkingSetCache {
* Default constructor
*/
public BreakpointWorkingSetCache() {
- fCache = new HashMap<IMarker, Vector<Object>>(15);
+ fCache = new HashMap<>(15);
}
/**
@@ -54,7 +54,7 @@ public class BreakpointWorkingSetCache {
public void addEntry(IMarker marker, Object entry) {
Vector<Object> list = fCache.get(marker);
if (list == null) {
- list = new Vector<Object>();
+ list = new Vector<>();
list.addElement(entry);
fCache.put(marker, list);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetElementAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetElementAdapter.java
index 194bc91fd..2acb97349 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetElementAdapter.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetElementAdapter.java
@@ -43,7 +43,7 @@ public class BreakpointWorkingSetElementAdapter implements IWorkingSetElementAda
}
private IAdaptable[] selectBreakpoints(IAdaptable[] elements) {
- List<IBreakpoint> breakpoints = new ArrayList<IBreakpoint>(elements.length);
+ List<IBreakpoint> breakpoints = new ArrayList<>(elements.length);
for (int i = 0; i < elements.length; i++) {
IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(elements[i], IBreakpoint.class);
if (breakpoint != null) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java
index 3ef157f10..38bf9d72f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java
@@ -169,7 +169,7 @@ public class BreakpointWorkingSetPage extends WizardPage implements IWorkingSetP
public void finish() {
String workingSetName = fWorkingSetName.getText();
Object[] adaptable = fTViewer.getCheckedElements().toArray();
- ArrayList<IBreakpoint> elements = new ArrayList<IBreakpoint>();
+ ArrayList<IBreakpoint> elements = new ArrayList<>();
//weed out non-breakpoint elements since 3.2
for(int i = 0; i < adaptable.length; i++) {
IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(adaptable[i], IBreakpoint.class);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsContentProvider.java
index 6b79da330..540175de0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsContentProvider.java
@@ -154,7 +154,7 @@ public class BreakpointsContentProvider implements ITreeContentProvider, IProper
*/
public BreakpointContainer[] getRoots(IBreakpoint breakpoint) {
if (isShowingGroups()) {
- List<BreakpointContainer> list = new ArrayList<BreakpointContainer>();
+ List<BreakpointContainer> list = new ArrayList<>();
for (int i = 0; i < fElements.length; i++) {
BreakpointContainer container = (BreakpointContainer) fElements[i];
if (container.contains(breakpoint)) {
@@ -186,7 +186,7 @@ public class BreakpointsContentProvider implements ITreeContentProvider, IProper
fElements = breakpoints;
} else {
IBreakpointOrganizer organizer = fOrganizers[0];
- Map<IAdaptable, BreakpointContainer> categoriesToContainers = new HashMap<IAdaptable, BreakpointContainer>();
+ Map<IAdaptable, BreakpointContainer> categoriesToContainers = new HashMap<>();
for (int i = 0; i < breakpoints.length; i++) {
IBreakpoint breakpoint = breakpoints[i];
IAdaptable[] categories = organizer.getCategories(breakpoint);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDropAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDropAdapter.java
index 16d026853..564b2b35f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDropAdapter.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDropAdapter.java
@@ -75,7 +75,7 @@ public class BreakpointsDropAdapter extends ViewerDropAdapter {
protected Object determineTarget(DropTargetEvent event) {
fTarget = (Item) event.item;
if (fTarget instanceof TreeItem) {
- List<Object> list = new ArrayList<Object>();
+ List<Object> list = new ArrayList<>();
TreeItem item = (TreeItem)fTarget;
while (item != null) {
list.add(item.getData());
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java
index 557eaeb62..a1568c38b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java
@@ -402,7 +402,7 @@ public class BreakpointsView extends VariablesView implements IBreakpointManager
if (value != null) {
String[] ids = value.split(","); //$NON-NLS-1$
BreakpointOrganizerManager manager = BreakpointOrganizerManager.getDefault();
- List<IBreakpointOrganizer> organziers = new ArrayList<IBreakpointOrganizer>();
+ List<IBreakpointOrganizer> organziers = new ArrayList<>();
for (int i = 0; i < ids.length; i++) {
IBreakpointOrganizer organizer = manager.getOrganizer(ids[i]);
if (organizer != null) {
@@ -756,7 +756,7 @@ public class BreakpointsView extends VariablesView implements IBreakpointManager
if (paths == null) {
return;
}
- Map<IBreakpointContainer, List<IBreakpoint>> containersToBreakpoints = new HashMap<IBreakpointContainer, List<IBreakpoint>>();
+ Map<IBreakpointContainer, List<IBreakpoint>> containersToBreakpoints = new HashMap<>();
for (int i = 0; i < paths.length; i++) {
IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(paths[i].getLastSegment(), IBreakpoint.class);
if (breakpoint != null) {
@@ -764,7 +764,7 @@ public class BreakpointsView extends VariablesView implements IBreakpointManager
if(container != null) {
List<IBreakpoint> list = containersToBreakpoints.get(container);
if (list == null) {
- list = new ArrayList<IBreakpoint>();
+ list = new ArrayList<>();
containersToBreakpoints.put(container, list);
}
list.add(breakpoint);
@@ -804,7 +804,7 @@ public class BreakpointsView extends VariablesView implements IBreakpointManager
}
IBreakpointOrganizer organizer = container.getOrganizer();
- List<IBreakpoint> breakpoints = new ArrayList<IBreakpoint>(selection.size());
+ List<IBreakpoint> breakpoints = new ArrayList<>(selection.size());
for (Iterator<?> iter = selection.iterator(); iter.hasNext();) {
IBreakpoint breakpoint = (IBreakpoint) DebugPlugin.getAdapter(iter.next(), IBreakpoint.class);
if (breakpoint != null) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsViewer.java
index 4c3d619bb..1ee852481 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsViewer.java
@@ -85,7 +85,7 @@ public class BreakpointsViewer extends CheckboxTreeViewer {
public IBreakpoint[] getVisibleBreakpoints() {
IBreakpointManager manager= DebugPlugin.getDefault().getBreakpointManager();
Object[] elements= ((ITreeContentProvider)getContentProvider()).getElements(manager);
- List<IBreakpoint> list = new ArrayList<IBreakpoint>();
+ List<IBreakpoint> list = new ArrayList<>();
for (int i = 0; i < elements.length; i++) {
TreeItem item = (TreeItem) searchItem(elements[i]);
if (item != null) {
@@ -213,7 +213,7 @@ public class BreakpointsViewer extends CheckboxTreeViewer {
if(items == null) {
return;
}
- Map<IBreakpointContainer, List<IBreakpoint>> containersToBreakpoints = new HashMap<IBreakpointContainer, List<IBreakpoint>>();
+ Map<IBreakpointContainer, List<IBreakpoint>> containersToBreakpoints = new HashMap<>();
IBreakpointContainer container = null;
IBreakpoint breakpoint = null;
for(int i = 0; i < items.length; i++) {
@@ -223,7 +223,7 @@ public class BreakpointsViewer extends CheckboxTreeViewer {
if(container != null) {
List<IBreakpoint> list = containersToBreakpoints.get(container);
if (list == null) {
- list = new ArrayList<IBreakpoint>();
+ list = new ArrayList<>();
containersToBreakpoints.put(container, list);
}
list.add(breakpoint);
@@ -375,7 +375,7 @@ public class BreakpointsViewer extends CheckboxTreeViewer {
* @return a list of widget occurrences to update or an empty list
*/
private Widget[] searchItems(Object element) {
- ArrayList<TreeItem> list = new ArrayList<TreeItem>();
+ ArrayList<TreeItem> list = new ArrayList<>();
TreeItem[] items = getTree().getItems();
for (int i = 0; i < items.length; i++) {
findAllOccurrences(items[i], element, list);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/WorkingSetBreakpointOrganizer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/WorkingSetBreakpointOrganizer.java
index 05a74768d..f0474ed62 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/WorkingSetBreakpointOrganizer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/WorkingSetBreakpointOrganizer.java
@@ -46,8 +46,8 @@ public class WorkingSetBreakpointOrganizer extends AbstractBreakpointOrganizerDe
*/
@Override
public IAdaptable[] getCategories(IBreakpoint breakpoint) {
- List<IAdaptable> result = new ArrayList<IAdaptable>();
- List<IResource> parents = new ArrayList<IResource>();
+ List<IAdaptable> result = new ArrayList<>();
+ List<IResource> parents = new ArrayList<>();
IResource res = breakpoint.getMarker().getResource();
parents.add(res);
while (res != null) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleLineNotifier.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleLineNotifier.java
index 92d9e863c..06c6e07f2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleLineNotifier.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleLineNotifier.java
@@ -36,7 +36,7 @@ public class ConsoleLineNotifier implements IPatternMatchListener, IPropertyChan
/**
* Console listeners
*/
- private List<IConsoleLineTracker> fListeners = new ArrayList<IConsoleLineTracker>(2);
+ private List<IConsoleLineTracker> fListeners = new ArrayList<>(2);
/**
* The console this notifier is tracking
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleTerminateAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleTerminateAction.java
index ec31c36d8..0562409de 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleTerminateAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleTerminateAction.java
@@ -85,7 +85,7 @@ public class ConsoleTerminateAction extends Action implements IUpdate {
private List<ITerminate> collectTargets(IProcess process) {
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
ILaunch[] launches = launchManager.getLaunches();
- List<ITerminate> targets = new ArrayList<ITerminate>();
+ List<ITerminate> targets = new ArrayList<>();
for (int i = 0; i < launches.length; i++) {
ILaunch launch = launches[i];
IProcess[] processes = launch.getProcesses();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java
index 7bbddae01..1619261bb 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java
@@ -94,7 +94,7 @@ import com.ibm.icu.text.MessageFormat;
public class ProcessConsole extends IOConsole implements IConsole, IDebugEventSetListener, IPropertyChangeListener {
private IProcess fProcess = null;
- private List<StreamListener> fStreamListeners = new ArrayList<StreamListener>();
+ private List<StreamListener> fStreamListeners = new ArrayList<>();
private IConsoleColorProvider fColorProvider;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsoleManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsoleManager.java
index b5d735b69..2f49e8abe 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsoleManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsoleManager.java
@@ -214,7 +214,7 @@ public class ProcessConsoleManager implements ILaunchListener {
*/
public IConsoleColorProvider getColorProvider(String type) {
if (fColorProviders == null) {
- fColorProviders = new HashMap<String, IConfigurationElement>();
+ fColorProviders = new HashMap<>();
IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_CONSOLE_COLOR_PROVIDERS);
IConfigurationElement[] elements = extensionPoint.getConfigurationElements();
for (int i = 0; i < elements.length; i++) {
@@ -253,7 +253,7 @@ public class ProcessConsoleManager implements ILaunchListener {
if (fLineTrackers == null) {
synchronized (fLineTrackersLock) { // can't use fLineTrackers as lock as it is null here
- fLineTrackers = new HashMap<String, List<IConfigurationElement>>();
+ fLineTrackers = new HashMap<>();
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_CONSOLE_LINE_TRACKERS);
IConfigurationElement[] elements = extensionPoint.getConfigurationElements();
for (int i = 0; i < elements.length; i++) {
@@ -261,7 +261,7 @@ public class ProcessConsoleManager implements ILaunchListener {
String processType = extension.getAttribute("processType"); //$NON-NLS-1$
List<IConfigurationElement> list = fLineTrackers.get(processType);
if (list == null) {
- list = new ArrayList<IConfigurationElement>();
+ list = new ArrayList<>();
fLineTrackers.put(processType, list);
}
list.add(extension);
@@ -269,7 +269,7 @@ public class ProcessConsoleManager implements ILaunchListener {
}
}
- ArrayList<IConsoleLineTracker> trackers = new ArrayList<IConsoleLineTracker>();
+ ArrayList<IConsoleLineTracker> trackers = new ArrayList<>();
if (type != null) {
List<IConfigurationElement> lineTrackerExtensions;
synchronized (fLineTrackers) {// need to synchronize as the update to list might be still happening
@@ -298,7 +298,7 @@ public class ProcessConsoleManager implements ILaunchListener {
private List<IProcess> getRemovedProcesses(ILaunch launch) {
List<IProcess> removed = null;
if (fProcesses == null) {
- fProcesses = new HashMap<ILaunch, IProcess[]>();
+ fProcesses = new HashMap<>();
}
IProcess[] old = fProcesses.get(launch);
IProcess[] curr = launch.getProcesses();
@@ -307,7 +307,7 @@ public class ProcessConsoleManager implements ILaunchListener {
IProcess process = old[i];
if (!contains(curr, process)) {
if (removed == null) {
- removed = new ArrayList<IProcess>();
+ removed = new ArrayList<>();
}
removed.add(process);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java
index a6ae957a4..bdcea86c7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java
@@ -384,7 +384,7 @@ public class ExpressionDropAdapter extends ViewerDropAdapter {
* @return whether the drop was successful
*/
private boolean performVariableOrWatchAdaptableDrop(IStructuredSelection selection) {
- List<IExpression> expressions = new ArrayList<IExpression>(selection.size());
+ List<IExpression> expressions = new ArrayList<>(selection.size());
for (Iterator<?> itr = selection.iterator(); itr.hasNext();) {
Object element = itr.next();
String expressionText = createExpressionString(element);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementHelper.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementHelper.java
index cb012b88a..9b7f0ee34 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementHelper.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementHelper.java
@@ -36,7 +36,7 @@ public class DebugElementHelper {
private static DelegatingModelPresentation fgPresenetation;
// map of images to image descriptors
- private static Map<Image, ImageDescriptor> fgImages = new HashMap<Image, ImageDescriptor>();
+ private static Map<Image, ImageDescriptor> fgImages = new HashMap<>();
/**
* Disposes this adapter
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DecorationManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DecorationManager.java
index e3fac7213..0c108e89e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DecorationManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DecorationManager.java
@@ -26,7 +26,7 @@ import org.eclipse.debug.core.model.IThread;
public class DecorationManager {
// map of targets to lists of active decorations
- private static Map<IDebugTarget, List<Decoration>> fDecorations = new HashMap<IDebugTarget, List<Decoration>>(10);
+ private static Map<IDebugTarget, List<Decoration>> fDecorations = new HashMap<>(10);
/**
* Adds the given decoration for the given stack frame.
@@ -39,7 +39,7 @@ public class DecorationManager {
IDebugTarget target = decoration.getThread().getDebugTarget();
List<Decoration> list = fDecorations.get(target);
if (list == null) {
- list = new ArrayList<Decoration>();
+ list = new ArrayList<>();
fDecorations.put(target, list);
}
list.add(decoration);
@@ -65,7 +65,7 @@ public class DecorationManager {
}
private static void doRemoveDecorations(IDebugTarget target, IThread thread) {
- ArrayList<Decoration> decorationsToRemove = new ArrayList<Decoration>();
+ ArrayList<Decoration> decorationsToRemove = new ArrayList<>();
synchronized (fDecorations) {
List<Decoration> list = fDecorations.get(target);
if (list != null) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java
index f3b492b2f..4d6e66cb1 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java
@@ -254,11 +254,11 @@ public class LaunchView extends AbstractDebugView
*
* @since 3.6
*/
- private Map<String, IHandler2> fHandlers = new HashMap<String, IHandler2>();
+ private Map<String, IHandler2> fHandlers = new HashMap<>();
private boolean fDebugToolbarInView = true;
- private Set<String> fDebugToolbarPerspectives = new TreeSet<String>();
+ private Set<String> fDebugToolbarPerspectives = new TreeSet<>();
/**
* Page-book page for the breadcrumb viewer. This page is activated in
@@ -343,7 +343,7 @@ public class LaunchView extends AbstractDebugView
* @return corresponding tree path
*/
private TreePath getViewerTreePath(IModelDelta node) {
- ArrayList<Object> list = new ArrayList<Object>();
+ ArrayList<Object> list = new ArrayList<>();
IModelDelta parentDelta = node.getParentDelta();
while (parentDelta != null) {
list.add(0, node.getElement());
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewBreadcrumb.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewBreadcrumb.java
index 0c74d79b9..d3bc1fd43 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewBreadcrumb.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewBreadcrumb.java
@@ -456,7 +456,7 @@ public class LaunchViewBreadcrumb extends AbstractBreadcrumb implements IDebugCo
}
private TreePath getViewerTreePath(IModelDelta node) {
- ArrayList<Object> list = new ArrayList<Object>();
+ ArrayList<Object> list = new ArrayList<>();
IModelDelta parentDelta = node.getParentDelta();
while (parentDelta != null) {
list.add(0, node.getElement());
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewCopyToClipboardActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewCopyToClipboardActionDelegate.java
index 494856be0..335d80c9d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewCopyToClipboardActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewCopyToClipboardActionDelegate.java
@@ -53,7 +53,7 @@ public class LaunchViewCopyToClipboardActionDelegate extends VirtualCopyToClipbo
} else {
// Return tree selection plus children.
TreeItem[] selection = clientViewer.getTree().getSelection();
- Set<Widget> set = new HashSet<Widget>();
+ Set<Widget> set = new HashSet<>();
collectChildItems(set, selection);
return set.toArray(new TreeItem[set.size()]);
}
@@ -68,7 +68,7 @@ public class LaunchViewCopyToClipboardActionDelegate extends VirtualCopyToClipbo
*/
private TreeItem[] getSelectedItemsInTreeViewer(TreeModelViewer viewer, TreePath path) {
Widget item = viewer.findItem(path);
- Set<Widget> set = new HashSet<Widget>();
+ Set<Widget> set = new HashSet<>();
if (item instanceof TreeItem) {
set.add(item);
if (((TreeItem) item).getExpanded()) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java
index 53e2351af..e8436da2a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java
@@ -52,7 +52,7 @@ public abstract class AbstractMemoryViewPane implements IMemoryBlockListener, IS
protected StackLayout fStackLayout;
protected ViewTabEnablementManager fViewTabEnablementManager;
protected CTabFolder fEmptyTabFolder;
- protected Hashtable<Integer, CTabFolder> fTabFolderForDebugView = new Hashtable<Integer, CTabFolder>();
+ protected Hashtable<Integer, CTabFolder> fTabFolderForDebugView = new Hashtable<>();
protected boolean fVisible;
protected IMemoryBlockRetrieval fKey; // store the key for current tab
// folder
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryBlockAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryBlockAction.java
index a7a180c71..fdddeb0b8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryBlockAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryBlockAction.java
@@ -147,7 +147,7 @@ public class AddMemoryBlockAction extends Action implements IDebugContextListene
prefillExp = input;
prefillLength = dialog.getLength();
- ArrayList<String> expressions = new ArrayList<String>();
+ ArrayList<String> expressions = new ArrayList<>();
if (input.length() == 0) {
expressions.add(IInternalDebugCoreConstants.EMPTY_STRING);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java
index 4765fec9b..974fe1330 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java
@@ -110,7 +110,7 @@ public class MemoryBlocksTreeViewPane implements ISelectionListener, ISelectionC
if (selected != null && selected instanceof IStructuredSelection) {
Object[] selectedMemBlks = ((IStructuredSelection) selected).toArray();
- ArrayList<Object> memoryBlocks = new ArrayList<Object>();
+ ArrayList<Object> memoryBlocks = new ArrayList<>();
for (int i = 0; i < selectedMemBlks.length; i++) {
if (selectedMemBlks[i] instanceof IMemoryBlock) {
memoryBlocks.add(selectedMemBlks[i]);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryView.java
index fa334728d..c5822b636 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryView.java
@@ -79,12 +79,12 @@ public class MemoryView extends ViewPart implements IMemoryRenderingSite2 {
private MemoryViewPartListener fPartListener;
private SashForm fSashForm;
- private Hashtable<String, IMemoryViewPane> fViewPanes = new Hashtable<String, IMemoryViewPane>();
- private Hashtable<String, ViewForm> fViewPaneControls = new Hashtable<String, ViewForm>();
- private ArrayList<String> fVisibleViewPanes = new ArrayList<String>();
+ private Hashtable<String, IMemoryViewPane> fViewPanes = new Hashtable<>();
+ private Hashtable<String, ViewForm> fViewPaneControls = new Hashtable<>();
+ private ArrayList<String> fVisibleViewPanes = new ArrayList<>();
private boolean fVisible;
- private ArrayList<Integer> fWeights = new ArrayList<Integer>();
+ private ArrayList<Integer> fWeights = new ArrayList<>();
private static final String VISIBILITY_PREF = IDebugUIConstants.ID_MEMORY_VIEW + ".viewPanesVisibility"; //$NON-NLS-1$
private static final String ID_MEMORY_VIEW_CONTEXT = "org.eclipse.debug.ui.memoryview"; //$NON-NLS-1$
@@ -122,7 +122,7 @@ public class MemoryView extends ViewPart implements IMemoryRenderingSite2 {
private String fActivePaneId;
class MemoryViewSelectionProvider implements ISelectionProvider, ISelectionChangedListener {
- ArrayList<ISelectionChangedListener> fListeners = new ArrayList<ISelectionChangedListener>();
+ ArrayList<ISelectionChangedListener> fListeners = new ArrayList<>();
IStructuredSelection fSelections = new StructuredSelection();
@@ -808,7 +808,7 @@ public class MemoryView extends ViewPart implements IMemoryRenderingSite2 {
@Override
public IMemoryRenderingContainer[] getMemoryRenderingContainers() {
Enumeration<IMemoryViewPane> enumeration = fViewPanes.elements();
- ArrayList<Object> containers = new ArrayList<Object>();
+ ArrayList<Object> containers = new ArrayList<>();
while (enumeration.hasMoreElements()) {
Object obj = enumeration.nextElement();
if (obj instanceof IMemoryRenderingContainer)
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewIdRegistry.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewIdRegistry.java
index 659c664f3..f890e48ea 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewIdRegistry.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewIdRegistry.java
@@ -49,7 +49,7 @@ public class MemoryViewIdRegistry {
private static ArrayList<String> getRegistry() {
if (fgRegistry == null)
- fgRegistry = new ArrayList<String>();
+ fgRegistry = new ArrayList<>();
return fgRegistry;
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java
index d4e94933c..46ec5d2df 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java
@@ -46,8 +46,8 @@ public class MemoryViewSynchronizationService implements IMemoryRenderingSynchro
private static final boolean DEBUG_SYNC_SERVICE = false;
public MemoryViewSynchronizationService() {
- fSynchronizeInfo = new Hashtable<IMemoryBlock, SynchronizeInfo>();
- fPropertyListeners = new Hashtable<IPropertyChangeListener, PropertyListener>();
+ fSynchronizeInfo = new Hashtable<>();
+ fPropertyListeners = new Hashtable<>();
MemoryViewUtil.getMemoryBlockManager().addListener(this);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewUtil.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewUtil.java
index b53c5e6da..8fb6ac5b5 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewUtil.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewUtil.java
@@ -48,7 +48,7 @@ public class MemoryViewUtil {
SWT.CAPS_LOCK, SWT.NUM_LOCK, SWT.SCROLL_LOCK, SWT.PAUSE, SWT.BREAK,
SWT.PRINT_SCREEN, SWT.ESC, SWT.CTRL, SWT.ALT, SWT.SHIFT };
- public static ArrayList<String> MEMORY_BLOCKS_HISTORY = new ArrayList<String>();
+ public static ArrayList<String> MEMORY_BLOCKS_HISTORY = new ArrayList<>();
/**
* @param selection
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java
index 310738b83..a7f04e4fd 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java
@@ -73,14 +73,14 @@ public class RenderingViewPane extends AbstractMemoryViewPane implements IMemory
public static final String RENDERING_VIEW_PANE_ID = DebugUIPlugin.getUniqueIdentifier() + ".MemoryView.RenderingViewPane"; //$NON-NLS-1$
- private Hashtable<IMemoryBlock, CTabFolder> fTabFolderForMemoryBlock = new Hashtable<IMemoryBlock, CTabFolder>();
- private Hashtable<CTabFolder, IMemoryBlock> fMemoryBlockFromTabFolder = new Hashtable<CTabFolder, IMemoryBlock>();
+ private Hashtable<IMemoryBlock, CTabFolder> fTabFolderForMemoryBlock = new Hashtable<>();
+ private Hashtable<CTabFolder, IMemoryBlock> fMemoryBlockFromTabFolder = new Hashtable<>();
private ViewPaneRenderingMgr fRenderingMgr;
private IMemoryRenderingSite fRenderingSite;
- private Set<IMemoryRendering> fAddedRenderings = new HashSet<IMemoryRendering>();
- private Set<IMemoryBlock> fAddedMemoryBlocks = new HashSet<IMemoryBlock>();
+ private Set<IMemoryRendering> fAddedRenderings = new HashSet<>();
+ private Set<IMemoryBlock> fAddedMemoryBlocks = new HashSet<>();
private boolean fCanAddRendering = true;
private boolean fCanRemoveRendering = true;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ResetMemoryBlockAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ResetMemoryBlockAction.java
index a2bbbb8f4..61aa23d11 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ResetMemoryBlockAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ResetMemoryBlockAction.java
@@ -34,7 +34,7 @@ import org.eclipse.ui.IViewPart;
public class ResetMemoryBlockAction implements IViewActionDelegate {
private IViewPart fView;
- private ArrayList<Object> fSelectedMB = new ArrayList<Object>();
+ private ArrayList<Object> fSelectedMB = new ArrayList<>();
/*
* (non-Javadoc)
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/SynchronizeInfo.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/SynchronizeInfo.java
index 4a3ac8880..f7cd15b87 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/SynchronizeInfo.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/SynchronizeInfo.java
@@ -42,7 +42,7 @@ public class SynchronizeInfo {
*/
public SynchronizeInfo(IMemoryBlock block) {
fBlock = block;
- fProperties = new Hashtable<String, Object>();
+ fProperties = new Hashtable<>();
}
/**
@@ -84,7 +84,7 @@ public class SynchronizeInfo {
return new String[0];
Enumeration<String> enumeration = fProperties.keys();
- ArrayList<String> ids = new ArrayList<String>();
+ ArrayList<String> ids = new ArrayList<>();
while (enumeration.hasMoreElements()) {
ids.add(enumeration.nextElement());
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneRenderingMgr.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneRenderingMgr.java
index 1639da7be..ab9d2c664 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneRenderingMgr.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneRenderingMgr.java
@@ -55,7 +55,7 @@ import org.w3c.dom.NodeList;
*/
public class ViewPaneRenderingMgr implements IDebugEventSetListener {
- private final ArrayList<IMemoryRendering> fRenderings = new ArrayList<IMemoryRendering>();
+ private final ArrayList<IMemoryRendering> fRenderings = new ArrayList<>();
private final IMemoryRenderingContainer fViewPane;
private static final String RENDERINGS_TAG = "persistedMemoryRenderings"; //$NON-NLS-1$
@@ -128,7 +128,7 @@ public class ViewPaneRenderingMgr implements IDebugEventSetListener {
return getRenderingsFromMemoryBlock(mem);
}
- ArrayList<IMemoryRendering> ret = new ArrayList<IMemoryRendering>();
+ ArrayList<IMemoryRendering> ret = new ArrayList<>();
for (int i = 0; i < fRenderings.size(); i++) {
if (fRenderings.get(i) != null) {
IMemoryRendering rendering = fRenderings.get(i);
@@ -146,7 +146,7 @@ public class ViewPaneRenderingMgr implements IDebugEventSetListener {
}
public IMemoryRendering[] getRenderingsFromDebugTarget(IDebugTarget target) {
- ArrayList<IMemoryRendering> ret = new ArrayList<IMemoryRendering>();
+ ArrayList<IMemoryRendering> ret = new ArrayList<>();
for (int i = 0; i < fRenderings.size(); i++) {
if (fRenderings.get(i) != null) {
IMemoryRendering rendering = fRenderings.get(i);
@@ -160,7 +160,7 @@ public class ViewPaneRenderingMgr implements IDebugEventSetListener {
}
public IMemoryRendering[] getRenderingsFromMemoryBlock(IMemoryBlock block) {
- ArrayList<IMemoryRendering> ret = new ArrayList<IMemoryRendering>();
+ ArrayList<IMemoryRendering> ret = new ArrayList<>();
for (int i = 0; i < fRenderings.size(); i++) {
if (fRenderings.get(i) != null) {
IMemoryRendering rendering = fRenderings.get(i);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneSelectionProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneSelectionProvider.java
index 8efa99637..8437af68c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneSelectionProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneSelectionProvider.java
@@ -25,7 +25,7 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
*
*/
public class ViewPaneSelectionProvider implements ISelectionProvider {
- ArrayList<ISelectionChangedListener> fListeners = new ArrayList<ISelectionChangedListener>();
+ ArrayList<ISelectionChangedListener> fListeners = new ArrayList<>();
ISelection fSelection;
/*
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AbstractVirtualContentTableModel.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AbstractVirtualContentTableModel.java
index ecec35404..8a34c9488 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AbstractVirtualContentTableModel.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AbstractVirtualContentTableModel.java
@@ -24,7 +24,7 @@ abstract public class AbstractVirtualContentTableModel extends AsynchronousTable
public Object[] getElements() {
ModelNode[] nodes = getNodes(getRootNode().getElement());
- ArrayList<Object> result = new ArrayList<Object>();
+ ArrayList<Object> result = new ArrayList<>();
if (nodes != null) {
for (int i = 0; i < nodes.length; i++) {
ModelNode[] children = nodes[i].getChildrenNodes();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncCopyTableRenderingAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncCopyTableRenderingAction.java
index 15eb8b648..d24478011 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncCopyTableRenderingAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncCopyTableRenderingAction.java
@@ -39,7 +39,7 @@ public class AsyncCopyTableRenderingAction extends CopyTableRenderingToClipboard
int itemCount = table.getItemCount();
int numVisibleLines = Math.min((table.getBounds().height / table.getItemHeight()) + 2, itemCount - topIndex);
- ArrayList<TableItem> items = new ArrayList<TableItem>();
+ ArrayList<TableItem> items = new ArrayList<>();
// start at top index until there is no more data in the table
for (int i = topIndex; i < topIndex + numVisibleLines; i++) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncPrintTableRenderingAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncPrintTableRenderingAction.java
index 799bdcaff..8dfe1165c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncPrintTableRenderingAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncPrintTableRenderingAction.java
@@ -40,7 +40,7 @@ public class AsyncPrintTableRenderingAction extends PrintTableRenderingAction {
int itemCount = table.getItemCount();
int numVisibleLines = Math.min((table.getBounds().height / table.getItemHeight()) + 2, itemCount - topIndex);
- ArrayList<TableItem> items = new ArrayList<TableItem>();
+ ArrayList<TableItem> items = new ArrayList<>();
// start at top index until there is no more data in the table
for (int i = topIndex; i < topIndex + numVisibleLines; i++) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncVirtualContentTableViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncVirtualContentTableViewer.java
index 9d1355048..4345a19ce 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncVirtualContentTableViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncVirtualContentTableViewer.java
@@ -40,7 +40,7 @@ import org.eclipse.ui.progress.UIJob;
abstract public class AsyncVirtualContentTableViewer extends AsynchronousTableViewer {
private Object fPendingTopIndexKey;
- private ArrayList<Object> fTopIndexQueue = new ArrayList<Object>();
+ private ArrayList<Object> fTopIndexQueue = new ArrayList<>();
private boolean fPendingResizeColumns;
private ListenerList<IVirtualContentListener> fVirtualContentListeners;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressDialog.java
index 2803d37b6..a91fe5384 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressDialog.java
@@ -36,7 +36,7 @@ import org.eclipse.ui.PlatformUI;
public class GoToAddressDialog extends TrayDialog implements ModifyListener {
- private static Vector<String> history = new Vector<String>();
+ private static Vector<String> history = new Vector<>();
private Combo expressionInput;
private String expression;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/MemorySegment.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/MemorySegment.java
index 9f370c159..c41b8e959 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/MemorySegment.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/MemorySegment.java
@@ -72,7 +72,7 @@ public class MemorySegment extends PlatformObject {
if (start + length > fBytes.length)
return new MemoryByte[0];
- ArrayList<MemoryByte> ret = new ArrayList<MemoryByte>();
+ ArrayList<MemoryByte> ret = new ArrayList<>();
for (int i=start; i< start+length; i++)
{
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentProvider.java
index d51dfe561..c4bb89cfe 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentProvider.java
@@ -70,8 +70,8 @@ public class TableRenderingContentProvider extends BasicDebugViewContentProvider
*/
public TableRenderingContentProvider()
{
- lineCache = new Vector<TableRenderingLine>();
- contentCache = new Hashtable<String, TableRenderingLine>();
+ lineCache = new Vector<>();
+ contentCache = new Hashtable<>();
initializeDynamicLoad();
DebugPlugin.getDefault().addDebugEventListener(this);
@@ -449,7 +449,7 @@ public class TableRenderingContentProvider extends BasicDebugViewContentProvider
// if debug adapter did not return enough memory, create dummy memory
if (memoryBuffer.length < reqNumBytes)
{
- ArrayList<MemoryByte> newBuffer = new ArrayList<MemoryByte>();
+ ArrayList<MemoryByte> newBuffer = new ArrayList<>();
for (int i=0; i<memoryBuffer.length; i++)
{
@@ -974,7 +974,7 @@ public class TableRenderingContentProvider extends BasicDebugViewContentProvider
DebugUIPlugin.log(e);
addressLength = 4 * IInternalDebugUIConstants.CHAR_PER_BYTE;
}
- ArrayList<TableRenderingLine> lines = new ArrayList<TableRenderingLine>();
+ ArrayList<TableRenderingLine> lines = new ArrayList<>();
String paddedString = DebugUITools.getPreferenceStore().getString(IDebugUIConstants.PREF_PADDED_STR);
for (int i=0; i<numOfLines; i++)
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLine.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLine.java
index 390aa31e9..ba6db186b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLine.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLine.java
@@ -67,7 +67,7 @@ public class TableRenderingLine extends PlatformObject {
public MemoryByte[] getBytes(int start, int end)
{
- ArrayList<MemoryByte> ret = new ArrayList<MemoryByte>();
+ ArrayList<MemoryByte> ret = new ArrayList<>();
for (int i=start; i<end; i++)
{
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingModel.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingModel.java
index d174c4f6c..2d6c26e1c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingModel.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingModel.java
@@ -62,8 +62,8 @@ public class TableRenderingModel extends AbstractVirtualContentTableModel implem
public TableRenderingModel(AsynchronousTableViewer viewer) {
super(viewer);
- fCache = new Hashtable<Object, Object>();
- fOrderedCache = new Vector<Object>();
+ fCache = new Hashtable<>();
+ fOrderedCache = new Vector<>();
}
@Override
@@ -243,7 +243,7 @@ public class TableRenderingModel extends AbstractVirtualContentTableModel implem
return;
}
- ArrayList<Object> segments = new ArrayList<Object>();
+ ArrayList<Object> segments = new ArrayList<>();
Enumeration<Object> enumeration = fOrderedCache.elements();
BigInteger address = ((MemorySegment) fOrderedCache.get(0)).getAddress();
@@ -284,7 +284,7 @@ public class TableRenderingModel extends AbstractVirtualContentTableModel implem
return;
}
- ArrayList<Object> segments = new ArrayList<Object>();
+ ArrayList<Object> segments = new ArrayList<>();
Object[] elements = getElements();
for (int i = 0; i < elements.length; i++) {
Object element = elements[i];
@@ -317,7 +317,7 @@ public class TableRenderingModel extends AbstractVirtualContentTableModel implem
}
private MemoryByte[] convertSegmentsToBytes(MemorySegment[] segments) {
- ArrayList<MemoryByte> toReturn = new ArrayList<MemoryByte>();
+ ArrayList<MemoryByte> toReturn = new ArrayList<>();
for (int i = 0; i < segments.length; i++) {
MemoryByte[] temp = segments[i].getBytes();
for (int j = 0; j < temp.length; j++) {
@@ -332,7 +332,7 @@ public class TableRenderingModel extends AbstractVirtualContentTableModel implem
Assert.isTrue(bytesPerLine > 0);
Assert.isTrue(numAddressableUnitPerLine > 0);
- ArrayList<MemorySegment> segments = new ArrayList<MemorySegment>();
+ ArrayList<MemorySegment> segments = new ArrayList<>();
MemoryByte[] temp = bytes;
if (alignAddress) {
@@ -401,7 +401,7 @@ public class TableRenderingModel extends AbstractVirtualContentTableModel implem
if (computeChanges()) {
Object[] newContent = compare(kids.toArray());
- ArrayList<Object> newList = new ArrayList<Object>();
+ ArrayList<Object> newList = new ArrayList<>();
for (int i = 0; i < newContent.length; i++) {
newList.add(newContent[i]);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/LogicalStructureCache.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/LogicalStructureCache.java
index 6d2e50ddd..2a437a5f2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/LogicalStructureCache.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/LogicalStructureCache.java
@@ -35,7 +35,7 @@ public class LogicalStructureCache {
/**
* Maps a ILogicalStructureType to the cache for that type
*/
- private Map<ILogicalStructureType, LogicalStructureTypeCache> fCacheForType = new HashMap<ILogicalStructureType, LogicalStructureTypeCache>();
+ private Map<ILogicalStructureType, LogicalStructureTypeCache> fCacheForType = new HashMap<>();
/**
* Returns the logical value to replace the given value using the specified logical structure.
@@ -88,12 +88,12 @@ public class LogicalStructureCache {
/**
* Maps a raw IValue to its calculated logical IValue
*/
- private Map<IValue, IValue> fKnownValues = new HashMap<IValue, IValue>();
+ private Map<IValue, IValue> fKnownValues = new HashMap<>();
/**
* Set of raw IValues that logical values are currently being evaluated for.
*/
- private Set<IValue> fPendingValues = new HashSet<IValue>();
+ private Set<IValue> fPendingValues = new HashSet<>();
public LogicalStructureTypeCache(ILogicalStructureType type){
fType = type;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java
index 506f5fa40..1a4f01627 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java
@@ -296,7 +296,7 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
*/
private ViewerInputService fInputService;
- private Map<String, IAction> fGlobalActionMap = new HashMap<String, IAction>();
+ private Map<String, IAction> fGlobalActionMap = new HashMap<>();
/**
* Viewer input requester used to update the viewer once the viewer input has been
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AbstractDetailPane.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AbstractDetailPane.java
index fc454540a..c7d44291b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AbstractDetailPane.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/AbstractDetailPane.java
@@ -40,12 +40,12 @@ public abstract class AbstractDetailPane implements IDetailPane {
* Map of actions. Keys are strings, values
* are <code>IAction</code>.
*/
- private Map<String, IAction> fActionMap = new HashMap<String, IAction>();
+ private Map<String, IAction> fActionMap = new HashMap<>();
/**
* Collection to track actions that should be updated when selection occurs.
*/
- private List<String> fSelectionActions = new ArrayList<String>();
+ private List<String> fSelectionActions = new ArrayList<>();
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#init(org.eclipse.ui.IWorkbenchPartSite)
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java
index 3abc49ffc..d408939c0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java
@@ -48,7 +48,7 @@ public class DefaultDetailPaneFactory implements IDetailPaneFactory {
*/
@Override
public Set<String> getDetailPaneTypes(IStructuredSelection selection) {
- Set<String> possibleIDs = new HashSet<String>(1);
+ Set<String> possibleIDs = new HashSet<>(1);
possibleIDs.add(DefaultDetailPane.ID);
return possibleIDs;
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java
index 03e86262e..ab562eb30 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java
@@ -263,7 +263,7 @@ public class DetailPaneManager {
public static final String PREF_DETAIL_AREAS = "preferredDetailPanes"; //$NON-NLS-1$
private DetailPaneManager(){
- fFactoriesByPaneID = new HashMap<String, IDetailPaneFactory>();
+ fFactoriesByPaneID = new HashMap<>();
fFactoriesByPaneID.put(MessageDetailPane.ID, new DefaultDetailPaneFactory());
}
@@ -357,7 +357,7 @@ public class DetailPaneManager {
* @return The factories enabled for the selection or an empty collection.
*/
private List<IDetailPaneFactory> getEnabledFactories(IStructuredSelection selection) {
- List<IDetailPaneFactory> factoriesForSelection = new ArrayList<IDetailPaneFactory>();
+ List<IDetailPaneFactory> factoriesForSelection = new ArrayList<>();
if (fKnownFactories == null) {
initializeDetailFactories();
}
@@ -380,7 +380,7 @@ public class DetailPaneManager {
* @return Set of pane IDs or an empty set
*/
private Set<String> getPossiblePaneIDs(List<IDetailPaneFactory> factoriesToQuery, IStructuredSelection selection) {
- Set<String> idsForSelection = new LinkedHashSet<String>();
+ Set<String> idsForSelection = new LinkedHashSet<>();
for (IDetailPaneFactory currentFactory : factoriesToQuery) {
for (String currentAreaTypeID : currentFactory.getDetailPaneTypes(selection)) {
fFactoriesByPaneID.put(currentAreaTypeID, currentFactory);
@@ -438,7 +438,7 @@ public class DetailPaneManager {
*/
private synchronized void initializeDetailFactories(){
if (fKnownFactories == null){
- fKnownFactories = new ArrayList<DetailPaneFactoryExtension>();
+ fKnownFactories = new ArrayList<>();
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_DETAIL_FACTORIES);
IConfigurationElement[] infos = extensionPoint.getConfigurationElements();
DetailPaneFactoryExtension delegate = null;
@@ -522,7 +522,7 @@ public class DetailPaneManager {
* @see #storePreferredDetailsAreas()
*/
private void loadPreferredDetailsAreas() {
- fPreferredDetailPanes = new HashMap<Set<String>, String>();
+ fPreferredDetailPanes = new HashMap<>();
String preferenceValue = Platform.getPreferencesService().getString(DebugUIPlugin.getUniqueIdentifier(),
PREF_DETAIL_AREAS,
"", //$NON-NLS-1$
@@ -532,7 +532,7 @@ public class DetailPaneManager {
String token = entryTokenizer.nextToken();
int valueStart = token.indexOf(':');
StringTokenizer keyTokenizer = new StringTokenizer(token.substring(0,valueStart),","); //$NON-NLS-1$
- Set<String> keys = new LinkedHashSet<String>();
+ Set<String> keys = new LinkedHashSet<>();
while (keyTokenizer.hasMoreTokens()){
keys.add(keyTokenizer.nextToken());
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java
index c77bae7f9..a528128b3 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java
@@ -158,7 +158,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi
private static Set<String> fgGlobalActionIds;
static {
- fgGlobalActionIds = new HashSet<String>();
+ fgGlobalActionIds = new HashSet<>();
fgGlobalActionIds.add(SELECT_ALL_ACTION);
fgGlobalActionIds.add(COPY_ACTION);
fgGlobalActionIds.add(CUT_ACTION);
@@ -245,8 +245,8 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi
* Constructs a new debug view.
*/
public AbstractDebugView() {
- fActionMap = new HashMap<String, IAction>(5);
- fUpdateables = new ArrayList<IUpdate>(3);
+ fActionMap = new HashMap<>(5);
+ fUpdateables = new ArrayList<>(3);
}
/**
@@ -966,7 +966,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi
*/
public void addContextMenuManager(IMenuManager contextMenuManager) {
if (fContextMenuManagers == null) {
- fContextMenuManagers = new ArrayList<IMenuManager>();
+ fContextMenuManagers = new ArrayList<>();
}
fContextMenuManagers.add(contextMenuManager);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
index 94a28248e..6ed04e176 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
@@ -818,7 +818,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
}
}
if (!groups.isEmpty()) {
- List<LaunchGroupExtension> list = new ArrayList<LaunchGroupExtension>();
+ List<LaunchGroupExtension> list = new ArrayList<>();
for (String id : groups) {
LaunchGroupExtension extension = getLaunchConfigurationManager().getLaunchGroup(id);
if (extension != null) {
@@ -876,7 +876,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
boolean run = config.getAttribute(IDebugUIConstants.ATTR_RUN_FAVORITE, false);
if (debug || run) {
// old attributes
- List<LaunchGroupExtension> groups = new ArrayList<LaunchGroupExtension>();
+ List<LaunchGroupExtension> groups = new ArrayList<>();
int num = 0;
if (debug) {
groups.add(getLaunchConfigurationManager().getLaunchGroup(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP));
@@ -906,7 +906,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
for (int i = 0; i < checked.length; i++) {
LaunchGroupExtension group = (LaunchGroupExtension)checked[i];
if (groups == null) {
- groups = new ArrayList<String>();
+ groups = new ArrayList<>();
}
groups.add(group.getIdentifier());
}
@@ -1109,7 +1109,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
@Override
public Object[] getElements(Object inputElement) {
ILaunchGroup[] groups = DebugUITools.getLaunchGroups();
- List<ILaunchGroup> possibleGroups = new ArrayList<ILaunchGroup>();
+ List<ILaunchGroup> possibleGroups = new ArrayList<>();
ILaunchConfiguration configuration = (ILaunchConfiguration)inputElement;
for (int i = 0; i < groups.length; i++) {
ILaunchGroup extension = groups[i];
@@ -1135,7 +1135,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
*/
class FavoritesLabelProvider implements ITableLabelProvider {
- private Map<Object, Image> fImages = new HashMap<Object, Image>();
+ private Map<Object, Image> fImages = new HashMap<>();
@Override
public Image getColumnImage(Object element, int columnIndex) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java
index a861e4758..5624f3039 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugUITools.java
@@ -877,7 +877,7 @@ public class DebugUITools {
Object toggleValue = getToggleTerminateValue(key);
if (toggleValue instanceof TerminateToggleValue) {
LaunchingResourceManager lrm = DebugUIPlugin.getDefault().getLaunchingResourceManager();
- ArrayList<LaunchShortcutExtension> shortcuts = new ArrayList<LaunchShortcutExtension>();
+ ArrayList<LaunchShortcutExtension> shortcuts = new ArrayList<>();
LaunchShortcutExtension shortcut = ((TerminateToggleValue) toggleValue).getShortcut();
shortcuts.add(shortcut);
IResource resource = SelectedResourceManager.getDefault().getSelectedResource();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
index e5618cd0c..b307bcf90 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
@@ -421,7 +421,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
*/
private Map<String, EnvironmentVariable> getNativeEnvironment() {
Map<String, String> stringVars = DebugPlugin.getDefault().getLaunchManager().getNativeEnvironmentCasePreserved();
- HashMap<String, EnvironmentVariable> vars = new HashMap<String, EnvironmentVariable>();
+ HashMap<String, EnvironmentVariable> vars = new HashMap<>();
for (Entry<String, String> entry : stringVars.entrySet()) {
vars.put(entry.getKey(), new EnvironmentVariable(entry.getKey(), entry.getValue()));
}
@@ -529,7 +529,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
// Convert the table's items into a Map so that this can be saved in the
// configuration's attributes.
TableItem[] items = environmentTable.getTable().getItems();
- Map<String, String> map = new HashMap<String, String>(items.length);
+ Map<String, String> map = new HashMap<>(items.length);
for (int i = 0; i < items.length; i++) {
EnvironmentVariable var = (EnvironmentVariable) items[i].getData();
map.put(var.getName(), var.getValue());
@@ -699,7 +699,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
return s1.compareTo(s2);
}
};
- TreeMap<Object, Object> envVars = new TreeMap<Object, Object>(comparator);
+ TreeMap<Object, Object> envVars = new TreeMap<>(comparator);
envVars.putAll((Map<?, ?>) inputElement);
elements = new EnvironmentVariable[envVars.size()];
int index = 0;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java
index c02930c71..0df29da21 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java
@@ -87,7 +87,7 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog {
}
//no filtering by default
- private ArrayList<VariableFilter> fFilters = new ArrayList<VariableFilter>();
+ private ArrayList<VariableFilter> fFilters = new ArrayList<>();
//when filtering is on, do not show all by default
private boolean fShowAllSelected = false;
@@ -185,7 +185,7 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog {
@Override
protected void setListElements(Object[] elements) {
- ArrayList<Object> filtered = new ArrayList<Object>();
+ ArrayList<Object> filtered = new ArrayList<>();
filtered.addAll(Arrays.asList(elements));
if(!fFilters.isEmpty() && !fShowAllSelected) {
for (int i = 0; i < elements.length; i++) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchHistoryAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchHistoryAction.java
index e73d9c530..65ce370a2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchHistoryAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchHistoryAction.java
@@ -406,7 +406,7 @@ public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, I
} else {
configuration = getLaunchConfigurationManager().getFilteredLastLaunch(groupid);
}
- ArrayList<ILaunchConfiguration> configs = new ArrayList<ILaunchConfiguration>(1);
+ ArrayList<ILaunchConfiguration> configs = new ArrayList<>(1);
if (configuration != null){
configs.add(configuration);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/BreakpointTypesContribution.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/BreakpointTypesContribution.java
index 90c7abc81..130f30541 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/BreakpointTypesContribution.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/BreakpointTypesContribution.java
@@ -133,7 +133,7 @@ public class BreakpointTypesContribution extends CompoundContributionItem implem
Set<String> enabledIDs = manager.getEnabledToggleBreakpointsTargetIDs(part, selection);
String preferredId = manager.getPreferredToggleBreakpointsTargetID(part, selection);
- List<Action> actions = new ArrayList<Action>(enabledIDs.size());
+ List<Action> actions = new ArrayList<>(enabledIDs.size());
for (String id : enabledIDs) {
Action action = new SelectTargetAction(manager.getToggleBreakpointsTargetName(id), enabledIDs, id);
if (id.equals(preferredId)) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java
index 69baf7b80..ab4e529aa 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java
@@ -82,7 +82,7 @@ public abstract class ContextualLaunchAction implements IObjectActionDelegate, I
public ContextualLaunchAction(String mode) {
fMode = mode;
ILaunchGroup[] groups = DebugUITools.getLaunchGroups();
- fGroupsByCategory = new HashMap<String, ILaunchGroup>(3);
+ fGroupsByCategory = new HashMap<>(3);
for (int i = 0; i < groups.length; i++) {
ILaunchGroup group = groups[i];
if (group.getMode().equals(mode)) {
@@ -210,7 +210,7 @@ public abstract class ContextualLaunchAction implements IObjectActionDelegate, I
context.setAllowPluginActivation(true);
context.addVariable("selection", selection); //$NON-NLS-1$
List<LaunchShortcutExtension> allShortCuts = getLaunchConfigurationManager().getLaunchShortcuts();
- List<LaunchShortcutExtension> filteredShortCuts = new ArrayList<LaunchShortcutExtension>();
+ List<LaunchShortcutExtension> filteredShortCuts = new ArrayList<>();
Iterator<LaunchShortcutExtension> iter = allShortCuts.iterator();
while (iter.hasNext()) {
LaunchShortcutExtension ext = iter.next();
@@ -230,7 +230,7 @@ public abstract class ContextualLaunchAction implements IObjectActionDelegate, I
if(menu.getItemCount() > 0 && filteredShortCuts.size() > 0) {
new MenuItem(menu, SWT.SEPARATOR);
}
- List<String> categories = new ArrayList<String>();
+ List<String> categories = new ArrayList<>();
for(LaunchShortcutExtension ext : filteredShortCuts) {
for(String mode : ext.getModes()) {
if (mode.equals(fMode)) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java
index aff4f216d..3911b810f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java
@@ -139,7 +139,7 @@ public abstract class DebugCommandHandler extends AbstractHandler {
/**
* Map of enabled targets keyed by workbench window.
*/
- private Map<IWorkbenchWindow, EnabledTarget> fEnabledTargetsMap = new WeakHashMap<IWorkbenchWindow, EnabledTarget>();
+ private Map<IWorkbenchWindow, EnabledTarget> fEnabledTargetsMap = new WeakHashMap<>();
/**
* The current enabled target, based on the active
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java
index b9816dd83..1ed45112e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java
@@ -68,7 +68,7 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress {
private boolean fCreateWorkingSets = false;
- private ArrayList<IBreakpoint> fAdded = new ArrayList<IBreakpoint>();
+ private ArrayList<IBreakpoint> fAdded = new ArrayList<>();
private String fCurrentWorkingSetProperty = null;
@@ -274,7 +274,7 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress {
* @since 3.5
*/
protected Map<String, Object> collectBreakpointProperties(IMemento memento) {
- HashMap<String, Object> map = new HashMap<String, Object>();
+ HashMap<String, Object> map = new HashMap<>();
//collect attributes from the 'breakpoint' node
map.put(IImportExportConstants.IE_BP_ENABLED, memento.getBoolean(IImportExportConstants.IE_BP_ENABLED));
@@ -377,7 +377,7 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress {
*/
private void updateWorkingSets(String[] wsnames, IBreakpoint breakpoint) {
IWorkingSetManager mgr = PlatformUI.getWorkbench().getWorkingSetManager();
- ArrayList<IWorkingSet> sets = new ArrayList<IWorkingSet>();
+ ArrayList<IWorkingSet> sets = new ArrayList<>();
collectContainingWorkingsets(breakpoint, sets);
for (int i = 0; i < wsnames.length; i++) {
if("".equals(wsnames[i])) { //$NON-NLS-1$
@@ -401,7 +401,7 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress {
}
ArrayList<IAdaptable> items = null;
for (IWorkingSet set : sets) {
- items = new ArrayList<IAdaptable>(Arrays.asList(set.getElements()));
+ items = new ArrayList<>(Arrays.asList(set.getElements()));
if(items.remove(breakpoint)) {
set.setElements(items.toArray(new IAdaptable[items.size()]));
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchAction.java
index 25c3b5f98..87460f4fd 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchAction.java
@@ -158,7 +158,7 @@ public class LaunchAction extends Action {
* @since 3.4
*/
private ILaunchGroup[] getAllGroupsForConfiguration(ILaunchConfiguration config) {
- ArrayList<ILaunchGroup> list = new ArrayList<ILaunchGroup>();
+ ArrayList<ILaunchGroup> list = new ArrayList<>();
try {
ILaunchConfigurationType type = config.getType();
Set<Set<String>> modes = type.getSupportedModeCombinations();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchShortcutsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchShortcutsAction.java
index 99f5cf47d..6d8702af9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchShortcutsAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/LaunchShortcutsAction.java
@@ -142,7 +142,7 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork
private IEvaluationContext createContext() {
IStructuredSelection ss = SelectedResourceManager.getDefault().getCurrentSelection();
Object o = ss.getFirstElement();
- List<IEditorInput> list = new ArrayList<IEditorInput>(0);
+ List<IEditorInput> list = new ArrayList<>(0);
if(o instanceof IEditorPart) {
list.add(((IEditorPart)o).getEditorInput());
}
@@ -163,7 +163,7 @@ public class LaunchShortcutsAction extends Action implements IMenuCreator, IWork
int accelerator = 1;
List<LaunchShortcutExtension> allShortCuts = getLaunchConfigurationManager().getLaunchShortcuts(fGroup.getCategory());
Iterator<LaunchShortcutExtension> iter = allShortCuts.iterator();
- List<LaunchShortcutExtension> filteredShortCuts = new ArrayList<LaunchShortcutExtension>(10);
+ List<LaunchShortcutExtension> filteredShortCuts = new ArrayList<>(10);
while (iter.hasNext()) {
LaunchShortcutExtension ext = iter.next();
try {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/WorkingSetSourceContainer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/WorkingSetSourceContainer.java
index 23d3e88e1..4e5e246f9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/WorkingSetSourceContainer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/WorkingSetSourceContainer.java
@@ -94,7 +94,7 @@ public class WorkingSetSourceContainer extends CompositeSourceContainer{
return new ISourceContainer[0];
}
- ArrayList<ISourceContainer> locationList = new ArrayList<ISourceContainer>();
+ ArrayList<ISourceContainer> locationList = new ArrayList<>();
for (int i = 0; i < elements.length; i++) {
IResource resource = elements[i].getAdapter(IResource.class);
diff --git a/org.eclipse.ui.console/META-INF/MANIFEST.MF b/org.eclipse.ui.console/META-INF/MANIFEST.MF
index a14c37dd5..4213f25cd 100644
--- a/org.eclipse.ui.console/META-INF/MANIFEST.MF
+++ b/org.eclipse.ui.console/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.ui.console; singleton:=true
-Bundle-Version: 3.7.1.qualifier
+Bundle-Version: 3.7.100.qualifier
Bundle-Activator: org.eclipse.ui.console.ConsolePlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.ui.console/pom.xml b/org.eclipse.ui.console/pom.xml
index 12d2f2ded..df2058e0a 100644
--- a/org.eclipse.ui.console/pom.xml
+++ b/org.eclipse.ui.console/pom.xml
@@ -14,10 +14,10 @@
<parent>
<artifactId>eclipse.platform.debug</artifactId>
<groupId>eclipse.platform.debug</groupId>
- <version>4.7.1-SNAPSHOT</version>
+ <version>4.8.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.ui</groupId>
<artifactId>org.eclipse.ui.console</artifactId>
- <version>3.7.1-SNAPSHOT</version>
+ <version>3.7.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/AbstractConsole.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/AbstractConsole.java
index 301729a2a..a609ba5e1 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/AbstractConsole.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/AbstractConsole.java
@@ -108,7 +108,7 @@ public abstract class AbstractConsole implements IConsole {
fEvent = event;
for (IPropertyChangeListener iPropertyChangeListener : fListeners) {
fListener = iPropertyChangeListener;
- SafeRunner.run(this);
+ SafeRunner.run(this);
}
fListener = null;
}
@@ -126,7 +126,7 @@ public abstract class AbstractConsole implements IConsole {
* @since 3.1
*/
public AbstractConsole(String name, ImageDescriptor imageDescriptor, boolean autoLifecycle) {
- this(name, null, imageDescriptor, autoLifecycle);
+ this(name, null, imageDescriptor, autoLifecycle);
}
/**
@@ -146,7 +146,7 @@ public abstract class AbstractConsole implements IConsole {
setType(type);
setImageDescriptor(imageDescriptor);
if (autoLifecycle) {
- ConsolePlugin.getDefault().getConsoleManager().addConsoleListener(new Lifecycle());
+ ConsolePlugin.getDefault().getConsoleManager().addConsoleListener(new Lifecycle());
}
}
@@ -174,12 +174,12 @@ public abstract class AbstractConsole implements IConsole {
* @param name the new name
*/
protected void setName(String name) {
- if (!name.equals(fName)) {
- String old = fName;
- fName = name;
- firePropertyChange(this, IBasicPropertyConstants.P_TEXT, old, name);
- }
- }
+ if (!name.equals(fName)) {
+ String old = fName;
+ fName = name;
+ firePropertyChange(this, IBasicPropertyConstants.P_TEXT, old, name);
+ }
+ }
@Override
public ImageDescriptor getImageDescriptor() {
@@ -238,7 +238,7 @@ public abstract class AbstractConsole implements IConsole {
* @since 3.1
*/
public final void initialize() {
- init();
+ init();
}
/**
@@ -261,7 +261,7 @@ public abstract class AbstractConsole implements IConsole {
* @since 3.1
*/
public final void destroy() {
- dispose();
+ dispose();
}
/**
@@ -281,38 +281,38 @@ public abstract class AbstractConsole implements IConsole {
*
* @since 3.1
*/
- public void activate() {
- ConsolePlugin.getDefault().getConsoleManager().showConsoleView(this);
- }
-
- /**
- * Sets this console's type identifier.
- *
- * @param typeIdentifier the type identifier for this console
- * @since 3.1
- */
- protected void setType(String typeIdentifier) {
- fType = typeIdentifier;
- }
-
- /**
- * @since 3.1
- */
- @Override
+ public void activate() {
+ ConsolePlugin.getDefault().getConsoleManager().showConsoleView(this);
+ }
+
+ /**
+ * Sets this console's type identifier.
+ *
+ * @param typeIdentifier the type identifier for this console
+ * @since 3.1
+ */
+ protected void setType(String typeIdentifier) {
+ fType = typeIdentifier;
+ }
+
+ /**
+ * @since 3.1
+ */
+ @Override
public String getType() {
- return fType;
- }
-
- /**
- * Returns the help context identifier for this console, or <code>null</code>
- * if none. When a non-<code>null</code> value is returned the associated help
- * will be installed for this console.
- *
- * @return help context id or <code>null</code>
- * @since 3.2
- */
- public String getHelpContextId() {
- return null;
- }
+ return fType;
+ }
+
+ /**
+ * Returns the help context identifier for this console, or <code>null</code>
+ * if none. When a non-<code>null</code> value is returned the associated help
+ * will be installed for this console.
+ *
+ * @return help context id or <code>null</code>
+ * @since 3.2
+ */
+ public String getHelpContextId() {
+ return null;
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java
index 67be06052..19d005da4 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java
@@ -142,43 +142,43 @@ public class ConsolePlugin extends AbstractUIPlugin {
ErrorDialog.openError(shell, title, message, status);
}
- /**
- * Returns the <code>Image</code> identified by the given key,
- * or <code>null</code> if it does not exist.
- *
- * @return the <code>Image</code> identified by the given key,
- * or <code>null</code> if it does not exist
- * @since 3.1
- */
- public static Image getImage(String key) {
- return ConsolePluginImages.getImage(key);
- }
-
- /**
- * Returns the <code>ImageDescriptor</code> identified by the given key,
- * or <code>null</code> if it does not exist.
- *
- * @return the <code>ImageDescriptor</code> identified by the given key,
- * or <code>null</code> if it does not exist
- * @since 3.1
- */
- public static ImageDescriptor getImageDescriptor(String key) {
- return ConsolePluginImages.getImageDescriptor(key);
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
+ /**
+ * Returns the <code>Image</code> identified by the given key,
+ * or <code>null</code> if it does not exist.
+ *
+ * @return the <code>Image</code> identified by the given key,
+ * or <code>null</code> if it does not exist
+ * @since 3.1
+ */
+ public static Image getImage(String key) {
+ return ConsolePluginImages.getImage(key);
+ }
+
+ /**
+ * Returns the <code>ImageDescriptor</code> identified by the given key,
+ * or <code>null</code> if it does not exist.
+ *
+ * @return the <code>ImageDescriptor</code> identified by the given key,
+ * or <code>null</code> if it does not exist
+ * @since 3.1
+ */
+ public static ImageDescriptor getImageDescriptor(String key) {
+ return ConsolePluginImages.getImageDescriptor(key);
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
@Override
public void stop(BundleContext context) throws Exception {
- if (fConsoleManager != null) {
- IConsole[] consoles = fConsoleManager.getConsoles();
- if (consoles != null) {
- fConsoleManager.removeConsoles(consoles);
- }
- }
- super.stop(context);
- }
+ if (fConsoleManager != null) {
+ IConsole[] consoles = fConsoleManager.getConsoles();
+ if (consoles != null) {
+ fConsoleManager.removeConsoles(consoles);
+ }
+ }
+ super.stop(context);
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsole.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsole.java
index 7b935820d..85b0f30b7 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsole.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsole.java
@@ -31,32 +31,32 @@ import org.eclipse.ui.part.IPageBookViewPage;
* @since 3.0
*/
public interface IConsole {
-
+
/**
* Returns the name of this console.
- *
+ *
* @return the name of this console
*/
public String getName();
-
+
/**
* Returns an image descriptor for this console, or <code>null</code>
* if none.
- *
+ *
* @return an image descriptor for this console, or <code>null</code>
* if none
*/
public ImageDescriptor getImageDescriptor();
-
+
/**
* Creates and returns a new page for this console. The page is displayed
* for this console in the console given view.
- *
+ *
* @param view the view in which the page is to be created
* @return a page book view page representation of this console
*/
public IPageBookViewPage createPage(IConsoleView view);
-
+
/**
* Adds a listener for changes to properties of this console.
* Has no effect if an identical listener is already registered.
@@ -76,19 +76,19 @@ public interface IConsole {
* @param listener a property change listener
*/
public void addPropertyChangeListener(IPropertyChangeListener listener);
-
+
/**
* Removes the given property listener from this console page.
* Has no effect if an identical listener is not already registered.
- *
+ *
* @param listener a property listener
*/
- public void removePropertyChangeListener(IPropertyChangeListener listener);
-
+ public void removePropertyChangeListener(IPropertyChangeListener listener);
+
/**
* Returns a unique identifier for this console's type, or <code>null</code>
* if unspecified.
- *
+ *
* @return a unique identifier for this console's type, or <code>null</code>
* @since 3.1
*/
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleConstants.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleConstants.java
index dbf506f10..27e8b0969 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleConstants.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleConstants.java
@@ -34,7 +34,7 @@ public interface IConsoleConstants {
* Type identifier for MessageConsole
* @since 3.1
*/
- public static final String MESSAGE_CONSOLE_TYPE = "org.eclipse.ui.MessageConsole"; //$NON-NLS-1$
+ public static final String MESSAGE_CONSOLE_TYPE = "org.eclipse.ui.MessageConsole"; //$NON-NLS-1$
/**
* The name of the font to use for the Console (value <code>"org.eclipse.ui.console.ConsoleFont"</code>).
@@ -79,23 +79,23 @@ public interface IConsoleConstants {
*
* @since 3.1
*/
- public static final String EXTENSION_POINT_CONSOLE_PATTERN_MATCH_LISTENERS = "consolePatternMatchListeners"; //$NON-NLS-1$
+ public static final String EXTENSION_POINT_CONSOLE_PATTERN_MATCH_LISTENERS = "consolePatternMatchListeners"; //$NON-NLS-1$
- /**
- * Console page participants extension point identifier
- * (value <code>"consolePageParticipants"</code>).
- *
- * @since 3.1
- */
- public static final String EXTENSION_POINT_CONSOLE_PAGE_PARTICIPANTS = "consolePageParticipants"; //$NON-NLS-1$
+ /**
+ * Console page participants extension point identifier
+ * (value <code>"consolePageParticipants"</code>).
+ *
+ * @since 3.1
+ */
+ public static final String EXTENSION_POINT_CONSOLE_PAGE_PARTICIPANTS = "consolePageParticipants"; //$NON-NLS-1$
- /**
- * Console factories extension point identifier
- * (value <code>"consoleFactories"</code>).
- *
- * @since 3.1
- */
- public static final String EXTENSION_POINT_CONSOLE_FACTORIES = "consoleFactories"; //$NON-NLS-1$
+ /**
+ * Console factories extension point identifier
+ * (value <code>"consoleFactories"</code>).
+ *
+ * @since 3.1
+ */
+ public static final String EXTENSION_POINT_CONSOLE_FACTORIES = "consoleFactories"; //$NON-NLS-1$
/**
* Property constant indicating a console's font has changed.
@@ -147,11 +147,11 @@ public interface IConsoleConstants {
*/
public static final String P_BACKGROUND_COLOR = ConsolePlugin.getUniqueIdentifier() + ".P_BACKGROUND_COLOR"; //$NON-NLS-1$
- /**
- * The default tab size for text consoles.
- *
- * @since 3.1
- */
- public static final int DEFAULT_TAB_SIZE = 8;
+ /**
+ * The default tab size for text consoles.
+ *
+ * @since 3.1
+ */
+ public static final int DEFAULT_TAB_SIZE = 8;
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleDocumentPartitioner.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleDocumentPartitioner.java
index 0da81fe60..25146aea8 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleDocumentPartitioner.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleDocumentPartitioner.java
@@ -27,25 +27,25 @@ import org.eclipse.swt.custom.StyleRange;
* @since 3.1
*/
public interface IConsoleDocumentPartitioner extends IDocumentPartitioner {
-
- /**
- * Returns whether this partitioner's document is read-only at the specified
- * offset. The user is not allowed to type in read-only locations.
- *
- * @param offset document offset
- * @return whether this partitioner's document is read-only at the specified
- * offset
- */
- public boolean isReadOnly(int offset);
-
- /**
- * Returns style ranges for the specified region of this partitioner's document
- * to use when rendering, or <code>null</code> if none.
- *
- * @param offset beginning offset for which style ranges are requested
- * @param length the length of text for which style ranges are requested
- * @return style ranges for the specified region of this partitioner's document
- * to use when rendering, or <code>null</code> if none
- */
- public StyleRange[] getStyleRanges(int offset, int length);
+
+ /**
+ * Returns whether this partitioner's document is read-only at the specified
+ * offset. The user is not allowed to type in read-only locations.
+ *
+ * @param offset document offset
+ * @return whether this partitioner's document is read-only at the specified
+ * offset
+ */
+ public boolean isReadOnly(int offset);
+
+ /**
+ * Returns style ranges for the specified region of this partitioner's document
+ * to use when rendering, or <code>null</code> if none.
+ *
+ * @param offset beginning offset for which style ranges are requested
+ * @param length the length of text for which style ranges are requested
+ * @return style ranges for the specified region of this partitioner's document
+ * to use when rendering, or <code>null</code> if none
+ */
+ public StyleRange[] getStyleRanges(int offset, int length);
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleFactory.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleFactory.java
index 4e27fede6..b32d5f19c 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleFactory.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleFactory.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -30,7 +30,7 @@ package org.eclipse.ui.console;
* An action appears in the console view's 'Open Console' drop-down menu with the
* corresponding <code>label</code> and optional <code>icon</code>. When the action
* is invoked, the specified <code>class</code> is instantiated and called to
- * open a console, via the method <code>openConsole()</code>.
+ * open a console, via the method <code>openConsole()</code>.
* </p>
* <p>
* Clients providing console factory extensions are intended to implement
@@ -39,10 +39,10 @@ package org.eclipse.ui.console;
* @since 3.1
*/
public interface IConsoleFactory {
- /**
- * Opens a console in the console view. Implementations may create a new
- * console or activate an existing console.
- */
- public void openConsole();
+ /**
+ * Opens a console in the console view. Implementations may create a new
+ * console or activate an existing console.
+ */
+ public void openConsole();
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleListener.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleListener.java
index 41aedb236..d75dc77ef 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleListener.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleListener.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -19,19 +19,19 @@ package org.eclipse.ui.console;
* @since 3.0
*/
public interface IConsoleListener {
-
+
/**
* Notification the given consoles have been added to the console
* manager.
- *
+ *
* @param consoles added consoles
*/
public void consolesAdded(IConsole[] consoles);
-
+
/**
* Notification the given consoles have been removed from the
* console manager.
- *
+ *
* @param consoles removed consoles
*/
public void consolesRemoved(IConsole[] consoles);
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleManager.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleManager.java
index 14ac3b8ec..e203d2f94 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleManager.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleManager.java
@@ -12,24 +12,24 @@ package org.eclipse.ui.console;
/**
* The console manager manages registered consoles.
- * @since 3.0
+ * @since 3.0
* @noimplement This interface is not intended to be implemented by clients.
* @noextend This interface is not intended to be extended by clients.
*/
public interface IConsoleManager {
-
+
/**
* Registers the given listener for console notifications. Has
* no effect if an identical listener is already registered.
- *
+ *
* @param listener listener to register
*/
public void addConsoleListener(IConsoleListener listener);
-
+
/**
* Unregisters the given listener for console notifications. Has
* no effect if an identical listener is not already registered.
- *
+ *
* @param listener listener to unregister
*/
public void removeConsoleListener(IConsoleListener listener);
@@ -38,70 +38,70 @@ public interface IConsoleManager {
* Adds the given consoles to the console manager. Has no effect for
* equivalent consoles already registered. The consoles will be added
* to any existing console views.
- *
+ *
* @param consoles consoles to add
*/
public void addConsoles(IConsole[] consoles);
-
+
/**
* Removes the given consoles from the console manager. If the consoles are
* being displayed in any console views, the associated pages will be removed
* and disposed.
- *
+ *
* @param consoles consoles to remove
*/
public void removeConsoles(IConsole[] consoles);
-
+
/**
* Returns a collection of consoles registered with the console manager.
- *
+ *
* @return a collection of consoles registered with the console manager
*/
public IConsole[] getConsoles();
-
+
/**
* Opens the console view and displays given the console.
* If the view is already open, it is brought to the front unless
* the view is pinned on a console other than the given console.
* Has no effect if the given console is not currently registered.
- *
+ *
* @param console console to display
*/
public void showConsoleView(IConsole console);
-
+
/**
* Warns that the content of the given console has changed in
* all console views. Has no effect if the given console is not
* currently registered.
- *
+ *
* @param console the console that has changed
*/
public void warnOfContentChange(IConsole console);
-
+
/**
* Creates and returns a collection of new pattern match listeners enabled for
* the given console. The pattern match listeners are new instances, intended
* to be used in a new console. No methods on the participants have been
* called. Clients are responsible for connecting to and disconnecting from
* the pattern match listeners.
- * <p>
- * Console pattern match listeners are contributed via the
- * <code>org.eclipse.ui.console.consolePatternMatchListeners</code> extension point.
- * </p>
- *
+ * <p>
+ * Console pattern match listeners are contributed via the
+ * <code>org.eclipse.ui.console.consolePatternMatchListeners</code> extension point.
+ * </p>
+ *
* @param console the console for which pattern match listeners are requested
* @return a collection of new pattern match listeners
- * @see IPatternMatchListener
+ * @see IPatternMatchListener
* @since 3.1
*/
public IPatternMatchListener[] createPatternMatchListeners(IConsole console);
-
- /**
- * Requests a redraw of any visible console page containing the specified console.
- *
- * @param console the console to be refreshed
- * @since 3.1
- */
- public void refresh(IConsole console);
-
+
+ /**
+ * Requests a redraw of any visible console page containing the specified console.
+ *
+ * @param console the console to be refreshed
+ * @since 3.1
+ */
+ public void refresh(IConsole console);
+
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsolePageParticipant.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsolePageParticipant.java
index a2e751438..a48fc0380 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsolePageParticipant.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsolePageParticipant.java
@@ -20,7 +20,7 @@ import org.eclipse.ui.part.IPageBookViewPage;
* <code>org.eclispe.ui.console.consolePageParticipants</code> extension point.
* <p>
* Participant behavior is implementation dependent. For example, a page participant
- * could add actions to a console's toolbar by accessing a its page's action bars.
+ * could add actions to a console's toolbar by accessing a its page's action bars.
* </p>
* <p>
* Following is an example extension definition.
@@ -37,35 +37,35 @@ import org.eclipse.ui.part.IPageBookViewPage;
* <code>enablement</code> attribute may be specified to control which consoles
* a page participant is applicable to.
* <p>
- * Clients contributing console page participant extensions are intended to
+ * Clients contributing console page participant extensions are intended to
* implement this interface.
* </p>
* @since 3.1
*/
public interface IConsolePageParticipant extends IAdaptable {
- /**
- * Called during page initialization. Marks the start of this
- * page participant's lifecycle.
- *
- * @param page the page corresponding to the given console
- * @param console the console for which a page has been created
- */
- public void init(IPageBookViewPage page, IConsole console);
-
- /**
- * Disposes this page participant. Marks the end of this
- * page participant's lifecycle.
- */
- public void dispose();
-
- /**
- * Notification this participant's page has been activated.
- */
- public void activated();
-
- /**
- * Notification this participant's page has been deactivated.
- */
- public void deactivated();
-
+ /**
+ * Called during page initialization. Marks the start of this
+ * page participant's lifecycle.
+ *
+ * @param page the page corresponding to the given console
+ * @param console the console for which a page has been created
+ */
+ public void init(IPageBookViewPage page, IConsole console);
+
+ /**
+ * Disposes this page participant. Marks the end of this
+ * page participant's lifecycle.
+ */
+ public void dispose();
+
+ /**
+ * Notification this participant's page has been activated.
+ */
+ public void activated();
+
+ /**
+ * Notification this participant's page has been deactivated.
+ */
+ public void deactivated();
+
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleView.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleView.java
index 17628858d..596db8c7d 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleView.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IConsoleView.java
@@ -31,23 +31,23 @@ public interface IConsoleView extends IViewPart, IScrollLockStateProvider {
/**
* Pins this console view. No other console page will be displayed until
- * this console view is un-pinned.
+ * this console view is un-pinned.
*
* @param pin <code>true</code> to pin the current console to the
- * top of the stack, <code>false</code> otherwise
- * @since 3.1
+ * top of the stack, <code>false</code> otherwise
+ * @since 3.1
*/
public void setPinned(boolean pin);
- /**
- * Displays and pins the given console in this console view. No
- * other console can be displayed until this console view is
- * un-pinned. Specifying <code>null</code> un-pins this console
- *
- * @param console console to pin, or <code>null</code> to un-pin
- * @deprecated rather than pinning a specific console, a console view is
- * pinned - use <code>setPinned(boolean)</code>
- */
+ /**
+ * Displays and pins the given console in this console view. No
+ * other console can be displayed until this console view is
+ * un-pinned. Specifying <code>null</code> un-pins this console
+ *
+ * @param console console to pin, or <code>null</code> to un-pin
+ * @deprecated rather than pinning a specific console, a console view is
+ * pinned - use <code>setPinned(boolean)</code>
+ */
@Deprecated
public void pin(IConsole console);
@@ -76,22 +76,22 @@ public interface IConsoleView extends IViewPart, IScrollLockStateProvider {
*/
public void warnOfContentChange(IConsole console);
- /**
- * Sets the scroll lock state of the currently active console.
- *
- * @param scrollLock <code>true</code> to turn scroll lock on, otherwise <code>false</code>
- * @since 3.1
- */
- @Override
+ /**
+ * Sets the scroll lock state of the currently active console.
+ *
+ * @param scrollLock <code>true</code> to turn scroll lock on, otherwise <code>false</code>
+ * @since 3.1
+ */
+ @Override
public void setScrollLock(boolean scrollLock);
- /**
- * Returns the scroll lock state of the currently active console.
- *
- * @return <code>true</code> if scroll lock is on, <code>false</code> otherwise
- * @since 3.1
- */
- @Override
+ /**
+ * Returns the scroll lock state of the currently active console.
+ *
+ * @return <code>true</code> if scroll lock is on, <code>false</code> otherwise
+ * @since 3.1
+ */
+ @Override
public boolean getScrollLock();
/**
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IHyperlink.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IHyperlink.java
index 38aa4994c..70c49b5cf 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IHyperlink.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IHyperlink.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -18,17 +18,17 @@ package org.eclipse.ui.console;
* @since 3.1
*/
public interface IHyperlink {
-
+
/**
* Notification that the mouse has entered this link's region.
*/
public void linkEntered();
-
+
/**
* Notification that the mouse has exited this link's region
*/
public void linkExited();
-
+
/**
* Notification that this link has been activated. Performs
* context specific linking.
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IHyperlink2.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IHyperlink2.java
index 3895f1583..b3999fb10 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IHyperlink2.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IHyperlink2.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -22,11 +22,11 @@ import org.eclipse.swt.widgets.Event;
* @since 3.2
*/
public interface IHyperlink2 extends IHyperlink {
-
+
/**
* Notification that this link has been activated. Performs
* context specific linking.
- *
+ *
* @param event the SWT event which triggered this hyperlink
*/
public void linkActivated(Event event);
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsole.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsole.java
index 44cbfc4d7..b07d283b6 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsole.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsole.java
@@ -39,58 +39,58 @@ public class IOConsole extends TextConsole {
/**
* The document partitioner
*/
- private IOConsolePartitioner partitioner;
+ private IOConsolePartitioner partitioner;
- /**
- * The stream from which user input may be read
- */
+ /**
+ * The stream from which user input may be read
+ */
private InputStream inputStream;
- /**
- * A collection of open streams connected to this console.
- */
+ /**
+ * A collection of open streams connected to this console.
+ */
private List<Closeable> openStreams = Collections.synchronizedList(new ArrayList<Closeable>());
- /**
- * The encoding used to for displaying console output.
- */
+ /**
+ * The encoding used to for displaying console output.
+ */
private Charset charset;
- /**
- * Constructs a console with the given name, type, image, and lifecycle, with the
- * workbench's default encoding.
- *
- * @param name name to display for this console
- * @param consoleType console type identifier or <code>null</code>
- * @param imageDescriptor image to display for this console or <code>null</code>
- * @param autoLifecycle whether lifecycle methods should be called automatically
- * when this console is added/removed from the console manager
- */
- public IOConsole(String name, String consoleType, ImageDescriptor imageDescriptor, boolean autoLifecycle) {
+ /**
+ * Constructs a console with the given name, type, image, and lifecycle, with the
+ * workbench's default encoding.
+ *
+ * @param name name to display for this console
+ * @param consoleType console type identifier or <code>null</code>
+ * @param imageDescriptor image to display for this console or <code>null</code>
+ * @param autoLifecycle whether lifecycle methods should be called automatically
+ * when this console is added/removed from the console manager
+ */
+ public IOConsole(String name, String consoleType, ImageDescriptor imageDescriptor, boolean autoLifecycle) {
this(name, consoleType, imageDescriptor, (String)null, autoLifecycle);
- }
+ }
- /**
- * Constructs a console with the given name, type, image, encoding and lifecycle.
- *
- * @param name name to display for this console
- * @param consoleType console type identifier or <code>null</code>
- * @param imageDescriptor image to display for this console or <code>null</code>
- * @param encoding the encoding that should be used to render the text, or <code>null</code>
- * if the system default encoding should be used
- * @param autoLifecycle whether lifecycle methods should be called automatically
- * when this console is added/removed from the console manager
- */
- public IOConsole(String name, String consoleType, ImageDescriptor imageDescriptor, String encoding, boolean autoLifecycle) {
+ /**
+ * Constructs a console with the given name, type, image, encoding and lifecycle.
+ *
+ * @param name name to display for this console
+ * @param consoleType console type identifier or <code>null</code>
+ * @param imageDescriptor image to display for this console or <code>null</code>
+ * @param encoding the encoding that should be used to render the text, or <code>null</code>
+ * if the system default encoding should be used
+ * @param autoLifecycle whether lifecycle methods should be called automatically
+ * when this console is added/removed from the console manager
+ */
+ public IOConsole(String name, String consoleType, ImageDescriptor imageDescriptor, String encoding, boolean autoLifecycle) {
this(name, consoleType, imageDescriptor,
encoding == null
- ? Charset.forName(WorkbenchEncoding.getWorkbenchDefaultEncoding())
+ ? Charset.forName(WorkbenchEncoding.getWorkbenchDefaultEncoding())
: Charset.forName(encoding),
- autoLifecycle);
- }
+ autoLifecycle);
+ }
- /**
+ /**
* Constructs a console with the given name, type, image, encoding and
* lifecycle.
*
@@ -106,83 +106,83 @@ public class IOConsole extends TextConsole {
* @since 3.7
*/
public IOConsole(String name, String consoleType, ImageDescriptor imageDescriptor, Charset charset, boolean autoLifecycle) {
- super(name, consoleType, imageDescriptor, autoLifecycle);
+ super(name, consoleType, imageDescriptor, autoLifecycle);
this.charset = charset;
- synchronized (openStreams) {
+ synchronized (openStreams) {
inputStream = new IOConsoleInputStream(this);
- openStreams.add(inputStream);
+ openStreams.add(inputStream);
}
if (inputStream instanceof IOConsoleInputStream) {
partitioner = new IOConsolePartitioner((IOConsoleInputStream) inputStream, this);
partitioner.connect(getDocument());
}
- }
+ }
- /**
- * Constructs a console with the given name, type, and image with the workbench's
- * default encoding. Lifecycle methods will be called when this console is
- * added/removed from the console manager.
- *
- * @param name name to display for this console
- * @param consoleType console type identifier or <code>null</code>
- * @param imageDescriptor image to display for this console or <code>null</code>
- */
- public IOConsole(String name, String consoleType, ImageDescriptor imageDescriptor) {
- this(name, consoleType, imageDescriptor, true);
- }
+ /**
+ * Constructs a console with the given name, type, and image with the workbench's
+ * default encoding. Lifecycle methods will be called when this console is
+ * added/removed from the console manager.
+ *
+ * @param name name to display for this console
+ * @param consoleType console type identifier or <code>null</code>
+ * @param imageDescriptor image to display for this console or <code>null</code>
+ */
+ public IOConsole(String name, String consoleType, ImageDescriptor imageDescriptor) {
+ this(name, consoleType, imageDescriptor, true);
+ }
- /**
- * Constructs a console with the given name and image. Lifecycle methods
- * will be called when this console is added/removed from the console manager.
- * This console will have an unspecified (<code>null</code>) type.
- *
- * @param name name to display for this console
- * @param imageDescriptor image to display for this console or <code>null</code>
- */
- public IOConsole(String name, ImageDescriptor imageDescriptor) {
- this(name, null, imageDescriptor);
- }
+ /**
+ * Constructs a console with the given name and image. Lifecycle methods
+ * will be called when this console is added/removed from the console manager.
+ * This console will have an unspecified (<code>null</code>) type.
+ *
+ * @param name name to display for this console
+ * @param imageDescriptor image to display for this console or <code>null</code>
+ */
+ public IOConsole(String name, ImageDescriptor imageDescriptor) {
+ this(name, null, imageDescriptor);
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.IConsole#createPage(org.eclipse.ui.console.IConsoleView)
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IConsole#createPage(org.eclipse.ui.console.IConsoleView)
+ */
+ @Override
public IPageBookViewPage createPage(IConsoleView view) {
- return new IOConsolePage(this, view);
- }
+ return new IOConsolePage(this, view);
+ }
- /**
- * Creates and returns a new output stream which may be used to write to this console.
- * A console may be connected to more than one output stream at once. Clients are
- * responsible for closing any output streams created on this console.
- * <p>
- * Clients should avoid writing large amounts of output to this stream in the UI
- * thread. The console needs to process the output in the UI thread and if the client
- * hogs the UI thread writing output to the console, the console will not be able
- * to process the output.
- * </p>
- * @return a new output stream connected to this console
- */
- public IOConsoleOutputStream newOutputStream() {
+ /**
+ * Creates and returns a new output stream which may be used to write to this console.
+ * A console may be connected to more than one output stream at once. Clients are
+ * responsible for closing any output streams created on this console.
+ * <p>
+ * Clients should avoid writing large amounts of output to this stream in the UI
+ * thread. The console needs to process the output in the UI thread and if the client
+ * hogs the UI thread writing output to the console, the console will not be able
+ * to process the output.
+ * </p>
+ * @return a new output stream connected to this console
+ */
+ public IOConsoleOutputStream newOutputStream() {
IOConsoleOutputStream outputStream = new IOConsoleOutputStream(this, this.charset);
- synchronized(openStreams) {
- openStreams.add(outputStream);
- }
- return outputStream;
- }
+ synchronized(openStreams) {
+ openStreams.add(outputStream);
+ }
+ return outputStream;
+ }
- /**
- * Returns the input stream connected to the keyboard.
- *
- * @return the input stream connected to the keyboard.
- */
- public IOConsoleInputStream getInputStream() {
+ /**
+ * Returns the input stream connected to the keyboard.
+ *
+ * @return the input stream connected to the keyboard.
+ */
+ public IOConsoleInputStream getInputStream() {
if (inputStream instanceof IOConsoleInputStream) {
return (IOConsoleInputStream) inputStream;
}
return null;
- }
+ }
/**
* Sets the new input stream.
@@ -194,15 +194,15 @@ public class IOConsole extends TextConsole {
this.inputStream = inputStream;
}
- /**
- * Returns this console's document partitioner.
- *
- * @return this console's document partitioner
- */
- @Override
+ /**
+ * Returns this console's document partitioner.
+ *
+ * @return this console's document partitioner
+ */
+ @Override
protected IConsoleDocumentPartitioner getPartitioner() {
- return partitioner;
- }
+ return partitioner;
+ }
/**
* Returns the maximum number of characters that the console will display at
@@ -212,7 +212,7 @@ public class IOConsole extends TextConsole {
* @return the maximum number of characters that the console will display
*/
public int getHighWaterMark() {
- return partitioner.getHighWaterMark();
+ return partitioner.getHighWaterMark();
}
/**
@@ -239,68 +239,68 @@ public class IOConsole extends TextConsole {
* @exception IllegalArgumentException if low >= high & low != -1
*/
public void setWaterMarks(int low, int high) {
- if (low >= 0) {
- if (low >= high) {
- throw new IllegalArgumentException("High water mark must be greater than low water mark"); //$NON-NLS-1$
- }
- }
+ if (low >= 0) {
+ if (low >= high) {
+ throw new IllegalArgumentException("High water mark must be greater than low water mark"); //$NON-NLS-1$
+ }
+ }
partitioner.setWaterMarks(low, high);
}
- /**
- * Check if all streams connected to this console are closed. If so,
- * notify the partitioner that this console is finished.
- */
- private void checkFinished() {
+ /**
+ * Check if all streams connected to this console are closed. If so,
+ * notify the partitioner that this console is finished.
+ */
+ private void checkFinished() {
if (openStreams.isEmpty()) {
partitioner.streamsClosed();
}
- }
+ }
- /**
- * Notification that an output stream connected to this console has been closed.
- *
- * @param stream stream that closed
- */
- void streamClosed(IOConsoleOutputStream stream) {
- synchronized (openStreams) {
- openStreams.remove(stream);
- checkFinished();
+ /**
+ * Notification that an output stream connected to this console has been closed.
+ *
+ * @param stream stream that closed
+ */
+ void streamClosed(IOConsoleOutputStream stream) {
+ synchronized (openStreams) {
+ openStreams.remove(stream);
+ checkFinished();
}
- }
+ }
- /**
- * Notification that the input stream connected to this console has been closed.
- *
- * @param stream stream that closed
- */
- void streamClosed(IOConsoleInputStream stream) {
- synchronized (openStreams) {
- openStreams.remove(stream);
- checkFinished();
+ /**
+ * Notification that the input stream connected to this console has been closed.
+ *
+ * @param stream stream that closed
+ */
+ void streamClosed(IOConsoleInputStream stream) {
+ synchronized (openStreams) {
+ openStreams.remove(stream);
+ checkFinished();
}
- }
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.TextConsole#clearConsole()
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.TextConsole#clearConsole()
+ */
+ @Override
public void clearConsole() {
- if (partitioner != null) {
- partitioner.clearBuffer();
- }
- }
+ if (partitioner != null) {
+ partitioner.clearBuffer();
+ }
+ }
- /**
- * Disposes this console.
- */
+ /**
+ * Disposes this console.
+ */
@Override
protected void dispose() {
- super.dispose();
- partitioner.disconnect();
- //make a copy of the open streams and close them all
- //a copy is needed as close the streams results in a callback that
- //removes the streams from the openStreams collection (bug 152794)
+ super.dispose();
+ partitioner.disconnect();
+ //make a copy of the open streams and close them all
+ //a copy is needed as close the streams results in a callback that
+ //removes the streams from the openStreams collection (bug 152794)
List<Closeable> list = new ArrayList<Closeable>(openStreams);
for (Closeable closable : list) {
try {
@@ -309,17 +309,17 @@ public class IOConsole extends TextConsole {
// e.printStackTrace();
}
}
- inputStream = null;
- }
+ inputStream = null;
+ }
- /**
- * Returns the encoding for this console, or <code>null</code> to indicate
- * default encoding.
- *
- * @return the encoding set for this console, or <code>null</code> to indicate
- * default encoding
- * @since 3.3
- */
+ /**
+ * Returns the encoding for this console, or <code>null</code> to indicate
+ * default encoding.
+ *
+ * @return the encoding set for this console, or <code>null</code> to indicate
+ * default encoding
+ * @since 3.3
+ */
public String getEncoding() {
return this.charset.name();
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleInputStream.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleInputStream.java
index 74e32f2c1..15a219b4d 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleInputStream.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleInputStream.java
@@ -28,141 +28,141 @@ import org.eclipse.swt.graphics.Color;
*
*/
public class IOConsoleInputStream extends InputStream {
- /**
- * Buffer to hold data from console until it is read.
- */
- private byte[] input = new byte[100];
+ /**
+ * Buffer to hold data from console until it is read.
+ */
+ private byte[] input = new byte[100];
- /**
- * Location in the buffer that the next byte of data from the
- * console should be stored.
- */
- private int inPointer = 0;
+ /**
+ * Location in the buffer that the next byte of data from the
+ * console should be stored.
+ */
+ private int inPointer = 0;
- /**
- * Location in the buffer that the next byte of data read from
- * this stream should come from.
- */
- private int outPointer = 0;
+ /**
+ * Location in the buffer that the next byte of data read from
+ * this stream should come from.
+ */
+ private int outPointer = 0;
- /**
- * The number of bytes of real data currently in the buffer.
- */
- private int size = 0;
+ /**
+ * The number of bytes of real data currently in the buffer.
+ */
+ private int size = 0;
- /**
- * Flag to indicate that EOF has been sent already.
- */
- private boolean eofSent = false;
+ /**
+ * Flag to indicate that EOF has been sent already.
+ */
+ private boolean eofSent = false;
- /**
- * Flag to indicate that the stream has been closed.
- */
- private boolean closed = false;
+ /**
+ * Flag to indicate that the stream has been closed.
+ */
+ private boolean closed = false;
- /**
- * The console that this stream is connected to.
- */
- private IOConsole console;
+ /**
+ * The console that this stream is connected to.
+ */
+ private IOConsole console;
- /**
- * The color used to display input in the console.
- */
- private Color color;
+ /**
+ * The color used to display input in the console.
+ */
+ private Color color;
- /**
- * The font style used to decorate input in the console.
- */
- private int fontStyle = SWT.NORMAL;
+ /**
+ * The font style used to decorate input in the console.
+ */
+ private int fontStyle = SWT.NORMAL;
- /**
- * Constructs a new input stream on the given console.
- *
- * @param console I/O console
- */
- IOConsoleInputStream(IOConsole console) {
- this.console = console;
- }
+ /**
+ * Constructs a new input stream on the given console.
+ *
+ * @param console I/O console
+ */
+ IOConsoleInputStream(IOConsole console) {
+ this.console = console;
+ }
- /*
- * (non-Javadoc)
- * @see java.io.InputStream#read(byte[], int, int)
- */
- @Override
+ /*
+ * (non-Javadoc)
+ * @see java.io.InputStream#read(byte[], int, int)
+ */
+ @Override
public synchronized int read(byte[] b, int off, int len) throws IOException {
- waitForData();
- if (available() == -1) {
- return -1;
- }
+ waitForData();
+ if (available() == -1) {
+ return -1;
+ }
- int toCopy = Math.min(len, size);
- if(input.length-outPointer > toCopy) {
- System.arraycopy(input, outPointer, b, off, toCopy);
- outPointer += toCopy;
- size -= toCopy;
- } else {
- int bytesToEnd = input.length-outPointer;
- System.arraycopy(input, outPointer, b, off, bytesToEnd);
- System.arraycopy(input, 0, b, off+bytesToEnd, toCopy-bytesToEnd);
- outPointer = toCopy-bytesToEnd;
- size -=toCopy;
- }
- return toCopy;
- }
+ int toCopy = Math.min(len, size);
+ if(input.length-outPointer > toCopy) {
+ System.arraycopy(input, outPointer, b, off, toCopy);
+ outPointer += toCopy;
+ size -= toCopy;
+ } else {
+ int bytesToEnd = input.length-outPointer;
+ System.arraycopy(input, outPointer, b, off, bytesToEnd);
+ System.arraycopy(input, 0, b, off+bytesToEnd, toCopy-bytesToEnd);
+ outPointer = toCopy-bytesToEnd;
+ size -=toCopy;
+ }
+ return toCopy;
+ }
- /*
- * (non-Javadoc)
- * @see java.io.InputStream#read(byte[])
- */
- @Override
+ /*
+ * (non-Javadoc)
+ * @see java.io.InputStream#read(byte[])
+ */
+ @Override
public int read(byte[] b) throws IOException {
- return read(b, 0, b.length);
- }
+ return read(b, 0, b.length);
+ }
- /*
- * (non-Javadoc)
- * @see java.io.InputStream#read()
- */
- @Override
+ /*
+ * (non-Javadoc)
+ * @see java.io.InputStream#read()
+ */
+ @Override
public synchronized int read() throws IOException {
- waitForData();
- if (available() == -1) {
- return -1;
- }
+ waitForData();
+ if (available() == -1) {
+ return -1;
+ }
- byte b = input[outPointer];
- outPointer++;
- if (outPointer == input.length) {
- outPointer = 0;
- }
- size -= 1;
- return b;
- }
+ byte b = input[outPointer];
+ outPointer++;
+ if (outPointer == input.length) {
+ outPointer = 0;
+ }
+ size -= 1;
+ return b;
+ }
- /**
- * Blocks until data is available to be read.
- * Ensure that the monitor for this object is obtained before
- * calling this method.
- */
- private void waitForData() {
- while (size == 0 && !closed) {
- try {
- wait();
- } catch (InterruptedException e) {
- }
- }
- }
+ /**
+ * Blocks until data is available to be read.
+ * Ensure that the monitor for this object is obtained before
+ * calling this method.
+ */
+ private void waitForData() {
+ while (size == 0 && !closed) {
+ try {
+ wait();
+ } catch (InterruptedException e) {
+ }
+ }
+ }
- /**
- * Appends text to this input stream's buffer.
- *
- * @param text the text to append to the buffer.
- */
- public synchronized void appendData(String text) {
- String encoding = console.getEncoding();
- byte[] newData;
- if (encoding!=null) {
+ /**
+ * Appends text to this input stream's buffer.
+ *
+ * @param text the text to append to the buffer.
+ */
+ public synchronized void appendData(String text) {
+ String encoding = console.getEncoding();
+ byte[] newData;
+ if (encoding!=null) {
try {
newData = text.getBytes(encoding);
} catch (UnsupportedEncodingException e) {
@@ -172,122 +172,122 @@ public class IOConsoleInputStream extends InputStream {
newData = text.getBytes();
}
- while(input.length-size < newData.length) {
- growArray();
- }
+ while(input.length-size < newData.length) {
+ growArray();
+ }
- if (size == 0) { //inPointer == outPointer
- System.arraycopy(newData, 0, input, 0, newData.length);
- inPointer = newData.length;
- size = newData.length;
- outPointer = 0;
- } else if (inPointer < outPointer || input.length - inPointer > newData.length) {
- System.arraycopy(newData, 0, input, inPointer, newData.length);
- inPointer += newData.length;
- size += newData.length;
- } else {
- System.arraycopy(newData, 0, input, inPointer, input.length-inPointer);
- System.arraycopy(newData, input.length-inPointer, input, 0, newData.length-(input.length-inPointer));
- inPointer = newData.length-(input.length-inPointer);
- size += newData.length;
- }
+ if (size == 0) { //inPointer == outPointer
+ System.arraycopy(newData, 0, input, 0, newData.length);
+ inPointer = newData.length;
+ size = newData.length;
+ outPointer = 0;
+ } else if (inPointer < outPointer || input.length - inPointer > newData.length) {
+ System.arraycopy(newData, 0, input, inPointer, newData.length);
+ inPointer += newData.length;
+ size += newData.length;
+ } else {
+ System.arraycopy(newData, 0, input, inPointer, input.length-inPointer);
+ System.arraycopy(newData, input.length-inPointer, input, 0, newData.length-(input.length-inPointer));
+ inPointer = newData.length-(input.length-inPointer);
+ size += newData.length;
+ }
- if (inPointer == input.length) {
- inPointer = 0;
- }
- notifyAll();
- }
+ if (inPointer == input.length) {
+ inPointer = 0;
+ }
+ notifyAll();
+ }
- /**
- * Enlarges the buffer.
- */
- private void growArray() {
- byte[] newInput = new byte[input.length+1024];
- if (outPointer < inPointer) {
- System.arraycopy(input, outPointer, newInput, 0, size);
- } else {
- System.arraycopy(input, outPointer, newInput, 0, input.length-outPointer);
- System.arraycopy(input, 0, newInput, input.length-outPointer, inPointer);
- }
- outPointer = 0;
- inPointer = size;
- input = newInput;
- newInput = null;
- }
+ /**
+ * Enlarges the buffer.
+ */
+ private void growArray() {
+ byte[] newInput = new byte[input.length+1024];
+ if (outPointer < inPointer) {
+ System.arraycopy(input, outPointer, newInput, 0, size);
+ } else {
+ System.arraycopy(input, outPointer, newInput, 0, input.length-outPointer);
+ System.arraycopy(input, 0, newInput, input.length-outPointer, inPointer);
+ }
+ outPointer = 0;
+ inPointer = size;
+ input = newInput;
+ newInput = null;
+ }
- /**
- * Returns this stream's font style.
- *
- * @return the font style used to decorate input in the associated console
- */
- public int getFontStyle() {
- return fontStyle;
- }
+ /**
+ * Returns this stream's font style.
+ *
+ * @return the font style used to decorate input in the associated console
+ */
+ public int getFontStyle() {
+ return fontStyle;
+ }
- /**
- * Sets this stream's font style.
- *
- * @param newFontStyle the font style to be used to decorate input in the associated console
- */
- public void setFontStyle(int newFontStyle) {
- if (newFontStyle != fontStyle) {
- int old = fontStyle;
- fontStyle = newFontStyle;
- console.firePropertyChange(this, IConsoleConstants.P_FONT_STYLE, Integer.valueOf(old), Integer.valueOf(fontStyle));
- }
- }
+ /**
+ * Sets this stream's font style.
+ *
+ * @param newFontStyle the font style to be used to decorate input in the associated console
+ */
+ public void setFontStyle(int newFontStyle) {
+ if (newFontStyle != fontStyle) {
+ int old = fontStyle;
+ fontStyle = newFontStyle;
+ console.firePropertyChange(this, IConsoleConstants.P_FONT_STYLE, Integer.valueOf(old), Integer.valueOf(fontStyle));
+ }
+ }
- /**
- * Sets the color to used to decorate input in the associated console.
- *
- * @param newColor the color to used to decorate input in the associated console.
- */
- public void setColor(Color newColor) {
- Color old = color;
- if (old == null || !old.equals(newColor)) {
- color = newColor;
- console.firePropertyChange(this, IConsoleConstants.P_STREAM_COLOR, old, newColor);
- }
- }
+ /**
+ * Sets the color to used to decorate input in the associated console.
+ *
+ * @param newColor the color to used to decorate input in the associated console.
+ */
+ public void setColor(Color newColor) {
+ Color old = color;
+ if (old == null || !old.equals(newColor)) {
+ color = newColor;
+ console.firePropertyChange(this, IConsoleConstants.P_STREAM_COLOR, old, newColor);
+ }
+ }
- /**
- * Returns the color used to decorate input in the associated console
- *
- * @return the color used to decorate input in the associated console
- */
- public Color getColor() {
- return color;
- }
+ /**
+ * Returns the color used to decorate input in the associated console
+ *
+ * @return the color used to decorate input in the associated console
+ */
+ public Color getColor() {
+ return color;
+ }
- /* (non-Javadoc)
- * @see java.io.InputStream#available()
- */
+ /* (non-Javadoc)
+ * @see java.io.InputStream#available()
+ */
@Override
public int available() throws IOException {
- if (closed && eofSent) {
- throw new IOException("Input Stream Closed"); //$NON-NLS-1$
- } else if (size == 0) {
- if (!eofSent) {
- eofSent = true;
- return -1;
- }
- throw new IOException("Input Stream Closed"); //$NON-NLS-1$
- }
+ if (closed && eofSent) {
+ throw new IOException("Input Stream Closed"); //$NON-NLS-1$
+ } else if (size == 0) {
+ if (!eofSent) {
+ eofSent = true;
+ return -1;
+ }
+ throw new IOException("Input Stream Closed"); //$NON-NLS-1$
+ }
- return size;
- }
+ return size;
+ }
- /* (non-Javadoc)
- * @see java.io.InputStream#close()
- */
- @Override
+ /* (non-Javadoc)
+ * @see java.io.InputStream#close()
+ */
+ @Override
public synchronized void close() throws IOException {
- if(closed) {
+ if(closed) {
// Closeable#close() has no effect if already closed
return;
- }
- closed = true;
- notifyAll();
- console.streamClosed(this);
- }
+ }
+ closed = true;
+ notifyAll();
+ console.streamClosed(this);
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java
index e2b6b3cc8..7536fb4e9 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java
@@ -37,107 +37,107 @@ import org.eclipse.ui.internal.console.StreamDecoder;
* @noextend This class is not intended to be subclassed by clients.
*/
public class IOConsoleOutputStream extends OutputStream {
- /**
- * Flag indicating whether this stream has been closed.
- */
- private boolean closed = false;
+ /**
+ * Flag indicating whether this stream has been closed.
+ */
+ private boolean closed = false;
- /**
- * The console's document partitioner.
- */
- private IOConsolePartitioner partitioner;
+ /**
+ * The console's document partitioner.
+ */
+ private IOConsolePartitioner partitioner;
- /**
- * The console this stream is attached to.
- */
- private IOConsole console;
+ /**
+ * The console this stream is attached to.
+ */
+ private IOConsole console;
- /**
- * Flag indicating that the console should be activated when data
- * is written to this stream.
- */
- private boolean activateOnWrite = false;
+ /**
+ * Flag indicating that the console should be activated when data
+ * is written to this stream.
+ */
+ private boolean activateOnWrite = false;
- /**
- * The color used to decorate data written to this stream.
- */
- private Color color;
+ /**
+ * The color used to decorate data written to this stream.
+ */
+ private Color color;
- /**
- * The font style used to decorate data written to this stream.
- */
- private int fontStyle;
+ /**
+ * The font style used to decorate data written to this stream.
+ */
+ private int fontStyle;
private StreamDecoder decoder;
- private boolean prependCR;
+ private boolean prependCR;
- /**
- * Constructs a new output stream on the given console.
- *
- * @param console I/O console
- */
+ /**
+ * Constructs a new output stream on the given console.
+ *
+ * @param console I/O console
+ */
IOConsoleOutputStream(IOConsole console, Charset charset) {
this.decoder = new StreamDecoder(charset);
this.console = console;
- this.partitioner = (IOConsolePartitioner) console.getPartitioner();
- }
+ this.partitioner = (IOConsolePartitioner) console.getPartitioner();
+ }
- /**
- * Returns the font style used to decorate data written to this stream.
- *
- * @return the font style used to decorate data written to this stream
- */
- public int getFontStyle() {
- return fontStyle;
- }
+ /**
+ * Returns the font style used to decorate data written to this stream.
+ *
+ * @return the font style used to decorate data written to this stream
+ */
+ public int getFontStyle() {
+ return fontStyle;
+ }
- /**
- * Sets the font style to be used to decorate data written to this stream.
- *
- * @param newFontStyle the font style to be used to decorate data written to this stream
- */
- public void setFontStyle(int newFontStyle) {
- if (newFontStyle != fontStyle) {
- int old = fontStyle;
- fontStyle = newFontStyle;
- console.firePropertyChange(this, IConsoleConstants.P_FONT_STYLE, Integer.valueOf(old), Integer.valueOf(fontStyle));
- }
- }
+ /**
+ * Sets the font style to be used to decorate data written to this stream.
+ *
+ * @param newFontStyle the font style to be used to decorate data written to this stream
+ */
+ public void setFontStyle(int newFontStyle) {
+ if (newFontStyle != fontStyle) {
+ int old = fontStyle;
+ fontStyle = newFontStyle;
+ console.firePropertyChange(this, IConsoleConstants.P_FONT_STYLE, Integer.valueOf(old), Integer.valueOf(fontStyle));
+ }
+ }
- /**
- * Returns whether the console this stream is writing to will be activated when this stream
- * is written to.
- *
- * @return whether the console this stream is writing to will be activated when this stream
- * is written to.
- */
- public boolean isActivateOnWrite() {
- return activateOnWrite;
- }
+ /**
+ * Returns whether the console this stream is writing to will be activated when this stream
+ * is written to.
+ *
+ * @return whether the console this stream is writing to will be activated when this stream
+ * is written to.
+ */
+ public boolean isActivateOnWrite() {
+ return activateOnWrite;
+ }
- /**
- * Sets whether to activate the console this stream is writing to when this stream
- * is written to.
- *
- * @param activateOnWrite whether the console this stream is writing to will be activated when this stream
- * is written to.
- */
- public void setActivateOnWrite(boolean activateOnWrite) {
- this.activateOnWrite = activateOnWrite;
- }
+ /**
+ * Sets whether to activate the console this stream is writing to when this stream
+ * is written to.
+ *
+ * @param activateOnWrite whether the console this stream is writing to will be activated when this stream
+ * is written to.
+ */
+ public void setActivateOnWrite(boolean activateOnWrite) {
+ this.activateOnWrite = activateOnWrite;
+ }
/**
* Sets the color of this stream. Use <code>null</code> to indicate
- * the default color.
+ * the default color.
*
* @param newColor color of this stream, or <code>null</code>
*/
public void setColor(Color newColor) {
Color old = color;
if (old == null || !old.equals(newColor)) {
- color = newColor;
- console.firePropertyChange(this, IConsoleConstants.P_STREAM_COLOR, old, newColor);
+ color = newColor;
+ console.firePropertyChange(this, IConsoleConstants.P_STREAM_COLOR, old, newColor);
}
}
@@ -148,16 +148,16 @@ public class IOConsoleOutputStream extends OutputStream {
* @return the color of this stream, or <code>null</code>
*/
public Color getColor() {
- return color;
+ return color;
}
- /**
- * Returns true if the stream has been closed
- * @return true is the stream has been closed, false otherwise.
- */
- public synchronized boolean isClosed() {
- return closed;
- }
+ /**
+ * Returns true if the stream has been closed
+ * @return true is the stream has been closed, false otherwise.
+ */
+ public synchronized boolean isClosed() {
+ return closed;
+ }
/*
* (non-Javadoc)
@@ -165,41 +165,41 @@ public class IOConsoleOutputStream extends OutputStream {
*/
@Override
public synchronized void close() throws IOException {
- if(closed) {
+ if(closed) {
// Closeable#close() has no effect if already closed
return;
- }
+ }
StringBuilder builder = new StringBuilder();
- if (prependCR) { // force writing of last /r
- prependCR = false;
+ if (prependCR) { // force writing of last /r
+ prependCR = false;
builder.append('\r');
- }
+ }
this.decoder.finish(builder);
if (builder.length() > 0) {
notifyParitioner(builder.toString());
}
- console.streamClosed(this);
- closed = true;
- partitioner = null;
+ console.streamClosed(this);
+ closed = true;
+ partitioner = null;
decoder = null;
- }
+ }
- /*
- * (non-Javadoc)
- * @see java.io.OutputStream#flush()
- */
- @Override
+ /*
+ * (non-Javadoc)
+ * @see java.io.OutputStream#flush()
+ */
+ @Override
public void flush() throws IOException {
- if(closed) {
- throw new IOException("Output Stream is closed"); //$NON-NLS-1$
- }
- }
+ if(closed) {
+ throw new IOException("Output Stream is closed"); //$NON-NLS-1$
+ }
+ }
- /*
- * (non-Javadoc)
- * @see java.io.OutputStream#write(byte[], int, int)
- */
- @Override
+ /*
+ * (non-Javadoc)
+ * @see java.io.OutputStream#write(byte[], int, int)
+ */
+ @Override
public synchronized void write(byte[] b, int off, int len) throws IOException {
if (closed) {
throw new IOException("Output Stream is closed"); //$NON-NLS-1$
@@ -207,23 +207,23 @@ public class IOConsoleOutputStream extends OutputStream {
StringBuilder builder = new StringBuilder();
this.decoder.decode(builder, b, off, len);
encodedWrite(builder.toString());
- }
- /*
- * (non-Javadoc)
- * @see java.io.OutputStream#write(byte[])
- */
- @Override
+ }
+ /*
+ * (non-Javadoc)
+ * @see java.io.OutputStream#write(byte[])
+ */
+ @Override
public void write(byte[] b) throws IOException {
- write(b, 0, b.length);
- }
- /*
- * (non-Javadoc)
- * @see java.io.OutputStream#write(int)
- */
- @Override
+ write(b, 0, b.length);
+ }
+ /*
+ * (non-Javadoc)
+ * @see java.io.OutputStream#write(int)
+ */
+ @Override
public void write(int b) throws IOException {
- write(new byte[] {(byte)b}, 0, 1);
- }
+ write(new byte[] {(byte)b}, 0, 1);
+ }
/**
* Writes a character array to the attached console.
@@ -252,7 +252,7 @@ public class IOConsoleOutputStream extends OutputStream {
this.encodedWrite(str);
}
- /**
+ /**
* Writes a character sequence to the attached console.
*
* @param chars the string/characters to write to the attached console.
@@ -262,57 +262,57 @@ public class IOConsoleOutputStream extends OutputStream {
public void write(CharSequence chars) throws IOException {
String str = chars.toString();
encodedWrite(str);
- }
+ }
- /**
+ /**
* Writes a string to the attached console.
*
* @param str the string to write to the attached console
* @throws IOException if the stream is closed
*/
- public void write(String str) throws IOException {
- encodedWrite(str);
- }
+ public void write(String str) throws IOException {
+ encodedWrite(str);
+ }
- private synchronized void encodedWrite(String encodedString) throws IOException {
- if(closed) {
- throw new IOException("Output Stream is closed"); //$NON-NLS-1$
- }
+ private synchronized void encodedWrite(String encodedString) throws IOException {
+ if(closed) {
+ throw new IOException("Output Stream is closed"); //$NON-NLS-1$
+ }
String newencoding = encodedString;
- if (prependCR){
+ if (prependCR){
newencoding = "\r" + newencoding; //$NON-NLS-1$
- prependCR=false;
- }
+ prependCR=false;
+ }
if (newencoding.endsWith("\r")) { //$NON-NLS-1$
- prependCR = true;
+ prependCR = true;
newencoding = new String(newencoding.substring(0, newencoding.length() - 1));
- }
+ }
notifyParitioner(newencoding);
- }
+ }
- private void notifyParitioner(String encodedString) throws IOException {
- try {
- partitioner.streamAppended(this, encodedString);
+ private void notifyParitioner(String encodedString) throws IOException {
+ try {
+ partitioner.streamAppended(this, encodedString);
- if (activateOnWrite) {
- console.activate();
- } else {
- ConsolePlugin.getDefault().getConsoleManager().warnOfContentChange(console);
- }
- } catch (IOException e) {
- if (!closed) {
- close();
- }
- throw e;
- }
- }
+ if (activateOnWrite) {
+ console.activate();
+ } else {
+ ConsolePlugin.getDefault().getConsoleManager().warnOfContentChange(console);
+ }
+ } catch (IOException e) {
+ if (!closed) {
+ close();
+ }
+ throw e;
+ }
+ }
- /**
- * Sets the character encoding used to interpret characters written to this steam.
- *
- * @param encoding encoding identifier
- */
- public void setEncoding(String encoding) {
+ /**
+ * Sets the character encoding used to interpret characters written to this steam.
+ *
+ * @param encoding encoding identifier
+ */
+ public void setEncoding(String encoding) {
String charsetName;
if (encoding == null) {
charsetName = WorkbenchEncoding.getWorkbenchDefaultEncoding();
@@ -343,6 +343,6 @@ public class IOConsoleOutputStream extends OutputStream {
this.encodedWrite(builder.toString());
}
this.decoder = new StreamDecoder(charset);
- }
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IPatternMatchListener.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IPatternMatchListener.java
index d3042ead2..2eed22e00 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IPatternMatchListener.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IPatternMatchListener.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -34,7 +34,7 @@ package org.eclipse.ui.console;
* <li><code>class</code> - fully qualified name of the Java class implementing
* <code>org.eclipse.ui.console.IPatternMatchListenerDelegate</code></li>
* </ul>
- * </p>
+ * </p>
* <p>
* Optionally a <code>qualifier</code> attribute may be specified to improve performance
* of regular expression matching. A qualifier specifies a simple regular expression used to
@@ -53,35 +53,35 @@ package org.eclipse.ui.console;
* @since 3.1
*/
public interface IPatternMatchListener extends IPatternMatchListenerDelegate {
- /**
- * Returns the pattern to be used for matching. The pattern is
- * a string representing a regular expression.
- *
- * @return the regular expression to be used for matching
- */
- public String getPattern();
-
- /**
- * Returns the flags to use when compiling this pattern match listener's
- * regular expression, as defined by by <code>Pattern.compile(String regex, int flags)</code>
- *
- * @return the flags to use when compiling this pattern match listener's
- * regular expression
- * @see java.util.regex.Pattern#compile(java.lang.String, int)
- */
- public int getCompilerFlags();
-
- /**
- * Returns a simple regular expression used to identify lines that may
- * match this pattern matcher's complete pattern, or <code>null</code>.
- * Use of this attribute can improve performance by disqualifying lines
- * from the search. When a line is found containing a match for this expression,
- * the line is searched from the beginning for this pattern matcher's
- * complete pattern. Lines not containing this pattern are discarded.
- *
- * @return a simple regular expression used to identify lines that may
- * match this pattern matcher's complete pattern, or <code>null</code>
- */
- public String getLineQualifier();
-
+ /**
+ * Returns the pattern to be used for matching. The pattern is
+ * a string representing a regular expression.
+ *
+ * @return the regular expression to be used for matching
+ */
+ public String getPattern();
+
+ /**
+ * Returns the flags to use when compiling this pattern match listener's
+ * regular expression, as defined by by <code>Pattern.compile(String regex, int flags)</code>
+ *
+ * @return the flags to use when compiling this pattern match listener's
+ * regular expression
+ * @see java.util.regex.Pattern#compile(java.lang.String, int)
+ */
+ public int getCompilerFlags();
+
+ /**
+ * Returns a simple regular expression used to identify lines that may
+ * match this pattern matcher's complete pattern, or <code>null</code>.
+ * Use of this attribute can improve performance by disqualifying lines
+ * from the search. When a line is found containing a match for this expression,
+ * the line is searched from the beginning for this pattern matcher's
+ * complete pattern. Lines not containing this pattern are discarded.
+ *
+ * @return a simple regular expression used to identify lines that may
+ * match this pattern matcher's complete pattern, or <code>null</code>
+ */
+ public String getLineQualifier();
+
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IPatternMatchListenerDelegate.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IPatternMatchListenerDelegate.java
index a3e60dd87..57784de0d 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IPatternMatchListenerDelegate.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IPatternMatchListenerDelegate.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -23,24 +23,24 @@ package org.eclipse.ui.console;
* @since 3.1
*/
public interface IPatternMatchListenerDelegate {
- /**
- * Notification that pattern matching will begin in the specified console.
- * A pattern matcher is connected to only one console at a time.
- *
- * @param console the console in which pattern matching will be performed
- */
- public void connect(TextConsole console);
-
- /**
- * Notification that pattern matching has been completed in the console
- * this delegate was last connected to.
- */
- public void disconnect();
-
- /**
- * Notification that a match has been found.
- *
- * @param event event describing where the match was found
- */
- public void matchFound(PatternMatchEvent event);
+ /**
+ * Notification that pattern matching will begin in the specified console.
+ * A pattern matcher is connected to only one console at a time.
+ *
+ * @param console the console in which pattern matching will be performed
+ */
+ public void connect(TextConsole console);
+
+ /**
+ * Notification that pattern matching has been completed in the console
+ * this delegate was last connected to.
+ */
+ public void disconnect();
+
+ /**
+ * Notification that a match has been found.
+ *
+ * @param event event describing where the match was found
+ */
+ public void matchFound(PatternMatchEvent event);
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsole.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsole.java
index aa399164e..e32ac502f 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsole.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsole.java
@@ -59,12 +59,12 @@ public class MessageConsole extends IOConsole {
@Deprecated
public static final int DEFAULT_TAB_SIZE = IConsoleConstants.DEFAULT_TAB_SIZE;
- /**
- * Constructs a message console with the given name and image.
- *
- * @param name console name
- * @param imageDescriptor console image descriptor or <code>null</code>
- */
+ /**
+ * Constructs a message console with the given name and image.
+ *
+ * @param name console name
+ * @param imageDescriptor console image descriptor or <code>null</code>
+ */
public MessageConsole(String name, ImageDescriptor imageDescriptor) {
this(name, imageDescriptor, true);
}
@@ -82,33 +82,33 @@ public class MessageConsole extends IOConsole {
this(name, IConsoleConstants.MESSAGE_CONSOLE_TYPE, imageDescriptor, autoLifecycle);
}
- /**
- * Constructs a message console with the given name, type, image, and lifecycle.
- *
- * @param name console name
- * @param consoleType console type identifier or <code>null</code>
- * @param imageDescriptor console image descriptor or <code>null</code>
- * @param autoLifecycle whether lifecycle methods should be called automatically
+ /**
+ * Constructs a message console with the given name, type, image, and lifecycle.
+ *
+ * @param name console name
+ * @param consoleType console type identifier or <code>null</code>
+ * @param imageDescriptor console image descriptor or <code>null</code>
+ * @param autoLifecycle whether lifecycle methods should be called automatically
* when added and removed from the console manager
*
- * @since 3.4
- */
+ * @since 3.4
+ */
public MessageConsole(String name, String consoleType, ImageDescriptor imageDescriptor, boolean autoLifecycle) {
this(name, consoleType, imageDescriptor, null, autoLifecycle);
}
- /**
- * Constructs a message console with the given name, type, image, encoding, and lifecycle specification.
- *
- * @param name the name to display for this console
- * @param consoleType console type identifier or <code>null</code>
- * @param imageDescriptor console image descriptor or <code>null</code>
- * @param encoding the encoding that should be used to render the text, or <code>null</code>
- * if the system default encoding should be used
- * @param autoLifecycle whether lifecycle methods should be called automatically
+ /**
+ * Constructs a message console with the given name, type, image, encoding, and lifecycle specification.
+ *
+ * @param name the name to display for this console
+ * @param consoleType console type identifier or <code>null</code>
+ * @param imageDescriptor console image descriptor or <code>null</code>
+ * @param encoding the encoding that should be used to render the text, or <code>null</code>
+ * if the system default encoding should be used
+ * @param autoLifecycle whether lifecycle methods should be called automatically
* when added and removed from the console manager
* @since 3.5
- */
+ */
public MessageConsole(String name, String consoleType, ImageDescriptor imageDescriptor, String encoding, boolean autoLifecycle) {
super(name, consoleType, imageDescriptor, encoding, autoLifecycle);
}
@@ -116,34 +116,34 @@ public class MessageConsole extends IOConsole {
/**
* Returns a new message stream connected to this console.
* <p>
- * Clients should avoid writing large amounts of output to this stream in the UI
- * thread. The console needs to process the output in the UI thread and if the client
- * hogs the UI thread writing output to the console, the console will not be able
- * to process the output.
- * </p>
+ * Clients should avoid writing large amounts of output to this stream in the UI
+ * thread. The console needs to process the output in the UI thread and if the client
+ * hogs the UI thread writing output to the console, the console will not be able
+ * to process the output.
+ * </p>
* @return a new message stream connected to this console
*/
public MessageConsoleStream newMessageStream() {
return new MessageConsoleStream(this, this.getCharset());
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.IConsole#createPage(org.eclipse.ui.console.IConsoleView)
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IConsole#createPage(org.eclipse.ui.console.IConsoleView)
+ */
+ @Override
public IPageBookViewPage createPage(IConsoleView view) {
- IOConsolePage page = (IOConsolePage) super.createPage(view);
- page.setReadOnly();
- return page;
- }
+ IOConsolePage page = (IOConsolePage) super.createPage(view);
+ page.setReadOnly();
+ return page;
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.IOConsole#getInputStream()
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IOConsole#getInputStream()
+ */
+ @Override
public IOConsoleInputStream getInputStream() {
- throw new UnsupportedOperationException("Message Console does not support user input"); //$NON-NLS-1$
- }
+ throw new UnsupportedOperationException("Message Console does not support user input"); //$NON-NLS-1$
+ }
/**
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java
index c8593d53a..580a1cce4 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java
@@ -37,7 +37,7 @@ import org.eclipse.ui.WorkbenchEncoding;
*/
public class MessageConsoleStream extends IOConsoleOutputStream {
- private MessageConsole fMessageConsole;
+ private MessageConsole fMessageConsole;
/**
* Constructs a new stream connected to the given console.
@@ -56,7 +56,7 @@ public class MessageConsoleStream extends IOConsoleOutputStream {
*/
public MessageConsoleStream(MessageConsole console, Charset charset) {
super(console, charset);
- fMessageConsole = console;
+ fMessageConsole = console;
}
/**
@@ -66,10 +66,10 @@ public class MessageConsoleStream extends IOConsoleOutputStream {
*/
public void print(String message) {
try {
- write(message);
- } catch (IOException e) {
- ConsolePlugin.log(e);
- }
+ write(message);
+ } catch (IOException e) {
+ ConsolePlugin.log(e);
+ }
}
@@ -78,10 +78,10 @@ public class MessageConsoleStream extends IOConsoleOutputStream {
*/
public void println() {
try {
- write("\n"); //$NON-NLS-1$
- } catch (IOException e) {
- ConsolePlugin.log(e);
- }
+ write("\n"); //$NON-NLS-1$
+ } catch (IOException e) {
+ ConsolePlugin.log(e);
+ }
}
/**
@@ -94,12 +94,12 @@ public class MessageConsoleStream extends IOConsoleOutputStream {
print(message + "\n"); //$NON-NLS-1$
}
- /**
- * Returns the console this stream is connected to.
- *
- * @return the console this stream is connected to
- */
- public MessageConsole getConsole() {
- return fMessageConsole;
- }
+ /**
+ * Returns the console this stream is connected to.
+ *
+ * @return the console this stream is connected to
+ */
+ public MessageConsole getConsole() {
+ return fMessageConsole;
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/PatternMatchEvent.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/PatternMatchEvent.java
index c4c00ff6f..4467836ae 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/PatternMatchEvent.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/PatternMatchEvent.java
@@ -24,50 +24,50 @@ import java.util.EventObject;
* @noextend This class is not intended to be subclassed by clients.
*/
public class PatternMatchEvent extends EventObject {
- /*
- * required by EventObject for ObjectSerialization.
- */
- private static final long serialVersionUID = 876890383326854537L;
-
- /**
- * The offset of the match within the console's document.
- */
- private int offset;
-
- /**
- * The length of the matched string
- */
- private int length;
+ /*
+ * required by EventObject for ObjectSerialization.
+ */
+ private static final long serialVersionUID = 876890383326854537L;
- /**
- * Constructs a new pattern match event.
- *
- * @param console the console in which the match was found
- * @param matchOffset the offset at which the match was found
- * @param matchLength the length of the text that matched
- */
- public PatternMatchEvent(TextConsole console, int matchOffset, int matchLength) {
- super(console);
- offset = matchOffset;
- length = matchLength;
- }
+ /**
+ * The offset of the match within the console's document.
+ */
+ private int offset;
- /**
- * Returns the length of the matched string.
- *
- * @return the length of the matched string
- */
- public int getLength() {
- return length;
- }
+ /**
+ * The length of the matched string
+ */
+ private int length;
+
+ /**
+ * Constructs a new pattern match event.
+ *
+ * @param console the console in which the match was found
+ * @param matchOffset the offset at which the match was found
+ * @param matchLength the length of the text that matched
+ */
+ public PatternMatchEvent(TextConsole console, int matchOffset, int matchLength) {
+ super(console);
+ offset = matchOffset;
+ length = matchLength;
+ }
+
+ /**
+ * Returns the length of the matched string.
+ *
+ * @return the length of the matched string
+ */
+ public int getLength() {
+ return length;
+ }
+
+ /**
+ * Returns the offset of the match within the document.
+ *
+ * @return the offset of the match within the document
+ */
+ public int getOffset() {
+ return offset;
+ }
- /**
- * Returns the offset of the match within the document.
- *
- * @return the offset of the match within the document
- */
- public int getOffset() {
- return offset;
- }
-
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsole.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsole.java
index 49cfc55a7..02c17158f 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsole.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsole.java
@@ -44,185 +44,185 @@ import org.eclipse.ui.part.IPageBookViewPage;
*/
public abstract class TextConsole extends AbstractConsole {
- /**
- * The current width of the console. Used for fixed width consoles.
- * A value of <=0 means does not have a fixed width.
- */
- private int fConsoleWidth;
- /**
- * The current tab width
- */
- private int fTabWidth;
- /**
+ /**
+ * The current width of the console. Used for fixed width consoles.
+ * A value of <=0 means does not have a fixed width.
+ */
+ private int fConsoleWidth;
+ /**
+ * The current tab width
+ */
+ private int fTabWidth;
+ /**
* The font used by this console
*/
- private Font fFont;
+ private Font fFont;
- /**
- * The background color used by this console or <code>null</code> if default
- */
- private Color fBackground;
+ /**
+ * The background color used by this console or <code>null</code> if default
+ */
+ private Color fBackground;
- /**
- * The Console's regular expression pattern matcher
- */
- private ConsolePatternMatcher fPatternMatcher;
+ /**
+ * The Console's regular expression pattern matcher
+ */
+ private ConsolePatternMatcher fPatternMatcher;
- /**
- * The Console's document
- */
- private ConsoleDocument fDocument;
+ /**
+ * The Console's document
+ */
+ private ConsoleDocument fDocument;
- /**
- * indication that the console's partitioner is not expecting more input
- */
- private boolean fPartitionerFinished = false;
+ /**
+ * indication that the console's partitioner is not expecting more input
+ */
+ private boolean fPartitionerFinished = false;
- /**
- * Indication that the console's pattern matcher has finished.
- * (all matches have been found and all listeners notified)
- */
- private boolean fMatcherFinished = false;
+ /**
+ * Indication that the console's pattern matcher has finished.
+ * (all matches have been found and all listeners notified)
+ */
+ private boolean fMatcherFinished = false;
- /**
- * indication that the console output complete property has been fired
- */
- private boolean fCompleteFired = false;
+ /**
+ * indication that the console output complete property has been fired
+ */
+ private boolean fCompleteFired = false;
- /**
- * Map of client defined attributes
- */
+ /**
+ * Map of client defined attributes
+ */
private HashMap<String, Object> fAttributes = new HashMap<String, Object>();
- private IConsoleManager fConsoleManager = ConsolePlugin.getDefault().getConsoleManager();
+ private IConsoleManager fConsoleManager = ConsolePlugin.getDefault().getConsoleManager();
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.AbstractConsole#dispose()
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.AbstractConsole#dispose()
+ */
+ @Override
protected void dispose() {
- super.dispose();
- fFont = null;
+ super.dispose();
+ fFont = null;
synchronized(fAttributes) {
- fAttributes.clear();
+ fAttributes.clear();
}
- }
- /**
- * Constructs a console with the given name, image descriptor, and lifecycle
- *
- * @param name name to display for this console
- * @param consoleType console type identifier or <code>null</code>
- * @param imageDescriptor image to display for this console or <code>null</code>
- * @param autoLifecycle whether lifecycle methods should be called automatically
- * when this console is added/removed from the console manager
- */
- public TextConsole(String name, String consoleType, ImageDescriptor imageDescriptor, boolean autoLifecycle) {
- super(name, consoleType, imageDescriptor, autoLifecycle);
- fDocument = new ConsoleDocument();
- fDocument.addPositionCategory(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY);
- fPatternMatcher = new ConsolePatternMatcher(this);
- fDocument.addDocumentListener(fPatternMatcher);
- fTabWidth = IConsoleConstants.DEFAULT_TAB_SIZE;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.IConsole#createPage(org.eclipse.ui.console.IConsoleView)
- */
- @Override
+ }
+ /**
+ * Constructs a console with the given name, image descriptor, and lifecycle
+ *
+ * @param name name to display for this console
+ * @param consoleType console type identifier or <code>null</code>
+ * @param imageDescriptor image to display for this console or <code>null</code>
+ * @param autoLifecycle whether lifecycle methods should be called automatically
+ * when this console is added/removed from the console manager
+ */
+ public TextConsole(String name, String consoleType, ImageDescriptor imageDescriptor, boolean autoLifecycle) {
+ super(name, consoleType, imageDescriptor, autoLifecycle);
+ fDocument = new ConsoleDocument();
+ fDocument.addPositionCategory(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY);
+ fPatternMatcher = new ConsolePatternMatcher(this);
+ fDocument.addDocumentListener(fPatternMatcher);
+ fTabWidth = IConsoleConstants.DEFAULT_TAB_SIZE;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IConsole#createPage(org.eclipse.ui.console.IConsoleView)
+ */
+ @Override
public IPageBookViewPage createPage(IConsoleView view) {
- return new TextConsolePage(this, view);
- }
+ return new TextConsolePage(this, view);
+ }
/**
* Returns this console's document.
- * <p>
- * Note that a console may or may not support direct manipulation of its document.
- * For example, an I/O console document and its partitions are produced from the
- * streams connected to it, and clients are not intended to modify the document's
- * contents.
- * </p>
+ * <p>
+ * Note that a console may or may not support direct manipulation of its document.
+ * For example, an I/O console document and its partitions are produced from the
+ * streams connected to it, and clients are not intended to modify the document's
+ * contents.
+ * </p>
*
* @return this console's document
*/
- public IDocument getDocument() {
- return fDocument;
- }
-
- /**
- * Returns the current width of this console. A value of zero of less
- * indicates this console has no fixed width.
- *
- * @return the current width of this console
- */
- public int getConsoleWidth() {
- return fConsoleWidth;
- }
-
- /**
- * Sets the width of this console in characters. Any value greater than zero
- * will cause this console to have a fixed width.
- *
- * @param width the width to make this console. Values of 0 or less imply
- * the console does not have any fixed width.
- */
- public void setConsoleWidth(int width) {
- if (fConsoleWidth != width) {
- int old = fConsoleWidth;
- fConsoleWidth = width;
-
- firePropertyChange(this, IConsoleConstants.P_CONSOLE_WIDTH, Integer.valueOf(old), Integer.valueOf(fConsoleWidth));
- }
- }
+ public IDocument getDocument() {
+ return fDocument;
+ }
+
+ /**
+ * Returns the current width of this console. A value of zero of less
+ * indicates this console has no fixed width.
+ *
+ * @return the current width of this console
+ */
+ public int getConsoleWidth() {
+ return fConsoleWidth;
+ }
+
+ /**
+ * Sets the width of this console in characters. Any value greater than zero
+ * will cause this console to have a fixed width.
+ *
+ * @param width the width to make this console. Values of 0 or less imply
+ * the console does not have any fixed width.
+ */
+ public void setConsoleWidth(int width) {
+ if (fConsoleWidth != width) {
+ int old = fConsoleWidth;
+ fConsoleWidth = width;
+
+ firePropertyChange(this, IConsoleConstants.P_CONSOLE_WIDTH, Integer.valueOf(old), Integer.valueOf(fConsoleWidth));
+ }
+ }
/**
* Sets the tab width used in this console.
*
* @param newTabWidth the tab width
*/
- public void setTabWidth(final int newTabWidth) {
- if (fTabWidth != newTabWidth) {
- final int oldTabWidth = fTabWidth;
- fTabWidth = newTabWidth;
- ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() {
- @Override
+ public void setTabWidth(final int newTabWidth) {
+ if (fTabWidth != newTabWidth) {
+ final int oldTabWidth = fTabWidth;
+ fTabWidth = newTabWidth;
+ ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
- firePropertyChange(TextConsole.this, IConsoleConstants.P_TAB_SIZE, Integer.valueOf(oldTabWidth), Integer.valueOf(fTabWidth));
- }
- });
- }
- }
+ firePropertyChange(TextConsole.this, IConsoleConstants.P_TAB_SIZE, Integer.valueOf(oldTabWidth), Integer.valueOf(fTabWidth));
+ }
+ });
+ }
+ }
/**
* Returns the tab width used in this console.
*
* @return tab width used in this console
*/
- public int getTabWidth() {
- return fTabWidth;
- }
+ public int getTabWidth() {
+ return fTabWidth;
+ }
- /**
+ /**
* Returns the font used by this console. Must be called in the UI thread.
*
* @return font used by this console
*/
- public Font getFont() {
- if (fFont == null) {
- fFont = getDefaultFont();
- }
- return fFont;
- }
+ public Font getFont() {
+ if (fFont == null) {
+ fFont = getDefaultFont();
+ }
+ return fFont;
+ }
- /**
- * Returns the default text font.
- *
- * @return the default text font
- */
- private Font getDefaultFont() {
- return JFaceResources.getFont(JFaceResources.TEXT_FONT);
- }
+ /**
+ * Returns the default text font.
+ *
+ * @return the default text font
+ */
+ private Font getDefaultFont() {
+ return JFaceResources.getFont(JFaceResources.TEXT_FONT);
+ }
/**
* Sets the font used by this console. Specify <code>null</code> to use
@@ -230,21 +230,21 @@ public abstract class TextConsole extends AbstractConsole {
*
* @param newFont font, or <code>null</code> to indicate the default font
*/
- public void setFont(Font newFont) {
- // ensure font is initialized
- getFont();
- // translate null to default font
+ public void setFont(Font newFont) {
+ // ensure font is initialized
+ getFont();
+ // translate null to default font
Font font = newFont;
if (font == null) {
font = getDefaultFont();
- }
- // fire property change if required
+ }
+ // fire property change if required
if (!fFont.equals(font)) {
- Font old = fFont;
+ Font old = fFont;
fFont = font;
- firePropertyChange(this, IConsoleConstants.P_FONT, old, fFont);
- }
- }
+ firePropertyChange(this, IConsoleConstants.P_FONT, old, fFont);
+ }
+ }
/**
* Sets the background color used by this console. Specify <code>null</code> to use
@@ -256,8 +256,8 @@ public abstract class TextConsole extends AbstractConsole {
*/
@Deprecated
public void setBackgrond(Color background) {
- setBackground(background);
- }
+ setBackground(background);
+ }
/**
* Sets the background color used by this console. Specify <code>null</code> to use
@@ -266,91 +266,91 @@ public abstract class TextConsole extends AbstractConsole {
* @param background background color or <code>null</code> for default
* @since 3.3
*/
- public void setBackground(Color background) {
- if (fBackground == null) {
- if (background == null) {
- return;
- }
- } else if (fBackground.equals(background)){
- return;
- }
- Color old = fBackground;
- fBackground = background;
- firePropertyChange(this, IConsoleConstants.P_BACKGROUND_COLOR, old, fBackground);
- }
-
- /**
- * Returns the background color to use for this console or <code>null</code> for the
- * default background color.
- *
- * @return background color or <code>null</code> for default
- * @since 3.3
- */
- public Color getBackground() {
- return fBackground;
- }
-
- /**
- * Clears the console.
- * <p>
- * Since a console may or may not support direct manipulation
- * of its document's contents, this method should be called to clear a text console's
- * document. The default implementation sets this console's document content
- * to the empty string directly. Subclasses should override as required.
- * </p>
- */
- public void clearConsole() {
- IDocument document = getDocument();
- if (document != null) {
- document.set(""); //$NON-NLS-1$
- }
- }
-
- /**
- * Returns the console's document partitioner.
- * @return The console's document partitioner
- */
- protected abstract IConsoleDocumentPartitioner getPartitioner();
-
- /**
- * Returns all hyperlinks in this console.
- *
- * @return all hyperlinks in this console
- */
- public IHyperlink[] getHyperlinks() {
- try {
- Position[] positions = getDocument().getPositions(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY);
- IHyperlink[] hyperlinks = new IHyperlink[positions.length];
- for (int i = 0; i < positions.length; i++) {
- ConsoleHyperlinkPosition position = (ConsoleHyperlinkPosition) positions[i];
- hyperlinks[i] = position.getHyperLink();
- }
- return hyperlinks;
- } catch (BadPositionCategoryException e) {
- return new IHyperlink[0];
- }
- }
-
- /**
- * Returns the hyperlink at the given offset of <code>null</code> if none.
- *
- * @param offset offset for which a hyperlink is requested
- * @return the hyperlink at the given offset of <code>null</code> if none
- */
- public IHyperlink getHyperlink(int offset) {
- try {
- IDocument document = getDocument();
- if (document != null) {
- Position[] positions = document.getPositions(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY);
- Position position = findPosition(offset, positions);
- if (position instanceof ConsoleHyperlinkPosition) {
- return ((ConsoleHyperlinkPosition) position).getHyperLink();
- }
- }
- } catch (BadPositionCategoryException e) {
- }
- return null;
- }
+ public void setBackground(Color background) {
+ if (fBackground == null) {
+ if (background == null) {
+ return;
+ }
+ } else if (fBackground.equals(background)){
+ return;
+ }
+ Color old = fBackground;
+ fBackground = background;
+ firePropertyChange(this, IConsoleConstants.P_BACKGROUND_COLOR, old, fBackground);
+ }
+
+ /**
+ * Returns the background color to use for this console or <code>null</code> for the
+ * default background color.
+ *
+ * @return background color or <code>null</code> for default
+ * @since 3.3
+ */
+ public Color getBackground() {
+ return fBackground;
+ }
+
+ /**
+ * Clears the console.
+ * <p>
+ * Since a console may or may not support direct manipulation
+ * of its document's contents, this method should be called to clear a text console's
+ * document. The default implementation sets this console's document content
+ * to the empty string directly. Subclasses should override as required.
+ * </p>
+ */
+ public void clearConsole() {
+ IDocument document = getDocument();
+ if (document != null) {
+ document.set(""); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Returns the console's document partitioner.
+ * @return The console's document partitioner
+ */
+ protected abstract IConsoleDocumentPartitioner getPartitioner();
+
+ /**
+ * Returns all hyperlinks in this console.
+ *
+ * @return all hyperlinks in this console
+ */
+ public IHyperlink[] getHyperlinks() {
+ try {
+ Position[] positions = getDocument().getPositions(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY);
+ IHyperlink[] hyperlinks = new IHyperlink[positions.length];
+ for (int i = 0; i < positions.length; i++) {
+ ConsoleHyperlinkPosition position = (ConsoleHyperlinkPosition) positions[i];
+ hyperlinks[i] = position.getHyperLink();
+ }
+ return hyperlinks;
+ } catch (BadPositionCategoryException e) {
+ return new IHyperlink[0];
+ }
+ }
+
+ /**
+ * Returns the hyperlink at the given offset of <code>null</code> if none.
+ *
+ * @param offset offset for which a hyperlink is requested
+ * @return the hyperlink at the given offset of <code>null</code> if none
+ */
+ public IHyperlink getHyperlink(int offset) {
+ try {
+ IDocument document = getDocument();
+ if (document != null) {
+ Position[] positions = document.getPositions(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY);
+ Position position = findPosition(offset, positions);
+ if (position instanceof ConsoleHyperlinkPosition) {
+ return ((ConsoleHyperlinkPosition) position).getHyperLink();
+ }
+ }
+ } catch (BadPositionCategoryException e) {
+ }
+ return null;
+ }
/**
* Binary search for the position at a given offset.
@@ -398,133 +398,133 @@ public abstract class TextConsole extends AbstractConsole {
return null;
}
- /**
- * Adds the given pattern match listener to this console. The listener will
- * be connected and receive match notifications. Has no effect if an identical
- * listener has already been added.
- *
- * @param listener the listener to add
- */
- public void addPatternMatchListener(IPatternMatchListener listener) {
- fPatternMatcher.addPatternMatchListener(listener);
- }
-
- /**
- * Removes the given pattern match listener from this console. The listener will be
- * disconnected and will no longer receive match notifications. Has no effect
- * if the listener was not previously added.
- *
- * @param listener the pattern match listener to remove
- */
- public void removePatternMatchListener(IPatternMatchListener listener) {
- fPatternMatcher.removePatternMatchListener(listener);
- }
-
-
- /**
- * Job scheduling rule that prevent the job from running if the console's PatternMatcher
- * is active.
- */
- private class MatcherSchedulingRule implements ISchedulingRule {
- @Override
+ /**
+ * Adds the given pattern match listener to this console. The listener will
+ * be connected and receive match notifications. Has no effect if an identical
+ * listener has already been added.
+ *
+ * @param listener the listener to add
+ */
+ public void addPatternMatchListener(IPatternMatchListener listener) {
+ fPatternMatcher.addPatternMatchListener(listener);
+ }
+
+ /**
+ * Removes the given pattern match listener from this console. The listener will be
+ * disconnected and will no longer receive match notifications. Has no effect
+ * if the listener was not previously added.
+ *
+ * @param listener the pattern match listener to remove
+ */
+ public void removePatternMatchListener(IPatternMatchListener listener) {
+ fPatternMatcher.removePatternMatchListener(listener);
+ }
+
+
+ /**
+ * Job scheduling rule that prevent the job from running if the console's PatternMatcher
+ * is active.
+ */
+ private class MatcherSchedulingRule implements ISchedulingRule {
+ @Override
public boolean contains(ISchedulingRule rule) {
- return rule == this;
- }
+ return rule == this;
+ }
- @Override
+ @Override
public boolean isConflicting(ISchedulingRule rule) {
- if (contains(rule)) {
- return true;
- }
- if (rule != this && rule instanceof MatcherSchedulingRule) {
- return (((MatcherSchedulingRule)rule).getConsole() == TextConsole.this);
- }
- return false;
- }
-
- public TextConsole getConsole() {
- return TextConsole.this;
- }
- }
-
- /**
- * Returns a scheduling rule which can be used to prevent jobs from running
- * while this console's pattern matcher is active.
- * <p>
- * Although this scheduling rule prevents jobs from running at the same time as
- * pattern matching jobs for this console, it does not enforce any ordering of jobs.
- * Since 3.2, pattern matching jobs belong to the job family identified by the console
- * object that matching is occurring on. To ensure a job runs after all scheduled pattern
- * matching is complete, clients must join on this console's job family.
- * </p>
- * @return a scheduling rule which can be used to prevent jobs from running
- * while this console's pattern matcher is active
- */
- public ISchedulingRule getSchedulingRule() {
- return new MatcherSchedulingRule();
- }
-
- /**
- * This console's partitioner should call this method when it is not expecting any new data
- * to be appended to the document.
- */
- public void partitionerFinished() {
- fPatternMatcher.forceFinalMatching();
- fPartitionerFinished = true;
- checkFinished();
- }
-
- /**
- * Called by this console's pattern matcher when matching is complete.
- * <p>
- * Clients should not call this method.
- * <p>
- */
- public void matcherFinished() {
- fMatcherFinished = true;
- fDocument.removeDocumentListener(fPatternMatcher);
- checkFinished();
- }
-
- /**
- * Fires the console output complete property change event.
- */
- private synchronized void checkFinished() {
- if (!fCompleteFired && fPartitionerFinished && fMatcherFinished ) {
- fCompleteFired = true;
- firePropertyChange(this, IConsoleConstants.P_CONSOLE_OUTPUT_COMPLETE, null, null);
- }
- }
-
- /**
- * Adds a hyperlink to this console.
- *
- * @param hyperlink the hyperlink to add
- * @param offset the offset in the console document at which the hyperlink should be added
- * @param length the length of the text which should be hyperlinked
- * @throws BadLocationException if the specified location is not valid.
- */
- public void addHyperlink(IHyperlink hyperlink, int offset, int length) throws BadLocationException {
- IDocument document = getDocument();
+ if (contains(rule)) {
+ return true;
+ }
+ if (rule != this && rule instanceof MatcherSchedulingRule) {
+ return (((MatcherSchedulingRule)rule).getConsole() == TextConsole.this);
+ }
+ return false;
+ }
+
+ public TextConsole getConsole() {
+ return TextConsole.this;
+ }
+ }
+
+ /**
+ * Returns a scheduling rule which can be used to prevent jobs from running
+ * while this console's pattern matcher is active.
+ * <p>
+ * Although this scheduling rule prevents jobs from running at the same time as
+ * pattern matching jobs for this console, it does not enforce any ordering of jobs.
+ * Since 3.2, pattern matching jobs belong to the job family identified by the console
+ * object that matching is occurring on. To ensure a job runs after all scheduled pattern
+ * matching is complete, clients must join on this console's job family.
+ * </p>
+ * @return a scheduling rule which can be used to prevent jobs from running
+ * while this console's pattern matcher is active
+ */
+ public ISchedulingRule getSchedulingRule() {
+ return new MatcherSchedulingRule();
+ }
+
+ /**
+ * This console's partitioner should call this method when it is not expecting any new data
+ * to be appended to the document.
+ */
+ public void partitionerFinished() {
+ fPatternMatcher.forceFinalMatching();
+ fPartitionerFinished = true;
+ checkFinished();
+ }
+
+ /**
+ * Called by this console's pattern matcher when matching is complete.
+ * <p>
+ * Clients should not call this method.
+ * <p>
+ */
+ public void matcherFinished() {
+ fMatcherFinished = true;
+ fDocument.removeDocumentListener(fPatternMatcher);
+ checkFinished();
+ }
+
+ /**
+ * Fires the console output complete property change event.
+ */
+ private synchronized void checkFinished() {
+ if (!fCompleteFired && fPartitionerFinished && fMatcherFinished ) {
+ fCompleteFired = true;
+ firePropertyChange(this, IConsoleConstants.P_CONSOLE_OUTPUT_COMPLETE, null, null);
+ }
+ }
+
+ /**
+ * Adds a hyperlink to this console.
+ *
+ * @param hyperlink the hyperlink to add
+ * @param offset the offset in the console document at which the hyperlink should be added
+ * @param length the length of the text which should be hyperlinked
+ * @throws BadLocationException if the specified location is not valid.
+ */
+ public void addHyperlink(IHyperlink hyperlink, int offset, int length) throws BadLocationException {
+ IDocument document = getDocument();
ConsoleHyperlinkPosition hyperlinkPosition = new ConsoleHyperlinkPosition(hyperlink, offset, length);
try {
document.addPosition(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY, hyperlinkPosition);
- fConsoleManager.refresh(this);
+ fConsoleManager.refresh(this);
} catch (BadPositionCategoryException e) {
ConsolePlugin.log(e);
}
- }
-
- /**
- * Returns the region associated with the given hyperlink.
- *
- * @param link hyperlink
- * @return the region associated with the hyperlink or null if the hyperlink is not found.
- */
- public IRegion getRegion(IHyperlink link) {
+ }
+
+ /**
+ * Returns the region associated with the given hyperlink.
+ *
+ * @param link hyperlink
+ * @return the region associated with the hyperlink or null if the hyperlink is not found.
+ */
+ public IRegion getRegion(IHyperlink link) {
try {
- IDocument doc = getDocument();
- if (doc != null) {
+ IDocument doc = getDocument();
+ if (doc != null) {
Position[] positions = doc.getPositions(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY);
for (int i = 0; i < positions.length; i++) {
ConsoleHyperlinkPosition position = (ConsoleHyperlinkPosition)positions[i];
@@ -532,33 +532,33 @@ public abstract class TextConsole extends AbstractConsole {
return new Region(position.getOffset(), position.getLength());
}
}
- }
+ }
} catch (BadPositionCategoryException e) {
}
return null;
- }
-
- /**
- * Returns the attribute associated with the specified key.
- *
- * @param key attribute key
- * @return the attribute associated with the specified key
- */
- public Object getAttribute(String key) {
- synchronized (fAttributes) {
- return fAttributes.get(key);
- }
- }
-
- /**
- * Sets an attribute value. Intended for client data.
- *
- * @param key attribute key
- * @param value attribute value
- */
- public void setAttribute(String key, Object value) {
- synchronized(fAttributes) {
- fAttributes.put(key, value);
- }
- }
+ }
+
+ /**
+ * Returns the attribute associated with the specified key.
+ *
+ * @param key attribute key
+ * @return the attribute associated with the specified key
+ */
+ public Object getAttribute(String key) {
+ synchronized (fAttributes) {
+ return fAttributes.get(key);
+ }
+ }
+
+ /**
+ * Sets an attribute value. Intended for client data.
+ *
+ * @param key attribute key
+ * @param value attribute value
+ */
+ public void setAttribute(String key, Object value) {
+ synchronized(fAttributes) {
+ fAttributes.put(key, value);
+ }
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsolePage.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsolePage.java
index 78634dd0c..a0fefa943 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsolePage.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsolePage.java
@@ -18,7 +18,6 @@ import java.util.Map;
import java.util.ResourceBundle;
import org.eclipse.core.runtime.IAdaptable;
-
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
@@ -26,23 +25,19 @@ import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.resource.JFaceResources;
-
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IFindReplaceTarget;
import org.eclipse.jface.text.ITextListener;
import org.eclipse.jface.text.ITextOperationTarget;
import org.eclipse.jface.text.TextEvent;
-
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
-
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Widget;
-
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IWorkbenchActionConstants;
@@ -57,7 +52,6 @@ import org.eclipse.ui.internal.console.FollowHyperlinkAction;
import org.eclipse.ui.internal.console.IConsoleHelpContextIds;
import org.eclipse.ui.part.IPageBookViewPage;
import org.eclipse.ui.part.IPageSite;
-
import org.eclipse.ui.texteditor.FindReplaceAction;
import org.eclipse.ui.texteditor.IUpdate;
@@ -76,14 +70,14 @@ import org.eclipse.ui.texteditor.IUpdate;
* @since 3.1
*/
public class TextConsolePage implements IPageBookViewPage, IPropertyChangeListener, IAdaptable {
- private IPageSite fSite;
- private TextConsole fConsole;
- private IConsoleView fConsoleView;
- private TextConsoleViewer fViewer;
- private MenuManager fMenuManager;
+ private IPageSite fSite;
+ private TextConsole fConsole;
+ private IConsoleView fConsoleView;
+ private TextConsoleViewer fViewer;
+ private MenuManager fMenuManager;
protected Map<String, IAction> fGlobalActions = new HashMap<String, IAction>();
protected ArrayList<String> fSelectionActions = new ArrayList<String>();
- protected ClearOutputAction fClearOutputAction;
+ protected ClearOutputAction fClearOutputAction;
// text selection listener, used to update selection dependent actions on selection changes
private ISelectionChangedListener selectionChangedListener = new ISelectionChangedListener() {
@@ -95,7 +89,7 @@ public class TextConsolePage implements IPageBookViewPage, IPropertyChangeListen
// updates the find replace action and the clear action if the document length is > 0
private ITextListener textListener = new ITextListener() {
- @Override
+ @Override
public void textChanged(TextEvent event) {
IUpdate findReplace = (IUpdate)fGlobalActions.get(ActionFactory.FIND.getId());
if (findReplace != null) {
@@ -111,61 +105,61 @@ public class TextConsolePage implements IPageBookViewPage, IPropertyChangeListen
}
};
- /**
- * Constructs a text console page for the given console in the given view.
- *
- * @param console text console
- * @param view console view the page is contained in
- */
+ /**
+ * Constructs a text console page for the given console in the given view.
+ *
+ * @param console text console
+ * @param view console view the page is contained in
+ */
public TextConsolePage(TextConsole console, IConsoleView view) {
- fConsole = console;
- fConsoleView = view;
+ fConsole = console;
+ fConsoleView = view;
}
- /**
- * Returns a viewer used to display the contents of this page's console.
- *
- * @param parent container for the viewer
- * @return a viewer used to display the contents of this page's console
- */
+ /**
+ * Returns a viewer used to display the contents of this page's console.
+ *
+ * @param parent container for the viewer
+ * @return a viewer used to display the contents of this page's console
+ */
protected TextConsoleViewer createViewer(Composite parent) {
return new TextConsoleViewer(parent, fConsole, fConsoleView);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.IPageBookViewPage#getSite()
- */
- @Override
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.part.IPageBookViewPage#getSite()
+ */
+ @Override
public IPageSite getSite() {
- return fSite;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.IPageBookViewPage#init(org.eclipse.ui.part.IPageSite)
- */
- @Override
+ return fSite;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.part.IPageBookViewPage#init(org.eclipse.ui.part.IPageSite)
+ */
+ @Override
public void init(IPageSite pageSite) throws PartInitException {
- fSite = pageSite;
- }
+ fSite = pageSite;
+ }
- /**
- * Updates selection dependent actions.
- */
- protected void updateSelectionDependentActions() {
+ /**
+ * Updates selection dependent actions.
+ */
+ protected void updateSelectionDependentActions() {
for (String string : fSelectionActions) {
updateAction(string);
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#createControl(org.eclipse.swt.widgets.Composite)
- */
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.part.IPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
@Override
public void createControl(Composite parent) {
- fViewer = createViewer(parent);
+ fViewer = createViewer(parent);
fViewer.setConsoleWidth(fConsole.getConsoleWidth());
fViewer.setTabWidth(fConsole.getTabWidth());
fConsole.addPropertyChangeListener(this);
@@ -173,7 +167,7 @@ public class TextConsolePage implements IPageBookViewPage, IPropertyChangeListen
String id = "#ContextMenu"; //$NON-NLS-1$
if (getConsole().getType() != null) {
- id = getConsole().getType() + "." + id; //$NON-NLS-1$
+ id = getConsole().getType() + "." + id; //$NON-NLS-1$
}
fMenuManager= new MenuManager("#ContextMenu", id); //$NON-NLS-1$
fMenuManager.setRemoveAllWhenShown(true);
@@ -194,89 +188,90 @@ public class TextConsolePage implements IPageBookViewPage, IPropertyChangeListen
fViewer.getSelectionProvider().addSelectionChangedListener(selectionChangedListener);
fViewer.addTextListener(textListener);
- }
+ }
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#dispose()
- */
- @Override
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.part.IPage#dispose()
+ */
+ @Override
public void dispose() {
- fConsole.removePropertyChangeListener(this);
- JFaceResources.getFontRegistry().removeListener(this);
-
- if (fMenuManager != null) {
- fMenuManager.dispose();
- }
- fClearOutputAction = null;
- fSelectionActions.clear();
- fGlobalActions.clear();
-
- fViewer.getSelectionProvider().removeSelectionChangedListener(selectionChangedListener);
- fViewer.removeTextListener(textListener);
- fViewer = null;
- }
-
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#getControl()
- */
- @Override
+ fConsole.removePropertyChangeListener(this);
+ JFaceResources.getFontRegistry().removeListener(this);
+
+ if (fMenuManager != null) {
+ fMenuManager.dispose();
+ }
+ fClearOutputAction = null;
+ fSelectionActions.clear();
+ fGlobalActions.clear();
+
+ fViewer.getSelectionProvider().removeSelectionChangedListener(selectionChangedListener);
+ fViewer.removeTextListener(textListener);
+ fViewer = null;
+ }
+
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.part.IPage#getControl()
+ */
+ @Override
public Control getControl() {
- return fViewer != null ? fViewer.getControl() : null;
- }
+ return fViewer != null ? fViewer.getControl() : null;
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#setActionBars(org.eclipse.ui.IActionBars)
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.IPage#setActionBars(org.eclipse.ui.IActionBars)
+ */
+ @Override
public void setActionBars(IActionBars actionBars) {
- }
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#setFocus()
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.IPage#setFocus()
+ */
+ @Override
public void setFocus() {
- if (fViewer != null) {
- fViewer.getTextWidget().setFocus();
- }
- }
+ if (fViewer != null) {
+ fViewer.getTextWidget().setFocus();
+ updateAction(ActionFactory.FIND.getId());
+ }
+ }
/*
* (non-Javadoc)
* @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
*/
- @Override
+ @Override
public void propertyChange(PropertyChangeEvent event) {
- if (fViewer != null) {
+ if (fViewer != null) {
Object source = event.getSource();
String property = event.getProperty();
if (source.equals(fConsole) && IConsoleConstants.P_FONT.equals(property)) {
fViewer.setFont(fConsole.getFont());
} else if (IConsoleConstants.P_FONT_STYLE.equals(property)) {
- fViewer.getTextWidget().redraw();
+ fViewer.getTextWidget().redraw();
} else if (property.equals(IConsoleConstants.P_STREAM_COLOR)) {
- fViewer.getTextWidget().redraw();
+ fViewer.getTextWidget().redraw();
} else if (source.equals(fConsole) && property.equals(IConsoleConstants.P_TAB_SIZE)) {
- Integer tabSize = (Integer)event.getNewValue();
- fViewer.setTabWidth(tabSize.intValue());
+ Integer tabSize = (Integer)event.getNewValue();
+ fViewer.setTabWidth(tabSize.intValue());
} else if (source.equals(fConsole) && property.equals(IConsoleConstants.P_CONSOLE_WIDTH)) {
- fViewer.setConsoleWidth(fConsole.getConsoleWidth());
+ fViewer.setConsoleWidth(fConsole.getConsoleWidth());
} else if (IConsoleConstants.P_BACKGROUND_COLOR.equals(property)) {
fViewer.getTextWidget().setBackground(fConsole.getBackground());
}
- }
+ }
}
- /**
- * Creates actions.
- */
- protected void createActions() {
- IActionBars actionBars= getSite().getActionBars();
- TextViewerAction action= new TextViewerAction(fViewer, ITextOperationTarget.SELECT_ALL);
+ /**
+ * Creates actions.
+ */
+ protected void createActions() {
+ IActionBars actionBars= getSite().getActionBars();
+ TextViewerAction action= new TextViewerAction(fViewer, ITextOperationTarget.SELECT_ALL);
action.configureAction(ConsoleMessages.TextConsolePage_SelectAllText, ConsoleMessages.TextConsolePage_SelectAllDescrip, ConsoleMessages.TextConsolePage_SelectAllDescrip);
action.setActionDefinitionId(ActionFactory.SELECT_ALL.getCommandId());
PlatformUI.getWorkbench().getHelpSystem().setHelp(action, IConsoleHelpContextIds.CONSOLE_SELECT_ALL_ACTION);
@@ -305,9 +300,9 @@ public class TextConsolePage implements IPageBookViewPage, IPropertyChangeListen
fClearOutputAction = new ClearOutputAction(fConsole);
- ResourceBundle bundle = ConsoleResourceBundleMessages.getBundle();
- FindReplaceAction fraction = new FindReplaceAction(bundle, "find_replace_action_", fConsoleView); //$NON-NLS-1$
- PlatformUI.getWorkbench().getHelpSystem().setHelp(fraction, IConsoleHelpContextIds.CONSOLE_FIND_REPLACE_ACTION);
+ ResourceBundle bundle = ConsoleResourceBundleMessages.getBundle();
+ FindReplaceAction fraction = new FindReplaceAction(bundle, "find_replace_action_", fConsoleView); //$NON-NLS-1$
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(fraction, IConsoleHelpContextIds.CONSOLE_FIND_REPLACE_ACTION);
setGlobalAction(actionBars, ActionFactory.FIND.getId(), fraction);
fSelectionActions.add(ActionFactory.CUT.getId());
@@ -316,23 +311,23 @@ public class TextConsolePage implements IPageBookViewPage, IPropertyChangeListen
fSelectionActions.add(ActionFactory.FIND.getId());
actionBars.updateActionBars();
- }
-
- /**
- * Configures an action for key bindings.
- *
- * @param actionBars action bars for this page
- * @param actionID action definition id
- * @param action associated action
- */
- protected void setGlobalAction(IActionBars actionBars, String actionID, IAction action) {
- fGlobalActions.put(actionID, action);
- actionBars.setGlobalActionHandler(actionID, action);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
+ }
+
+ /**
+ * Configures an action for key bindings.
+ *
+ * @param actionBars action bars for this page
+ * @param actionID action definition id
+ * @param action associated action
+ */
+ protected void setGlobalAction(IActionBars actionBars, String actionID, IAction action) {
+ fGlobalActions.put(actionID, action);
+ actionBars.setGlobalActionHandler(actionID, action);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+ */
@SuppressWarnings("unchecked")
@Override
public <T> T getAdapter(Class<T> required) {
@@ -343,9 +338,9 @@ public class TextConsolePage implements IPageBookViewPage, IPropertyChangeListen
return (T) fViewer.getTextWidget();
}
return null;
- }
+ }
- /**
+ /**
* Returns the view this page is contained in.
*
* @return the view this page is contained in
@@ -363,11 +358,11 @@ public class TextConsolePage implements IPageBookViewPage, IPropertyChangeListen
return fConsole;
}
- /**
- * Updates the global action with the given id
- *
- * @param actionId action definition id
- */
+ /**
+ * Updates the global action with the given id
+ *
+ * @param actionId action definition id
+ */
protected void updateAction(String actionId) {
IAction action= fGlobalActions.get(actionId);
if (action instanceof IUpdate) {
@@ -405,21 +400,21 @@ public class TextConsolePage implements IPageBookViewPage, IPropertyChangeListen
}
- /**
- * Returns the viewer contained in this page.
- *
- * @return the viewer contained in this page
- */
- public TextConsoleViewer getViewer() {
- return fViewer;
- }
-
- /**
- * Sets the viewer contained in this page.
- *
- * @param viewer text viewer
- */
- public void setViewer(TextConsoleViewer viewer) {
- this.fViewer = viewer;
- }
+ /**
+ * Returns the viewer contained in this page.
+ *
+ * @return the viewer contained in this page
+ */
+ public TextConsoleViewer getViewer() {
+ return fViewer;
+ }
+
+ /**
+ * Sets the viewer contained in this page.
+ *
+ * @param viewer text viewer
+ */
+ public void setViewer(TextConsoleViewer viewer) {
+ this.fViewer = viewer;
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java
index fe5b069af..0b28a96e1 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java
@@ -74,64 +74,64 @@ import org.eclipse.ui.progress.WorkbenchJob;
* @since 3.1
*/
public class TextConsoleViewer extends SourceViewer implements LineStyleListener, LineBackgroundListener, MouseTrackListener, MouseMoveListener, MouseListener {
- /**
- * Adapts document to the text widget.
- */
- private ConsoleDocumentAdapter documentAdapter;
+ /**
+ * Adapts document to the text widget.
+ */
+ private ConsoleDocumentAdapter documentAdapter;
- private IHyperlink hyperlink;
+ private IHyperlink hyperlink;
- private Cursor handCursor;
+ private Cursor handCursor;
- private Cursor textCursor;
+ private Cursor textCursor;
- private int consoleWidth = -1;
+ private int consoleWidth = -1;
- private TextConsole console;
+ private TextConsole console;
- private IPropertyChangeListener propertyChangeListener;
+ private IPropertyChangeListener propertyChangeListener;
private IScrollLockStateProvider scrollLockStateProvider;
- private IDocumentListener documentListener = new IDocumentListener() {
- @Override
+ private IDocumentListener documentListener = new IDocumentListener() {
+ @Override
public void documentAboutToBeChanged(DocumentEvent event) {
- }
+ }
- @Override
+ @Override
public void documentChanged(DocumentEvent event) {
- updateLinks(event.fOffset);
- }
- };
- // event listener used to send event to hyperlink for IHyperlink2
- private Listener mouseUpListener = new Listener() {
+ updateLinks(event.fOffset);
+ }
+ };
+ // event listener used to send event to hyperlink for IHyperlink2
+ private Listener mouseUpListener = new Listener() {
@Override
public void handleEvent(Event event) {
- if (hyperlink != null) {
- String selection = getTextWidget().getSelectionText();
- if (selection.length() <= 0) {
- if (event.button == 1) {
- if (hyperlink instanceof IHyperlink2) {
+ if (hyperlink != null) {
+ String selection = getTextWidget().getSelectionText();
+ if (selection.length() <= 0) {
+ if (event.button == 1) {
+ if (hyperlink instanceof IHyperlink2) {
((IHyperlink2) hyperlink).linkActivated(event);
} else {
hyperlink.linkActivated();
}
- }
- }
- }
+ }
+ }
+ }
}
};
// to store to user scroll lock action
private AtomicBoolean userHoldsScrollLock = new AtomicBoolean(false);
- WorkbenchJob revealJob = new WorkbenchJob("Reveal End of Document") {//$NON-NLS-1$
- @Override
+ WorkbenchJob revealJob = new WorkbenchJob("Reveal End of Document") {//$NON-NLS-1$
+ @Override
public IStatus runInUIThread(IProgressMonitor monitor) {
scrollToEndOfDocument();
- return Status.OK_STATUS;
- }
- };
+ return Status.OK_STATUS;
+ }
+ };
// reveal the end of the document
private void scrollToEndOfDocument() {
@@ -171,29 +171,29 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
return false;
}
- private IPositionUpdater positionUpdater = new IPositionUpdater() {
- @Override
+ private IPositionUpdater positionUpdater = new IPositionUpdater() {
+ @Override
public void update(DocumentEvent event) {
- try {
- IDocument document = getDocument();
- if (document != null) {
- Position[] positions = document.getPositions(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY);
- for (int i = 0; i < positions.length; i++) {
- Position position = positions[i];
- if (position.offset == event.fOffset && position.length<=event.fLength) {
- position.delete();
- }
- if (position.isDeleted) {
- document.removePosition(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY, position);
- }
- }
- }
- } catch (BadPositionCategoryException e) {
- }
- }
- };
-
- /**
+ try {
+ IDocument document = getDocument();
+ if (document != null) {
+ Position[] positions = document.getPositions(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY);
+ for (int i = 0; i < positions.length; i++) {
+ Position position = positions[i];
+ if (position.offset == event.fOffset && position.length<=event.fLength) {
+ position.delete();
+ }
+ if (position.isDeleted) {
+ document.removePosition(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY, position);
+ }
+ }
+ }
+ } catch (BadPositionCategoryException e) {
+ }
+ }
+ };
+
+ /**
* Constructs a new viewer in the given parent for the specified console.
*
* @param parent the containing composite
@@ -214,22 +214,22 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
* @param parent containing widget
* @param console text console
*/
- public TextConsoleViewer(Composite parent, TextConsole console) {
- super(parent, null, SWT.V_SCROLL | SWT.H_SCROLL);
- this.console = console;
-
- IDocument document = console.getDocument();
- setDocument(document);
-
- StyledText styledText = getTextWidget();
- styledText.setDoubleClickEnabled(true);
- styledText.addLineStyleListener(this);
- styledText.addLineBackgroundListener(this);
- styledText.setEditable(true);
- styledText.setBackground(console.getBackground());
- setFont(console.getFont());
- styledText.addMouseTrackListener(this);
- styledText.addListener(SWT.MouseUp, mouseUpListener);
+ public TextConsoleViewer(Composite parent, TextConsole console) {
+ super(parent, null, SWT.V_SCROLL | SWT.H_SCROLL);
+ this.console = console;
+
+ IDocument document = console.getDocument();
+ setDocument(document);
+
+ StyledText styledText = getTextWidget();
+ styledText.setDoubleClickEnabled(true);
+ styledText.addLineStyleListener(this);
+ styledText.addLineBackgroundListener(this);
+ styledText.setEditable(true);
+ styledText.setBackground(console.getBackground());
+ setFont(console.getFont());
+ styledText.addMouseTrackListener(this);
+ styledText.addListener(SWT.MouseUp, mouseUpListener);
// event listener used to send event to vertical scroll bar
styledText.getVerticalBar().addSelectionListener(new SelectionAdapter() {
@Override
@@ -277,7 +277,7 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
} else if (e.keyCode == SWT.END || e.keyCode == SWT.BOTTOM) {
setScrollLock(false);// selecting END makes it reveal the
- // end
+ // end
} else if ((e.keyCode == SWT.PAGE_DOWN || e.keyCode == SWT.ARROW_DOWN) && checkEndOfDocument()) {
// unlock if Down at the end of document
setScrollLock(false);
@@ -311,543 +311,543 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
}
});
- ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
- propertyChangeListener = new HyperlinkColorChangeListener();
- colorRegistry.addListener(propertyChangeListener);
-
- revealJob.setSystem(true);
- document.addDocumentListener(documentListener);
- document.addPositionUpdater(positionUpdater);
- }
-
- /**
- * Sets the tab width used by this viewer.
- *
- * @param tabWidth
- * the tab width used by this viewer
- */
- public void setTabWidth(int tabWidth) {
- StyledText styledText = getTextWidget();
- int oldWidth = styledText.getTabs();
- if (tabWidth != oldWidth) {
- styledText.setTabs(tabWidth);
- }
- }
-
- /**
- * Sets the font used by this viewer.
- *
- * @param font
- * the font used by this viewer
- */
- public void setFont(Font font) {
- StyledText styledText = getTextWidget();
- Font oldFont = styledText.getFont();
- if (oldFont == font) {
- return;
- }
- if (font == null || !(font.equals(oldFont))) {
- styledText.setFont(font);
- }
- }
-
- /**
- * Positions the cursor at the end of the document.
- */
- protected void revealEndOfDocument() {
- revealJob.schedule(50);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.custom.LineStyleListener#lineGetStyle(org.eclipse.swt.custom.LineStyleEvent)
- */
- @Override
+ ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
+ propertyChangeListener = new HyperlinkColorChangeListener();
+ colorRegistry.addListener(propertyChangeListener);
+
+ revealJob.setSystem(true);
+ document.addDocumentListener(documentListener);
+ document.addPositionUpdater(positionUpdater);
+ }
+
+ /**
+ * Sets the tab width used by this viewer.
+ *
+ * @param tabWidth
+ * the tab width used by this viewer
+ */
+ public void setTabWidth(int tabWidth) {
+ StyledText styledText = getTextWidget();
+ int oldWidth = styledText.getTabs();
+ if (tabWidth != oldWidth) {
+ styledText.setTabs(tabWidth);
+ }
+ }
+
+ /**
+ * Sets the font used by this viewer.
+ *
+ * @param font
+ * the font used by this viewer
+ */
+ public void setFont(Font font) {
+ StyledText styledText = getTextWidget();
+ Font oldFont = styledText.getFont();
+ if (oldFont == font) {
+ return;
+ }
+ if (font == null || !(font.equals(oldFont))) {
+ styledText.setFont(font);
+ }
+ }
+
+ /**
+ * Positions the cursor at the end of the document.
+ */
+ protected void revealEndOfDocument() {
+ revealJob.schedule(50);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.swt.custom.LineStyleListener#lineGetStyle(org.eclipse.swt.custom.LineStyleEvent)
+ */
+ @Override
public void lineGetStyle(LineStyleEvent event) {
- IDocument document = getDocument();
- if (document != null && document.getLength() > 0) {
+ IDocument document = getDocument();
+ if (document != null && document.getLength() > 0) {
ArrayList<StyleRange> ranges = new ArrayList<StyleRange>();
- int offset = event.lineOffset;
- int length = event.lineText.length();
-
- StyleRange[] partitionerStyles = ((IConsoleDocumentPartitioner) document.getDocumentPartitioner()).getStyleRanges(event.lineOffset, event.lineText.length());
- if (partitionerStyles != null) {
- for (int i = 0; i < partitionerStyles.length; i++) {
- ranges.add(partitionerStyles[i]);
- }
- } else {
- ranges.add(new StyleRange(offset, length, null, null));
- }
-
- try {
- Position[] positions = getDocument().getPositions(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY);
- Position[] overlap = findPosition(offset, length, positions);
- Color color = JFaceColors.getHyperlinkText(Display.getCurrent());
- if (overlap != null) {
- for (int i = 0; i < overlap.length; i++) {
- Position position = overlap[i];
- StyleRange linkRange = new StyleRange(position.offset, position.length, color, null);
- linkRange.underline = true;
- override(ranges, linkRange);
- }
- }
- } catch (BadPositionCategoryException e) {
- }
-
- if (ranges.size() > 0) {
- event.styles = ranges.toArray(new StyleRange[ranges.size()]);
- }
- }
- }
+ int offset = event.lineOffset;
+ int length = event.lineText.length();
+
+ StyleRange[] partitionerStyles = ((IConsoleDocumentPartitioner) document.getDocumentPartitioner()).getStyleRanges(event.lineOffset, event.lineText.length());
+ if (partitionerStyles != null) {
+ for (int i = 0; i < partitionerStyles.length; i++) {
+ ranges.add(partitionerStyles[i]);
+ }
+ } else {
+ ranges.add(new StyleRange(offset, length, null, null));
+ }
+
+ try {
+ Position[] positions = getDocument().getPositions(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY);
+ Position[] overlap = findPosition(offset, length, positions);
+ Color color = JFaceColors.getHyperlinkText(Display.getCurrent());
+ if (overlap != null) {
+ for (int i = 0; i < overlap.length; i++) {
+ Position position = overlap[i];
+ StyleRange linkRange = new StyleRange(position.offset, position.length, color, null);
+ linkRange.underline = true;
+ override(ranges, linkRange);
+ }
+ }
+ } catch (BadPositionCategoryException e) {
+ }
+
+ if (ranges.size() > 0) {
+ event.styles = ranges.toArray(new StyleRange[ranges.size()]);
+ }
+ }
+ }
private void override(List<StyleRange> ranges, StyleRange newRange) {
- if (ranges.isEmpty()) {
- ranges.add(newRange);
- return;
- }
-
- int start = newRange.start;
- int end = start + newRange.length;
- for (int i = 0; i < ranges.size(); i++) {
- StyleRange existingRange = ranges.get(i);
- int rEnd = existingRange.start + existingRange.length;
- if (end <= existingRange.start || start >= rEnd) {
- continue;
- }
-
- if (start < existingRange.start && end > existingRange.start) {
- start = existingRange.start;
- }
-
- if (start >= existingRange.start && end <= rEnd) {
- existingRange.length = start - existingRange.start;
- ranges.add(++i, newRange);
- if (end != rEnd) {
- ranges.add(++i, new StyleRange(end, rEnd - end - 1, existingRange.foreground, existingRange.background));
- }
- return;
- } else if (start >= existingRange.start && start < rEnd) {
- existingRange.length = start - existingRange.start;
- ranges.add(++i, newRange);
- } else if (end >= rEnd) {
- ranges.remove(i);
- } else {
- ranges.add(++i, new StyleRange(end + 1, rEnd - end + 1, existingRange.foreground, existingRange.background));
- }
- }
- }
-
- /**
- * Binary search for the positions overlapping the given range
- *
- * @param offset
- * the offset of the range
- * @param length
- * the length of the range
- * @param positions
- * the positions to search
- * @return the positions overlapping the given range, or <code>null</code>
- */
- private Position[] findPosition(int offset, int length, Position[] positions) {
-
- if (positions.length == 0) {
+ if (ranges.isEmpty()) {
+ ranges.add(newRange);
+ return;
+ }
+
+ int start = newRange.start;
+ int end = start + newRange.length;
+ for (int i = 0; i < ranges.size(); i++) {
+ StyleRange existingRange = ranges.get(i);
+ int rEnd = existingRange.start + existingRange.length;
+ if (end <= existingRange.start || start >= rEnd) {
+ continue;
+ }
+
+ if (start < existingRange.start && end > existingRange.start) {
+ start = existingRange.start;
+ }
+
+ if (start >= existingRange.start && end <= rEnd) {
+ existingRange.length = start - existingRange.start;
+ ranges.add(++i, newRange);
+ if (end != rEnd) {
+ ranges.add(++i, new StyleRange(end, rEnd - end - 1, existingRange.foreground, existingRange.background));
+ }
+ return;
+ } else if (start >= existingRange.start && start < rEnd) {
+ existingRange.length = start - existingRange.start;
+ ranges.add(++i, newRange);
+ } else if (end >= rEnd) {
+ ranges.remove(i);
+ } else {
+ ranges.add(++i, new StyleRange(end + 1, rEnd - end + 1, existingRange.foreground, existingRange.background));
+ }
+ }
+ }
+
+ /**
+ * Binary search for the positions overlapping the given range
+ *
+ * @param offset
+ * the offset of the range
+ * @param length
+ * the length of the range
+ * @param positions
+ * the positions to search
+ * @return the positions overlapping the given range, or <code>null</code>
+ */
+ private Position[] findPosition(int offset, int length, Position[] positions) {
+
+ if (positions.length == 0) {
return null;
}
- int rangeEnd = offset + length;
- int left = 0;
- int right = positions.length - 1;
- int mid = 0;
- Position position = null;
+ int rangeEnd = offset + length;
+ int left = 0;
+ int right = positions.length - 1;
+ int mid = 0;
+ Position position = null;
- while (left < right) {
+ while (left < right) {
- mid = (left + right) / 2;
+ mid = (left + right) / 2;
- position = positions[mid];
- if (rangeEnd < position.getOffset()) {
- if (left == mid) {
+ position = positions[mid];
+ if (rangeEnd < position.getOffset()) {
+ if (left == mid) {
right = left;
} else {
right = mid - 1;
}
- } else if (offset > (position.getOffset() + position.getLength() - 1)) {
- if (right == mid) {
+ } else if (offset > (position.getOffset() + position.getLength() - 1)) {
+ if (right == mid) {
left = right;
} else {
left = mid + 1;
}
- } else {
- left = right = mid;
- }
- }
+ } else {
+ left = right = mid;
+ }
+ }
List<Position> list = new ArrayList<Position>();
- int index = left - 1;
- if (index >= 0) {
- position = positions[index];
- while (index >= 0 && (position.getOffset() + position.getLength()) > offset) {
- index--;
- if (index > 0) {
- position = positions[index];
- }
- }
- }
- index++;
- position = positions[index];
- while (index < positions.length && (position.getOffset() < rangeEnd)) {
- list.add(position);
- index++;
- if (index < positions.length) {
- position = positions[index];
- }
- }
-
- if (list.isEmpty()) {
- return null;
- }
- return list.toArray(new Position[list.size()]);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.custom.LineBackgroundListener#lineGetBackground(org.eclipse.swt.custom.LineBackgroundEvent)
- */
- @Override
+ int index = left - 1;
+ if (index >= 0) {
+ position = positions[index];
+ while (index >= 0 && (position.getOffset() + position.getLength()) > offset) {
+ index--;
+ if (index > 0) {
+ position = positions[index];
+ }
+ }
+ }
+ index++;
+ position = positions[index];
+ while (index < positions.length && (position.getOffset() < rangeEnd)) {
+ list.add(position);
+ index++;
+ if (index < positions.length) {
+ position = positions[index];
+ }
+ }
+
+ if (list.isEmpty()) {
+ return null;
+ }
+ return list.toArray(new Position[list.size()]);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.swt.custom.LineBackgroundListener#lineGetBackground(org.eclipse.swt.custom.LineBackgroundEvent)
+ */
+ @Override
public void lineGetBackground(LineBackgroundEvent event) {
- event.lineBackground = null;
- }
-
- /**
- * Returns the hand cursor.
- *
- * @return the hand cursor
- */
- protected Cursor getHandCursor() {
- if (handCursor == null) {
- handCursor = new Cursor(ConsolePlugin.getStandardDisplay(), SWT.CURSOR_HAND);
- }
- return handCursor;
- }
-
- /**
- * Returns the text cursor.
- *
- * @return the text cursor
- */
- protected Cursor getTextCursor() {
- if (textCursor == null) {
- textCursor = new Cursor(ConsolePlugin.getStandardDisplay(), SWT.CURSOR_IBEAM);
- }
- return textCursor;
- }
-
- /**
- * Notification a hyperlink has been entered.
- *
- * @param link
- * the link that was entered
- */
- protected void linkEntered(IHyperlink link) {
- Control control = getTextWidget();
- if (hyperlink != null) {
- linkExited(hyperlink);
- }
- hyperlink = link;
- hyperlink.linkEntered();
- control.setCursor(getHandCursor());
- control.redraw();
- control.addMouseListener(this);
- }
-
- /**
- * Notification a link was exited.
- *
- * @param link
- * the link that was exited
- */
- protected void linkExited(IHyperlink link) {
- link.linkExited();
- hyperlink = null;
- Control control = getTextWidget();
- control.setCursor(getTextCursor());
- control.redraw();
- control.removeMouseListener(this);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.MouseTrackListener#mouseEnter(org.eclipse.swt.events.MouseEvent)
- */
- @Override
+ event.lineBackground = null;
+ }
+
+ /**
+ * Returns the hand cursor.
+ *
+ * @return the hand cursor
+ */
+ protected Cursor getHandCursor() {
+ if (handCursor == null) {
+ handCursor = new Cursor(ConsolePlugin.getStandardDisplay(), SWT.CURSOR_HAND);
+ }
+ return handCursor;
+ }
+
+ /**
+ * Returns the text cursor.
+ *
+ * @return the text cursor
+ */
+ protected Cursor getTextCursor() {
+ if (textCursor == null) {
+ textCursor = new Cursor(ConsolePlugin.getStandardDisplay(), SWT.CURSOR_IBEAM);
+ }
+ return textCursor;
+ }
+
+ /**
+ * Notification a hyperlink has been entered.
+ *
+ * @param link
+ * the link that was entered
+ */
+ protected void linkEntered(IHyperlink link) {
+ Control control = getTextWidget();
+ if (hyperlink != null) {
+ linkExited(hyperlink);
+ }
+ hyperlink = link;
+ hyperlink.linkEntered();
+ control.setCursor(getHandCursor());
+ control.redraw();
+ control.addMouseListener(this);
+ }
+
+ /**
+ * Notification a link was exited.
+ *
+ * @param link
+ * the link that was exited
+ */
+ protected void linkExited(IHyperlink link) {
+ link.linkExited();
+ hyperlink = null;
+ Control control = getTextWidget();
+ control.setCursor(getTextCursor());
+ control.redraw();
+ control.removeMouseListener(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.swt.events.MouseTrackListener#mouseEnter(org.eclipse.swt.events.MouseEvent)
+ */
+ @Override
public void mouseEnter(MouseEvent e) {
- getTextWidget().addMouseMoveListener(this);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.MouseTrackListener#mouseExit(org.eclipse.swt.events.MouseEvent)
- */
- @Override
+ getTextWidget().addMouseMoveListener(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.swt.events.MouseTrackListener#mouseExit(org.eclipse.swt.events.MouseEvent)
+ */
+ @Override
public void mouseExit(MouseEvent e) {
- getTextWidget().removeMouseMoveListener(this);
- if (hyperlink != null) {
- linkExited(hyperlink);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.MouseTrackListener#mouseHover(org.eclipse.swt.events.MouseEvent)
- */
- @Override
+ getTextWidget().removeMouseMoveListener(this);
+ if (hyperlink != null) {
+ linkExited(hyperlink);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.swt.events.MouseTrackListener#mouseHover(org.eclipse.swt.events.MouseEvent)
+ */
+ @Override
public void mouseHover(MouseEvent e) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.MouseMoveListener#mouseMove(org.eclipse.swt.events.MouseEvent)
- */
- @Override
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.swt.events.MouseMoveListener#mouseMove(org.eclipse.swt.events.MouseEvent)
+ */
+ @Override
public void mouseMove(MouseEvent e) {
- int offset = -1;
- try {
- Point p = new Point(e.x, e.y);
- offset = getTextWidget().getOffsetAtLocation(p);
- } catch (IllegalArgumentException ex) {
- // out of the document range
- }
- updateLinks(offset);
- }
-
- /**
- * The cursor has just be moved to the given offset, the mouse has hovered
- * over the given offset. Update link rendering.
- *
- * @param offset
- */
- protected void updateLinks(int offset) {
- if (offset >= 0) {
- IHyperlink link = getHyperlink(offset);
- if (link != null) {
- if (link.equals(hyperlink)) {
- return;
- }
- linkEntered(link);
- return;
- }
- }
- if (hyperlink != null) {
- linkExited(hyperlink);
- }
- }
-
- /**
- * Returns the currently active hyperlink or <code>null</code> if none.
- *
- * @return the currently active hyperlink or <code>null</code> if none
- */
- public IHyperlink getHyperlink() {
- return hyperlink;
- }
-
- /**
- * Returns the hyperlink at the specified offset, or <code>null</code> if
- * none.
- *
- * @param offset
- * offset at which a hyperlink has been requested
- * @return hyperlink at the specified offset, or <code>null</code> if none
- */
- public IHyperlink getHyperlink(int offset) {
- if (offset >= 0 && console != null) {
- return console.getHyperlink(offset);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.MouseListener#mouseDoubleClick(org.eclipse.swt.events.MouseEvent)
- */
- @Override
+ int offset = -1;
+ try {
+ Point p = new Point(e.x, e.y);
+ offset = getTextWidget().getOffsetAtLocation(p);
+ } catch (IllegalArgumentException ex) {
+ // out of the document range
+ }
+ updateLinks(offset);
+ }
+
+ /**
+ * The cursor has just be moved to the given offset, the mouse has hovered
+ * over the given offset. Update link rendering.
+ *
+ * @param offset
+ */
+ protected void updateLinks(int offset) {
+ if (offset >= 0) {
+ IHyperlink link = getHyperlink(offset);
+ if (link != null) {
+ if (link.equals(hyperlink)) {
+ return;
+ }
+ linkEntered(link);
+ return;
+ }
+ }
+ if (hyperlink != null) {
+ linkExited(hyperlink);
+ }
+ }
+
+ /**
+ * Returns the currently active hyperlink or <code>null</code> if none.
+ *
+ * @return the currently active hyperlink or <code>null</code> if none
+ */
+ public IHyperlink getHyperlink() {
+ return hyperlink;
+ }
+
+ /**
+ * Returns the hyperlink at the specified offset, or <code>null</code> if
+ * none.
+ *
+ * @param offset
+ * offset at which a hyperlink has been requested
+ * @return hyperlink at the specified offset, or <code>null</code> if none
+ */
+ public IHyperlink getHyperlink(int offset) {
+ if (offset >= 0 && console != null) {
+ return console.getHyperlink(offset);
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.swt.events.MouseListener#mouseDoubleClick(org.eclipse.swt.events.MouseEvent)
+ */
+ @Override
public void mouseDoubleClick(MouseEvent e) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent)
- */
- @Override
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.swt.events.MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent)
+ */
+ @Override
public void mouseDown(MouseEvent e) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.MouseListener#mouseUp(org.eclipse.swt.events.MouseEvent)
- */
- @Override
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.swt.events.MouseListener#mouseUp(org.eclipse.swt.events.MouseEvent)
+ */
+ @Override
public void mouseUp(MouseEvent e) {
- }
+ }
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.TextViewer#createDocumentAdapter()
- */
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.text.TextViewer#createDocumentAdapter()
+ */
@Override
protected IDocumentAdapter createDocumentAdapter() {
- if (documentAdapter == null) {
- documentAdapter = new ConsoleDocumentAdapter(consoleWidth = -1);
- }
- return documentAdapter;
- }
-
- /**
- * Sets the console to have a fixed character width. Use -1 to indicate that
- * a fixed width should not be used.
- *
- * @param width
- * fixed character width of the console, or -1
- */
- public void setConsoleWidth(int width) {
- if (consoleWidth != width) {
- consoleWidth = width;
- ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() {
- @Override
+ if (documentAdapter == null) {
+ documentAdapter = new ConsoleDocumentAdapter(consoleWidth = -1);
+ }
+ return documentAdapter;
+ }
+
+ /**
+ * Sets the console to have a fixed character width. Use -1 to indicate that
+ * a fixed width should not be used.
+ *
+ * @param width
+ * fixed character width of the console, or -1
+ */
+ public void setConsoleWidth(int width) {
+ if (consoleWidth != width) {
+ consoleWidth = width;
+ ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
- if (documentAdapter != null) {
- documentAdapter.setWidth(consoleWidth);
- }
- }
- });
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.TextViewer#handleDispose()
- */
- @Override
+ if (documentAdapter != null) {
+ documentAdapter.setWidth(consoleWidth);
+ }
+ }
+ });
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.text.TextViewer#handleDispose()
+ */
+ @Override
protected void handleDispose() {
- IDocument document = getDocument();
- if (document != null) {
- document.removeDocumentListener(documentListener);
- document.removePositionUpdater(positionUpdater);
- }
-
- StyledText styledText = getTextWidget();
- styledText.removeLineStyleListener(this);
- styledText.removeLineBackgroundListener(this);
- styledText.removeMouseTrackListener(this);
-
- if(handCursor != null) {
- handCursor.dispose();
- }
- handCursor = null;
- if(textCursor != null) {
- textCursor.dispose();
- }
- textCursor = null;
- hyperlink = null;
- console = null;
-
- ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
- colorRegistry.removeListener(propertyChangeListener);
-
- super.handleDispose();
- }
-
- class HyperlinkColorChangeListener implements IPropertyChangeListener {
- @Override
+ IDocument document = getDocument();
+ if (document != null) {
+ document.removeDocumentListener(documentListener);
+ document.removePositionUpdater(positionUpdater);
+ }
+
+ StyledText styledText = getTextWidget();
+ styledText.removeLineStyleListener(this);
+ styledText.removeLineBackgroundListener(this);
+ styledText.removeMouseTrackListener(this);
+
+ if(handCursor != null) {
+ handCursor.dispose();
+ }
+ handCursor = null;
+ if(textCursor != null) {
+ textCursor.dispose();
+ }
+ textCursor = null;
+ hyperlink = null;
+ console = null;
+
+ ColorRegistry colorRegistry = JFaceResources.getColorRegistry();
+ colorRegistry.removeListener(propertyChangeListener);
+
+ super.handleDispose();
+ }
+
+ class HyperlinkColorChangeListener implements IPropertyChangeListener {
+ @Override
public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(JFacePreferences.ACTIVE_HYPERLINK_COLOR) || event.getProperty().equals(JFacePreferences.HYPERLINK_COLOR)) {
- getTextWidget().redraw();
- }
- }
+ if (event.getProperty().equals(JFacePreferences.ACTIVE_HYPERLINK_COLOR) || event.getProperty().equals(JFacePreferences.HYPERLINK_COLOR)) {
+ getTextWidget().redraw();
+ }
+ }
- }
+ }
- /*
- * work around to memory leak in TextViewer$WidgetCommand
- */
- @Override
+ /*
+ * work around to memory leak in TextViewer$WidgetCommand
+ */
+ @Override
protected void updateTextListeners(WidgetCommand cmd) {
- super.updateTextListeners(cmd);
- cmd.preservedText = null;
- cmd.event = null;
- cmd.text = null;
- }
+ super.updateTextListeners(cmd);
+ cmd.preservedText = null;
+ cmd.event = null;
+ cmd.text = null;
+ }
- @Override
+ @Override
protected void internalRevealRange(int start, int end) {
- StyledText textWidget = getTextWidget();
- int startLine = documentAdapter.getLineAtOffset(start);
- int endLine = documentAdapter.getLineAtOffset(end);
+ StyledText textWidget = getTextWidget();
+ int startLine = documentAdapter.getLineAtOffset(start);
+ int endLine = documentAdapter.getLineAtOffset(end);
- int top = textWidget.getTopIndex();
- if (top > -1) {
- // scroll vertically
+ int top = textWidget.getTopIndex();
+ if (top > -1) {
+ // scroll vertically
@SuppressWarnings("deprecation")
int lines = getVisibleLinesInViewport();
- int bottom = top + lines;
-
- // two lines at the top and the bottom should always be left
- // if window is smaller than 5 lines, always center position is
- // chosen
- int bufferZone = 2;
- if (startLine >= top + bufferZone && startLine <= bottom - bufferZone && endLine >= top + bufferZone && endLine <= bottom - bufferZone) {
-
- // do not scroll at all as it is already visible
- } else {
- int delta = Math.max(0, lines - (endLine - startLine));
- textWidget.setTopIndex(startLine - delta / 3);
- updateViewportListeners(INTERNAL);
- }
-
- // scroll horizontally
- if (endLine < startLine) {
- endLine += startLine;
- startLine = endLine - startLine;
- endLine -= startLine;
- }
-
- int startPixel = -1;
- int endPixel = -1;
-
- if (endLine > startLine) {
- // reveal the beginning of the range in the start line
- IRegion extent = getExtent(start, start);
- startPixel = extent.getOffset() + textWidget.getHorizontalPixel();
- endPixel = startPixel;
- } else {
- IRegion extent = getExtent(start, end);
- startPixel = extent.getOffset() + textWidget.getHorizontalPixel();
- endPixel = startPixel + extent.getLength();
- }
-
- int visibleStart = textWidget.getHorizontalPixel();
- int visibleEnd = visibleStart + textWidget.getClientArea().width;
-
- // scroll only if not yet visible
- if (startPixel < visibleStart || visibleEnd < endPixel) {
- // set buffer zone to 10 pixels
- bufferZone = 10;
- int newOffset = visibleStart;
- int visibleWidth = visibleEnd - visibleStart;
- int selectionPixelWidth = endPixel - startPixel;
-
- if (startPixel < visibleStart) {
+ int bottom = top + lines;
+
+ // two lines at the top and the bottom should always be left
+ // if window is smaller than 5 lines, always center position is
+ // chosen
+ int bufferZone = 2;
+ if (startLine >= top + bufferZone && startLine <= bottom - bufferZone && endLine >= top + bufferZone && endLine <= bottom - bufferZone) {
+
+ // do not scroll at all as it is already visible
+ } else {
+ int delta = Math.max(0, lines - (endLine - startLine));
+ textWidget.setTopIndex(startLine - delta / 3);
+ updateViewportListeners(INTERNAL);
+ }
+
+ // scroll horizontally
+ if (endLine < startLine) {
+ endLine += startLine;
+ startLine = endLine - startLine;
+ endLine -= startLine;
+ }
+
+ int startPixel = -1;
+ int endPixel = -1;
+
+ if (endLine > startLine) {
+ // reveal the beginning of the range in the start line
+ IRegion extent = getExtent(start, start);
+ startPixel = extent.getOffset() + textWidget.getHorizontalPixel();
+ endPixel = startPixel;
+ } else {
+ IRegion extent = getExtent(start, end);
+ startPixel = extent.getOffset() + textWidget.getHorizontalPixel();
+ endPixel = startPixel + extent.getLength();
+ }
+
+ int visibleStart = textWidget.getHorizontalPixel();
+ int visibleEnd = visibleStart + textWidget.getClientArea().width;
+
+ // scroll only if not yet visible
+ if (startPixel < visibleStart || visibleEnd < endPixel) {
+ // set buffer zone to 10 pixels
+ bufferZone = 10;
+ int newOffset = visibleStart;
+ int visibleWidth = visibleEnd - visibleStart;
+ int selectionPixelWidth = endPixel - startPixel;
+
+ if (startPixel < visibleStart) {
newOffset = startPixel;
} else if (selectionPixelWidth + bufferZone < visibleWidth) {
newOffset = endPixel + bufferZone - visibleWidth;
@@ -855,13 +855,13 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
newOffset = startPixel;
}
- float index = ((float) newOffset) / ((float) getAverageCharWidth());
+ float index = ((float) newOffset) / ((float) getAverageCharWidth());
- textWidget.setHorizontalIndex(Math.round(index));
- }
+ textWidget.setHorizontalIndex(Math.round(index));
+ }
- }
- }
+ }
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/ClearOutputAction.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/ClearOutputAction.java
index fd36d38f4..f2f568714 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/ClearOutputAction.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/ClearOutputAction.java
@@ -70,8 +70,8 @@ public class ClearOutputAction extends Action {
* @param viewer viewer whose document this action is associated with
*/
public ClearOutputAction(ITextViewer viewer) {
- this();
- fViewer = viewer;
+ this();
+ fViewer = viewer;
}
/* (non-Javadoc)
@@ -82,15 +82,15 @@ public class ClearOutputAction extends Action {
BusyIndicator.showWhile(ConsolePlugin.getStandardDisplay(), new Runnable() {
@Override
public void run() {
- if (fIOConsole == null) {
+ if (fIOConsole == null) {
IDocument document = fViewer.getDocument();
if (document != null) {
document.set(""); //$NON-NLS-1$
}
fViewer.setSelectedRange(0, 0);
- } else {
- fIOConsole.clearConsole();
- }
+ } else {
+ fIOConsole.clearConsole();
+ }
}
});
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/CloseConsoleAction.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/CloseConsoleAction.java
index b1fc76517..88987c63f 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/CloseConsoleAction.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/CloseConsoleAction.java
@@ -27,17 +27,17 @@ import org.eclipse.ui.internal.console.IInternalConsoleConstants;
*/
public class CloseConsoleAction extends Action {
- private IConsole fConsole;
+ private IConsole fConsole;
- public CloseConsoleAction(IConsole console) {
- super(ConsoleMessages.CloseConsoleAction_0, ConsolePluginImages.getImageDescriptor(IInternalConsoleConstants.IMG_ELCL_CLOSE));
+ public CloseConsoleAction(IConsole console) {
+ super(ConsoleMessages.CloseConsoleAction_0, ConsolePluginImages.getImageDescriptor(IInternalConsoleConstants.IMG_ELCL_CLOSE));
setDisabledImageDescriptor(ConsolePluginImages.getImageDescriptor(IInternalConsoleConstants.IMG_DLCL_CLOSE));
- setToolTipText(ConsoleMessages.CloseConsoleAction_1);
- fConsole = console;
- }
+ setToolTipText(ConsoleMessages.CloseConsoleAction_1);
+ fConsole = console;
+ }
@Override
public void run() {
- ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[]{fConsole});
- }
+ ConsolePlugin.getDefault().getConsoleManager().removeConsoles(new IConsole[]{fConsole});
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocument.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocument.java
index 8eb24bb79..8fc6d0e63 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocument.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocument.java
@@ -94,37 +94,37 @@ public class ConsoleDocument extends Document {
/* (non-Javadoc)
* @see org.eclipse.jface.text.IDocument#set(java.lang.String)
*/
- @Override
+ @Override
public synchronized void set(String text) {
- super.set(text);
- }
+ super.set(text);
+ }
/* (non-Javadoc)
* @see org.eclipse.jface.text.AbstractDocument#completeInitialization()
*/
- @Override
+ @Override
protected void completeInitialization() {
- super.completeInitialization();
- addPositionUpdater(new HyperlinkUpdater());
- }
+ super.completeInitialization();
+ addPositionUpdater(new HyperlinkUpdater());
+ }
/* (non-Javadoc)
* @see org.eclipse.jface.text.IDocument#addPosition(java.lang.String, org.eclipse.jface.text.Position)
*/
@Override
public synchronized void addPosition(String category, Position position) throws BadLocationException, BadPositionCategoryException {
- super.addPosition(category, position);
- }
+ super.addPosition(category, position);
+ }
/* (non-Javadoc)
* @see org.eclipse.jface.text.IDocument#removePosition(java.lang.String, org.eclipse.jface.text.Position)
*/
- @Override
+ @Override
public synchronized void removePosition(String category, Position position) throws BadPositionCategoryException {
- super.removePosition(category, position);
- }
+ super.removePosition(category, position);
+ }
/* (non-Javadoc)
* @see org.eclipse.jface.text.IDocument#getPositions(java.lang.String)
*/
- @Override
+ @Override
public synchronized Position[] getPositions(String category) throws BadPositionCategoryException {
- return super.getPositions(category);
- }
+ return super.getPositions(category);
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocumentAdapter.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocumentAdapter.java
index 486594d11..564074ac7 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocumentAdapter.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDocumentAdapter.java
@@ -36,168 +36,168 @@ import org.eclipse.swt.custom.TextChangingEvent;
*/
public class ConsoleDocumentAdapter implements IDocumentAdapter, IDocumentListener {
- private int consoleWidth = -1;
+ private int consoleWidth = -1;
private List<TextChangeListener> textChangeListeners;
- private IDocument document;
+ private IDocument document;
- int[] offsets = new int[5000];
- int[] lengths = new int[5000];
- private int regionCount = 1;
- private Pattern pattern = Pattern.compile("$", Pattern.MULTILINE); //$NON-NLS-1$
+ int[] offsets = new int[5000];
+ int[] lengths = new int[5000];
+ private int regionCount = 1;
+ private Pattern pattern = Pattern.compile("$", Pattern.MULTILINE); //$NON-NLS-1$
- public ConsoleDocumentAdapter(int width) {
+ public ConsoleDocumentAdapter(int width) {
textChangeListeners = new ArrayList<TextChangeListener>();
- consoleWidth = width;
- }
-
- /*
- * repairs lines list from the beginning of the line containing the offset of any
- * DocumentEvent, to the end of the Document.
- */
- private void repairLines(int eventOffset) {
- if (document == null) {
- return;
- }
- try {
- int docLine = document.getLineOfOffset(eventOffset);
- int docLineOffset = document.getLineOffset(docLine);
- int widgetLine = getLineAtOffset(docLineOffset);
-
- for (int i=regionCount-1; i>=widgetLine; i--) {
- regionCount--;
- }
-
- int numLinesInDoc = document.getNumberOfLines();
-
- int nextOffset = document.getLineOffset(docLine);
- for (int i = docLine; i<numLinesInDoc; i++) {
- int offset = nextOffset;
- int length = document.getLineLength(i);
- nextOffset += length;
-
- if (length == 0) {
- addRegion(offset, 0);
- } else {
- while (length > 0) {
- int trimmedLength = length;
- String lineDelimiter = document.getLineDelimiter(i);
- int lineDelimiterLength = 0;
- if (lineDelimiter != null) {
- lineDelimiterLength = lineDelimiter.length();
- trimmedLength -= lineDelimiterLength;
- }
-
- if (consoleWidth > 0 && consoleWidth < trimmedLength) {
- addRegion(offset, consoleWidth);
- offset += consoleWidth;
- length -= consoleWidth;
- } else {
- addRegion(offset, length);
- offset += length;
- length -= length;
- }
- }
- }
- }
- } catch (BadLocationException e) {
- }
-
- if (regionCount == 0) {
- addRegion(0, document.getLength());
- }
- }
-
- private void addRegion(int offset, int length) {
- if (regionCount == 0) {
- offsets[0] = offset;
- lengths[0] = length;
- } else {
- if (regionCount == offsets.length) {
- growRegionArray(regionCount * 2);
- }
- offsets[regionCount] = offset;
- lengths[regionCount] = length;
- }
- regionCount++;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.IDocumentAdapter#setDocument(org.eclipse.jface.text.IDocument)
- */
- @Override
+ consoleWidth = width;
+ }
+
+ /*
+ * repairs lines list from the beginning of the line containing the offset of any
+ * DocumentEvent, to the end of the Document.
+ */
+ private void repairLines(int eventOffset) {
+ if (document == null) {
+ return;
+ }
+ try {
+ int docLine = document.getLineOfOffset(eventOffset);
+ int docLineOffset = document.getLineOffset(docLine);
+ int widgetLine = getLineAtOffset(docLineOffset);
+
+ for (int i=regionCount-1; i>=widgetLine; i--) {
+ regionCount--;
+ }
+
+ int numLinesInDoc = document.getNumberOfLines();
+
+ int nextOffset = document.getLineOffset(docLine);
+ for (int i = docLine; i<numLinesInDoc; i++) {
+ int offset = nextOffset;
+ int length = document.getLineLength(i);
+ nextOffset += length;
+
+ if (length == 0) {
+ addRegion(offset, 0);
+ } else {
+ while (length > 0) {
+ int trimmedLength = length;
+ String lineDelimiter = document.getLineDelimiter(i);
+ int lineDelimiterLength = 0;
+ if (lineDelimiter != null) {
+ lineDelimiterLength = lineDelimiter.length();
+ trimmedLength -= lineDelimiterLength;
+ }
+
+ if (consoleWidth > 0 && consoleWidth < trimmedLength) {
+ addRegion(offset, consoleWidth);
+ offset += consoleWidth;
+ length -= consoleWidth;
+ } else {
+ addRegion(offset, length);
+ offset += length;
+ length -= length;
+ }
+ }
+ }
+ }
+ } catch (BadLocationException e) {
+ }
+
+ if (regionCount == 0) {
+ addRegion(0, document.getLength());
+ }
+ }
+
+ private void addRegion(int offset, int length) {
+ if (regionCount == 0) {
+ offsets[0] = offset;
+ lengths[0] = length;
+ } else {
+ if (regionCount == offsets.length) {
+ growRegionArray(regionCount * 2);
+ }
+ offsets[regionCount] = offset;
+ lengths[regionCount] = length;
+ }
+ regionCount++;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.IDocumentAdapter#setDocument(org.eclipse.jface.text.IDocument)
+ */
+ @Override
public void setDocument(IDocument doc) {
- if (document != null) {
- document.removeDocumentListener(this);
- }
+ if (document != null) {
+ document.removeDocumentListener(this);
+ }
- document = doc;
+ document = doc;
- if (document != null) {
- document.addDocumentListener(this);
- repairLines(0);
- }
- }
+ if (document != null) {
+ document.addDocumentListener(this);
+ repairLines(0);
+ }
+ }
- /* (non-Javadoc)
- * @see org.eclipse.swt.custom.StyledTextContent#addTextChangeListener(org.eclipse.swt.custom.TextChangeListener)
- */
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.custom.StyledTextContent#addTextChangeListener(org.eclipse.swt.custom.TextChangeListener)
+ */
@Override
public synchronized void addTextChangeListener(TextChangeListener listener) {
Assert.isNotNull(listener);
if (!textChangeListeners.contains(listener)) {
textChangeListeners.add(listener);
}
- }
+ }
- /* (non-Javadoc)
- * @see org.eclipse.swt.custom.StyledTextContent#removeTextChangeListener(org.eclipse.swt.custom.TextChangeListener)
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.custom.StyledTextContent#removeTextChangeListener(org.eclipse.swt.custom.TextChangeListener)
+ */
+ @Override
public synchronized void removeTextChangeListener(TextChangeListener listener) {
- if(textChangeListeners != null) {
- Assert.isNotNull(listener);
- textChangeListeners.remove(listener);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.custom.StyledTextContent#getCharCount()
- */
- @Override
+ if(textChangeListeners != null) {
+ Assert.isNotNull(listener);
+ textChangeListeners.remove(listener);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.custom.StyledTextContent#getCharCount()
+ */
+ @Override
public int getCharCount() {
- return document.getLength();
- }
+ return document.getLength();
+ }
- /* (non-Javadoc)
- * @see org.eclipse.swt.custom.StyledTextContent#getLine(int)
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.custom.StyledTextContent#getLine(int)
+ */
+ @Override
public String getLine(int lineIndex) {
- try {
- StringBuffer line = new StringBuffer(document.get(offsets[lineIndex], lengths[lineIndex]));
- int index = line.length() - 1;
- while(index > -1 && (line.charAt(index)=='\n' || line.charAt(index)=='\r')) {
- index--;
- }
- return new String(line.substring(0, index+1));
- } catch (BadLocationException e) {
- }
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.custom.StyledTextContent#getLineAtOffset(int)
- */
- @Override
+ try {
+ StringBuffer line = new StringBuffer(document.get(offsets[lineIndex], lengths[lineIndex]));
+ int index = line.length() - 1;
+ while(index > -1 && (line.charAt(index)=='\n' || line.charAt(index)=='\r')) {
+ index--;
+ }
+ return new String(line.substring(0, index+1));
+ } catch (BadLocationException e) {
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.custom.StyledTextContent#getLineAtOffset(int)
+ */
+ @Override
public int getLineAtOffset(int offset) {
- if (offset == 0 || regionCount <= 1) {
- return 0;
- }
+ if (offset == 0 || regionCount <= 1) {
+ return 0;
+ }
- if (offset == document.getLength()) {
- return regionCount-1;
- }
+ if (offset == document.getLength()) {
+ return regionCount-1;
+ }
int left= 0;
int right= regionCount-1;
@@ -205,123 +205,123 @@ public class ConsoleDocumentAdapter implements IDocumentAdapter, IDocumentListen
while (left <= right) {
if(left == right) {
- return right;
- }
- midIndex = (left + right) / 2;
-
- if (offset < offsets[midIndex]) {
- right = midIndex;
- } else if (offset >= offsets[midIndex] + lengths[midIndex]) {
- left = midIndex + 1;
- } else {
- return midIndex;
- }
+ return right;
+ }
+ midIndex = (left + right) / 2;
+
+ if (offset < offsets[midIndex]) {
+ right = midIndex;
+ } else if (offset >= offsets[midIndex] + lengths[midIndex]) {
+ left = midIndex + 1;
+ } else {
+ return midIndex;
+ }
}
return midIndex;
- }
+ }
- /* (non-Javadoc)
- * @see org.eclipse.swt.custom.StyledTextContent#getLineCount()
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.custom.StyledTextContent#getLineCount()
+ */
+ @Override
public int getLineCount() {
- return regionCount;
- }
+ return regionCount;
+ }
- /* (non-Javadoc)
- * @see org.eclipse.swt.custom.StyledTextContent#getLineDelimiter()
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.custom.StyledTextContent#getLineDelimiter()
+ */
+ @Override
public String getLineDelimiter() {
- return System.getProperty("line.separator"); //$NON-NLS-1$
- }
+ return System.getProperty("line.separator"); //$NON-NLS-1$
+ }
- /* (non-Javadoc)
- * @see org.eclipse.swt.custom.StyledTextContent#getOffsetAtLine(int)
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.custom.StyledTextContent#getOffsetAtLine(int)
+ */
+ @Override
public int getOffsetAtLine(int lineIndex) {
- return offsets[lineIndex];
- }
+ return offsets[lineIndex];
+ }
- /* (non-Javadoc)
- * @see org.eclipse.swt.custom.StyledTextContent#getTextRange(int, int)
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.custom.StyledTextContent#getTextRange(int, int)
+ */
+ @Override
public String getTextRange(int start, int length) {
- try {
- return document.get(start, length);
- } catch (BadLocationException e) {
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.custom.StyledTextContent#replaceTextRange(int, int, java.lang.String)
- */
- @Override
+ try {
+ return document.get(start, length);
+ } catch (BadLocationException e) {
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.custom.StyledTextContent#replaceTextRange(int, int, java.lang.String)
+ */
+ @Override
public void replaceTextRange(int start, int replaceLength, String text) {
- try {
- document.replace(start, replaceLength, text);
- } catch (BadLocationException e) {
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.swt.custom.StyledTextContent#setText(java.lang.String)
- */
- @Override
+ try {
+ document.replace(start, replaceLength, text);
+ } catch (BadLocationException e) {
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.custom.StyledTextContent#setText(java.lang.String)
+ */
+ @Override
public synchronized void setText(String text) {
- TextChangedEvent changeEvent = new TextChangedEvent(this);
+ TextChangedEvent changeEvent = new TextChangedEvent(this);
for (TextChangeListener listener : textChangeListeners) {
listener.textSet(changeEvent);
}
- }
+ }
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
+ */
+ @Override
public synchronized void documentAboutToBeChanged(DocumentEvent event) {
- if (document == null) {
- return;
- }
-
- TextChangingEvent changeEvent = new TextChangingEvent(this);
- changeEvent.start = event.fOffset;
- changeEvent.newText = (event.fText == null ? "" : event.fText); //$NON-NLS-1$
- changeEvent.replaceCharCount = event.fLength;
- changeEvent.newCharCount = (event.fText == null ? 0 : event.fText.length());
-
- int first = getLineAtOffset(event.fOffset);
- int lOffset = Math.max(event.fOffset + event.fLength - 1, 0);
+ if (document == null) {
+ return;
+ }
+
+ TextChangingEvent changeEvent = new TextChangingEvent(this);
+ changeEvent.start = event.fOffset;
+ changeEvent.newText = (event.fText == null ? "" : event.fText); //$NON-NLS-1$
+ changeEvent.replaceCharCount = event.fLength;
+ changeEvent.newCharCount = (event.fText == null ? 0 : event.fText.length());
+
+ int first = getLineAtOffset(event.fOffset);
+ int lOffset = Math.max(event.fOffset + event.fLength - 1, 0);
int last = getLineAtOffset(lOffset);
- changeEvent.replaceLineCount = Math.max(last - first, 0);
+ changeEvent.replaceLineCount = Math.max(last - first, 0);
- int newLineCount = countNewLines(event.fText);
+ int newLineCount = countNewLines(event.fText);
changeEvent.newLineCount = newLineCount >= 0 ? newLineCount : 0;
- if (changeEvent.newLineCount > offsets.length-regionCount) {
- growRegionArray(changeEvent.newLineCount);
- }
+ if (changeEvent.newLineCount > offsets.length-regionCount) {
+ growRegionArray(changeEvent.newLineCount);
+ }
for (TextChangeListener listener : textChangeListeners) {
listener.textChanging(changeEvent);
}
- }
-
- private void growRegionArray(int minSize) {
- int size = Math.max(offsets.length*2, minSize*2);
- int[] newOffsets = new int[size];
- System.arraycopy(offsets, 0, newOffsets, 0, regionCount);
- offsets = newOffsets;
- int[] newLengths = new int[size];
- System.arraycopy(lengths, 0, newLengths, 0, regionCount);
- lengths = newLengths;
- }
-
- private int countNewLines(String string) {
+ }
+
+ private void growRegionArray(int minSize) {
+ int size = Math.max(offsets.length*2, minSize*2);
+ int[] newOffsets = new int[size];
+ System.arraycopy(offsets, 0, newOffsets, 0, regionCount);
+ offsets = newOffsets;
+ int[] newLengths = new int[size];
+ System.arraycopy(lengths, 0, newLengths, 0, regionCount);
+ lengths = newLengths;
+ }
+
+ private int countNewLines(String string) {
int count = 0;
if (string.length() == 0) {
@@ -372,36 +372,36 @@ public class ConsoleDocumentAdapter implements IDocumentAdapter, IDocumentListen
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
+ */
+ @Override
public synchronized void documentChanged(DocumentEvent event) {
- if (document == null) {
- return;
- }
+ if (document == null) {
+ return;
+ }
- repairLines(event.fOffset);
+ repairLines(event.fOffset);
- TextChangedEvent changeEvent = new TextChangedEvent(this);
+ TextChangedEvent changeEvent = new TextChangedEvent(this);
for (TextChangeListener listener : textChangeListeners) {
listener.textChanged(changeEvent);
}
- }
-
- /**
- * sets consoleWidth, repairs line information, then fires event to the viewer text widget.
- * @param width The console's width
- */
- public void setWidth(int width) {
- if (width != consoleWidth) {
- consoleWidth = width;
- repairLines(0);
- TextChangedEvent changeEvent = new TextChangedEvent(this);
+ }
+
+ /**
+ * sets consoleWidth, repairs line information, then fires event to the viewer text widget.
+ * @param width The console's width
+ */
+ public void setWidth(int width) {
+ if (width != consoleWidth) {
+ consoleWidth = width;
+ repairLines(0);
+ TextChangedEvent changeEvent = new TextChangedEvent(this);
for (TextChangeListener listener : textChangeListeners) {
listener.textSet(changeEvent);
}
- }
- }
+ }
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDropDownAction.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDropDownAction.java
index 2aa907a4b..b510e9996 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDropDownAction.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleDropDownAction.java
@@ -100,8 +100,8 @@ class ConsoleDropDownAction extends Action implements IMenuCreator, IConsoleList
}
private void addActionToMenu(Menu parent, Action action, int accelerator) {
- if (accelerator < 10) {
- StringBuffer label= new StringBuffer();
+ if (accelerator < 10) {
+ StringBuffer label= new StringBuffer();
//add the numerical accelerator
label.append('&');
label.append(accelerator);
@@ -118,13 +118,13 @@ class ConsoleDropDownAction extends Action implements IMenuCreator, IConsoleList
*/
@Override
public void run() {
- ConsoleView consoleView = (ConsoleView) fView;
- boolean pinned = consoleView.isPinned();
- try {
- if (pinned) {
- consoleView.setPinned(false);
- }
- IConsole[] consoles = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
+ ConsoleView consoleView = (ConsoleView) fView;
+ boolean pinned = consoleView.isPinned();
+ try {
+ if (pinned) {
+ consoleView.setPinned(false);
+ }
+ IConsole[] consoles = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
IConsole current = fView.getConsole();
int idx = 0;
for (int i = 0; i < consoles.length; i++) {
@@ -134,16 +134,16 @@ class ConsoleDropDownAction extends Action implements IMenuCreator, IConsoleList
}
}
int next = idx+1;
- if(next >= consoles.length) {
- next = 0;
- }
- fView.display(consoles[next]);
- }
- finally {
- if (pinned) {
- consoleView.setPinned(true);
- }
- }
+ if(next >= consoles.length) {
+ next = 0;
+ }
+ fView.display(consoles[next]);
+ }
+ finally {
+ if (pinned) {
+ consoleView.setPinned(true);
+ }
+ }
}
/* (non-Javadoc)
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java
index b63793f7e..874f3f9fe 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleFactoryExtension.java
@@ -36,84 +36,84 @@ import org.osgi.framework.Bundle;
*/
public class ConsoleFactoryExtension implements IPluginContribution {
- private IConfigurationElement fConfig;
- private Expression fEnablementExpression;
- private String fLabel;
- private ImageDescriptor fImageDescriptor;
- private IConsoleFactory fFactory;
-
- ConsoleFactoryExtension(IConfigurationElement config) {
- fConfig = config;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPluginContribution#getLocalId()
- */
+ private IConfigurationElement fConfig;
+ private Expression fEnablementExpression;
+ private String fLabel;
+ private ImageDescriptor fImageDescriptor;
+ private IConsoleFactory fFactory;
+
+ ConsoleFactoryExtension(IConfigurationElement config) {
+ fConfig = config;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPluginContribution#getLocalId()
+ */
@Override
public String getLocalId() {
- return fConfig.getAttribute("id"); //$NON-NLS-1$
- }
+ return fConfig.getAttribute("id"); //$NON-NLS-1$
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPluginContribution#getPluginId()
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPluginContribution#getPluginId()
+ */
+ @Override
public String getPluginId() {
- return fConfig.getContributor().getName();
- }
-
- public boolean isEnabled() {
- try {
- Expression enablementExpression = getEnablementExpression();
- if (enablementExpression == null) {
- return true;
- }
- EvaluationContext context = new EvaluationContext(null, this);
- EvaluationResult evaluationResult = enablementExpression.evaluate(context);
- return evaluationResult != EvaluationResult.FALSE;
- } catch (CoreException e) {
- ConsolePlugin.log(e);
- return false;
- }
- }
-
- public Expression getEnablementExpression() throws CoreException {
+ return fConfig.getContributor().getName();
+ }
+
+ public boolean isEnabled() {
+ try {
+ Expression enablementExpression = getEnablementExpression();
+ if (enablementExpression == null) {
+ return true;
+ }
+ EvaluationContext context = new EvaluationContext(null, this);
+ EvaluationResult evaluationResult = enablementExpression.evaluate(context);
+ return evaluationResult != EvaluationResult.FALSE;
+ } catch (CoreException e) {
+ ConsolePlugin.log(e);
+ return false;
+ }
+ }
+
+ public Expression getEnablementExpression() throws CoreException {
if (fEnablementExpression == null) {
IConfigurationElement[] elements = fConfig.getChildren(ExpressionTagNames.ENABLEMENT);
IConfigurationElement enablement = elements.length > 0 ? elements[0] : null;
if (enablement != null) {
- fEnablementExpression = ExpressionConverter.getDefault().perform(enablement);
+ fEnablementExpression = ExpressionConverter.getDefault().perform(enablement);
}
}
return fEnablementExpression;
- }
-
- public String getLabel() {
- if (fLabel == null) {
- fLabel = fConfig.getAttribute("label"); //$NON-NLS-1$
- }
- return fLabel;
- }
-
- public ImageDescriptor getImageDescriptor() {
- if (fImageDescriptor == null) {
- String path = fConfig.getAttribute("icon"); //$NON-NLS-1$
- if (path != null) {
- Bundle bundle = Platform.getBundle(getPluginId());
- URL url = FileLocator.find(bundle, new Path(path), null);
- if (url != null) {
- fImageDescriptor = ImageDescriptor.createFromURL(url);
- }
- }
- }
- return fImageDescriptor;
- }
-
- public IConsoleFactory createFactory() throws CoreException {
- if (fFactory == null) {
- fFactory = (IConsoleFactory) fConfig.createExecutableExtension("class"); //$NON-NLS-1$
- }
- return fFactory;
- }
+ }
+
+ public String getLabel() {
+ if (fLabel == null) {
+ fLabel = fConfig.getAttribute("label"); //$NON-NLS-1$
+ }
+ return fLabel;
+ }
+
+ public ImageDescriptor getImageDescriptor() {
+ if (fImageDescriptor == null) {
+ String path = fConfig.getAttribute("icon"); //$NON-NLS-1$
+ if (path != null) {
+ Bundle bundle = Platform.getBundle(getPluginId());
+ URL url = FileLocator.find(bundle, new Path(path), null);
+ if (url != null) {
+ fImageDescriptor = ImageDescriptor.createFromURL(url);
+ }
+ }
+ }
+ return fImageDescriptor;
+ }
+
+ public IConsoleFactory createFactory() throws CoreException {
+ if (fFactory == null) {
+ fFactory = (IConsoleFactory) fConfig.createExecutableExtension("class"); //$NON-NLS-1$
+ }
+ return fFactory;
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleHyperlinkPosition.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleHyperlinkPosition.java
index 841e2d3be..306ed6810 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleHyperlinkPosition.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleHyperlinkPosition.java
@@ -16,7 +16,7 @@ import org.eclipse.ui.console.IHyperlink;
/**
* Describes the position of a hyperlink within the Console's document.
- *
+ *
* @since 3.1
*/
public class ConsoleHyperlinkPosition extends Position {
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
index 1ef4b9830..faaac740b 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
@@ -78,56 +78,56 @@ public class ConsoleManager implements IConsoleManager {
private List<IConsoleView> fConsoleViews = new ArrayList<IConsoleView>();
- private boolean fWarnQueued = false;
+ private boolean fWarnQueued = false;
- private RepaintJob fRepaintJob = new RepaintJob();
+ private RepaintJob fRepaintJob = new RepaintJob();
- private class RepaintJob extends WorkbenchJob {
+ private class RepaintJob extends WorkbenchJob {
private Set<IConsole> list = new HashSet<IConsole>();
- public RepaintJob() {
- super("schedule redraw() of viewers"); //$NON-NLS-1$
- setSystem(true);
- }
+ public RepaintJob() {
+ super("schedule redraw() of viewers"); //$NON-NLS-1$
+ setSystem(true);
+ }
- void addConsole(IConsole console) {
- synchronized (list) {
- list.add(console);
+ void addConsole(IConsole console) {
+ synchronized (list) {
+ list.add(console);
}
- }
+ }
- @Override
+ @Override
public IStatus runInUIThread(IProgressMonitor monitor) {
- synchronized (list) {
- if (list.isEmpty()) {
- return Status.OK_STATUS;
- }
-
- IWorkbenchWindow[] workbenchWindows = PlatformUI.getWorkbench().getWorkbenchWindows();
- for (int i = 0; i < workbenchWindows.length; i++) {
- IWorkbenchWindow window = workbenchWindows[i];
- if (window != null) {
- IWorkbenchPage page = window.getActivePage();
- if (page != null) {
- IViewPart part = page.findView(IConsoleConstants.ID_CONSOLE_VIEW);
- if (part != null && part instanceof IConsoleView) {
- ConsoleView view = (ConsoleView) part;
- if (list.contains(view.getConsole())) {
- Control control = view.getCurrentPage().getControl();
- if (!control.isDisposed()) {
- control.redraw();
- }
- }
- }
-
- }
- }
- }
- list.clear();
- }
- return Status.OK_STATUS;
- }
- }
+ synchronized (list) {
+ if (list.isEmpty()) {
+ return Status.OK_STATUS;
+ }
+
+ IWorkbenchWindow[] workbenchWindows = PlatformUI.getWorkbench().getWorkbenchWindows();
+ for (int i = 0; i < workbenchWindows.length; i++) {
+ IWorkbenchWindow window = workbenchWindows[i];
+ if (window != null) {
+ IWorkbenchPage page = window.getActivePage();
+ if (page != null) {
+ IViewPart part = page.findView(IConsoleConstants.ID_CONSOLE_VIEW);
+ if (part != null && part instanceof IConsoleView) {
+ ConsoleView view = (ConsoleView) part;
+ if (list.contains(view.getConsole())) {
+ Control control = view.getCurrentPage().getControl();
+ if (!control.isDisposed()) {
+ control.redraw();
+ }
+ }
+ }
+
+ }
+ }
+ }
+ list.clear();
+ }
+ return Status.OK_STATUS;
+ }
+ }
/**
* Notifies a console listener of additions or removals
@@ -178,7 +178,7 @@ public class ConsoleManager implements IConsoleManager {
fType = update;
for (IConsoleListener iConsoleListener : fListeners) {
fListener = iConsoleListener;
- SafeRunner.run(this);
+ SafeRunner.run(this);
}
fChanged = null;
fListener = null;
@@ -186,17 +186,17 @@ public class ConsoleManager implements IConsoleManager {
}
public void registerConsoleView(ConsoleView view) {
- synchronized (fConsoleViews) {
- fConsoleViews.add(view);
- }
+ synchronized (fConsoleViews) {
+ fConsoleViews.add(view);
+ }
+ }
+ public void unregisterConsoleView(ConsoleView view) {
+ synchronized (fConsoleViews) {
+ fConsoleViews.remove(view);
+ }
}
- public void unregisterConsoleView(ConsoleView view) {
- synchronized (fConsoleViews) {
- fConsoleViews.remove(view);
- }
- }
- /* (non-Javadoc)
+ /* (non-Javadoc)
* @see org.eclipse.ui.console.IConsoleManager#addConsoleListener(org.eclipse.ui.console.IConsoleListener)
*/
@Override
@@ -225,11 +225,11 @@ public class ConsoleManager implements IConsoleManager {
List<IConsole> added = new ArrayList<IConsole>(consoles.length);
synchronized (fConsoles) {
for (int i = 0; i < consoles.length; i++) {
- IConsole console = consoles[i];
- if(console instanceof TextConsole) {
- TextConsole ioconsole = (TextConsole)console;
- createPatternMatchListeners(ioconsole);
- }
+ IConsole console = consoles[i];
+ if(console instanceof TextConsole) {
+ TextConsole ioconsole = (TextConsole)console;
+ createPatternMatchListeners(ioconsole);
+ }
if (!fConsoles.contains(console)) {
fConsoles.add(console);
added.add(console);
@@ -409,96 +409,96 @@ public class ConsoleManager implements IConsoleManager {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.IConsoleManager#getPatternMatchListenerDelegates(org.eclipse.ui.console.IConsole)
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IConsoleManager#getPatternMatchListenerDelegates(org.eclipse.ui.console.IConsole)
+ */
+ @Override
public IPatternMatchListener[] createPatternMatchListeners(IConsole console) {
- if (fPatternMatchListeners == null) {
+ if (fPatternMatchListeners == null) {
fPatternMatchListeners = new ArrayList<PatternMatchListenerExtension>();
- IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.EXTENSION_POINT_CONSOLE_PATTERN_MATCH_LISTENERS);
- IConfigurationElement[] elements = extensionPoint.getConfigurationElements();
- for (int i = 0; i < elements.length; i++) {
- IConfigurationElement config = elements[i];
- PatternMatchListenerExtension extension = new PatternMatchListenerExtension(config);
- fPatternMatchListeners.add(extension);
- }
- }
+ IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.EXTENSION_POINT_CONSOLE_PATTERN_MATCH_LISTENERS);
+ IConfigurationElement[] elements = extensionPoint.getConfigurationElements();
+ for (int i = 0; i < elements.length; i++) {
+ IConfigurationElement config = elements[i];
+ PatternMatchListenerExtension extension = new PatternMatchListenerExtension(config);
+ fPatternMatchListeners.add(extension);
+ }
+ }
ArrayList<PatternMatchListener> list = new ArrayList<PatternMatchListener>();
for (Iterator<PatternMatchListenerExtension> i = fPatternMatchListeners.iterator(); i.hasNext();) {
- PatternMatchListenerExtension extension = i.next();
- try {
- if (extension.getEnablementExpression() == null) {
- i.remove();
- continue;
- }
-
- if (console instanceof TextConsole && extension.isEnabledFor(console)) {
- TextConsole textConsole = (TextConsole) console;
- PatternMatchListener patternMatchListener = new PatternMatchListener(extension);
- try {
- textConsole.addPatternMatchListener(patternMatchListener);
- list.add(patternMatchListener);
- } catch (PatternSyntaxException e) {
- ConsolePlugin.log(e);
- i.remove();
- }
- }
- } catch (CoreException e) {
- ConsolePlugin.log(e);
- }
- }
- return list.toArray(new PatternMatchListener[0]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.IConsoleManager#getPageParticipants(org.eclipse.ui.console.IConsole)
- */
- public IConsolePageParticipant[] getPageParticipants(IConsole console) {
- if(fPageParticipants == null) {
+ PatternMatchListenerExtension extension = i.next();
+ try {
+ if (extension.getEnablementExpression() == null) {
+ i.remove();
+ continue;
+ }
+
+ if (console instanceof TextConsole && extension.isEnabledFor(console)) {
+ TextConsole textConsole = (TextConsole) console;
+ PatternMatchListener patternMatchListener = new PatternMatchListener(extension);
+ try {
+ textConsole.addPatternMatchListener(patternMatchListener);
+ list.add(patternMatchListener);
+ } catch (PatternSyntaxException e) {
+ ConsolePlugin.log(e);
+ i.remove();
+ }
+ }
+ } catch (CoreException e) {
+ ConsolePlugin.log(e);
+ }
+ }
+ return list.toArray(new PatternMatchListener[0]);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IConsoleManager#getPageParticipants(org.eclipse.ui.console.IConsole)
+ */
+ public IConsolePageParticipant[] getPageParticipants(IConsole console) {
+ if(fPageParticipants == null) {
fPageParticipants = new ArrayList<ConsolePageParticipantExtension>();
- IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.EXTENSION_POINT_CONSOLE_PAGE_PARTICIPANTS);
- IConfigurationElement[] elements = extensionPoint.getConfigurationElements();
- for(int i = 0; i < elements.length; i++) {
- IConfigurationElement config = elements[i];
- ConsolePageParticipantExtension extension = new ConsolePageParticipantExtension(config);
- fPageParticipants.add(extension);
- }
- }
+ IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.EXTENSION_POINT_CONSOLE_PAGE_PARTICIPANTS);
+ IConfigurationElement[] elements = extensionPoint.getConfigurationElements();
+ for(int i = 0; i < elements.length; i++) {
+ IConfigurationElement config = elements[i];
+ ConsolePageParticipantExtension extension = new ConsolePageParticipantExtension(config);
+ fPageParticipants.add(extension);
+ }
+ }
ArrayList<IConsolePageParticipant> list = new ArrayList<IConsolePageParticipant>();
for (Iterator<ConsolePageParticipantExtension> i = fPageParticipants.iterator(); i.hasNext();) {
- ConsolePageParticipantExtension extension = i.next();
- try {
- if (extension.isEnabledFor(console)) {
- list.add(extension.createDelegate());
- }
- } catch (CoreException e) {
- ConsolePlugin.log(e);
- }
- }
- return list.toArray(new IConsolePageParticipant[0]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.IConsoleManager#getConsoleFactories()
- */
- public ConsoleFactoryExtension[] getConsoleFactoryExtensions() {
- if (fConsoleFactoryExtensions == null) {
+ ConsolePageParticipantExtension extension = i.next();
+ try {
+ if (extension.isEnabledFor(console)) {
+ list.add(extension.createDelegate());
+ }
+ } catch (CoreException e) {
+ ConsolePlugin.log(e);
+ }
+ }
+ return list.toArray(new IConsolePageParticipant[0]);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IConsoleManager#getConsoleFactories()
+ */
+ public ConsoleFactoryExtension[] getConsoleFactoryExtensions() {
+ if (fConsoleFactoryExtensions == null) {
fConsoleFactoryExtensions = new ArrayList<ConsoleFactoryExtension>();
- IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.EXTENSION_POINT_CONSOLE_FACTORIES);
- IConfigurationElement[] configurationElements = extensionPoint.getConfigurationElements();
- for (int i = 0; i < configurationElements.length; i++) {
- fConsoleFactoryExtensions.add(new ConsoleFactoryExtension(configurationElements[i]));
- }
- }
- return fConsoleFactoryExtensions.toArray(new ConsoleFactoryExtension[0]);
- }
+ IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.EXTENSION_POINT_CONSOLE_FACTORIES);
+ IConfigurationElement[] configurationElements = extensionPoint.getConfigurationElements();
+ for (int i = 0; i < configurationElements.length; i++) {
+ fConsoleFactoryExtensions.add(new ConsoleFactoryExtension(configurationElements[i]));
+ }
+ }
+ return fConsoleFactoryExtensions.toArray(new ConsoleFactoryExtension[0]);
+ }
- @Override
+ @Override
public void refresh(final IConsole console) {
- fRepaintJob.addConsole(console);
- fRepaintJob.schedule(50);
- }
+ fRepaintJob.addConsole(console);
+ fRepaintJob.schedule(50);
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.java
index b91f1c849..7f3a13e92 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.java
@@ -51,23 +51,23 @@ public class ConsoleMessages extends NLS {
public static String CloseConsoleAction_0;
public static String CloseConsoleAction_1;
- public static String TextConsolePage_SelectAllDescrip;
- public static String TextConsolePage_SelectAllText;
- public static String TextConsolePage_CutText;
- public static String TextConsolePage_CutDescrip;
- public static String TextConsolePage_CopyText;
- public static String TextConsolePage_CopyDescrip;
- public static String TextConsolePage_PasteText;
- public static String TextConsolePage_PasteDescrip;
+ public static String TextConsolePage_SelectAllDescrip;
+ public static String TextConsolePage_SelectAllText;
+ public static String TextConsolePage_CutText;
+ public static String TextConsolePage_CutDescrip;
+ public static String TextConsolePage_CopyText;
+ public static String TextConsolePage_CopyDescrip;
+ public static String TextConsolePage_PasteText;
+ public static String TextConsolePage_PasteDescrip;
static {
// load message values from bundle file
NLS.initializeMessages(BUNDLE_NAME, ConsoleMessages.class);
}
- public static String PatternMatchListenerExtension_3;
+ public static String PatternMatchListenerExtension_3;
- public static String PatternMatchListenerExtension_4;
+ public static String PatternMatchListenerExtension_4;
- public static String PatternMatchListenerExtension_5;
+ public static String PatternMatchListenerExtension_5;
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePageParticipantExtension.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePageParticipantExtension.java
index 9bf749569..a7d7e9f30 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePageParticipantExtension.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePageParticipantExtension.java
@@ -23,53 +23,53 @@ import org.eclipse.ui.console.IConsolePageParticipant;
public class ConsolePageParticipantExtension implements IPluginContribution {
- private IConfigurationElement fConfig;
- private Expression fEnablementExpression;
+ private IConfigurationElement fConfig;
+ private Expression fEnablementExpression;
- public ConsolePageParticipantExtension(IConfigurationElement config) {
- fConfig = config;
- }
+ public ConsolePageParticipantExtension(IConfigurationElement config) {
+ fConfig = config;
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPluginContribution#getLocalId()
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPluginContribution#getLocalId()
+ */
+ @Override
public String getLocalId() {
- return fConfig.getAttribute("id"); //$NON-NLS-1$
- }
+ return fConfig.getAttribute("id"); //$NON-NLS-1$
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPluginContribution#getPluginId()
- */
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPluginContribution#getPluginId()
+ */
@Override
public String getPluginId() {
- return fConfig.getContributor().getName();
- }
+ return fConfig.getContributor().getName();
+ }
- public boolean isEnabledFor(IConsole console) throws CoreException {
- EvaluationContext context = new EvaluationContext(null, console);
- Expression expression = getEnablementExpression();
- if (expression != null){
- EvaluationResult evaluationResult = expression.evaluate(context);
- return evaluationResult == EvaluationResult.TRUE;
- }
- return true;
- }
+ public boolean isEnabledFor(IConsole console) throws CoreException {
+ EvaluationContext context = new EvaluationContext(null, console);
+ Expression expression = getEnablementExpression();
+ if (expression != null){
+ EvaluationResult evaluationResult = expression.evaluate(context);
+ return evaluationResult == EvaluationResult.TRUE;
+ }
+ return true;
+ }
- public Expression getEnablementExpression() throws CoreException {
+ public Expression getEnablementExpression() throws CoreException {
if (fEnablementExpression == null) {
IConfigurationElement[] elements = fConfig.getChildren(ExpressionTagNames.ENABLEMENT);
IConfigurationElement enablement = elements.length > 0 ? elements[0] : null;
if (enablement != null) {
- fEnablementExpression = ExpressionConverter.getDefault().perform(enablement);
+ fEnablementExpression = ExpressionConverter.getDefault().perform(enablement);
}
}
return fEnablementExpression;
- }
+ }
- public IConsolePageParticipant createDelegate() throws CoreException {
- return (IConsolePageParticipant) fConfig.createExecutableExtension("class"); //$NON-NLS-1$;
- }
+ public IConsolePageParticipant createDelegate() throws CoreException {
+ return (IConsolePageParticipant) fConfig.createExecutableExtension("class"); //$NON-NLS-1$;
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePatternMatcher.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePatternMatcher.java
index 3289b751b..5344e375a 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePatternMatcher.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePatternMatcher.java
@@ -33,35 +33,35 @@ public class ConsolePatternMatcher implements IDocumentListener {
private MatchJob fMatchJob;
- /**
- * Collection of compiled pattern match listeners
- */
+ /**
+ * Collection of compiled pattern match listeners
+ */
private ArrayList<CompiledPatternMatchListener> fPatterns = new ArrayList<CompiledPatternMatchListener>();
- private TextConsole fConsole;
+ private TextConsole fConsole;
- private boolean fFinalMatch;
+ private boolean fFinalMatch;
private boolean fScheduleFinal;
- public ConsolePatternMatcher(TextConsole console) {
- fConsole = console;
+ public ConsolePatternMatcher(TextConsole console) {
+ fConsole = console;
fMatchJob = new MatchJob();
- }
+ }
- private class MatchJob extends Job {
- MatchJob() {
- super("Match Job"); //$NON-NLS-1$
- setSystem(true);
+ private class MatchJob extends Job {
+ MatchJob() {
+ super("Match Job"); //$NON-NLS-1$
+ setSystem(true);
setRule(fConsole.getSchedulingRule());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
protected IStatus run(IProgressMonitor monitor) {
IDocument doc = fConsole.getDocument();
String text = null;
@@ -175,136 +175,136 @@ public class ConsolePatternMatcher implements IDocumentListener {
@Override
public boolean belongsTo(Object family) {
- return family == fConsole;
- }
+ return family == fConsole;
+ }
- }
+ }
- private class CompiledPatternMatchListener {
- Pattern pattern;
+ private class CompiledPatternMatchListener {
+ Pattern pattern;
- Pattern qualifier;
+ Pattern qualifier;
- IPatternMatchListener listener;
+ IPatternMatchListener listener;
- int end = 0;
+ int end = 0;
- CompiledPatternMatchListener(Pattern pattern, Pattern qualifier, IPatternMatchListener matchListener) {
- this.pattern = pattern;
- this.listener = matchListener;
- this.qualifier = qualifier;
- }
+ CompiledPatternMatchListener(Pattern pattern, Pattern qualifier, IPatternMatchListener matchListener) {
+ this.pattern = pattern;
+ this.listener = matchListener;
+ this.qualifier = qualifier;
+ }
- public void dispose() {
- listener.disconnect();
- pattern = null;
- qualifier = null;
- listener = null;
- }
- }
+ public void dispose() {
+ listener.disconnect();
+ pattern = null;
+ qualifier = null;
+ listener = null;
+ }
+ }
- /**
+ /**
* Adds the given pattern match listener to this console. The listener will
* be connected and receive match notifications.
*
* @param matchListener
* the pattern match listener to add
*/
- public void addPatternMatchListener(IPatternMatchListener matchListener) {
- synchronized (fPatterns) {
+ public void addPatternMatchListener(IPatternMatchListener matchListener) {
+ synchronized (fPatterns) {
for (CompiledPatternMatchListener listener : fPatterns) {
if (listener.listener == matchListener) {
return;
}
}
- if (matchListener == null || matchListener.getPattern() == null) {
- throw new IllegalArgumentException("Pattern cannot be null"); //$NON-NLS-1$
- }
-
- Pattern pattern = Pattern.compile(matchListener.getPattern(), matchListener.getCompilerFlags());
- String qualifier = matchListener.getLineQualifier();
- Pattern qPattern = null;
- if (qualifier != null) {
- qPattern = Pattern.compile(qualifier, matchListener.getCompilerFlags());
- }
- CompiledPatternMatchListener notifier = new CompiledPatternMatchListener(pattern, qPattern, matchListener);
- fPatterns.add(notifier);
- matchListener.connect(fConsole);
- fMatchJob.schedule();
- }
- }
-
- /**
- * Removes the given pattern match listener from this console. The listener
- * will be disconnected and will no longer receive match notifications.
- *
- * @param matchListener
- * the pattern match listener to remove.
- */
- public void removePatternMatchListener(IPatternMatchListener matchListener) {
- synchronized (fPatterns) {
+ if (matchListener == null || matchListener.getPattern() == null) {
+ throw new IllegalArgumentException("Pattern cannot be null"); //$NON-NLS-1$
+ }
+
+ Pattern pattern = Pattern.compile(matchListener.getPattern(), matchListener.getCompilerFlags());
+ String qualifier = matchListener.getLineQualifier();
+ Pattern qPattern = null;
+ if (qualifier != null) {
+ qPattern = Pattern.compile(qualifier, matchListener.getCompilerFlags());
+ }
+ CompiledPatternMatchListener notifier = new CompiledPatternMatchListener(pattern, qPattern, matchListener);
+ fPatterns.add(notifier);
+ matchListener.connect(fConsole);
+ fMatchJob.schedule();
+ }
+ }
+
+ /**
+ * Removes the given pattern match listener from this console. The listener
+ * will be disconnected and will no longer receive match notifications.
+ *
+ * @param matchListener
+ * the pattern match listener to remove.
+ */
+ public void removePatternMatchListener(IPatternMatchListener matchListener) {
+ synchronized (fPatterns) {
for (Iterator<CompiledPatternMatchListener> iter = fPatterns.iterator(); iter.hasNext();) {
- CompiledPatternMatchListener element = iter.next();
- if (element.listener == matchListener) {
- iter.remove();
- matchListener.disconnect();
- }
- }
- }
- }
-
- public void disconnect() {
- fMatchJob.cancel();
- synchronized (fPatterns) {
+ CompiledPatternMatchListener element = iter.next();
+ if (element.listener == matchListener) {
+ iter.remove();
+ matchListener.disconnect();
+ }
+ }
+ }
+ }
+
+ public void disconnect() {
+ fMatchJob.cancel();
+ synchronized (fPatterns) {
for (CompiledPatternMatchListener listener : fPatterns) {
listener.dispose();
}
- fPatterns.clear();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
- */
- @Override
+ fPatterns.clear();
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
+ */
+ @Override
public void documentAboutToBeChanged(DocumentEvent event) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
- */
- @Override
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
+ */
+ @Override
public void documentChanged(DocumentEvent event) {
- if (event.fLength > 0) {
- synchronized (fPatterns) {
- if (event.fDocument.getLength() == 0) {
- // document has been cleared, reset match listeners
+ if (event.fLength > 0) {
+ synchronized (fPatterns) {
+ if (event.fDocument.getLength() == 0) {
+ // document has been cleared, reset match listeners
for (CompiledPatternMatchListener notifier : fPatterns) {
notifier.end = 0;
}
- } else {
- if (event.fOffset == 0) {
- //document was trimmed
+ } else {
+ if (event.fOffset == 0) {
+ //document was trimmed
for (CompiledPatternMatchListener notifier : fPatterns) {
notifier.end = notifier.end > event.fLength ? notifier.end - event.fLength : 0;
}
- }
- }
- }
- }
- fMatchJob.schedule();
- }
-
-
- public void forceFinalMatching() {
- fScheduleFinal = true;
- fMatchJob.schedule();
- }
+ }
+ }
+ }
+ }
+ fMatchJob.schedule();
+ }
+
+
+ public void forceFinalMatching() {
+ fScheduleFinal = true;
+ fMatchJob.schedule();
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleResourceBundleMessages.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleResourceBundleMessages.java
index 33b7d8568..86382aafa 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleResourceBundleMessages.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleResourceBundleMessages.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -14,22 +14,22 @@ import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class ConsoleResourceBundleMessages {
- private static final String BUNDLE_NAME = "org.eclipse.ui.internal.console.ConsoleResourceBundleMessages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.ui.internal.console.ConsoleResourceBundleMessages"; //$NON-NLS-1$
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
- private ConsoleResourceBundleMessages() {
- }
+ private ConsoleResourceBundleMessages() {
+ }
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
- public static ResourceBundle getBundle() {
- return RESOURCE_BUNDLE;
- }
+ public static ResourceBundle getBundle() {
+ return RESOURCE_BUNDLE;
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleTypePropertyTester.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleTypePropertyTester.java
index 2909471c5..928e36797 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleTypePropertyTester.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleTypePropertyTester.java
@@ -20,14 +20,14 @@ import org.eclipse.ui.console.IConsole;
*/
public class ConsoleTypePropertyTester extends PropertyTester {
- /* (non-Javadoc)
- * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
- */
+ /* (non-Javadoc)
+ * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
+ */
@Override
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- IConsole console = (IConsole) receiver;
- String type = console.getType();
- return type != null ? type.equals(expectedValue) : false;
- }
+ IConsole console = (IConsole) receiver;
+ String type = console.getType();
+ return type != null ? type.equals(expectedValue) : false;
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleView.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleView.java
index 0f68c92e7..02fac9708 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleView.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleView.java
@@ -115,7 +115,7 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
private OpenConsoleAction fOpenConsoleAction = null;
- private boolean fScrollLock;
+ private boolean fScrollLock;
private boolean fWordWrap;
private boolean isAvailable() {
@@ -146,45 +146,48 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
@Override
protected void showPageRec(PageRec pageRec) {
- // don't show the page when pinned, unless this is the first console to be added
- // or its the default page
- if (fActiveConsole != null && pageRec.page != getDefaultPage() && fPinned && fConsoleToPart.size() > 1) {
- IConsole console = fPartToConsole.get(pageRec.part);
- if (!fStack.contains(console)) {
- fStack.add(console);
- }
- return;
- }
-
- IConsole recConsole = fPartToConsole.get(pageRec.part);
- if (recConsole!=null && recConsole.equals(fActiveConsole)) {
- return;
- }
-
- super.showPageRec(pageRec);
- fActiveConsole = recConsole;
- IConsole tos = null;
- if (!fStack.isEmpty()) {
- tos = fStack.get(0);
- }
- if (tos != null && !tos.equals(fActiveConsole) && fActive) {
- deactivateParticipants(tos);
- }
- if (fActiveConsole != null && !fActiveConsole.equals(tos)) {
- fStack.remove(fActiveConsole);
- fStack.add(0,fActiveConsole);
- activateParticipants(fActiveConsole);
- }
- updateTitle();
- updateHelp();
- // update console actions
- if (fPinAction != null) {
- fPinAction.update();
- }
- IPage page = getCurrentPage();
- if (page instanceof IOConsolePage) {
- ((IOConsolePage) page).setWordWrap(fWordWrap);
- }
+ // don't show the page when pinned, unless this is the first console to be added
+ // or its the default page
+ if (fActiveConsole != null && pageRec.page != getDefaultPage() && fPinned && fConsoleToPart.size() > 1) {
+ IConsole console = fPartToConsole.get(pageRec.part);
+ if (!fStack.contains(console)) {
+ fStack.add(console);
+ }
+ return;
+ }
+
+ IConsole recConsole = fPartToConsole.get(pageRec.part);
+ if (recConsole!=null && recConsole.equals(fActiveConsole)) {
+ return;
+ }
+
+ super.showPageRec(pageRec);
+ fActiveConsole = recConsole;
+ IConsole tos = null;
+ if (!fStack.isEmpty()) {
+ tos = fStack.get(0);
+ }
+ if (tos != null && !tos.equals(fActiveConsole) && fActive) {
+ deactivateParticipants(tos);
+ }
+ if (fActiveConsole != null && !fActiveConsole.equals(tos)) {
+ fStack.remove(fActiveConsole);
+ fStack.add(0,fActiveConsole);
+ activateParticipants(fActiveConsole);
+ }
+ updateTitle();
+ updateHelp();
+ // update console actions
+ if (fPinAction != null) {
+ fPinAction.update();
+ }
+ IPage page = getCurrentPage();
+ if (page instanceof IOConsolePage) {
+ ((IOConsolePage) page).setWordWrap(fWordWrap);
+ }
+ if (page != null) {
+ page.setFocus();
+ }
}
/**
@@ -199,7 +202,7 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
if (listeners != null) {
for (IConsolePageParticipant iConsolePageParticipant : listeners) {
final IConsolePageParticipant participant = iConsolePageParticipant;
- SafeRunner.run(new ISafeRunnable() {
+ SafeRunner.run(new ISafeRunnable() {
@Override
public void run() throws Exception {
participant.activated();
@@ -210,7 +213,7 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
listeners.remove(participant);
}
});
- }
+ }
}
}
}
@@ -227,22 +230,22 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
/**
* Updates the view title based on the active console
*/
- protected void updateTitle() {
- IConsole console = getConsole();
- if (console == null) {
- setContentDescription(ConsoleMessages.ConsoleView_0);
- } else {
- String newName = console.getName();
- String oldName = getContentDescription();
- if (newName!=null && !(newName.equals(oldName))) {
- setContentDescription(console.getName());
- }
- }
- }
-
- protected void updateHelp() {
- IConsole console = getConsole();
- String helpContextId = null;
+ protected void updateTitle() {
+ IConsole console = getConsole();
+ if (console == null) {
+ setContentDescription(ConsoleMessages.ConsoleView_0);
+ } else {
+ String newName = console.getName();
+ String oldName = getContentDescription();
+ if (newName!=null && !(newName.equals(oldName))) {
+ setContentDescription(console.getName());
+ }
+ }
+ }
+
+ protected void updateHelp() {
+ IConsole console = getConsole();
+ String helpContextId = null;
if (console instanceof AbstractConsole) {
AbstractConsole abs = (AbstractConsole) console;
helpContextId = abs.getHelpContextId();
@@ -251,18 +254,18 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
helpContextId = IConsoleHelpContextIds.CONSOLE_VIEW;
}
PlatformUI.getWorkbench().getHelpSystem().setHelp(getPageBook().getParent(), helpContextId);
- }
+ }
@Override
protected void doDestroyPage(IWorkbenchPart part, PageRec pageRecord) {
- IConsole console = fPartToConsole.get(part);
+ IConsole console = fPartToConsole.get(part);
// dispose page participants
ListenerList<IConsolePageParticipant> listeners = fConsoleToPageParticipants.remove(console);
if (listeners != null) {
for (IConsolePageParticipant iConsolePageParticipant : listeners) {
final IConsolePageParticipant participant = iConsolePageParticipant;
- SafeRunner.run(new ISafeRunnable() {
+ SafeRunner.run(new ISafeRunnable() {
@Override
public void run() throws Exception {
participant.dispose();
@@ -272,7 +275,7 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
ConsolePlugin.log(exception);
}
});
- }
+ }
}
IPage page = pageRecord.page;
@@ -283,9 +286,9 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
// empty cross-reference cache
fPartToConsole.remove(part);
fConsoleToPart.remove(console);
- if (fPartToConsole.isEmpty()) {
- fActiveConsole = null;
- }
+ if (fPartToConsole.isEmpty()) {
+ fActiveConsole = null;
+ }
// update console actions
fPinAction.update();
@@ -299,7 +302,7 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
* @return registered page participants or <code>null</code>
*/
private ListenerList<IConsolePageParticipant> getParticipants(IConsole console) {
- return fConsoleToPageParticipants.get(console);
+ return fConsoleToPageParticipants.get(console);
}
@Override
@@ -320,7 +323,7 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
fConsoleToPageParticipants.put(console, participants);
for (IConsolePageParticipant iConsolePageParticipant : participants) {
final IConsolePageParticipant participant = iConsolePageParticipant;
- SafeRunner.run(new ISafeRunnable() {
+ SafeRunner.run(new ISafeRunnable() {
@Override
public void run() throws Exception {
participant.init(page, console);
@@ -331,7 +334,7 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
participants.remove(participant);
}
});
- }
+ }
PageRec rec = new PageRec(dummyPart, page);
return rec;
@@ -349,9 +352,9 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
site.getPage().removePartListener((IPartListener2)this);
}
super.dispose();
- ConsoleManager consoleManager = (ConsoleManager) ConsolePlugin.getDefault().getConsoleManager();
- consoleManager.removeConsoleListener(this);
- consoleManager.unregisterConsoleView(this);
+ ConsoleManager consoleManager = (ConsoleManager) ConsolePlugin.getDefault().getConsoleManager();
+ consoleManager.removeConsoleListener(this);
+ consoleManager.unregisterConsoleView(this);
if (fDisplayConsoleAction != null) {
fDisplayConsoleAction.dispose();
fDisplayConsoleAction = null;
@@ -361,11 +364,11 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
/**
* Returns the console manager.
*
- * @return the console manager
- */
- private IConsoleManager getConsoleManager() {
- return ConsolePlugin.getDefault().getConsoleManager();
- }
+ * @return the console manager
+ */
+ private IConsoleManager getConsoleManager() {
+ return ConsolePlugin.getDefault().getConsoleManager();
+ }
@Override
protected IPage createDefaultPage(PageBook book) {
@@ -387,15 +390,15 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
// ensure it's still registered since this is done asynchronously
IConsole[] allConsoles = getConsoleManager().getConsoles();
for (int j = 0; j < allConsoles.length; j++) {
- IConsole registered = allConsoles[j];
- if (registered.equals(console)) {
- ConsoleWorkbenchPart part = new ConsoleWorkbenchPart(console, getSite());
- fConsoleToPart.put(console, part);
- fPartToConsole.put(part, console);
- partActivated(part);
- break;
- }
- }
+ IConsole registered = allConsoles[j];
+ if (registered.equals(console)) {
+ ConsoleWorkbenchPart part = new ConsoleWorkbenchPart(console, getSite());
+ fConsoleToPart.put(console, part);
+ fPartToConsole.put(part, console);
+ partActivated(part);
+ break;
+ }
+ }
}
}
@@ -451,7 +454,7 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
fDisplayConsoleAction = new ConsoleDropDownAction(this);
ConsoleFactoryExtension[] extensions = ((ConsoleManager)ConsolePlugin.getDefault().getConsoleManager()).getConsoleFactoryExtensions();
if (extensions.length > 0) {
- fOpenConsoleAction = new OpenConsoleAction();
+ fOpenConsoleAction = new OpenConsoleAction();
}
}
@@ -462,9 +465,9 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
mgr.add(fPinAction);
mgr.add(fDisplayConsoleAction);
if (fOpenConsoleAction != null) {
- mgr.add(fOpenConsoleAction);
- if (mgr instanceof ToolBarManager) {
- ToolBarManager tbm= (ToolBarManager) mgr;
+ mgr.add(fOpenConsoleAction);
+ if (mgr instanceof ToolBarManager) {
+ ToolBarManager tbm= (ToolBarManager) mgr;
final ToolBar tb= tbm.getControl();
tb.addMouseListener(new MouseAdapter() {
@Override
@@ -485,28 +488,28 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
}
}
});
- }
+ }
}
}
@Override
public void display(IConsole console) {
- if (fPinned && fActiveConsole != null) {
- return;
- }
- if (console.equals(fActiveConsole)) {
- return;
- }
- ConsoleWorkbenchPart part = fConsoleToPart.get(console);
- if (part != null) {
- partActivated(part);
- }
+ if (fPinned && fActiveConsole != null) {
+ return;
+ }
+ if (console.equals(fActiveConsole)) {
+ return;
+ }
+ ConsoleWorkbenchPart part = fConsoleToPart.get(console);
+ if (part != null) {
+ partActivated(part);
+ }
}
@Override
public void setPinned(boolean pin) {
- fPinned = pin;
- if (fPinAction != null) {
+ fPinned = pin;
+ if (fPinAction != null) {
fPinAction.update();
}
}
@@ -628,25 +631,25 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
@SuppressWarnings("unchecked")
@Override
public <T> T getAdapter(Class<T> key) {
- Object adpater = super.getAdapter(key);
- if (adpater == null) {
- IConsole console = getConsole();
- if (console != null) {
+ Object adpater = super.getAdapter(key);
+ if (adpater == null) {
+ IConsole console = getConsole();
+ if (console != null) {
ListenerList<IConsolePageParticipant> listeners = getParticipants(console);
- // an adapter can be asked for before the console participants are created
- if (listeners != null) {
+ // an adapter can be asked for before the console participants are created
+ if (listeners != null) {
for (IConsolePageParticipant iConsolePageParticipant : listeners) {
IConsolePageParticipant participant = iConsolePageParticipant;
- adpater = participant.getAdapter(key);
- if (adpater != null) {
+ adpater = participant.getAdapter(key);
+ if (adpater != null) {
return (T) adpater;
- }
- }
- }
- }
- }
+ }
+ }
+ }
+ }
+ }
return (T) adpater;
- }
+ }
@Override
public void partActivated(IWorkbenchPartReference partRef) {
@@ -670,40 +673,40 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
@Override
public void partDeactivated(IWorkbenchPartReference partRef) {
- if (isThisPart(partRef)) {
+ if (isThisPart(partRef)) {
fActive = false;
IContextService contextService = getSite().getService(IContextService.class);
if(contextService != null) {
contextService.deactivateContext(fActivatedContext);
deactivateParticipants(fActiveConsole);
}
- }
+ }
}
- /**
+ /**
* Returns if the specified part reference is to this view part (if the part
* reference is the console view or not)
*
* @param partRef the workbench part reference
* @return true if the specified part reference is the console view
*/
- protected boolean isThisPart(IWorkbenchPartReference partRef) {
- if (partRef instanceof IViewReference) {
- IViewReference viewRef = (IViewReference) partRef;
- if (getViewSite() != null && viewRef.getId().equals(getViewSite().getId())) {
- String secId = viewRef.getSecondaryId();
- String mySec = null;
- if (getSite() instanceof IViewSite) {
- mySec = ((IViewSite)getSite()).getSecondaryId();
- }
- if (mySec == null) {
- return secId == null;
- }
- return mySec.equals(secId);
- }
- }
- return false;
- }
+ protected boolean isThisPart(IWorkbenchPartReference partRef) {
+ if (partRef instanceof IViewReference) {
+ IViewReference viewRef = (IViewReference) partRef;
+ if (getViewSite() != null && viewRef.getId().equals(getViewSite().getId())) {
+ String secId = viewRef.getSecondaryId();
+ String mySec = null;
+ if (getSite() instanceof IViewSite) {
+ mySec = ((IViewSite)getSite()).getSecondaryId();
+ }
+ if (mySec == null) {
+ return secId == null;
+ }
+ return mySec.equals(secId);
+ }
+ }
+ return false;
+ }
/**
* Deactivates participants for the given console, if any.
@@ -712,12 +715,12 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
*/
private void deactivateParticipants(IConsole console) {
// deactivate
- if (console != null) {
+ if (console != null) {
final ListenerList<IConsolePageParticipant> listeners = getParticipants(console);
if (listeners != null) {
for (IConsolePageParticipant iConsolePageParticipant : listeners) {
final IConsolePageParticipant participant = iConsolePageParticipant;
- SafeRunner.run(new ISafeRunnable() {
+ SafeRunner.run(new ISafeRunnable() {
@Override
public void run() throws Exception {
participant.deactivated();
@@ -728,9 +731,9 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
listeners.remove(participant);
}
});
- }
+ }
}
- }
+ }
}
@Override
@@ -749,20 +752,20 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
public void partInputChanged(IWorkbenchPartReference partRef) {
}
- @Override
+ @Override
public void setScrollLock(boolean scrollLock) {
- fScrollLock = scrollLock;
+ fScrollLock = scrollLock;
- IPage page = getCurrentPage();
- if (page instanceof IOConsolePage) {
- ((IOConsolePage)page).setAutoScroll(!scrollLock);
- }
- }
+ IPage page = getCurrentPage();
+ if (page instanceof IOConsolePage) {
+ ((IOConsolePage)page).setAutoScroll(!scrollLock);
+ }
+ }
- @Override
+ @Override
public boolean getScrollLock() {
- return fScrollLock;
- }
+ return fScrollLock;
+ }
@Override
public void setWordWrap(boolean wordWrap) {
@@ -782,18 +785,18 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
return fWordWrap;
}
- @Override
+ @Override
public void pin(IConsole console) {
- if (console == null) {
- setPinned(false);
- } else {
- if (isPinned()) {
- setPinned(false);
- }
- display(console);
- setPinned(true);
- }
- }
+ if (console == null) {
+ setPinned(false);
+ } else {
+ if (isPinned()) {
+ setPinned(false);
+ }
+ display(console);
+ setPinned(true);
+ }
+ }
@Override
public void setAutoScrollLock(boolean scrollLock) {
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleViewConsoleFactory.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleViewConsoleFactory.java
index 5fe80b8df..780d777c6 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleViewConsoleFactory.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleViewConsoleFactory.java
@@ -20,28 +20,28 @@ import org.eclipse.ui.console.IConsoleFactory;
public class ConsoleViewConsoleFactory implements IConsoleFactory {
- int counter = 1;
+ int counter = 1;
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.console.IConsoleFactory#openConsole()
- */
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.console.IConsoleFactory#openConsole()
+ */
@Override
public void openConsole() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- IWorkbenchPage page = window.getActivePage();
- if (page != null) {
- try {
- String secondaryId = "Console View #" + counter; //$NON-NLS-1$
- page.showView(IConsoleConstants.ID_CONSOLE_VIEW, secondaryId, 1);
- counter++;
- } catch (PartInitException e) {
- ConsolePlugin.log(e);
- }
- }
- }
- }
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if (window != null) {
+ IWorkbenchPage page = window.getActivePage();
+ if (page != null) {
+ try {
+ String secondaryId = "Console View #" + counter; //$NON-NLS-1$
+ page.showView(IConsoleConstants.ID_CONSOLE_VIEW, secondaryId, 1);
+ counter++;
+ } catch (PartInitException e) {
+ ConsolePlugin.log(e);
+ }
+ }
+ }
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java
index 400f7d528..ace7d4e07 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java
@@ -31,7 +31,7 @@ public class ConsoleWorkbenchPart implements IWorkbenchPart {
@Override
public boolean equals(Object obj) {
return (obj instanceof ConsoleWorkbenchPart) &&
- fConsole.equals(((ConsoleWorkbenchPart)obj).fConsole);
+ fConsole.equals(((ConsoleWorkbenchPart)obj).fConsole);
}
/* (non-Javadoc)
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java
index 5a735ccf9..4d81df31d 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java
@@ -24,28 +24,28 @@ public class FollowHyperlinkAction extends Action {
private TextConsoleViewer viewer;
- /**
+ /**
* Constructs a follow link action
*/
public FollowHyperlinkAction(TextConsoleViewer consoleViewer) {
- super(ConsoleMessages.FollowHyperlinkAction_0);
+ super(ConsoleMessages.FollowHyperlinkAction_0);
setToolTipText(ConsoleMessages.FollowHyperlinkAction_1);
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IConsoleHelpContextIds.CONSOLE_OPEN_LINK_ACTION);
this.viewer = consoleViewer;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#isEnabled()
- */
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IAction#isEnabled()
+ */
@Override
public boolean isEnabled() {
- return viewer.getHyperlink() != null;
- }
+ return viewer.getHyperlink() != null;
+ }
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.action.IAction#run()
+ */
@Override
public void run() {
IHyperlink link = viewer.getHyperlink();
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/HyperlinkUpdater.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/HyperlinkUpdater.java
index 0c78ed550..43eeb6d45 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/HyperlinkUpdater.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/HyperlinkUpdater.java
@@ -37,9 +37,9 @@ public class HyperlinkUpdater extends DefaultPositionUpdater {
int positionEnd = fPosition.offset + fPosition.length - 1;
int editEnd = fOffset + fLength - 1;
if ((fOffset <= fPosition.offset && (editEnd > fPosition.offset)) ||
- (fOffset < positionEnd && (editEnd > positionEnd)) ||
- (fOffset >= fPosition.offset && fOffset <= positionEnd) ||
- (editEnd >= fPosition.offset && editEnd <= positionEnd)) {
+ (fOffset < positionEnd && (editEnd > positionEnd)) ||
+ (fOffset >= fPosition.offset && fOffset <= positionEnd) ||
+ (editEnd >= fPosition.offset && editEnd <= positionEnd)) {
fPosition.delete();
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IInternalConsoleConstants.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IInternalConsoleConstants.java
index 1465ca8ec..d29005b43 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IInternalConsoleConstants.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IInternalConsoleConstants.java
@@ -32,5 +32,5 @@ public interface IInternalConsoleConstants {
public static final String IMG_ELCL_LOCK = "IMG_ELCL_LOCK"; //$NON-NLS-1$
public static final String IMG_ELCL_WRAP = "IMG_ELCL_WRAP"; //$NON-NLS-1$
public static final String IMG_ELCL_CLOSE = "IMG_ELCL_CLOSE"; //$NON-NLS-1$
- public static final String IMG_ELCL_NEW_CON = "IMG_ELCL_NEW_CON"; //$NON-NLS-1$
+ public static final String IMG_ELCL_NEW_CON = "IMG_ELCL_NEW_CON"; //$NON-NLS-1$
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePage.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePage.java
index 1b876a93e..0afc425f6 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePage.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePage.java
@@ -31,54 +31,54 @@ import org.eclipse.ui.console.TextConsoleViewer;
*/
public class IOConsolePage extends TextConsolePage {
- private ScrollLockAction fScrollLockAction;
- private WordWrapAction fWordWrapAction;
+ private ScrollLockAction fScrollLockAction;
+ private WordWrapAction fWordWrapAction;
- private boolean fReadOnly;
+ private boolean fReadOnly;
- private IPropertyChangeListener fPropertyChangeListener;
+ private IPropertyChangeListener fPropertyChangeListener;
private IConsoleView fView;
- public IOConsolePage(TextConsole console, IConsoleView view) {
- super(console, view);
+ public IOConsolePage(TextConsole console, IConsoleView view) {
+ super(console, view);
fView = view;
- fPropertyChangeListener = new IPropertyChangeListener() {
- @Override
+ fPropertyChangeListener = new IPropertyChangeListener() {
+ @Override
public void propertyChange(PropertyChangeEvent event) {
- String property = event.getProperty();
- if (property.equals(IConsoleConstants.P_CONSOLE_OUTPUT_COMPLETE)) {
- setReadOnly();
- }
- }
- };
- console.addPropertyChangeListener(fPropertyChangeListener);
- }
-
- @Override
+ String property = event.getProperty();
+ if (property.equals(IConsoleConstants.P_CONSOLE_OUTPUT_COMPLETE)) {
+ setReadOnly();
+ }
+ }
+ };
+ console.addPropertyChangeListener(fPropertyChangeListener);
+ }
+
+ @Override
public void createControl(Composite parent) {
- super.createControl(parent);
- if (fReadOnly) {
- IOConsoleViewer viewer = (IOConsoleViewer) getViewer();
- viewer.setReadOnly();
- }
- }
-
- @Override
+ super.createControl(parent);
+ if (fReadOnly) {
+ IOConsoleViewer viewer = (IOConsoleViewer) getViewer();
+ viewer.setReadOnly();
+ }
+ }
+
+ @Override
protected TextConsoleViewer createViewer(Composite parent) {
return new IOConsoleViewer(parent, (TextConsole) getConsole(), fView);
- }
+ }
- public void setAutoScroll(boolean scroll) {
- IOConsoleViewer viewer = (IOConsoleViewer) getViewer();
- if (viewer != null) {
- viewer.setAutoScroll(scroll);
- fScrollLockAction.setChecked(!scroll);
- }
- }
+ public void setAutoScroll(boolean scroll) {
+ IOConsoleViewer viewer = (IOConsoleViewer) getViewer();
+ if (viewer != null) {
+ viewer.setAutoScroll(scroll);
+ fScrollLockAction.setChecked(!scroll);
+ }
+ }
- public boolean isAutoScroll() {
+ public boolean isAutoScroll() {
IOConsoleViewer viewer = (IOConsoleViewer) getViewer();
if (viewer != null) {
return viewer.isAutoScroll();
@@ -86,65 +86,65 @@ public class IOConsolePage extends TextConsolePage {
}
return false;
}
- public void setWordWrap(boolean wordwrap) {
- IOConsoleViewer viewer = (IOConsoleViewer) getViewer();
- if (viewer != null) {
- viewer.setWordWrap(wordwrap);
- fWordWrapAction.setChecked(wordwrap);
- }
- }
-
- /**
- * Informs the viewer that it's text widget should not be editable.
- */
- public void setReadOnly() {
- fReadOnly = true;
- IOConsoleViewer viewer = (IOConsoleViewer) getViewer();
- if (viewer != null) {
- viewer.setReadOnly();
- }
- }
-
- @Override
+ public void setWordWrap(boolean wordwrap) {
+ IOConsoleViewer viewer = (IOConsoleViewer) getViewer();
+ if (viewer != null) {
+ viewer.setWordWrap(wordwrap);
+ fWordWrapAction.setChecked(wordwrap);
+ }
+ }
+
+ /**
+ * Informs the viewer that it's text widget should not be editable.
+ */
+ public void setReadOnly() {
+ fReadOnly = true;
+ IOConsoleViewer viewer = (IOConsoleViewer) getViewer();
+ if (viewer != null) {
+ viewer.setReadOnly();
+ }
+ }
+
+ @Override
protected void createActions() {
- super.createActions();
- fScrollLockAction = new ScrollLockAction(getConsoleView());
- setAutoScroll(!fScrollLockAction.isChecked());
- fWordWrapAction = new WordWrapAction(getConsoleView());
- setWordWrap(fWordWrapAction.isChecked());
- }
-
- @Override
+ super.createActions();
+ fScrollLockAction = new ScrollLockAction(getConsoleView());
+ setAutoScroll(!fScrollLockAction.isChecked());
+ fWordWrapAction = new WordWrapAction(getConsoleView());
+ setWordWrap(fWordWrapAction.isChecked());
+ }
+
+ @Override
protected void contextMenuAboutToShow(IMenuManager menuManager) {
- super.contextMenuAboutToShow(menuManager);
- menuManager.add(fScrollLockAction);
- menuManager.add(fWordWrapAction);
- IOConsoleViewer viewer = (IOConsoleViewer) getViewer();
- if (!viewer.isReadOnly()) {
- menuManager.remove(ActionFactory.CUT.getId());
- menuManager.remove(ActionFactory.PASTE.getId());
- }
- }
+ super.contextMenuAboutToShow(menuManager);
+ menuManager.add(fScrollLockAction);
+ menuManager.add(fWordWrapAction);
+ IOConsoleViewer viewer = (IOConsoleViewer) getViewer();
+ if (!viewer.isReadOnly()) {
+ menuManager.remove(ActionFactory.CUT.getId());
+ menuManager.remove(ActionFactory.PASTE.getId());
+ }
+ }
@Override
protected void configureToolBar(IToolBarManager mgr) {
- super.configureToolBar(mgr);
- mgr.appendToGroup(IConsoleConstants.OUTPUT_GROUP, fScrollLockAction);
- mgr.appendToGroup(IConsoleConstants.OUTPUT_GROUP, fWordWrapAction);
- }
+ super.configureToolBar(mgr);
+ mgr.appendToGroup(IConsoleConstants.OUTPUT_GROUP, fScrollLockAction);
+ mgr.appendToGroup(IConsoleConstants.OUTPUT_GROUP, fWordWrapAction);
+ }
- @Override
+ @Override
public void dispose() {
- if (fScrollLockAction != null) {
- fScrollLockAction.dispose();
- fScrollLockAction = null;
- }
- if (fWordWrapAction != null) {
- fWordWrapAction.dispose();
- fWordWrapAction = null;
- }
- fView = null;
- getConsole().removePropertyChangeListener(fPropertyChangeListener);
- super.dispose();
- }
+ if (fScrollLockAction != null) {
+ fScrollLockAction.dispose();
+ fScrollLockAction = null;
+ }
+ if (fWordWrapAction != null) {
+ fWordWrapAction.dispose();
+ fWordWrapAction = null;
+ }
+ fView = null;
+ getConsole().removePropertyChangeListener(fPropertyChangeListener);
+ super.dispose();
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartition.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartition.java
index bd20169be..be353aaab 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartition.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartition.java
@@ -30,183 +30,183 @@ public class IOConsolePartition implements ITypedRegion {
* The data contained by this partition.
*/
private StringBuffer buffer;
- private String type;
- private int offset;
- /**
- * Output partitions are all read only.
- * Input partitions are read only once they have been appended to the console's input stream.
- */
- private boolean readOnly;
-
- /**
- * Only one of inputStream or outputStream will be null depending on the partitions type.
- */
- private IOConsoleOutputStream outputStream;
- private IOConsoleInputStream inputStream;
- private int length;
-
- /**
- * Creates a new partition to contain output to console.
- */
- public IOConsolePartition(IOConsoleOutputStream outputStream, int length) {
- this.outputStream = outputStream;
- this.length = length;
- this.type = OUTPUT_PARTITION_TYPE;
- this.readOnly = true;
- }
-
- /**
- * Creates a new partition to contain input from a console
- */
- public IOConsolePartition(IOConsoleInputStream inputStream, String text) {
- this.inputStream = inputStream;
- buffer = new StringBuffer(text);
- length = text.length();
- this.type = INPUT_PARTITION_TYPE;
- this.readOnly = false;
- }
-
- /**
- * Inserts a string into this partition.
- * @param s The string to insert
- * @param offset the offset in the partition
- */
- public void insert(String s, int insertOffset) {
- buffer.insert(insertOffset, s);
- length += s.length();
- }
-
- /**
- * Deletes data from this partition.
- * @param delOffset
- * @param delLength
- */
- public void delete(int delOffset, int delLength) {
- buffer.delete(delOffset, delOffset+delLength);
- length -= delLength;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.text.ITypedRegion#getType()
- */
- @Override
+ private String type;
+ private int offset;
+ /**
+ * Output partitions are all read only.
+ * Input partitions are read only once they have been appended to the console's input stream.
+ */
+ private boolean readOnly;
+
+ /**
+ * Only one of inputStream or outputStream will be null depending on the partitions type.
+ */
+ private IOConsoleOutputStream outputStream;
+ private IOConsoleInputStream inputStream;
+ private int length;
+
+ /**
+ * Creates a new partition to contain output to console.
+ */
+ public IOConsolePartition(IOConsoleOutputStream outputStream, int length) {
+ this.outputStream = outputStream;
+ this.length = length;
+ this.type = OUTPUT_PARTITION_TYPE;
+ this.readOnly = true;
+ }
+
+ /**
+ * Creates a new partition to contain input from a console
+ */
+ public IOConsolePartition(IOConsoleInputStream inputStream, String text) {
+ this.inputStream = inputStream;
+ buffer = new StringBuffer(text);
+ length = text.length();
+ this.type = INPUT_PARTITION_TYPE;
+ this.readOnly = false;
+ }
+
+ /**
+ * Inserts a string into this partition.
+ * @param s The string to insert
+ * @param offset the offset in the partition
+ */
+ public void insert(String s, int insertOffset) {
+ buffer.insert(insertOffset, s);
+ length += s.length();
+ }
+
+ /**
+ * Deletes data from this partition.
+ * @param delOffset
+ * @param delLength
+ */
+ public void delete(int delOffset, int delLength) {
+ buffer.delete(delOffset, delOffset+delLength);
+ length -= delLength;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.text.ITypedRegion#getType()
+ */
+ @Override
public String getType() {
- return type;
- }
+ return type;
+ }
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.text.IRegion#getLength()
- */
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.text.IRegion#getLength()
+ */
@Override
public int getLength() {
- return length;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.text.IRegion#getOffset()
- */
- @Override
+ return length;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.text.IRegion#getOffset()
+ */
+ @Override
public int getOffset() {
- return offset;
- }
-
- /**
- * Sets this partitions offset in the document.
- *
- * @param offset This partitions offset in the document.
- */
- public void setOffset(int offset) {
- this.offset = offset;
- }
-
- /**
- * Sets this partition's length.
- *
- * @param length
- */
- public void setLength(int length) {
- this.length = length;
- }
-
- /**
- * Returns the data contained in this partition.
- * @return The data contained in this partition.
- */
- public String getString() {
- return buffer.toString();
- }
-
- /**
- * Returns a StyleRange object which may be used for setting the style
- * of this partition in a viewer.
- */
- public StyleRange getStyleRange(int rangeOffset, int rangeLength) {
- return new StyleRange(rangeOffset, rangeLength, getColor(), null, getFontStyle());
- }
-
- /**
- * Returns the font of the input stream if the type of the partition
- * is <code>INPUT_PARTITION_TYPE</code>, otherwise it returns the output
- * stream font
- *
- * @return the font of one of the backing streams
- */
- private int getFontStyle() {
- if (type.equals(INPUT_PARTITION_TYPE)) {
- return inputStream.getFontStyle();
- }
- return outputStream.getFontStyle();
- }
-
- /**
- * Returns the colour of the input stream if the type of the partition
- * is <code>INPUT_PARTITION_TYPE</code>, otherwise it returns the output
- * stream colour
- *
- * @return the colour of one of the backing streams
- */
- public Color getColor() {
- if (type.equals(INPUT_PARTITION_TYPE)) {
- return inputStream.getColor();
- }
- return outputStream.getColor();
- }
-
- /**
- * Returns if this partition is read-only.
- *
- * @see org.eclipse.ui.console.IConsoleDocumentPartitioner#isReadOnly(int)
- * @return if this partition is read-only
- */
- public boolean isReadOnly() {
- return readOnly;
- }
-
- /**
- * Sets the read-only state of this partition to <code>true</code>.
- *
- * @see org.eclipse.ui.console.IConsoleDocumentPartitioner#isReadOnly(int)
- */
- public void setReadOnly() {
- readOnly = true;
- }
-
- /**
- * Clears the contents of the buffer
- */
- public void clearBuffer() {
- buffer.setLength(0);
- }
-
- /**
- * Returns the underlying output stream
- *
- * @return the underlying output stream
- */
- IOConsoleOutputStream getStream() {
- return outputStream;
- }
+ return offset;
+ }
+
+ /**
+ * Sets this partitions offset in the document.
+ *
+ * @param offset This partitions offset in the document.
+ */
+ public void setOffset(int offset) {
+ this.offset = offset;
+ }
+
+ /**
+ * Sets this partition's length.
+ *
+ * @param length
+ */
+ public void setLength(int length) {
+ this.length = length;
+ }
+
+ /**
+ * Returns the data contained in this partition.
+ * @return The data contained in this partition.
+ */
+ public String getString() {
+ return buffer.toString();
+ }
+
+ /**
+ * Returns a StyleRange object which may be used for setting the style
+ * of this partition in a viewer.
+ */
+ public StyleRange getStyleRange(int rangeOffset, int rangeLength) {
+ return new StyleRange(rangeOffset, rangeLength, getColor(), null, getFontStyle());
+ }
+
+ /**
+ * Returns the font of the input stream if the type of the partition
+ * is <code>INPUT_PARTITION_TYPE</code>, otherwise it returns the output
+ * stream font
+ *
+ * @return the font of one of the backing streams
+ */
+ private int getFontStyle() {
+ if (type.equals(INPUT_PARTITION_TYPE)) {
+ return inputStream.getFontStyle();
+ }
+ return outputStream.getFontStyle();
+ }
+
+ /**
+ * Returns the colour of the input stream if the type of the partition
+ * is <code>INPUT_PARTITION_TYPE</code>, otherwise it returns the output
+ * stream colour
+ *
+ * @return the colour of one of the backing streams
+ */
+ public Color getColor() {
+ if (type.equals(INPUT_PARTITION_TYPE)) {
+ return inputStream.getColor();
+ }
+ return outputStream.getColor();
+ }
+
+ /**
+ * Returns if this partition is read-only.
+ *
+ * @see org.eclipse.ui.console.IConsoleDocumentPartitioner#isReadOnly(int)
+ * @return if this partition is read-only
+ */
+ public boolean isReadOnly() {
+ return readOnly;
+ }
+
+ /**
+ * Sets the read-only state of this partition to <code>true</code>.
+ *
+ * @see org.eclipse.ui.console.IConsoleDocumentPartitioner#isReadOnly(int)
+ */
+ public void setReadOnly() {
+ readOnly = true;
+ }
+
+ /**
+ * Clears the contents of the buffer
+ */
+ public void clearBuffer() {
+ buffer.setLength(0);
+ }
+
+ /**
+ * Returns the underlying output stream
+ *
+ * @return the underlying output stream
+ */
+ IOConsoleOutputStream getStream() {
+ return outputStream;
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java
index b18f518ba..d1555bad4 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java
@@ -84,9 +84,9 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
private String[] lld;
private int highWaterMark = -1;
private int lowWaterMark = -1;
- private boolean connected = false;
+ private boolean connected = false;
- private IOConsole console;
+ private IOConsole console;
private TrimJob trimJob = new TrimJob();
/**
@@ -97,7 +97,7 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
private Object overflowLock = new Object();
- private int fBuffer;
+ private int fBuffer;
public IOConsolePartitioner(IOConsoleInputStream inputStream, IOConsole console) {
this.inputStream = inputStream;
@@ -123,17 +123,17 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
inputPartitions = new ArrayList<IOConsolePartition>();
queueJob = new QueueProcessingJob();
queueJob.setSystem(true);
- queueJob.setPriority(Job.INTERACTIVE);
+ queueJob.setPriority(Job.INTERACTIVE);
queueJob.setRule(console.getSchedulingRule());
connected = true;
}
public int getHighWaterMark() {
- return highWaterMark;
+ return highWaterMark;
}
public int getLowWaterMark() {
- return lowWaterMark;
+ return lowWaterMark;
}
public void setWaterMarks(int low, int high) {
@@ -150,13 +150,13 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
/**
* Notification from the console that all of its streams have been closed.
*/
- public void streamsClosed() {
- consoleClosedPartition = new PendingPartition(null, null);
- synchronized (pendingPartitions) {
- pendingPartitions.add(consoleClosedPartition);
- }
- queueJob.schedule(); //ensure that all pending partitions are processed.
- }
+ public void streamsClosed() {
+ consoleClosedPartition = new PendingPartition(null, null);
+ synchronized (pendingPartitions) {
+ pendingPartitions.add(consoleClosedPartition);
+ }
+ queueJob.schedule(); //ensure that all pending partitions are processed.
+ }
/*
* (non-Javadoc)
@@ -169,9 +169,9 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
partitions.clear();
connected = false;
try {
- inputStream.close();
- } catch (IOException e) {
- }
+ inputStream.close();
+ } catch (IOException e) {
+ }
}
}
@@ -223,7 +223,7 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
IOConsolePartition position= null;
if (left == right) {
- return new IOConsolePartition[]{partitions.get(0)};
+ return new IOConsolePartition[]{partitions.get(0)};
}
while (left < right) {
@@ -251,7 +251,7 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
List<IOConsolePartition> list = new ArrayList<IOConsolePartition>();
int index = left - 1;
if (index >= 0) {
- position= partitions.get(index);
+ position= partitions.get(index);
while (index >= 0 && (position.getOffset() + position.getLength()) > offset) {
index--;
if (index >= 0) {
@@ -309,10 +309,10 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
if (document != null && highWaterMark > 0) {
int length = document.getLength();
if (length > highWaterMark) {
- if (trimJob.getState() == Job.NONE) { //if the job isn't already running
- trimJob.setOffset(length - lowWaterMark);
- trimJob.schedule();
- }
+ if (trimJob.getState() == Job.NONE) { //if the job isn't already running
+ trimJob.setOffset(length - lowWaterMark);
+ trimJob.schedule();
+ }
}
}
}
@@ -321,10 +321,10 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
* Clears the console
*/
public void clearBuffer() {
- synchronized (overflowLock) {
- trimJob.setOffset(-1);
- trimJob.schedule();
- }
+ synchronized (overflowLock) {
+ trimJob.setOffset(-1);
+ trimJob.schedule();
+ }
}
/*
@@ -334,9 +334,9 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
*/
@Override
public IRegion documentChanged2(DocumentEvent event) {
- if (document == null) {
- return null; //another thread disconnected the partitioner
- }
+ if (document == null) {
+ return null; //another thread disconnected the partitioner
+ }
if (document.getLength() == 0) { //document cleared
if (lastPartition != null && lastPartition.getType().equals(IOConsolePartition.INPUT_PARTITION_TYPE)) {
synchronized (partitions) {
@@ -354,20 +354,20 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
if (updatePartitions != null) {
for (PendingPartition pp : updatePartitions) {
if (pp == consoleClosedPartition) {
- continue;
- }
-
- int ppLen = pp.text.length();
- if (lastPartition != null && lastPartition.getStream() == pp.stream) {
- int len = lastPartition.getLength();
- lastPartition.setLength(len + ppLen);
- } else {
- IOConsolePartition partition = new IOConsolePartition(pp.stream, ppLen);
- partition.setOffset(firstOffset);
- lastPartition = partition;
- partitions.add(partition);
- }
- firstOffset += ppLen;
+ continue;
+ }
+
+ int ppLen = pp.text.length();
+ if (lastPartition != null && lastPartition.getStream() == pp.stream) {
+ int len = lastPartition.getLength();
+ lastPartition.setLength(len + ppLen);
+ } else {
+ IOConsolePartition partition = new IOConsolePartition(pp.stream, ppLen);
+ partition.setOffset(firstOffset);
+ lastPartition = partition;
+ partitions.add(partition);
+ }
+ firstOffset += ppLen;
}
}
}
@@ -398,44 +398,44 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
String ld = lld[i];
int index = partitionText.lastIndexOf(ld);
if (index != -1) {
- index += ld.length();
+ index += ld.length();
}
if (index > lastLineDelimiter) {
- lastLineDelimiter = index;
+ lastLineDelimiter = index;
}
}
if (lastLineDelimiter != -1) {
StringBuffer input = new StringBuffer();
Iterator<IOConsolePartition> it = inputPartitions.iterator();
while (it.hasNext()) {
- IOConsolePartition partition = it.next();
- if (partition.getOffset() + partition.getLength() <= event.fOffset + lastLineDelimiter) {
- if (partition == lastPartition) {
- lastPartition = null;
- }
- input.append(partition.getString());
+ IOConsolePartition partition = it.next();
+ if (partition.getOffset() + partition.getLength() <= event.fOffset + lastLineDelimiter) {
+ if (partition == lastPartition) {
+ lastPartition = null;
+ }
+ input.append(partition.getString());
partition.clearBuffer();
partition.setReadOnly();
it.remove();
- } else {
- //create a new partition containing everything up to the line delimiter
- //and append that to the string buffer.
- String contentBefore = partitionText.substring(0, lastLineDelimiter);
- IOConsolePartition newPartition = new IOConsolePartition(inputStream, contentBefore);
- newPartition.setOffset(partition.getOffset());
- newPartition.setReadOnly();
- newPartition.clearBuffer();
- int index = partitions.indexOf(partition);
- partitions.add(index, newPartition);
- input.append(contentBefore);
- //delete everything that has been appended to the buffer.
- partition.delete(0, lastLineDelimiter);
- partition.setOffset(lastLineDelimiter + partition.getOffset());
- lastLineDelimiter = 0;
- }
+ } else {
+ //create a new partition containing everything up to the line delimiter
+ //and append that to the string buffer.
+ String contentBefore = partitionText.substring(0, lastLineDelimiter);
+ IOConsolePartition newPartition = new IOConsolePartition(inputStream, contentBefore);
+ newPartition.setOffset(partition.getOffset());
+ newPartition.setReadOnly();
+ newPartition.clearBuffer();
+ int index = partitions.indexOf(partition);
+ partitions.add(index, newPartition);
+ input.append(contentBefore);
+ //delete everything that has been appended to the buffer.
+ partition.delete(0, lastLineDelimiter);
+ partition.setOffset(lastLineDelimiter + partition.getOffset());
+ lastLineDelimiter = 0;
+ }
}
if (input.length() > 0) {
- inputStream.appendData(input.toString());
+ inputStream.appendData(input.toString());
}
}
@@ -458,36 +458,36 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
* @param s The string that should be appended to the document.
*/
public void streamAppended(IOConsoleOutputStream stream, String s) throws IOException {
- if (document == null) {
- throw new IOException("Document is closed"); //$NON-NLS-1$
- }
+ if (document == null) {
+ throw new IOException("Document is closed"); //$NON-NLS-1$
+ }
synchronized(pendingPartitions) {
PendingPartition last = pendingPartitions.size() > 0 ? pendingPartitions.get(pendingPartitions.size()-1) : null;
if (last != null && last.stream == stream) {
last.append(s);
} else {
pendingPartitions.add(new PendingPartition(stream, s));
- if (fBuffer > 1000) {
- queueJob.schedule();
- } else {
- queueJob.schedule(50);
- }
+ if (fBuffer > 1000) {
+ queueJob.schedule();
+ } else {
+ queueJob.schedule(50);
+ }
}
- if (fBuffer > 160000) {
- if(Display.getCurrent() == null){
+ if (fBuffer > 160000) {
+ if(Display.getCurrent() == null){
try {
pendingPartitions.wait();
} catch (InterruptedException e) {
}
- } else {
+ } else {
/*
* if we are in UI thread we cannot lock it, so process
* queued output.
*/
- processQueue();
- }
- }
+ processQueue();
+ }
+ }
}
}
@@ -501,13 +501,13 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
PendingPartition(IOConsoleOutputStream stream, String text) {
this.stream = stream;
if (text != null) {
- append(text);
- }
+ append(text);
+ }
}
void append(String moreText) {
text.append(moreText);
- fBuffer += moreText.length();
+ fBuffer += moreText.length();
}
}
@@ -517,39 +517,39 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
*/
private class QueueProcessingJob extends UIJob {
- QueueProcessingJob() {
+ QueueProcessingJob() {
super("IOConsole Updater"); //$NON-NLS-1$
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.internal.jobs.InternalJob#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.internal.jobs.InternalJob#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
public IStatus runInUIThread(IProgressMonitor monitor) {
- processQueue();
- return Status.OK_STATUS;
- }
-
- /*
- * Job will process as much as it can each time it's run, but it gets
- * scheduled everytime a PendingPartition is added to the list, meaning
- * that this job could get scheduled unnecessarily in cases of heavy output.
- * Note however, that schedule() will only reschedule a running/scheduled Job
- * once even if it's called many times.
- */
- @Override
+ processQueue();
+ return Status.OK_STATUS;
+ }
+
+ /*
+ * Job will process as much as it can each time it's run, but it gets
+ * scheduled everytime a PendingPartition is added to the list, meaning
+ * that this job could get scheduled unnecessarily in cases of heavy output.
+ * Note however, that schedule() will only reschedule a running/scheduled Job
+ * once even if it's called many times.
+ */
+ @Override
public boolean shouldRun() {
- boolean shouldRun = connected && pendingPartitions != null && pendingPartitions.size() > 0;
- return shouldRun;
- }
+ boolean shouldRun = connected && pendingPartitions != null && pendingPartitions.size() > 0;
+ return shouldRun;
+ }
}
void processQueue() {
- synchronized (overflowLock) {
+ synchronized (overflowLock) {
ArrayList<PendingPartition> pendingCopy = new ArrayList<PendingPartition>();
- StringBuffer buffer = null;
- boolean consoleClosed = false;
+ StringBuffer buffer = null;
+ boolean consoleClosed = false;
synchronized(pendingPartitions) {
pendingCopy.addAll(pendingPartitions);
pendingPartitions.clear();
@@ -571,131 +571,131 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum
consoleClosed = true;
}
}
- if (connected) {
- setUpdateInProgress(true);
- updatePartitions = pendingCopy;
- firstOffset = document.getLength();
- try {
- if (buffer != null) {
- document.replace(firstOffset, 0, buffer.toString());
- }
- } catch (BadLocationException e) {
- }
- updatePartitions = null;
- setUpdateInProgress(false);
- }
- if (consoleClosed) {
- console.partitionerFinished();
- }
- checkBufferSize();
- }
+ if (connected) {
+ setUpdateInProgress(true);
+ updatePartitions = pendingCopy;
+ firstOffset = document.getLength();
+ try {
+ if (buffer != null) {
+ document.replace(firstOffset, 0, buffer.toString());
+ }
+ } catch (BadLocationException e) {
+ }
+ updatePartitions = null;
+ setUpdateInProgress(false);
+ }
+ if (consoleClosed) {
+ console.partitionerFinished();
+ }
+ checkBufferSize();
+ }
}
- /**
- * Job to trim the console document, runs in the UI thread.
- */
- private class TrimJob extends WorkbenchJob {
-
- /**
- * trims output up to the line containing the given offset,
- * or all output if -1.
- */
- private int truncateOffset;
-
- /**
- * Creates a new job to trim the buffer.
- */
- TrimJob() {
- super("Trim Job"); //$NON-NLS-1$
- setSystem(true);
- }
-
- /**
- * Sets the trim offset.
- *
- * @param offset trims output up to the line containing the given offset
- */
- public void setOffset(int offset) {
- truncateOffset = offset;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
+ /**
+ * Job to trim the console document, runs in the UI thread.
+ */
+ private class TrimJob extends WorkbenchJob {
+
+ /**
+ * trims output up to the line containing the given offset,
+ * or all output if -1.
+ */
+ private int truncateOffset;
+
+ /**
+ * Creates a new job to trim the buffer.
+ */
+ TrimJob() {
+ super("Trim Job"); //$NON-NLS-1$
+ setSystem(true);
+ }
+
+ /**
+ * Sets the trim offset.
+ *
+ * @param offset trims output up to the line containing the given offset
+ */
+ public void setOffset(int offset) {
+ truncateOffset = offset;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
public IStatus runInUIThread(IProgressMonitor monitor) {
- if (document == null) {
- return Status.OK_STATUS;
- }
-
- int length = document.getLength();
- if (truncateOffset < length) {
- synchronized (overflowLock) {
- try {
- if (truncateOffset < 0) {
- // clear
- setUpdateInProgress(true);
- document.set(""); //$NON-NLS-1$
- setUpdateInProgress(false);
- partitions.clear();
- } else {
- // overflow
- int cutoffLine = document.getLineOfOffset(truncateOffset);
- int cutOffset = document.getLineOffset(cutoffLine);
-
-
- // set the new length of the first partition
- IOConsolePartition partition = (IOConsolePartition) getPartition(cutOffset);
- partition.setLength(partition.getOffset() + partition.getLength() - cutOffset);
-
- setUpdateInProgress(true);
- document.replace(0, cutOffset, ""); //$NON-NLS-1$
- setUpdateInProgress(false);
-
- //remove partitions and reset Partition offsets
- int index = partitions.indexOf(partition);
- for (int i = 0; i < index; i++) {
- partitions.remove(0);
- }
-
- int offset = 0;
+ if (document == null) {
+ return Status.OK_STATUS;
+ }
+
+ int length = document.getLength();
+ if (truncateOffset < length) {
+ synchronized (overflowLock) {
+ try {
+ if (truncateOffset < 0) {
+ // clear
+ setUpdateInProgress(true);
+ document.set(""); //$NON-NLS-1$
+ setUpdateInProgress(false);
+ partitions.clear();
+ } else {
+ // overflow
+ int cutoffLine = document.getLineOfOffset(truncateOffset);
+ int cutOffset = document.getLineOffset(cutoffLine);
+
+
+ // set the new length of the first partition
+ IOConsolePartition partition = (IOConsolePartition) getPartition(cutOffset);
+ partition.setLength(partition.getOffset() + partition.getLength() - cutOffset);
+
+ setUpdateInProgress(true);
+ document.replace(0, cutOffset, ""); //$NON-NLS-1$
+ setUpdateInProgress(false);
+
+ //remove partitions and reset Partition offsets
+ int index = partitions.indexOf(partition);
+ for (int i = 0; i < index; i++) {
+ partitions.remove(0);
+ }
+
+ int offset = 0;
for (IOConsolePartition p : partitions) {
- p.setOffset(offset);
- offset += p.getLength();
- }
- }
- } catch (BadLocationException e) {
- }
- }
- }
- return Status.OK_STATUS;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.IConsoleDocumentPartitioner#isReadOnly(int)
- */
- @Override
+ p.setOffset(offset);
+ offset += p.getLength();
+ }
+ }
+ } catch (BadLocationException e) {
+ }
+ }
+ }
+ return Status.OK_STATUS;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IConsoleDocumentPartitioner#isReadOnly(int)
+ */
+ @Override
public boolean isReadOnly(int offset) {
- return ((IOConsolePartition)getPartition(offset)).isReadOnly();
- }
+ return ((IOConsolePartition)getPartition(offset)).isReadOnly();
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.IConsoleDocumentPartitioner#computeStyleRange(int, int)
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IConsoleDocumentPartitioner#computeStyleRange(int, int)
+ */
+ @Override
public StyleRange[] getStyleRanges(int offset, int length) {
- if (!connected) {
- return new StyleRange[0];
- }
- IOConsolePartition[] computedPartitions = (IOConsolePartition[])computePartitioning(offset, length);
- StyleRange[] styles = new StyleRange[computedPartitions.length];
- for (int i = 0; i < computedPartitions.length; i++) {
- int rangeStart = Math.max(computedPartitions[i].getOffset(), offset);
- int rangeLength = computedPartitions[i].getLength();
- styles[i] = computedPartitions[i].getStyleRange(rangeStart, rangeLength);
- }
- return styles;
- }
+ if (!connected) {
+ return new StyleRange[0];
+ }
+ IOConsolePartition[] computedPartitions = (IOConsolePartition[])computePartitioning(offset, length);
+ StyleRange[] styles = new StyleRange[computedPartitions.length];
+ for (int i = 0; i < computedPartitions.length; i++) {
+ int rangeStart = Math.max(computedPartitions[i].getOffset(), offset);
+ int rangeLength = computedPartitions[i].getLength();
+ styles[i] = computedPartitions[i].getStyleRange(rangeStart, rangeLength);
+ }
+ return styles;
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsoleViewer.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsoleViewer.java
index 65a0e8899..432f86a6f 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsoleViewer.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsoleViewer.java
@@ -31,18 +31,18 @@ import org.eclipse.ui.console.TextConsoleViewer;
* @since 3.1
*/
public class IOConsoleViewer extends TextConsoleViewer {
- /**
- * will always scroll with output if value is true.
- */
- private boolean fAutoScroll = true;
+ /**
+ * will always scroll with output if value is true.
+ */
+ private boolean fAutoScroll = true;
- private boolean fWordWrap = false;
+ private boolean fWordWrap = false;
- private IDocumentListener fDocumentListener;
+ private IDocumentListener fDocumentListener;
- public IOConsoleViewer(Composite parent, TextConsole console) {
- super(parent, console);
- }
+ public IOConsoleViewer(Composite parent, TextConsole console) {
+ super(parent, console);
+ }
/**
* Constructs a new viewer in the given parent for the specified console.
@@ -56,65 +56,65 @@ public class IOConsoleViewer extends TextConsoleViewer {
super(parent, console, scrollLockStateProvider);
}
- public boolean isAutoScroll() {
- return fAutoScroll;
- }
+ public boolean isAutoScroll() {
+ return fAutoScroll;
+ }
- public void setAutoScroll(boolean scroll) {
- fAutoScroll = scroll;
- }
+ public void setAutoScroll(boolean scroll) {
+ fAutoScroll = scroll;
+ }
- public boolean isWordWrap() {
- return fWordWrap;
- }
+ public boolean isWordWrap() {
+ return fWordWrap;
+ }
- public void setWordWrap(boolean wordwrap) {
- fWordWrap = wordwrap;
- getTextWidget().setWordWrap(wordwrap);
- }
+ public void setWordWrap(boolean wordwrap) {
+ fWordWrap = wordwrap;
+ getTextWidget().setWordWrap(wordwrap);
+ }
- @Override
+ @Override
protected void handleVerifyEvent(VerifyEvent e) {
- IDocument doc = getDocument();
- String[] legalLineDelimiters = doc.getLegalLineDelimiters();
- String eventString = e.text;
- try {
- IConsoleDocumentPartitioner partitioner = (IConsoleDocumentPartitioner) doc.getDocumentPartitioner();
- if (!partitioner.isReadOnly(e.start)) {
- boolean isCarriageReturn = false;
- for (int i = 0; i < legalLineDelimiters.length; i++) {
- if (e.text.equals(legalLineDelimiters[i])) {
- isCarriageReturn = true;
- break;
- }
- }
-
- if (!isCarriageReturn) {
- super.handleVerifyEvent(e);
- return;
- }
- }
-
- int length = doc.getLength();
- if (e.start == length) {
- super.handleVerifyEvent(e);
- } else {
- try {
- doc.replace(length, 0, eventString);
- updateWidgetCaretLocation(length);
- } catch (BadLocationException e1) {
- }
- e.doit = false;
- }
- } finally {
- StyledText text = (StyledText) e.widget;
- text.setCaretOffset(text.getCharCount());
- }
- }
-
- /*
- * Update the Text widget location to new location
- */
+ IDocument doc = getDocument();
+ String[] legalLineDelimiters = doc.getLegalLineDelimiters();
+ String eventString = e.text;
+ try {
+ IConsoleDocumentPartitioner partitioner = (IConsoleDocumentPartitioner) doc.getDocumentPartitioner();
+ if (!partitioner.isReadOnly(e.start)) {
+ boolean isCarriageReturn = false;
+ for (int i = 0; i < legalLineDelimiters.length; i++) {
+ if (e.text.equals(legalLineDelimiters[i])) {
+ isCarriageReturn = true;
+ break;
+ }
+ }
+
+ if (!isCarriageReturn) {
+ super.handleVerifyEvent(e);
+ return;
+ }
+ }
+
+ int length = doc.getLength();
+ if (e.start == length) {
+ super.handleVerifyEvent(e);
+ } else {
+ try {
+ doc.replace(length, 0, eventString);
+ updateWidgetCaretLocation(length);
+ } catch (BadLocationException e1) {
+ }
+ e.doit = false;
+ }
+ } finally {
+ StyledText text = (StyledText) e.widget;
+ text.setCaretOffset(text.getCharCount());
+ }
+ }
+
+ /*
+ * Update the Text widget location to new location
+ */
private void updateWidgetCaretLocation(int documentCaret) {
int widgetCaret = modelOffset2WidgetOffset(documentCaret);
if (widgetCaret == -1) {
@@ -135,57 +135,57 @@ public class IOConsoleViewer extends TextConsoleViewer {
}
}
- /**
- * makes the associated text widget uneditable.
- */
- public void setReadOnly() {
- ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() {
- @Override
+ /**
+ * makes the associated text widget uneditable.
+ */
+ public void setReadOnly() {
+ ConsolePlugin.getStandardDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
- StyledText text = getTextWidget();
- if (text != null && !text.isDisposed()) {
- text.setEditable(false);
- }
- }
- });
- }
-
- /**
- * @return <code>false</code> if text is editable
- */
- public boolean isReadOnly() {
- return !getTextWidget().getEditable();
- }
-
- @Override
+ StyledText text = getTextWidget();
+ if (text != null && !text.isDisposed()) {
+ text.setEditable(false);
+ }
+ }
+ });
+ }
+
+ /**
+ * @return <code>false</code> if text is editable
+ */
+ public boolean isReadOnly() {
+ return !getTextWidget().getEditable();
+ }
+
+ @Override
public void setDocument(IDocument document) {
- IDocument oldDocument= getDocument();
+ IDocument oldDocument= getDocument();
- super.setDocument(document);
+ super.setDocument(document);
- if (oldDocument != null) {
- oldDocument.removeDocumentListener(getDocumentListener());
- }
- if (document != null) {
- document.addDocumentListener(getDocumentListener());
- }
- }
+ if (oldDocument != null) {
+ oldDocument.removeDocumentListener(getDocumentListener());
+ }
+ if (document != null) {
+ document.addDocumentListener(getDocumentListener());
+ }
+ }
- private IDocumentListener getDocumentListener() {
- if (fDocumentListener == null) {
- fDocumentListener= new IDocumentListener() {
+ private IDocumentListener getDocumentListener() {
+ if (fDocumentListener == null) {
+ fDocumentListener= new IDocumentListener() {
@Override
public void documentAboutToBeChanged(DocumentEvent event) {
- }
+ }
- @Override
+ @Override
public void documentChanged(DocumentEvent event) {
- if (fAutoScroll) {
- revealEndOfDocument();
- }
- }
- };
- }
- return fDocumentListener;
- }
+ if (fAutoScroll) {
+ revealEndOfDocument();
+ }
+ }
+ };
+ }
+ return fDocumentListener;
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/OpenConsoleAction.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/OpenConsoleAction.java
index e895fe91a..d3ed73344 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/OpenConsoleAction.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/OpenConsoleAction.java
@@ -31,71 +31,71 @@ import org.eclipse.ui.console.IConsoleFactory;
*/
public class OpenConsoleAction extends Action implements IMenuCreator {
- private ConsoleFactoryExtension[] fFactoryExtensions;
- private Menu fMenu;
+ private ConsoleFactoryExtension[] fFactoryExtensions;
+ private Menu fMenu;
- public OpenConsoleAction() {
- fFactoryExtensions = ((ConsoleManager)ConsolePlugin.getDefault().getConsoleManager()).getConsoleFactoryExtensions();
+ public OpenConsoleAction() {
+ fFactoryExtensions = ((ConsoleManager)ConsolePlugin.getDefault().getConsoleManager()).getConsoleFactoryExtensions();
setText(ConsoleMessages.OpenConsoleAction_0);
setToolTipText(ConsoleMessages.OpenConsoleAction_1);
setImageDescriptor(ConsolePluginImages.getImageDescriptor(IInternalConsoleConstants.IMG_ELCL_NEW_CON));
setDisabledImageDescriptor(ConsolePluginImages.getImageDescriptor(IInternalConsoleConstants.IMG_DLCL_NEW_CON));
setMenuCreator(this);
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IConsoleHelpContextIds.CONSOLE_OPEN_CONSOLE_ACTION);
- }
+ }
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#dispose()
- */
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IMenuCreator#dispose()
+ */
@Override
public void dispose() {
- fFactoryExtensions = null;
- }
-
- /*
- * @see org.eclipse.jface.action.Action#runWithEvent(org.eclipse.swt.widgets.Event)
- * @since 3.5
- */
- @Override
+ fFactoryExtensions = null;
+ }
+
+ /*
+ * @see org.eclipse.jface.action.Action#runWithEvent(org.eclipse.swt.widgets.Event)
+ * @since 3.5
+ */
+ @Override
public void runWithEvent(Event event) {
- if (event.widget instanceof ToolItem) {
+ if (event.widget instanceof ToolItem) {
ToolItem toolItem= (ToolItem) event.widget;
Control control= toolItem.getParent();
- Menu menu= getMenu(control);
-
- Rectangle bounds= toolItem.getBounds();
- Point topLeft= new Point(bounds.x, bounds.y + bounds.height);
- menu.setLocation(control.toDisplay(topLeft));
- menu.setVisible(true);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)
- */
- @Override
+ Menu menu= getMenu(control);
+
+ Rectangle bounds= toolItem.getBounds();
+ Point topLeft= new Point(bounds.x, bounds.y + bounds.height);
+ menu.setLocation(control.toDisplay(topLeft));
+ menu.setVisible(true);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)
+ */
+ @Override
public Menu getMenu(Control parent) {
- if (fMenu != null) {
- fMenu.dispose();
- }
-
- fMenu= new Menu(parent);
- int accel = 1;
- for (int i = 0; i < fFactoryExtensions.length; i++) {
- ConsoleFactoryExtension extension = fFactoryExtensions[i];
- if (!WorkbenchActivityHelper.filterItem(extension) && extension.isEnabled()) {
- String label = extension.getLabel();
- ImageDescriptor image = extension.getImageDescriptor();
- addActionToMenu(fMenu, new ConsoleFactoryAction(label, image, extension), accel);
- accel++;
- }
- }
- return fMenu;
- }
+ if (fMenu != null) {
+ fMenu.dispose();
+ }
+
+ fMenu= new Menu(parent);
+ int accel = 1;
+ for (int i = 0; i < fFactoryExtensions.length; i++) {
+ ConsoleFactoryExtension extension = fFactoryExtensions[i];
+ if (!WorkbenchActivityHelper.filterItem(extension) && extension.isEnabled()) {
+ String label = extension.getLabel();
+ ImageDescriptor image = extension.getImageDescriptor();
+ addActionToMenu(fMenu, new ConsoleFactoryAction(label, image, extension), accel);
+ accel++;
+ }
+ }
+ return fMenu;
+ }
private void addActionToMenu(Menu parent, Action action, int accelerator) {
if (accelerator < 10) {
- StringBuffer label= new StringBuffer();
+ StringBuffer label= new StringBuffer();
//add the numerical accelerator
label.append('&');
label.append(accelerator);
@@ -108,50 +108,50 @@ public class OpenConsoleAction extends Action implements IMenuCreator {
item.fill(parent, -1);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)
+ */
+ @Override
public Menu getMenu(Menu parent) {
- return null;
- }
+ return null;
+ }
- private class ConsoleFactoryAction extends Action {
+ private class ConsoleFactoryAction extends Action {
- private ConsoleFactoryExtension fConfig;
- private IConsoleFactory fFactory;
+ private ConsoleFactoryExtension fConfig;
+ private IConsoleFactory fFactory;
- public ConsoleFactoryAction(String label, ImageDescriptor image, ConsoleFactoryExtension extension) {
- setText(label);
- if (image != null) {
- setImageDescriptor(image);
- }
- fConfig = extension;
- }
+ public ConsoleFactoryAction(String label, ImageDescriptor image, ConsoleFactoryExtension extension) {
+ setText(label);
+ if (image != null) {
+ setImageDescriptor(image);
+ }
+ fConfig = extension;
+ }
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ @Override
public void run() {
- try {
- if (fFactory == null) {
- fFactory = fConfig.createFactory();
- }
-
- fFactory.openConsole();
- } catch (CoreException e) {
- ConsolePlugin.log(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#runWithEvent(org.eclipse.swt.widgets.Event)
- */
- @Override
+ try {
+ if (fFactory == null) {
+ fFactory = fConfig.createFactory();
+ }
+
+ fFactory.openConsole();
+ } catch (CoreException e) {
+ ConsolePlugin.log(e);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IAction#runWithEvent(org.eclipse.swt.widgets.Event)
+ */
+ @Override
public void runWithEvent(Event event) {
- run();
- }
- }
+ run();
+ }
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListener.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListener.java
index aaf415555..d61662577 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListener.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListener.java
@@ -18,53 +18,53 @@ import org.eclipse.ui.console.TextConsole;
public class PatternMatchListener implements IPatternMatchListener {
- private PatternMatchListenerExtension fExtension;
- private IPatternMatchListenerDelegate fDelegate;
+ private PatternMatchListenerExtension fExtension;
+ private IPatternMatchListenerDelegate fDelegate;
- public PatternMatchListener(PatternMatchListenerExtension extension) throws CoreException {
- fExtension = extension;
- fDelegate = fExtension.createDelegate();
- }
+ public PatternMatchListener(PatternMatchListenerExtension extension) throws CoreException {
+ fExtension = extension;
+ fDelegate = fExtension.createDelegate();
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.IPatternMatchListener#getPattern()
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IPatternMatchListener#getPattern()
+ */
+ @Override
public String getPattern() {
- return fExtension.getPattern();
- }
+ return fExtension.getPattern();
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.IPatternMatchListener#getCompilerFlags()
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IPatternMatchListener#getCompilerFlags()
+ */
+ @Override
public int getCompilerFlags() {
- return fExtension.getCompilerFlags();
- }
+ return fExtension.getCompilerFlags();
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.IPatternMatchListener#matchFound(org.eclipse.ui.console.PatternMatchEvent)
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IPatternMatchListener#matchFound(org.eclipse.ui.console.PatternMatchEvent)
+ */
+ @Override
public void matchFound(PatternMatchEvent event) {
- fDelegate.matchFound(event);
- }
+ fDelegate.matchFound(event);
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.IPatternMatchListenerDelegate#connect(org.eclipse.ui.console.TextConsole)
- */
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IPatternMatchListenerDelegate#connect(org.eclipse.ui.console.TextConsole)
+ */
@Override
public void connect(TextConsole console) {
- fDelegate.connect(console);
- }
+ fDelegate.connect(console);
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.console.IPatternMatchListener#disconnect()
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.console.IPatternMatchListener#disconnect()
+ */
+ @Override
public void disconnect() {
- fDelegate.disconnect();
- }
+ fDelegate.disconnect();
+ }
/* (non-Javadoc)
* @see org.eclipse.ui.console.IPatternMatchListener#getQuickPattern()
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListenerExtension.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListenerExtension.java
index 869129180..8faab5c46 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListenerExtension.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListenerExtension.java
@@ -31,125 +31,125 @@ import com.ibm.icu.text.MessageFormat;
public class PatternMatchListenerExtension implements IPluginContribution {
- private IConfigurationElement fConfig;
- private Expression fEnablementExpression;
- private String fPattern;
- private String fQualifier;
- private int fFlags = -1;
-
- public PatternMatchListenerExtension(IConfigurationElement extension) {
- fConfig = extension;
- }
-
- /*
- * returns the integer value of the flags defined in java.util.regex.Pattern.
- * Both <code>Pattern.MULTILINE</code> and <code>MULTILINE</code> will return
- * the same value.
- */
- public int parseFlags(String flagsElement) {
- int val = 0;
- if (flagsElement == null) {
- return val;
- }
-
- try {
+ private IConfigurationElement fConfig;
+ private Expression fEnablementExpression;
+ private String fPattern;
+ private String fQualifier;
+ private int fFlags = -1;
+
+ public PatternMatchListenerExtension(IConfigurationElement extension) {
+ fConfig = extension;
+ }
+
+ /*
+ * returns the integer value of the flags defined in java.util.regex.Pattern.
+ * Both <code>Pattern.MULTILINE</code> and <code>MULTILINE</code> will return
+ * the same value.
+ */
+ public int parseFlags(String flagsElement) {
+ int val = 0;
+ if (flagsElement == null) {
+ return val;
+ }
+
+ try {
String flags = flagsElement.replaceAll("Pattern.", ""); //$NON-NLS-1$ //$NON-NLS-2$
String[] tokens = flags.split("\\s\\|\\s"); //$NON-NLS-1$
Class<?> clazz = Class.forName("java.util.regex.Pattern"); //$NON-NLS-1$
- for (int i = 0; i < tokens.length; i++) {
- Field field = clazz.getDeclaredField(tokens[i]);
- val |= field.getInt(null);
- }
- } catch (ClassNotFoundException e) {
- ConsolePlugin.log(e);
- } catch (NoSuchFieldException e) {
- ConsolePlugin.log(e);
- } catch (IllegalAccessException e) {
- ConsolePlugin.log(e);
- }
- return val;
- }
-
- public boolean isEnabledFor(IConsole console) throws CoreException {
- EvaluationContext context = new EvaluationContext(null, console);
- EvaluationResult evaluationResult = getEnablementExpression().evaluate(context);
- return evaluationResult == EvaluationResult.TRUE;
- }
-
- public IPatternMatchListenerDelegate createDelegate() throws CoreException {
- return (IPatternMatchListenerDelegate) fConfig.createExecutableExtension("class"); //$NON-NLS-1$
- }
-
- public Expression getEnablementExpression() throws CoreException {
+ for (int i = 0; i < tokens.length; i++) {
+ Field field = clazz.getDeclaredField(tokens[i]);
+ val |= field.getInt(null);
+ }
+ } catch (ClassNotFoundException e) {
+ ConsolePlugin.log(e);
+ } catch (NoSuchFieldException e) {
+ ConsolePlugin.log(e);
+ } catch (IllegalAccessException e) {
+ ConsolePlugin.log(e);
+ }
+ return val;
+ }
+
+ public boolean isEnabledFor(IConsole console) throws CoreException {
+ EvaluationContext context = new EvaluationContext(null, console);
+ EvaluationResult evaluationResult = getEnablementExpression().evaluate(context);
+ return evaluationResult == EvaluationResult.TRUE;
+ }
+
+ public IPatternMatchListenerDelegate createDelegate() throws CoreException {
+ return (IPatternMatchListenerDelegate) fConfig.createExecutableExtension("class"); //$NON-NLS-1$
+ }
+
+ public Expression getEnablementExpression() throws CoreException {
if (fEnablementExpression == null) {
IConfigurationElement[] elements = fConfig.getChildren(ExpressionTagNames.ENABLEMENT);
- if (elements.length == 0) {
+ if (elements.length == 0) {
String message = MessageFormat.format("{0} " + getLocalId() + " {1} " + getPluginId() + " {2}", new Object[] { ConsoleMessages.PatternMatchListenerExtension_3, ConsoleMessages.PatternMatchListenerExtension_4, ConsoleMessages.PatternMatchListenerExtension_5 }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ConsolePlugin.log(new Status(IStatus.WARNING, ConsolePlugin.getUniqueIdentifier(), IStatus.OK, message, null));
- }
+ ConsolePlugin.log(new Status(IStatus.WARNING, ConsolePlugin.getUniqueIdentifier(), IStatus.OK, message, null));
+ }
IConfigurationElement enablement = elements.length > 0 ? elements[0] : null;
if (enablement != null) {
- fEnablementExpression = ExpressionConverter.getDefault().perform(enablement);
+ fEnablementExpression = ExpressionConverter.getDefault().perform(enablement);
}
}
return fEnablementExpression;
- }
-
- /*
- * returns the regular expression to be matched.
- */
- public String getPattern() {
- if (fPattern == null) {
- fPattern = fConfig.getAttribute("regex"); //$NON-NLS-1$
- try {
- fPattern = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(fPattern, false);
- } catch (CoreException e) {
- ConsolePlugin.log(e);
- }
- }
- return fPattern;
- }
-
- /*
- * returns the flags to be used by <code>Pattern.compile(pattern, flags)</code>
- */
- public int getCompilerFlags() {
- if(fFlags < 0) {
- String flagsAttribute = fConfig.getAttribute("flags"); //$NON-NLS-1$
- fFlags = parseFlags(flagsAttribute);
- }
- return fFlags;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPluginContribution#getLocalId()
- */
+ }
+
+ /*
+ * returns the regular expression to be matched.
+ */
+ public String getPattern() {
+ if (fPattern == null) {
+ fPattern = fConfig.getAttribute("regex"); //$NON-NLS-1$
+ try {
+ fPattern = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(fPattern, false);
+ } catch (CoreException e) {
+ ConsolePlugin.log(e);
+ }
+ }
+ return fPattern;
+ }
+
+ /*
+ * returns the flags to be used by <code>Pattern.compile(pattern, flags)</code>
+ */
+ public int getCompilerFlags() {
+ if(fFlags < 0) {
+ String flagsAttribute = fConfig.getAttribute("flags"); //$NON-NLS-1$
+ fFlags = parseFlags(flagsAttribute);
+ }
+ return fFlags;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPluginContribution#getLocalId()
+ */
@Override
public String getLocalId() {
- return fConfig.getAttribute("id"); //$NON-NLS-1$
- }
+ return fConfig.getAttribute("id"); //$NON-NLS-1$
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPluginContribution#getPluginId()
- */
- @Override
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IPluginContribution#getPluginId()
+ */
+ @Override
public String getPluginId() {
- return fConfig.getContributor().getName();
- }
-
- public String getQuickPattern() {
- if (fQualifier == null) {
- fQualifier = fConfig.getAttribute("qualifier"); //$NON-NLS-1$
- try {
- if (fQualifier != null) {
- fQualifier = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(fQualifier, false);
- }
+ return fConfig.getContributor().getName();
+ }
+
+ public String getQuickPattern() {
+ if (fQualifier == null) {
+ fQualifier = fConfig.getAttribute("qualifier"); //$NON-NLS-1$
+ try {
+ if (fQualifier != null) {
+ fQualifier = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(fQualifier, false);
+ }
} catch (CoreException e) {
ConsolePlugin.log(e);
}
- }
- return fQualifier;
- }
+ }
+ return fQualifier;
+ }
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java
index 94e5d51e0..f3d60295b 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java
@@ -42,7 +42,7 @@ public class PinConsoleAction extends Action implements IUpdate {
*/
@Override
public void run() {
- fView.setPinned(isChecked());
+ fView.setPinned(isChecked());
}
/* (non-Javadoc)
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ScrollLockAction.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ScrollLockAction.java
index 07d13c7b8..41cd0f90a 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ScrollLockAction.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ScrollLockAction.java
@@ -21,17 +21,17 @@ import org.eclipse.ui.console.IConsoleView;
*/
public class ScrollLockAction extends Action {
- private IConsoleView fConsoleView;
+ private IConsoleView fConsoleView;
public ScrollLockAction(IConsoleView consoleView) {
super(ConsoleMessages.ScrollLockAction_0);
- fConsoleView = consoleView;
+ fConsoleView = consoleView;
setToolTipText(ConsoleMessages.ScrollLockAction_1);
setHoverImageDescriptor(ConsolePluginImages.getImageDescriptor(IInternalConsoleConstants.IMG_LCL_LOCK));
setDisabledImageDescriptor(ConsolePluginImages.getImageDescriptor(IInternalConsoleConstants.IMG_DLCL_LOCK));
setImageDescriptor(ConsolePluginImages.getImageDescriptor(IInternalConsoleConstants.IMG_ELCL_LOCK));
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IConsoleHelpContextIds.CONSOLE_SCROLL_LOCK_ACTION);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IConsoleHelpContextIds.CONSOLE_SCROLL_LOCK_ACTION);
boolean checked = fConsoleView.getScrollLock();
setChecked(checked);
}
@@ -41,11 +41,11 @@ public class ScrollLockAction extends Action {
*/
@Override
public void run() {
- fConsoleView.setScrollLock(isChecked());
+ fConsoleView.setScrollLock(isChecked());
}
public void dispose() {
- fConsoleView = null;
+ fConsoleView = null;
}
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ShowConsoleAction.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ShowConsoleAction.java
index ea09fb14e..1dd0b2ca2 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ShowConsoleAction.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ShowConsoleAction.java
@@ -38,14 +38,14 @@ public class ShowConsoleAction extends Action {
*/
public static void showConsole(IConsole console, IConsoleView consoleView) {
if (!console.equals(consoleView.getConsole())) {
- boolean pinned = consoleView.isPinned();
- if (pinned) {
- consoleView.setPinned(false);
- }
- consoleView.display(console);
- if (pinned) {
- consoleView.setPinned(true);
- }
+ boolean pinned = consoleView.isPinned();
+ if (pinned) {
+ consoleView.setPinned(false);
+ }
+ consoleView.display(console);
+ if (pinned) {
+ consoleView.setPinned(true);
+ }
}
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/WordWrapAction.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/WordWrapAction.java
index 6e6eddd63..c4196e7de 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/WordWrapAction.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/WordWrapAction.java
@@ -47,4 +47,4 @@ public class WordWrapAction extends Action {
public void dispose() {
fConsoleView = null;
}
-} \ No newline at end of file
+}
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.java
index bd7651f0c..e84a10414 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.java
@@ -3,8 +3,8 @@
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* IBM - Initial API and implementation
* dakshinamurthy.karra@gmail.com - bug 165371
**********************************************************************/
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsUtil.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsUtil.java
index 8f7a871b2..507dccd56 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsUtil.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsUtil.java
@@ -33,7 +33,7 @@ public class ExternalToolsUtil {
/**
* Throws a core exception with an error status object built from
* the given message, lower level exception, and error code.
- *
+ *
* @param message the status message
* @param exception lower level exception associated with the
* error, or <code>null</code> if none
@@ -42,14 +42,14 @@ public class ExternalToolsUtil {
protected static void abort(String message, Throwable exception, int code) throws CoreException {
throw new CoreException(new Status(IStatus.ERROR, ExternalToolsPlugin.PLUGIN_ID, code, message, exception));
}
-
+
/**
* Expands and returns the location attribute of the given launch
* configuration. The location is
* verified to point to an existing file, in the local file system.
- *
+ *
* @param configuration launch configuration
- * @return an absolute path to a file in the local file system
+ * @return an absolute path to a file in the local file system
* @throws CoreException if unable to retrieve the associated launch
* configuration attribute, if unable to resolve any variables, or if the
* resolved location does not point to an existing file in the local file
@@ -58,11 +58,11 @@ public class ExternalToolsUtil {
public static IPath getLocation(ILaunchConfiguration configuration) throws CoreException {
return ExternalToolsCoreUtil.getLocation(configuration);
}
-
+
/**
* Returns a boolean specifying whether or not output should be captured for
* the given configuration
- *
+ *
* @param configuration the configuration from which the value will be
* extracted
* @return boolean specifying whether or not output should be captured
@@ -77,7 +77,7 @@ public class ExternalToolsUtil {
* configuration. Returns <code>null</code> if a working directory is not
* specified. If specified, the working is verified to point to an existing
* directory in the local file system.
- *
+ *
* @param configuration launch configuration
* @return an absolute path to a directory in the local file system, or
* <code>null</code> if unspecified
@@ -93,7 +93,7 @@ public class ExternalToolsUtil {
/**
* Expands and returns the arguments attribute of the given launch
* configuration. Returns <code>null</code> if arguments are not specified.
- *
+ *
* @param configuration launch configuration
* @return an array of resolved arguments, or <code>null</code> if
* unspecified
@@ -103,13 +103,13 @@ public class ExternalToolsUtil {
public static String[] getArguments(ILaunchConfiguration configuration) throws CoreException {
return ExternalToolsCoreUtil.getArguments(configuration);
}
-
+
/**
* Returns whether the given launch configuration is enabled. This property
* is intended only to apply to external tool builder configurations and
* determines whether the project builder will launch the configuration
* when it builds.
- *
+ *
* @param configuration the configuration for which the enabled state should
* be determined.
* @return whether the given configuration is enabled to be run when a build occurs.
@@ -118,30 +118,30 @@ public class ExternalToolsUtil {
public static boolean isBuilderEnabled(ILaunchConfiguration configuration) throws CoreException {
return ExternalToolsCoreUtil.isBuilderEnabled(configuration);
}
-
+
/**
* Returns the collection of resources for the build scope as specified by the given launch configuration.
- *
+ *
* @param configuration launch configuration
* @throws CoreException if an exception occurs while retrieving the resources
*/
public static IResource[] getResourcesForBuildScope(ILaunchConfiguration configuration) throws CoreException {
return ExternalToolsCoreUtil.getResourcesForBuildScope(configuration);
}
-
+
/**
* Parses the argument text into an array of individual
* strings using the space character as the delimiter.
* An individual argument containing spaces must have a
- * double quote (") at the start and end. Two double
+ * double quote (") at the start and end. Two double
* quotes together is taken to mean an embedded double
* quote in the argument text.
- *
+ *
* @param arguments the arguments as one string
* @return the array of arguments
*/
public static String[] parseStringIntoList(String arguments) {
return ExternalToolsCoreUtil.parseStringIntoList(arguments);
- }
-
+ }
+
}
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/OpenExternalToolsConfigurations.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/OpenExternalToolsConfigurations.java
index dcb105fd0..4ce5b12b6 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/OpenExternalToolsConfigurations.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/OpenExternalToolsConfigurations.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsImages.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsImages.java
index 9fc9e6b38..a476b0e10 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsImages.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsImages.java
@@ -26,11 +26,11 @@ import org.eclipse.swt.graphics.Image;
*/
public class ExternalToolsImages {
- /**
+ /**
* The image registry containing <code>Image</code>s.
*/
private static ImageRegistry imageRegistry;
-
+
/**
* The registry for composite images
*/
@@ -40,17 +40,17 @@ public class ExternalToolsImages {
private static URL ICON_BASE_URL= null;
static {
- String pathSuffix = "icons/full/"; //$NON-NLS-1$
+ String pathSuffix = "icons/full/"; //$NON-NLS-1$
ICON_BASE_URL= ExternalToolsPlugin.getDefault().getBundle().getEntry(pathSuffix);
}
// Use IPath and toOSString to build the names to ensure they have the slashes correct
private final static String OBJECT= "obj16/"; //basic colors - size 16x16 //$NON-NLS-1$
-
+
/**
* Declare all images
*/
- private static void declareImages() {
+ private static void declareImages() {
// Objects
declareRegistryImage(IExternalToolConstants.IMG_TAB_MAIN, OBJECT + "main_tab.png"); //$NON-NLS-1$
declareRegistryImage(IExternalToolConstants.IMG_TAB_BUILD, OBJECT + "build_tab.png"); //$NON-NLS-1$
@@ -70,7 +70,7 @@ public class ExternalToolsImages {
}
imageRegistry.put(key, desc);
}
-
+
/**
* Returns the ImageRegistry.
*/
@@ -122,7 +122,7 @@ public class ExternalToolsImages {
public static Image getImage(String key) {
return getImageRegistry().get(key);
}
-
+
/**
* Returns the <code>ImageDescriptor<code> identified by the given key,
* or <code>null</code> if it does not exist.
@@ -130,15 +130,15 @@ public class ExternalToolsImages {
public static ImageDescriptor getImageDescriptor(String key) {
return getImageRegistry().getDescriptor(key);
}
-
+
private static URL makeIconFileURL(String iconPath) throws MalformedURLException {
if (ICON_BASE_URL == null) {
throw new MalformedURLException();
}
-
+
return new URL(ICON_BASE_URL, iconPath);
}
-
+
/**
* Sets the three image descriptors for enabled, disabled, and hovered to an action. The actions
* are retrieved from the *lcl16 folders.
@@ -146,9 +146,9 @@ public class ExternalToolsImages {
public static void setLocalImageDescriptors(IAction action, String iconName) {
setImageDescriptors(action, "lcl16", iconName); //$NON-NLS-1$
}
-
+
private static void setImageDescriptors(IAction action, String type, String relPath) {
-
+
try {
ImageDescriptor id= ImageDescriptor.createFromURL(makeIconFileURL("d" + type, relPath)); //$NON-NLS-1$
if (id != null)
@@ -167,18 +167,18 @@ public class ExternalToolsImages {
action.setImageDescriptor(create("e" + type, relPath)); //$NON-NLS-1$
}
-
+
private static URL makeIconFileURL(String prefix, String name) throws MalformedURLException {
if (ICON_BASE_URL == null) {
throw new MalformedURLException();
}
-
+
StringBuffer buffer= new StringBuffer(prefix);
buffer.append('/');
buffer.append(name);
return new URL(ICON_BASE_URL, buffer.toString());
}
-
+
private static ImageDescriptor create(String prefix, String name) {
try {
return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name));
@@ -187,20 +187,20 @@ public class ExternalToolsImages {
return ImageDescriptor.getMissingImageDescriptor();
}
}
-
- /**
- * Returns the image for the given composite descriptor.
+
+ /**
+ * Returns the image for the given composite descriptor.
*/
public static Image getImage(CompositeImageDescriptor imageDescriptor) {
if (imageDescriptorRegistry == null) {
- imageDescriptorRegistry = new ImageDescriptorRegistry();
+ imageDescriptorRegistry = new ImageDescriptorRegistry();
}
return imageDescriptorRegistry.get(imageDescriptor);
}
-
+
public static void disposeImageDescriptorRegistry() {
if (imageDescriptorRegistry != null) {
- imageDescriptorRegistry.dispose();
+ imageDescriptorRegistry.dispose();
}
}
}
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.java
index 3b66a05c5..f3070965f 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.java
@@ -3,8 +3,8 @@
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* IBM - Initial API and implementation
**********************************************************************/
package org.eclipse.ui.externaltools.internal.model;
@@ -13,7 +13,7 @@ import org.eclipse.osgi.util.NLS;
public class ExternalToolsModelMessages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.ui.externaltools.internal.model.ExternalToolsModelMessages";//$NON-NLS-1$
-
+
public static String ImageDescriptorRegistry_Allocating_image_for_wrong_display_1;
public static String BuilderUtils_5;
public static String BuilderUtils_6;
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolsHelpContextIds.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolsHelpContextIds.java
index 5b557bf92..bce35c8a2 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolsHelpContextIds.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolsHelpContextIds.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -20,17 +20,17 @@ package org.eclipse.ui.externaltools.internal.model;
*/
public interface IExternalToolsHelpContextIds {
public static final String PREFIX = "org.eclipse.ui.externaltools."; //$NON-NLS-1$
-
+
// Preference Pages
public static final String EXTERNAL_TOOLS_PREFERENCE_PAGE = PREFIX + "preference_page_context"; //$NON-NLS-1$
-
+
// Property Pages
public static final String EXTERNAL_TOOLS_BUILDER_PROPERTY_PAGE = PREFIX + "builder_property_page_context"; //$NON-NLS-1$
-
+
//Dialogs
public static final String MESSAGE_WITH_TOGGLE_DIALOG = PREFIX + "message_with_toggle_dialog_context"; //$NON-NLS-1$
public static final String FILE_SELECTION_DIALOG = PREFIX + "file_selection_dialog_context"; //$NON-NLS-1$
-
+
//Launch configuration dialog tabs
public static final String EXTERNAL_TOOLS_LAUNCH_CONFIGURATION_DIALOG_BUILDER_TAB = PREFIX + "builders_tab_context"; //$NON-NLS-1$
public static final String EXTERNAL_TOOLS_LAUNCH_CONFIGURATION_DIALOG_PROGRAM_MAIN_TAB = PREFIX + "program_main_tab_context"; //$NON-NLS-1$
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IPreferenceConstants.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IPreferenceConstants.java
index ab0944c78..167409ee4 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IPreferenceConstants.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IPreferenceConstants.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -15,7 +15,7 @@ package org.eclipse.ui.externaltools.internal.model;
* Constants used to identify user preferences.
*/
public interface IPreferenceConstants {
-
+
/**
* Boolean preference key which indicates whether or not the user should be prompted
* before an external tool project builder is migrated to the new builder format.
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.java
index e51a01194..17cb8eb67 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.java
@@ -3,8 +3,8 @@
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* IBM - Initial API and implementation
**********************************************************************/
package org.eclipse.ui.externaltools.internal.ui;
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/VariableMessages.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/VariableMessages.java
index 959a71486..c091d81a8 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/VariableMessages.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/VariableMessages.java
@@ -3,8 +3,8 @@
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* IBM - Initial API and implementation
**********************************************************************/
package org.eclipse.ui.externaltools.internal.variables;
diff --git a/org.eclipse.ui.externaltools/META-INF/MANIFEST.MF b/org.eclipse.ui.externaltools/META-INF/MANIFEST.MF
index 4495b6d63..5ed6f4978 100644
--- a/org.eclipse.ui.externaltools/META-INF/MANIFEST.MF
+++ b/org.eclipse.ui.externaltools/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Plugin.name
Bundle-SymbolicName: org.eclipse.ui.externaltools; singleton:=true
-Bundle-Version: 3.4.0.qualifier
+Bundle-Version: 3.4.100.qualifier
Bundle-Activator: org.eclipse.ui.externaltools.internal.model.ExternalToolsPlugin
Bundle-Vendor: %Plugin.providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.java b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.java
index da41c1ff8..084c864d7 100644
--- a/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.java
+++ b/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.java
@@ -3,8 +3,8 @@
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* IBM - Initial API and implementation
**********************************************************************/
package org.eclipse.ui.externaltools.internal.program.launchConfigurations;
diff --git a/org.eclipse.ui.externaltools/pom.xml b/org.eclipse.ui.externaltools/pom.xml
index f1e0b3663..24e15880d 100644
--- a/org.eclipse.ui.externaltools/pom.xml
+++ b/org.eclipse.ui.externaltools/pom.xml
@@ -14,10 +14,10 @@
<parent>
<artifactId>eclipse.platform.debug</artifactId>
<groupId>eclipse.platform.debug</groupId>
- <version>4.7.1-SNAPSHOT</version>
+ <version>4.8.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.ui</groupId>
<artifactId>org.eclipse.ui.externaltools</artifactId>
- <version>3.4.0-SNAPSHOT</version>
+ <version>3.4.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/pom.xml b/pom.xml
index 087af9e37..a9d6857d6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,13 +15,13 @@
<parent>
<groupId>org.eclipse</groupId>
<artifactId>eclipse-platform-parent</artifactId>
- <version>4.7.1-SNAPSHOT</version>
+ <version>4.8.0-SNAPSHOT</version>
<relativePath>../eclipse-platform-parent</relativePath>
</parent>
<groupId>eclipse.platform.debug</groupId>
<artifactId>eclipse.platform.debug</artifactId>
- <version>4.7.1-SNAPSHOT</version>
+ <version>4.8.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>

Back to the top