Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Rennie2013-07-31 12:44:16 -0400
committerMike Rennie2013-07-31 12:44:16 -0400
commitd975f27f12707ae6598994c5e3c6bd5e271d46c4 (patch)
treec7d1b2b1a202e19c0c2ccaaff959f4dd25286f0d /org.eclipse.debug.examples.ui
parent4fcde1ffaf34791bd406d47ce72d17e2801432a3 (diff)
downloadeclipse.platform.debug-d975f27f12707ae6598994c5e3c6bd5e271d46c4.tar.gz
eclipse.platform.debug-d975f27f12707ae6598994c5e3c6bd5e271d46c4.tar.xz
eclipse.platform.debug-d975f27f12707ae6598994c5e3c6bd5e271d46c4.zip
Bug 352626 - Move platform debug to Java 1.6 BREE
Diffstat (limited to 'org.eclipse.debug.examples.ui')
-rw-r--r--org.eclipse.debug.examples.ui/.classpath4
-rw-r--r--org.eclipse.debug.examples.ui/.settings/org.eclipse.jdt.core.prefs40
-rw-r--r--org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF8
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/CheckboxModelProxyFactory.java1
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlCellModifier.java3
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEditor.java2
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlLabelProvider.java1
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlsMementoProvider.java1
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiAdapterFactory.java2
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java20
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventModelProxy.java7
-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.java2
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerColumnPresentation.java5
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java3
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java3
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerModelProxyFactory.java1
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnFactory.java2
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackColumnPresentation.java5
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackContentProvider.java3
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java1
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackModelProxy.java2
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java9
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ControlDetailPaneFactory.java17
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/TempoSliderDetailPane.java9
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/ExampleLaunchStatusHandler.java1
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiLaunchShortcut.java28
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java11
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiTabGroup.java1
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java59
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/AdapterFactory.java2
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/AddPDAMemoryBlockAction.java5
-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.java1
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetContentProvider.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetProxy.java1
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDARestartDebugCommand.java9
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAThreadEventHandler.java8
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAViewActionProvider.java14
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAVirtualFindAction.java144
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java12
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java2
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDARunToLineAdapter.java2
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTarget.java16
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTargetFactory.java43
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/AnnotationHover.java11
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java28
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistant.java3
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java3
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAScanner.java12
-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.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDALaunchShortcut.java6
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java9
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDATabGroup.java1
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/presentation/PDAModelPresentation.java5
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/AbstractDataStackViewHandler.java3
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CanPushTester.java3
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CheckboxView.java3
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/DataStackView.java16
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopHandler.java11
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PushHandler.java3
64 files changed, 444 insertions, 225 deletions
diff --git a/org.eclipse.debug.examples.ui/.classpath b/org.eclipse.debug.examples.ui/.classpath
index b7464f3ca..ad32c83a7 100644
--- a/org.eclipse.debug.examples.ui/.classpath
+++ b/org.eclipse.debug.examples.ui/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.debug.examples.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.debug.examples.ui/.settings/org.eclipse.jdt.core.prefs
index 5d7a22fe3..74c3aeb02 100644
--- a/org.eclipse.debug.examples.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.debug.examples.ui/.settings/org.eclipse.jdt.core.prefs
@@ -14,17 +14,17 @@ org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonN
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
@@ -33,9 +33,9 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
@@ -53,10 +53,10 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
@@ -65,7 +65,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
@@ -78,11 +78,11 @@ 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=ignore
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
@@ -91,18 +91,18 @@ org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=enabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
@@ -119,9 +119,9 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
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.unusedWarningToken=error
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.6
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.examples.ui/META-INF/MANIFEST.MF b/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF
index cdbdcd9bc..91cdcd845 100644
--- a/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF
@@ -6,14 +6,14 @@ Bundle-Version: 1.4.200.qualifier
Bundle-Activator: org.eclipse.debug.examples.ui.pda.DebugUIPlugin
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources,
- org.eclipse.debug.core,
+ org.eclipse.debug.core;bundle-version="3.9.0",
org.eclipse.ui,
- org.eclipse.debug.ui,
+ org.eclipse.debug.ui;bundle-version="3.10.0",
org.eclipse.jface.text,
org.eclipse.ui.editors,
org.eclipse.ui.workbench.texteditor,
org.eclipse.ui.ide,
- org.eclipse.debug.examples.core,
+ org.eclipse.debug.examples.core;bundle-version="1.3.300",
org.eclipse.core.expressions
Eclipse-LazyStart: true
Export-Package: org.eclipse.debug.examples.ui.midi.adapters;x-internal:=true,
@@ -26,5 +26,5 @@ Export-Package: org.eclipse.debug.examples.ui.midi.adapters;x-internal:=true,
org.eclipse.debug.examples.ui.pda.launcher;x-internal:=true,
org.eclipse.debug.examples.ui.pda.presentation;x-internal:=true,
org.eclipse.debug.examples.ui.pda.views;x-internal:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
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 31d375ab8..ff95f9fc1 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
@@ -24,6 +24,7 @@ public class CheckboxModelProxyFactory implements IModelProxyFactory {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory#createModelProxy(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
public IModelProxy createModelProxy(Object element, IPresentationContext context) {
if (CheckboxView.ID.equals(context.getId())) {
if (element instanceof Track) {
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 100f20e5a..214aba225 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
@@ -25,6 +25,7 @@ public class ControlCellModifier implements ICellModifier {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ICellModifier#canModify(java.lang.Object, java.lang.String)
*/
+ @Override
public boolean canModify(Object element, String property) {
if (SequencerColumnPresentation.COL_VALUE.equals(property)) {
if (element instanceof SequencerControl) {
@@ -37,6 +38,7 @@ public class ControlCellModifier implements ICellModifier {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ICellModifier#getValue(java.lang.Object, java.lang.String)
*/
+ @Override
public Object getValue(Object element, String property) {
if (SequencerColumnPresentation.COL_VALUE.equals(property)) {
if (element instanceof SequencerControl) {
@@ -50,6 +52,7 @@ public class ControlCellModifier implements ICellModifier {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ICellModifier#modify(java.lang.Object, java.lang.String, java.lang.Object)
*/
+ @Override
public void modify(Object element, String property, Object value) {
Object oldValue = getValue(element, property);
if (!value.equals(oldValue)) {
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 ecb05ae8b..a76fc406e 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
@@ -27,6 +27,7 @@ public class ControlEditor implements IElementEditor {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor#getCellEditor(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String, java.lang.Object, org.eclipse.swt.widgets.Composite)
*/
+ @Override
public CellEditor getCellEditor(IPresentationContext context, String columnId, Object element, Composite parent) {
return new TextCellEditor(parent);
}
@@ -34,6 +35,7 @@ public class ControlEditor implements IElementEditor {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor#getCellModifier(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
*/
+ @Override
public ICellModifier getCellModifier(IPresentationContext context, Object element) {
return new ControlCellModifier();
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/ControlEventHandler.java
index a09df84d3..0d5d262de 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
@@ -55,6 +55,7 @@ public class ControlEventHandler extends DebugEventHandler {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler#handlesEvent(org.eclipse.debug.core.DebugEvent)
*/
+ @Override
protected boolean handlesEvent(DebugEvent event) {
return true;
}
@@ -62,6 +63,7 @@ public class ControlEventHandler extends DebugEventHandler {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler#dispose()
*/
+ @Override
public synchronized void dispose() {
super.dispose();
if (fTimer != null) {
@@ -72,6 +74,7 @@ public class ControlEventHandler extends DebugEventHandler {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler#refreshRoot(org.eclipse.debug.core.DebugEvent)
*/
+ @Override
protected void refreshRoot(DebugEvent event) {
ModelDelta delta = new ModelDelta(fLaunch, IModelDelta.CONTENT);
fireDelta(delta);
@@ -80,6 +83,7 @@ public class ControlEventHandler extends DebugEventHandler {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler#handleResume(org.eclipse.debug.core.DebugEvent)
*/
+ @Override
protected void handleResume(DebugEvent event) {
super.handleResume(event);
startTimer();
@@ -91,6 +95,7 @@ public class ControlEventHandler extends DebugEventHandler {
private void startTimer() {
fTimer = new Timer(true);
fTimer.schedule(new TimerTask() {
+ @Override
public void run() {
ModelDelta delta = new ModelDelta(fLaunch, IModelDelta.NO_CHANGE);
delta = delta.addNode(new ClockControl(fLaunch), IModelDelta.STATE | IModelDelta.CONTENT);
@@ -102,6 +107,7 @@ public class ControlEventHandler extends DebugEventHandler {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.update.DebugEventHandler#handleSuspend(org.eclipse.debug.core.DebugEvent)
*/
+ @Override
protected void handleSuspend(DebugEvent event) {
super.handleSuspend(event);
if (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 febdf3e42..7daab2a8b 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
@@ -26,6 +26,7 @@ public class ControlLabelProvider extends ElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getLabel(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
*/
+ @Override
protected String getLabel(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
SequencerControl control = (SequencerControl) elementPath.getLastSegment();
if (SequencerColumnPresentation.COL_NAME.equals(columnId)) {
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 1e3988ad1..6197cda6f 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
@@ -26,6 +26,7 @@ public class ControlsMementoProvider extends DebugElementMementoProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.DebugElementMementoProvider#getElementName(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
protected String getElementName(Object element, IPresentationContext context) throws CoreException {
if (element instanceof MidiLaunch) {
return "SEQUENCER"; //$NON-NLS-1$
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 9ddbf24df..b3dfbbead 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
@@ -50,6 +50,7 @@ public class MidiAdapterFactory implements IAdapterFactory {
private static IModelProxyFactory fgCheckboxModelProxyFactory = new CheckboxModelProxyFactory();
+ @Override
public Object getAdapter(Object adaptableObject, Class adapterType) {
if (IElementContentProvider.class.equals(adapterType)) {
if (adaptableObject instanceof MidiLaunch) {
@@ -104,6 +105,7 @@ public class MidiAdapterFactory implements IAdapterFactory {
return null;
}
+ @Override
public Class[] getAdapterList() {
return new Class[]{IElementContentProvider.class, IElementLabelProvider.class, IStepOverHandler.class,};
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java
index 13406acda..39f3a4a8f 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventLabelProvider.java
@@ -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)
@@ -22,7 +22,7 @@ import org.eclipse.jface.viewers.TreePath;
/**
* Provides labels for MIDI tracks.
- *
+ *
* @since 1.0
*/
public class MidiEventLabelProvider extends ElementLabelProvider {
@@ -30,6 +30,7 @@ public class MidiEventLabelProvider extends ElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getLabel(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
*/
+ @Override
protected String getLabel(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
MidiEvent event = (MidiEvent) elementPath.getLastSegment();
MidiMessage message = event.getMessage();
@@ -57,24 +58,25 @@ public class MidiEventLabelProvider extends ElementLabelProvider {
}
return ""; //$NON-NLS-1$
}
-
-
+
+
/*
* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getChecked(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
public boolean getChecked(TreePath path, IPresentationContext presentationContext) throws CoreException {
- Boolean result = (Boolean) MidiEventModelProxy.gChecked.get(path);
- return result == null ? false : result.booleanValue();
+ Boolean result = MidiEventModelProxy.gChecked.get(path);
+ return result == null ? false : result.booleanValue();
}
-
+
/**
* Appends a byte to the buffer with 2 hex characters.
- *
+ *
* @param buffer
* @param b
*/
- private void appendByte(StringBuffer buffer, byte b) {
+ private void appendByte(StringBuffer buffer, byte b) {
String hex = Integer.toHexString(b & 0xFF).toUpperCase();
for (int i = hex.length(); i < 2; i++) {
buffer.append('0');
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventModelProxy.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventModelProxy.java
index 884062f09..26d89d818 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventModelProxy.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/MidiEventModelProxy.java
@@ -20,12 +20,13 @@ import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy;
import org.eclipse.jface.viewers.TreePath;
public class MidiEventModelProxy extends AbstractModelProxy implements ICheckboxModelProxy {
- static Map gChecked = new HashMap();
-
-
+ static Map<TreePath, Boolean> gChecked = new HashMap<TreePath, Boolean>();
+
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckboxModelProxy#setChecked(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object, org.eclipse.jface.viewers.TreePath, boolean)
*/
+ @Override
public boolean setChecked(IPresentationContext context, Object viewerInput, TreePath path, boolean checked) {
System.out.println("TrackCheckListener.setChecked() element = " + path.getLastSegment() + " checked = " + checked); //$NON-NLS-1$ //$NON-NLS-2$
gChecked.put(path, Boolean.valueOf(checked));
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 440b79e46..30d11b260 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
@@ -26,6 +26,7 @@ public class MidiStepOverHandler implements IStepOverHandler {
/* (non-Javadoc)
* @see org.eclipse.debug.core.commands.IDebugCommandHandler#canExecute(org.eclipse.debug.core.commands.IEnabledStateRequest)
*/
+ @Override
public void canExecute(IEnabledStateRequest request) {
// We could create a job here, schedule it, then return to be asynchronous
request.setEnabled(request.getElements().length > 0);
@@ -35,6 +36,7 @@ public class MidiStepOverHandler implements IStepOverHandler {
/* (non-Javadoc)
* @see org.eclipse.debug.core.commands.IDebugCommandHandler#execute(org.eclipse.debug.core.commands.IDebugCommandRequest)
*/
+ @Override
public boolean execute(IDebugCommandRequest request) {
// We could create a job to do this work, schedule it, then return to be asynchronous
// If running asynchronously, remember to return the enablement you want the action to have while this action is run
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 5a9fc55b1..3fdde0f0f 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
@@ -27,6 +27,7 @@ public class SequencerColumnFactory implements IColumnPresentationFactory {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory#createColumnPresentation(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
*/
+ @Override
public IColumnPresentation createColumnPresentation(IPresentationContext context, Object element) {
if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) || CheckboxView.ID.equals(context.getId())) {
return new SequencerColumnPresentation();
@@ -37,6 +38,7 @@ public class SequencerColumnFactory implements IColumnPresentationFactory {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory#getColumnPresentationId(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
*/
+ @Override
public String getColumnPresentationId(IPresentationContext context, Object element) {
if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) || CheckboxView.ID.equals(context.getId())) {
return SequencerColumnPresentation.ID;
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 5be898b41..3672fcb46 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
@@ -38,6 +38,7 @@ public class SequencerColumnPresentation extends AbstractColumnPresentation {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getAvailableColumns()
*/
+ @Override
public String[] getAvailableColumns() {
return COLUMN_IDS;
}
@@ -45,6 +46,7 @@ public class SequencerColumnPresentation extends AbstractColumnPresentation {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getHeader(java.lang.String)
*/
+ @Override
public String getHeader(String id) {
if (COL_NAME.equals(id)) {
return "Control"; //$NON-NLS-1$
@@ -58,6 +60,7 @@ public class SequencerColumnPresentation extends AbstractColumnPresentation {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getId()
*/
+ @Override
public String getId() {
return ID;
}
@@ -65,6 +68,7 @@ public class SequencerColumnPresentation extends AbstractColumnPresentation {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getInitialColumns()
*/
+ @Override
public String[] getInitialColumns() {
return COLUMN_IDS;
}
@@ -72,6 +76,7 @@ public class SequencerColumnPresentation extends AbstractColumnPresentation {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#isOptional()
*/
+ @Override
public boolean isOptional() {
return false;
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerContentProvider.java
index 348e854e2..149ec9df6 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
@@ -34,6 +34,7 @@ public class SequencerContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
+ @Override
protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
return getTracks((MidiLaunch) element).length;
@@ -49,6 +50,7 @@ public class SequencerContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
+ @Override
protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
return getElements(getTracks((MidiLaunch) parent), index, length);
@@ -89,6 +91,7 @@ public class SequencerContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#supportsContextId(java.lang.String)
*/
+ @Override
protected boolean supportsContextId(String id) {
return IDebugUIConstants.ID_DEBUG_VIEW.equals(id)
|| IDebugUIConstants.ID_VARIABLE_VIEW.equals(id);
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/SequencerControlsModelProxy.java
index 3faf1c4f0..a6b0338a9 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
@@ -51,6 +51,7 @@ public class SequencerControlsModelProxy extends EventHandlerModelProxy {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy#installed(org.eclipse.jface.viewers.Viewer)
*/
+ @Override
public void installed(Viewer viewer) {
super.installed(viewer);
fHandler.init();
@@ -68,6 +69,7 @@ public class SequencerControlsModelProxy extends EventHandlerModelProxy {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.update.EventHandlerModelProxy#createEventHandlers()
*/
+ @Override
protected DebugEventHandler[] createEventHandlers() {
fHandler = new ControlEventHandler(this);
return new DebugEventHandler[]{fHandler};
@@ -76,6 +78,7 @@ public class SequencerControlsModelProxy extends EventHandlerModelProxy {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.update.EventHandlerModelProxy#containsEvent(org.eclipse.debug.core.DebugEvent)
*/
+ @Override
protected boolean containsEvent(DebugEvent event) {
if (event.getSource() instanceof SequencerControl) {
return ((SequencerControl)event.getSource()).getLaunch().equals(fLaunch);
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 52e48c1e7..5955b8aa6 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
@@ -29,6 +29,7 @@ public class SequencerModelProxyFactory implements IModelProxyFactory {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory#createModelProxy(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
public IModelProxy createModelProxy(Object element, IPresentationContext context) {
if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId())) {
if (element instanceof MidiLaunch) {
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 66b9063e1..cc7727735 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
@@ -27,6 +27,7 @@ public class TrackColumnFactory implements IColumnPresentationFactory {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory#createColumnPresentation(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
*/
+ @Override
public IColumnPresentation createColumnPresentation(IPresentationContext context, Object element) {
if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) || CheckboxView.ID.equals(context.getId())) {
return new TrackColumnPresentation();
@@ -37,6 +38,7 @@ public class TrackColumnFactory implements IColumnPresentationFactory {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory#getColumnPresentationId(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
*/
+ @Override
public String getColumnPresentationId(IPresentationContext context, Object element) {
if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) || CheckboxView.ID.equals(context.getId())) {
return TrackColumnPresentation.ID;
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 a24ce8c19..bc51c663e 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
@@ -45,6 +45,7 @@ public class TrackColumnPresentation extends AbstractColumnPresentation {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getAvailableColumns()
*/
+ @Override
public String[] getAvailableColumns() {
return COLUMN_IDS;
}
@@ -52,6 +53,7 @@ public class TrackColumnPresentation extends AbstractColumnPresentation {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getHeader(java.lang.String)
*/
+ @Override
public String getHeader(String id) {
if (COL_TICK.equals(id)) {
return "Tick"; //$NON-NLS-1$
@@ -71,6 +73,7 @@ public class TrackColumnPresentation extends AbstractColumnPresentation {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getId()
*/
+ @Override
public String getId() {
return ID;
}
@@ -78,6 +81,7 @@ public class TrackColumnPresentation extends AbstractColumnPresentation {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#getInitialColumns()
*/
+ @Override
public String[] getInitialColumns() {
return COLUMN_INITIAL;
}
@@ -85,6 +89,7 @@ public class TrackColumnPresentation extends AbstractColumnPresentation {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation#isOptional()
*/
+ @Override
public boolean isOptional() {
return false;
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackContentProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackContentProvider.java
index 1606038d0..04ace9c2e 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
@@ -32,6 +32,7 @@ public class TrackContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
+ @Override
protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
Track track = (Track) element;
if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) || CheckboxView.ID.equals(context.getId()) ) {
@@ -43,6 +44,7 @@ public class TrackContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
+ @Override
protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(context.getId()) || CheckboxView.ID.equals(context.getId())) {
Track track = (Track) parent;
@@ -58,6 +60,7 @@ public class TrackContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#supportsContextId(java.lang.String)
*/
+ @Override
protected boolean supportsContextId(String id) {
return IDebugUIConstants.ID_VARIABLE_VIEW.equals(id) || CheckboxView.ID.equals(id);
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/adapters/TrackLabelProvider.java
index 817ebb5be..14c80acdf 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
@@ -28,6 +28,7 @@ public class TrackLabelProvider extends ElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getLabel(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
*/
+ @Override
protected String getLabel(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
Track track = (Track) elementPath.getLastSegment();
MidiLaunch launch = (MidiLaunch) elementPath.getSegment(0);
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 4fe083c60..cb10aa824 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
@@ -25,6 +25,7 @@ public class TrackModelProxy extends AbstractModelProxy {
fTrack = track;
}
+ @Override
public void installed(Viewer viewer) {
super.installed(viewer);
@@ -36,6 +37,7 @@ public class TrackModelProxy extends AbstractModelProxy {
fireModelChanged(delta);
}
+ @Override
public synchronized void dispose() {
super.dispose();
MidiEventModelProxy.gChecked.clear();
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ClockSliderDetailPane.java
index d80481839..b34c8edc1 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
@@ -34,11 +34,13 @@ public class ClockSliderDetailPane implements IDetailPane {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#createControl(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public Control createControl(Composite parent) {
fSlider = new Slider(parent, SWT.HORIZONTAL);
fSlider.setMinimum(0);
fSlider.setMaximum(1000);
fSlider.addSelectionListener(new SelectionAdapter(){
+ @Override
public void widgetSelected(SelectionEvent e) {
int selection = fSlider.getSelection();
if (fControl != null) {
@@ -52,6 +54,7 @@ public class ClockSliderDetailPane implements IDetailPane {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#display(org.eclipse.jface.viewers.IStructuredSelection)
*/
+ @Override
public void display(IStructuredSelection selection) {
fControl = null;
if (selection == null || selection.isEmpty()) {
@@ -70,12 +73,14 @@ public class ClockSliderDetailPane implements IDetailPane {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#dispose()
*/
+ @Override
public void dispose() {
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#getDescription()
*/
+ @Override
public String getDescription() {
return "Location (seconds)"; //$NON-NLS-1$
}
@@ -83,6 +88,7 @@ public class ClockSliderDetailPane implements IDetailPane {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#getID()
*/
+ @Override
public String getID() {
return ControlDetailPaneFactory.ID_CLOCK_SLIDER;
}
@@ -90,6 +96,7 @@ public class ClockSliderDetailPane implements IDetailPane {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#getName()
*/
+ @Override
public String getName() {
return "Clock Slider (seconds)"; //$NON-NLS-1$
}
@@ -97,12 +104,14 @@ public class ClockSliderDetailPane implements IDetailPane {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#init(org.eclipse.ui.IWorkbenchPartSite)
*/
+ @Override
public void init(IWorkbenchPartSite partSite) {
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#setFocus()
*/
+ @Override
public boolean setFocus() {
fSlider.setFocus();
return true;
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ControlDetailPaneFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ControlDetailPaneFactory.java
index fda22c034..25cf833d6 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ControlDetailPaneFactory.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/detailpanes/ControlDetailPaneFactory.java
@@ -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
*******************************************************************************/
@@ -21,16 +21,16 @@ import org.eclipse.jface.viewers.IStructuredSelection;
/**
* Creates detail panes for sequencer controls.
- *
+ *
* @since 1.0
*/
public class ControlDetailPaneFactory implements IDetailPaneFactory {
-
+
/**
* Identifier for the tempo slider detail pane
*/
public static final String ID_TEMPO_SLIDER = "TEMPO_SLIDER"; //$NON-NLS-1$
-
+
/**
* Identifier for the clock slider detail pane
*/
@@ -39,6 +39,7 @@ public class ControlDetailPaneFactory implements IDetailPaneFactory {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPaneFactory#createDetailPane(java.lang.String)
*/
+ @Override
public IDetailPane createDetailPane(String paneID) {
if (ID_TEMPO_SLIDER.equals(paneID)) {
return new TempoSliderDetailPane();
@@ -52,6 +53,7 @@ public class ControlDetailPaneFactory implements IDetailPaneFactory {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPaneFactory#getDefaultDetailPane(org.eclipse.jface.viewers.IStructuredSelection)
*/
+ @Override
public String getDefaultDetailPane(IStructuredSelection selection) {
if (selection.size() == 1) {
Object element = selection.getFirstElement();
@@ -68,6 +70,7 @@ public class ControlDetailPaneFactory implements IDetailPaneFactory {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPaneFactory#getDetailPaneDescription(java.lang.String)
*/
+ @Override
public String getDetailPaneDescription(String paneID) {
if (ID_TEMPO_SLIDER.equals(paneID)) {
return "Tempo Slider"; //$NON-NLS-1$
@@ -81,6 +84,7 @@ public class ControlDetailPaneFactory implements IDetailPaneFactory {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPaneFactory#getDetailPaneName(java.lang.String)
*/
+ @Override
public String getDetailPaneName(String paneID) {
if (ID_TEMPO_SLIDER.equals(paneID)) {
return "Tempo Slider"; //$NON-NLS-1$
@@ -94,8 +98,9 @@ public class ControlDetailPaneFactory implements IDetailPaneFactory {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPaneFactory#getDetailPaneTypes(org.eclipse.jface.viewers.IStructuredSelection)
*/
- public Set getDetailPaneTypes(IStructuredSelection selection) {
- Set set = new HashSet();
+ @Override
+ public Set<String> getDetailPaneTypes(IStructuredSelection selection) {
+ Set<String> set = new HashSet<String>();
if (selection.size() == 1) {
Object element = selection.getFirstElement();
if (element instanceof TempoControl) {
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 ccce38df3..bf13b8b8f 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
@@ -34,11 +34,13 @@ public class TempoSliderDetailPane implements IDetailPane {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#createControl(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public Control createControl(Composite parent) {
fSlider = new Slider(parent, SWT.HORIZONTAL);
fSlider.setMinimum(20);
fSlider.setMaximum(500);
fSlider.addSelectionListener(new SelectionAdapter(){
+ @Override
public void widgetSelected(SelectionEvent e) {
int selection = fSlider.getSelection();
if (fControl != null) {
@@ -52,6 +54,7 @@ public class TempoSliderDetailPane implements IDetailPane {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#display(org.eclipse.jface.viewers.IStructuredSelection)
*/
+ @Override
public void display(IStructuredSelection selection) {
fControl = null;
if (selection == null || selection.isEmpty()) {
@@ -67,12 +70,14 @@ public class TempoSliderDetailPane implements IDetailPane {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#dispose()
*/
+ @Override
public void dispose() {
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#getDescription()
*/
+ @Override
public String getDescription() {
return "Tempo (beats per minute)"; //$NON-NLS-1$
}
@@ -80,6 +85,7 @@ public class TempoSliderDetailPane implements IDetailPane {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#getID()
*/
+ @Override
public String getID() {
return ControlDetailPaneFactory.ID_TEMPO_SLIDER;
}
@@ -87,6 +93,7 @@ public class TempoSliderDetailPane implements IDetailPane {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#getName()
*/
+ @Override
public String getName() {
return "Tempo Slider (BPM)"; //$NON-NLS-1$
}
@@ -94,12 +101,14 @@ public class TempoSliderDetailPane implements IDetailPane {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#init(org.eclipse.ui.IWorkbenchPartSite)
*/
+ @Override
public void init(IWorkbenchPartSite partSite) {
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDetailPane#setFocus()
*/
+ @Override
public boolean setFocus() {
fSlider.setFocus();
return true;
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 2af3957ef..03b8672cc 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
@@ -22,6 +22,7 @@ import org.eclipse.debug.ui.ILaunchConfigurationDialog;
*/
public class ExampleLaunchStatusHandler implements IStatusHandler {
+ @Override
public Object handleStatus(IStatus status, Object source) throws CoreException {
if (source instanceof ILaunchConfigurationDialog) {
return null;
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiLaunchShortcut.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiLaunchShortcut.java
index 987b12bb4..ea72138af 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiLaunchShortcut.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiLaunchShortcut.java
@@ -34,7 +34,7 @@ import org.eclipse.ui.dialogs.ElementListSelectionDialog;
/**
* Launch shortcut for a MIDI file.
- *
+ *
* @since 1.0
*/
public class MidiLaunchShortcut implements ILaunchShortcut {
@@ -42,6 +42,7 @@ public class MidiLaunchShortcut implements ILaunchShortcut {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers.ISelection, java.lang.String)
*/
+ @Override
public void launch(ISelection selection, String mode) {
if (selection instanceof IStructuredSelection) {
IStructuredSelection ss = (IStructuredSelection) selection;
@@ -60,14 +61,14 @@ public class MidiLaunchShortcut implements ILaunchShortcut {
/**
* Returns a MIDI configuration to use for the given file or
- * <code>null</code> to cancel. Creates a new configuration
+ * <code>null</code> to cancel. Creates a new configuration
* if required.
- *
+ *
* @param file file
* @return associated launch configuration or <code>null</code>
*/
private ILaunchConfiguration getConfiguration(IFile file) {
- List candiates = new ArrayList();
+ List<ILaunchConfiguration> candiates = new ArrayList<ILaunchConfiguration>();
try {
ILaunchConfiguration[] configurations = getLaunchManager().getLaunchConfigurations(getLaunchType());
for (int i = 0; i < configurations.length; i++) {
@@ -88,7 +89,7 @@ public class MidiLaunchShortcut implements ILaunchShortcut {
/**
* Returns the MIDI launch configuration type.
- *
+ *
* @return the MIDI launch configuration type
*/
private ILaunchConfigurationType getLaunchType() {
@@ -99,24 +100,24 @@ public class MidiLaunchShortcut implements ILaunchShortcut {
/**
* Returns the launch manager.
- *
+ *
* @return launch manager
*/
private ILaunchManager getLaunchManager() {
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
return manager;
}
-
+
/**
* Returns a configuration from the given collection of configurations that should be launched,
* or <code>null</code> to cancel.
- *
+ *
* @param configList list of configurations to choose from
* @return configuration to launch or <code>null</code> to cancel
*/
- private ILaunchConfiguration chooseConfiguration(List configList) {
+ private ILaunchConfiguration chooseConfiguration(List<ILaunchConfiguration> configList) {
if (configList.size() == 1) {
- return (ILaunchConfiguration) configList.get(0);
+ return configList.get(0);
}
IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog= new ElementListSelectionDialog(DebugUIPlugin.getActiveWorkbenchShell(), labelProvider);
@@ -129,13 +130,13 @@ public class MidiLaunchShortcut implements ILaunchShortcut {
if (result == Window.OK) {
return (ILaunchConfiguration) dialog.getFirstResult();
}
- return null;
+ return null;
}
-
+
/**
* Creates and returns a new MIDI launch configuration for the
* given file.
- *
+ *
* @param file MIDI file
* @return new launch configuration
*/
@@ -157,6 +158,7 @@ public class MidiLaunchShortcut implements ILaunchShortcut {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, java.lang.String)
*/
+ @Override
public void launch(IEditorPart editor, String mode) {
// nothing - currently no editor
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiMainTab.java
index b7d2bd092..c7f1b3448 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
@@ -57,6 +57,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public void createControl(Composite parent) {
Font font = parent.getFont();
@@ -81,6 +82,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
fFileText.setLayoutData(gd);
fFileText.setFont(font);
fFileText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
updateLaunchConfigurationDialog();
}
@@ -88,6 +90,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
fFileButton = createPushButton(comp, "&Browse...", null); //$NON-NLS-1$
fFileButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
browseMidiFiles();
}
@@ -109,6 +112,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
gd.horizontalSpan = 3;
fExceptions.setLayoutData(gd);
fExceptions.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
fHandled.setEnabled(fExceptions.getSelection());
fUnhandled.setEnabled(fExceptions.getSelection());
@@ -118,6 +122,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
fHandled = new Button(test, SWT.RADIO);
fHandled.setText("Throw a handled e&xception during launch to re-open launch dialog"); //$NON-NLS-1$
SelectionAdapter sa = new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
updateLaunchConfigurationDialog();
}
@@ -145,11 +150,13 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
*/
+ @Override
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
*/
+ @Override
public void initializeFrom(ILaunchConfiguration configuration) {
try {
String file = null;
@@ -174,6 +181,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
*/
+ @Override
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
String file = fFileText.getText().trim();
if (file.length() == 0) {
@@ -205,6 +213,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
*/
+ @Override
public String getName() {
return "Main"; //$NON-NLS-1$
}
@@ -212,6 +221,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
*/
+ @Override
public boolean isValid(ILaunchConfiguration launchConfig) {
setErrorMessage(null);
setMessage(null);
@@ -231,6 +241,7 @@ public class MidiMainTab extends AbstractLaunchConfigurationTab {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()
*/
+ @Override
public Image getImage() {
return DebugUIPlugin.getDefault().getImageRegistry().get(DebugUIPlugin.IMG_OBJ_MIDI);
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiTabGroup.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/midi/launcher/MidiTabGroup.java
index 52e8b9dbd..6678753a0 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
@@ -24,6 +24,7 @@ public class MidiTabGroup extends AbstractLaunchConfigurationTabGroup {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String)
*/
+ @Override
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
setTabs(new ILaunchConfigurationTab[] {
new MidiMainTab(),
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java
index 6bdfbf4fa..1ea844c16 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/DebugUIPlugin.java
@@ -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
@@ -41,15 +41,15 @@ public class DebugUIPlugin extends AbstractUIPlugin {
private static DebugUIPlugin plugin;
//Resource bundle.
private ResourceBundle resourceBundle;
-
+
private final static String ICONS_PATH = "icons/full/";//$NON-NLS-1$
private final static String PATH_OBJECT = ICONS_PATH + "obj16/"; //Model object icons //$NON-NLS-1$
private final static String PATH_ELOCALTOOL = ICONS_PATH + "elcl16/"; //Enabled local toolbar icons //$NON-NLS-1$
private final static String PATH_DLOCALTOOL = ICONS_PATH + "dlcl16/"; //Disabled local toolbar icons //$NON-NLS-1$
-
+
/**
* The id of the plugin
- *
+ *
* @since 1.4.200
*/
public static final String PLUGIN_ID = "org.eclipse.debug.examples.ui"; //$NON-NLS-1$
@@ -58,34 +58,34 @@ public class DebugUIPlugin extends AbstractUIPlugin {
*/
public final static String IMG_ELCL_POP = "IMG_ELCL_POP"; //$NON-NLS-1$
public final static String IMG_DLCL_POP = "IMG_DLCL_POP"; //$NON-NLS-1$
-
+
/**
* Toolbar action to push onto data stack
*/
public final static String IMG_ELCL_PUSH = "IMG_ELCL_PUSH"; //$NON-NLS-1$
public final static String IMG_DLCL_PUSH = "IMG_DLCL_PUSH"; //$NON-NLS-1$
-
+
/**
* PDA program image
*/
public final static String IMG_OBJ_PDA = "IMB_OBJ_PDA"; //$NON-NLS-1$
-
+
/**
* MIDI file image
*/
public final static String IMG_OBJ_MIDI = "IMB_OBJ_MIDI"; //$NON-NLS-1$
-
+
/**
* Keyword color
*/
public final static RGB KEYWORD = new RGB(0,0,255);
public final static RGB LABEL = new RGB(128, 128, 0);
-
+
/**
* Managed colors
*/
- private final Map fColors = new HashMap();
-
+ private final Map<RGB, Color> fColors = new HashMap<RGB, Color>();
+
/**
* The constructor.
*/
@@ -97,6 +97,7 @@ public class DebugUIPlugin extends AbstractUIPlugin {
/**
* This method is called upon plug-in activation
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
// Toggles single threaded adapter example
@@ -108,14 +109,15 @@ public class DebugUIPlugin extends AbstractUIPlugin {
/**
* This method is called when the plug-in is stopped
*/
+ @Override
public void stop(BundleContext context) throws Exception {
super.stop(context);
plugin = null;
resourceBundle = null;
- Iterator colors = fColors.entrySet().iterator();
+ Iterator<Entry<RGB, Color>> colors = fColors.entrySet().iterator();
while (colors.hasNext()) {
- Map.Entry entry = (Entry) colors.next();
- ((Color)entry.getValue()).dispose();
+ Entry<RGB, Color> entry = colors.next();
+ entry.getValue().dispose();
}
}
@@ -153,11 +155,12 @@ public class DebugUIPlugin extends AbstractUIPlugin {
}
return resourceBundle;
}
-
-
+
+
/* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
*/
+ @Override
protected void initializeImageRegistry(ImageRegistry reg) {
declareImage(IMG_OBJ_PDA, PATH_OBJECT + "pda.gif"); //$NON-NLS-1$
declareImage(IMG_OBJ_MIDI, PATH_OBJECT + "note.gif"); //$NON-NLS-1$
@@ -166,12 +169,12 @@ public class DebugUIPlugin extends AbstractUIPlugin {
declareImage(IMG_ELCL_PUSH, PATH_ELOCALTOOL + "push.gif"); //$NON-NLS-1$
declareImage(IMG_DLCL_PUSH, PATH_DLOCALTOOL + "push.gif"); //$NON-NLS-1$
}
-
+
/**
* 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
@@ -189,34 +192,34 @@ public class DebugUIPlugin extends AbstractUIPlugin {
}
getImageRegistry().put(key, desc);
}
-
+
/**
* Returns the color described by the given RGB.
- *
+ *
* @param rgb
* @return color
*/
public Color getColor(RGB rgb) {
- Color color = (Color) fColors.get(rgb);
+ Color color = fColors.get(rgb);
if (color == null) {
color= new Color(Display.getCurrent(), rgb);
fColors.put(rgb, color);
}
return color;
}
-
+
/**
* Returns the active workbench window
- *
+ *
* @return the active workbench window
*/
public static IWorkbenchWindow getActiveWorkbenchWindow() {
return getDefault().getWorkbench().getActiveWorkbenchWindow();
}
-
+
/**
* Returns the active workbench shell or <code>null</code> if none
- *
+ *
* @return the active workbench shell or <code>null</code> if none
*/
public static Shell getActiveWorkbenchShell() {
@@ -225,6 +228,6 @@ public class DebugUIPlugin extends AbstractUIPlugin {
return window.getShell();
}
return null;
- }
-
+ }
+
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/AdapterFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/AdapterFactory.java
index 689c50649..02a382c5c 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/AdapterFactory.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/AdapterFactory.java
@@ -30,6 +30,7 @@ public class AdapterFactory implements IAdapterFactory {
private static IModelProxyFactory fgFactory = new ModelProxyFactory();
private static IViewActionProvider fgViewActionProvider = new PDAViewActionProvider();
+ @Override
public Object getAdapter(Object adaptableObject, Class adapterType) {
if (IElementContentProvider.class.equals(adapterType)) {
if (adaptableObject instanceof PDADebugTarget) {
@@ -49,6 +50,7 @@ public class AdapterFactory implements IAdapterFactory {
return null;
}
+ @Override
public Class[] getAdapterList() {
return new Class[]{IElementContentProvider.class, IModelProxyFactory.class, IViewActionProvider.class};
}
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 1a8ff182d..8ce7996f1 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
@@ -34,6 +34,7 @@ public class AddPDAMemoryBlockAction implements IActionDelegate2{
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
+ @Override
public void run(IAction action) {
IWorkbenchWindow window = DebugUIPlugin.getActiveWorkbenchWindow();
if (window != null) {
@@ -73,6 +74,7 @@ public class AddPDAMemoryBlockAction implements IActionDelegate2{
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
*/
+ @Override
public void selectionChanged(IAction action, ISelection selection) {
PDADebugTarget target = getTarget(selection);
action.setEnabled(target != null && !target.isTerminated());
@@ -81,18 +83,21 @@ public class AddPDAMemoryBlockAction implements IActionDelegate2{
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
*/
+ @Override
public void init(IAction action) {
}
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate2#dispose()
*/
+ @Override
public void dispose() {
}
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
*/
+ @Override
public void runWithEvent(IAction action, Event event) {
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 3375fb088..3eed074e3 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
@@ -24,7 +24,8 @@ public class CommandAdapterFactory implements IAdapterFactory {
private static IRestartHandler fgRestartHandler = new PDARestartDebugCommand();
- public Object getAdapter(Object adaptableObject, Class adapterType) {
+ @Override
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
if (IRestartHandler.class.equals(adapterType)) {
if (adaptableObject instanceof PDADebugTarget) {
return fgRestartHandler;
@@ -33,7 +34,8 @@ public class CommandAdapterFactory implements IAdapterFactory {
return null;
}
- public Class[] getAdapterList() {
+ @Override
+ public Class[] getAdapterList() {
return new Class[]{IRestartHandler.class};
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/ModelProxyFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/ModelProxyFactory.java
index a8e5959f1..4f5586ee1 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
@@ -20,6 +20,7 @@ import org.eclipse.debug.ui.IDebugUIConstants;
public class ModelProxyFactory implements IModelProxyFactory {
+ @Override
public IModelProxy createModelProxy(Object element, IPresentationContext context) {
if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
if (element instanceof PDADebugTarget){
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 ed0c069ee..fad17ae43 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
@@ -27,7 +27,8 @@ public class PDADebugTargetContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
- protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
+ @Override
+ protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
PDAThread thread = ((PDADebugTarget) element).getThread(0);
if (thread != null) {
if (thread.hasStackFrames()) {
@@ -40,6 +41,7 @@ public class PDADebugTargetContentProvider extends ElementContentProvider {
/* (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)
*/
+ @Override
protected boolean hasChildren(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
PDAThread thread = ((PDADebugTarget) element).getThread(0);
if (thread != null) {
@@ -51,6 +53,7 @@ public class PDADebugTargetContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
+ @Override
protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
if (context.getId().equals(IDebugUIConstants.ID_DEBUG_VIEW)) {
PDAThread thread = ((PDADebugTarget) parent).getThread(0);
@@ -64,6 +67,7 @@ public class PDADebugTargetContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#supportsContextId(java.lang.String)
*/
+ @Override
protected boolean supportsContextId(String id) {
return IDebugUIConstants.ID_DEBUG_VIEW.equals(id);
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetProxy.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDADebugTargetProxy.java
index e905e12fe..7aee1b507 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
@@ -31,6 +31,7 @@ public class PDADebugTargetProxy extends DebugTargetProxy {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.update.DebugTargetProxy#createEventHandlers()
*/
+ @Override
protected DebugEventHandler[] createEventHandlers() {
return new DebugEventHandler[] { new DebugTargetEventHandler(this), new PDAThreadEventHandler(this) };
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDARestartDebugCommand.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDARestartDebugCommand.java
index 7bb788b24..41ff6c1de 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
@@ -24,14 +24,16 @@ import org.eclipse.debug.examples.core.pda.model.PDADebugTarget;
*/
public class PDARestartDebugCommand extends AbstractDebugCommand implements IRestartHandler {
- protected void doExecute(Object[] targets, IProgressMonitor monitor, IRequest request) throws CoreException {
+ @Override
+ protected void doExecute(Object[] targets, IProgressMonitor monitor, IRequest request) throws CoreException {
for (int i = 0; i < targets.length; i++) {
((PDADebugTarget)targets[i]).restart();
monitor.worked(1);
}
}
- protected Object getTarget(Object element) {
+ @Override
+ protected Object getTarget(Object element) {
IDebugTarget target = (IDebugTarget)getAdapter(element, IDebugTarget.class);
if (target instanceof PDADebugTarget) {
return target;
@@ -39,7 +41,8 @@ public class PDARestartDebugCommand extends AbstractDebugCommand implements IRes
return null;
}
- protected boolean isExecutable(Object[] targets, IProgressMonitor monitor, IEnabledStateRequest request)
+ @Override
+ protected boolean isExecutable(Object[] targets, IProgressMonitor monitor, IEnabledStateRequest request)
throws CoreException
{
for (int i = 0; i < targets.length; i++) {
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 60d0bbc6c..ed3082637 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
@@ -41,6 +41,7 @@ public class PDAThreadEventHandler extends DebugEventHandler {
super(proxy);
}
+ @Override
protected void handleSuspend(DebugEvent event) {
IThread thread = (IThread) event.getSource();
int extras = IModelDelta.STATE;
@@ -60,28 +61,34 @@ public class PDAThreadEventHandler extends DebugEventHandler {
return o1.equals(o2);
}
+ @Override
protected void handleResume(DebugEvent event) {
IThread thread = (IThread) event.getSource();
fireDeltaAndClearTopFrame(thread, IModelDelta.STATE | IModelDelta.CONTENT);
}
+ @Override
protected void handleCreate(DebugEvent event) {
fireDeltaAndClearTopFrame((IThread) event.getSource(), IModelDelta.ADDED);
}
+ @Override
protected void handleTerminate(DebugEvent event) {
fireDeltaAndClearTopFrame((IThread) event.getSource(), IModelDelta.REMOVED);
}
+ @Override
protected void handleChange(DebugEvent event) {
fireDeltaUpdatingTopFrame((IThread) event.getSource(), IModelDelta.STATE);
}
+ @Override
protected void handleLateSuspend(DebugEvent suspend, DebugEvent resume) {
IThread thread = (IThread) suspend.getSource();
fireDeltaUpdatingTopFrame(thread, IModelDelta.CONTENT | IModelDelta.EXPAND);
}
+ @Override
protected void handleSuspendTimeout(DebugEvent event) {
IThread thread = (IThread) event.getSource();
fireDeltaAndClearTopFrame(thread, IModelDelta.CONTENT);
@@ -144,6 +151,7 @@ public class PDAThreadEventHandler extends DebugEventHandler {
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/adapters/PDAViewActionProvider.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAViewActionProvider.java
index cb575878e..9af6fc981 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAViewActionProvider.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAViewActionProvider.java
@@ -1,12 +1,13 @@
/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems and others.
+ * Copyright (c) 2012, 2013 Wind River Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Wind River Systems - initial implementation
+ * Wind River Systems - initial implementation
+ * IBM Corporation - bug fixing
*/
package org.eclipse.debug.examples.ui.pda.adapters;
@@ -27,16 +28,17 @@ import org.eclipse.jface.action.IAction;
*/
public class PDAViewActionProvider implements IViewActionProvider {
- Map fActions = new HashMap();
-
+ Map<IPresentationContext, Action> fActions = new HashMap<IPresentationContext, Action>();
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IViewActionProvider#getAction(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
*/
+ @Override
public IAction getAction(IPresentationContext presentationContext, String actionID) {
if (presentationContext.getId().equals(IDebugUIConstants.ID_VARIABLE_VIEW) &&
- IDebugView.FIND_ACTION.equals(actionID) )
+ IDebugView.FIND_ACTION.equals(actionID) )
{
- Action action = (Action)fActions.get(presentationContext);
+ Action action = fActions.get(presentationContext);
if (action == null) {
action = new PDAVirtualFindAction(presentationContext);
fActions.put(presentationContext, action);
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAVirtualFindAction.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAVirtualFindAction.java
index b5e613ef3..204227995 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAVirtualFindAction.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/adapters/PDAVirtualFindAction.java
@@ -57,46 +57,54 @@ import org.eclipse.ui.texteditor.IUpdate;
/**
* Action which prompts user with a filtered list selection dialog to find an element in tree.
- *
+ *
* @since 3.3
*/
public class PDAVirtualFindAction extends Action implements IUpdate {
-
+
private final TreeModelViewer fClientViewer;
-
+
protected class VirtualViewerListener implements IViewerUpdateListener, ILabelUpdateListener {
-
+
private boolean fViewerUpdatesComplete = false;
private boolean fLabelUpdatesComplete = false;
private IProgressMonitor fProgressMonitor;
- private int fRemainingUpdatesCount = 0;
-
- public void labelUpdateStarted(ILabelUpdate update) {}
- public void labelUpdateComplete(ILabelUpdate update) {
- incrementProgress(1);
+ private int fRemainingUpdatesCount = 0;
+
+ @Override
+ public void labelUpdateStarted(ILabelUpdate update) {}
+ @Override
+ public void labelUpdateComplete(ILabelUpdate update) {
+ incrementProgress(1);
}
- public void labelUpdatesBegin() {
- fLabelUpdatesComplete = false;
+ @Override
+ public void labelUpdatesBegin() {
+ fLabelUpdatesComplete = false;
}
- public void labelUpdatesComplete() {
+ @Override
+ public void labelUpdatesComplete() {
fLabelUpdatesComplete = true;
completeProgress();
}
-
- public void updateStarted(IViewerUpdate update) {}
- public void updateComplete(IViewerUpdate update) {
+
+ @Override
+ public void updateStarted(IViewerUpdate update) {}
+ @Override
+ public void updateComplete(IViewerUpdate update) {
if (update instanceof IChildrenUpdate) {
incrementProgress(((IChildrenUpdate)update).getLength());
}
}
- public void viewerUpdatesBegin() {
- fViewerUpdatesComplete = false;
+ @Override
+ public void viewerUpdatesBegin() {
+ fViewerUpdatesComplete = false;
}
- public void viewerUpdatesComplete() {
+ @Override
+ public void viewerUpdatesComplete() {
fViewerUpdatesComplete = true;
completeProgress();
}
-
+
private void completeProgress() {
IProgressMonitor pm;
synchronized (this) {
@@ -104,9 +112,9 @@ public class PDAVirtualFindAction extends Action implements IUpdate {
}
if (pm != null && fLabelUpdatesComplete && fViewerUpdatesComplete) {
pm.done();
- }
+ }
}
-
+
private void incrementProgress(int count) {
IProgressMonitor pm;
synchronized (this) {
@@ -115,28 +123,31 @@ public class PDAVirtualFindAction extends Action implements IUpdate {
}
if (pm != null && fLabelUpdatesComplete && fViewerUpdatesComplete) {
pm.worked(count);
- }
+ }
}
}
-
+
private static class FindLabelProvider extends LabelProvider {
private final VirtualTreeModelViewer fVirtualViewer;
- private final Map fTextCache = new HashMap();
- public FindLabelProvider(VirtualTreeModelViewer viewer, List items) {
+ private final Map<VirtualItem, String> fTextCache = new HashMap<VirtualItem, String>();
+
+ public FindLabelProvider(VirtualTreeModelViewer viewer, List<VirtualItem> items) {
fVirtualViewer = viewer;
for (int i = 0; i < items.size(); i++) {
- VirtualItem item = (VirtualItem)items.get(i);
+ VirtualItem item = items.get(i);
fTextCache.put(item, fVirtualViewer.getText(item, 0));
}
}
-
+
+ @Override
public Image getImage(Object element) {
return fVirtualViewer.getImage((VirtualItem) element, 0);
}
+ @Override
public String getText(Object element) {
- return (String)fTextCache.get(element);
+ return fTextCache.get(element);
}
}
@@ -154,8 +165,8 @@ public class PDAVirtualFindAction extends Action implements IUpdate {
clientViewer.saveElementState(TreePath.EMPTY, stateDelta, IModelDelta.EXPAND);
listener.fRemainingUpdatesCount = calcUpdatesCount(stateDelta);
VirtualTreeModelViewer fVirtualViewer = new VirtualTreeModelViewer(
- clientViewer.getDisplay(),
- SWT.NONE,
+ clientViewer.getDisplay(),
+ SWT.NONE,
makeVirtualPresentationContext(clientViewer.getPresentationContext()));
fVirtualViewer.addViewerUpdateListener(listener);
fVirtualViewer.addLabelUpdateListener(listener);
@@ -166,59 +177,62 @@ public class PDAVirtualFindAction extends Action implements IUpdate {
fVirtualViewer.updateViewer(stateDelta);
return fVirtualViewer;
}
-
+
protected IPresentationContext makeVirtualPresentationContext(final IPresentationContext clientViewerContext) {
return new PresentationContext(clientViewerContext.getId()) {
-
+
{
String[] clientProperties = clientViewerContext.getProperties();
for (int i = 0; i < clientProperties.length; i++) {
setProperty(clientProperties[i], clientViewerContext.getProperty(clientProperties[i]));
}
-
+
}
-
- public String[] getColumns() {
+
+ @Override
+ public String[] getColumns() {
String[] clientColumns = super.getColumns();
-
+
if (clientColumns == null || clientColumns.length == 0) {
// No columns are used.
return null;
}
-
+
// Try to find the name column.
for (int i = 0; i < clientColumns.length; i++) {
if (IDebugUIConstants.COLUMN_ID_VARIABLE_NAME.equals(clientColumns[i])) {
- return new String[] { IDebugUIConstants.COLUMN_ID_VARIABLE_NAME };
+ return new String[] { IDebugUIConstants.COLUMN_ID_VARIABLE_NAME };
}
}
-
+
return new String[] { clientColumns[0] };
}
};
}
-
+
+ @Override
public void run() {
final VirtualViewerListener listener = new VirtualViewerListener();
VirtualTreeModelViewer virtualViewer = initVirtualViewer(fClientViewer, listener);
-
+
ProgressMonitorDialog dialog = new TimeTriggeredProgressMonitorDialog(fClientViewer.getControl().getShell(), 500);
final IProgressMonitor monitor = dialog.getProgressMonitor();
dialog.setCancelable(true);
-
+
try {
dialog.run(
- true, true,
+ true, true,
new IRunnableWithProgress() {
- public void run(final IProgressMonitor m) throws InvocationTargetException, InterruptedException {
+ @Override
+ public void run(final IProgressMonitor m) throws InvocationTargetException, InterruptedException {
synchronized(listener) {
listener.fProgressMonitor = m;
listener.fProgressMonitor.beginTask(DebugUIPlugin.removeAccelerators(getText()), listener.fRemainingUpdatesCount);
}
-
+
while ((!listener.fLabelUpdatesComplete || !listener.fViewerUpdatesComplete) && !listener.fProgressMonitor.isCanceled()) {
Thread.sleep(1);
- }
+ }
synchronized(listener) {
listener.fProgressMonitor = null;
}
@@ -230,10 +244,10 @@ public class PDAVirtualFindAction extends Action implements IUpdate {
} catch (InterruptedException e) {
return;
}
-
+
VirtualItem root = virtualViewer.getTree();
if (!monitor.isCanceled()) {
- List list = new ArrayList();
+ List<VirtualItem> list = new ArrayList<VirtualItem>();
collectAllChildren(root, list);
FindLabelProvider labelProvider = new FindLabelProvider(virtualViewer, list);
VirtualItem result = performFind(list, labelProvider);
@@ -246,11 +260,12 @@ public class PDAVirtualFindAction extends Action implements IUpdate {
virtualViewer.removeViewerUpdateListener(listener);
virtualViewer.dispose();
}
-
+
private int calcUpdatesCount(IModelDelta stateDelta) {
final int[] count = new int[] {0};
stateDelta.accept( new IModelDeltaVisitor() {
- public boolean visit(IModelDelta delta, int depth) {
+ @Override
+ public boolean visit(IModelDelta delta, int depth) {
if ((delta.getFlags() & IModelDelta.EXPAND) != 0) {
count[0] += delta.getChildCount();
return true;
@@ -258,12 +273,12 @@ public class PDAVirtualFindAction extends Action implements IUpdate {
return false;
}
});
-
+
// Double it to account for separate element and label update ticks.
return count[0] * 2;
}
-
- private void collectAllChildren(VirtualItem element, List collect) {
+
+ private void collectAllChildren(VirtualItem element, List<VirtualItem> collect) {
VirtualItem[] children = element.getItems();
if (children != null) {
for (int i = 0; i < children.length; i++) {
@@ -274,11 +289,11 @@ public class PDAVirtualFindAction extends Action implements IUpdate {
}
}
}
-
- protected VirtualItem performFind(List items, FindLabelProvider labelProvider) {
+
+ protected VirtualItem performFind(List<VirtualItem> items, FindLabelProvider labelProvider) {
FindElementDialog dialog = new FindElementDialog(
- fClientViewer.getControl().getShell(),
- labelProvider,
+ fClientViewer.getControl().getShell(),
+ labelProvider,
items.toArray());
dialog.setTitle("PDA Variables View Find"); //$NON-NLS-1$
dialog.setMessage("&Specify an element to select (? = any character, * = any String):"); //$NON-NLS-1$
@@ -290,28 +305,29 @@ public class PDAVirtualFindAction extends Action implements IUpdate {
}
return null;
}
-
+
protected void setSelectionToClient(VirtualTreeModelViewer virtualViewer, ILabelProvider labelProvider, VirtualItem findItem) {
virtualViewer.getTree().setSelection(new VirtualItem[] { findItem } );
ModelDelta stateDelta = new ModelDelta(virtualViewer.getInput(), IModelDelta.NO_CHANGE);
virtualViewer.saveElementState(TreePath.EMPTY, stateDelta, IModelDelta.SELECT);
fClientViewer.updateViewer(stateDelta);
-
+
ISelection selection = fClientViewer.getSelection();
if (!selection.isEmpty() &&
- selection instanceof IStructuredSelection &&
+ selection instanceof IStructuredSelection &&
((IStructuredSelection)selection).getFirstElement().equals(findItem.getData()) ) {
} else {
DebugUIPlugin.errorDialog(
- fClientViewer.getControl().getShell(),
+ fClientViewer.getControl().getShell(),
"Error", //$NON-NLS-1$
"Could not select item:" + labelProvider.getText(findItem), //$NON-NLS-1$
new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), "Element no longer in viewer.")); //$NON-NLS-1$
- }
+ }
}
-
+
+ @Override
public void update() {
setEnabled( fClientViewer.getInput() != null && fClientViewer.getChildCount(TreePath.EMPTY) > 0 );
}
-
+
}
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 6eba0bad9..ca4706959 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
@@ -38,6 +38,7 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleLineBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
+ @Override
public void toggleLineBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
ITextEditor textEditor = getEditor(part);
if (textEditor != null) {
@@ -63,6 +64,7 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleLineBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
+ @Override
public boolean canToggleLineBreakpoints(IWorkbenchPart part, ISelection selection) {
return getEditor(part) != null;
}
@@ -92,17 +94,20 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleMethodBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
+ @Override
public void toggleMethodBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleMethodBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
+ @Override
public boolean canToggleMethodBreakpoints(IWorkbenchPart part, ISelection selection) {
return false;
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleWatchpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
+ @Override
public void toggleWatchpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
String[] variableAndFunctionName = getVariableAndFunctionName(part, selection);
if (variableAndFunctionName != null && part instanceof ITextEditor && selection instanceof ITextSelection) {
@@ -117,6 +122,7 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#canToggleWatchpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
+ @Override
public boolean canToggleWatchpoints(IWorkbenchPart part, ISelection selection) {
return getVariableAndFunctionName(part, selection) != null;
}
@@ -210,7 +216,8 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#toggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
- public void toggleBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
+ @Override
+ public void toggleBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
if (canToggleWatchpoints(part, selection)) {
toggleWatchpoints(part, selection);
} else {
@@ -221,7 +228,8 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#canToggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
- public boolean canToggleBreakpoints(IWorkbenchPart part, ISelection selection) {
+ @Override
+ public boolean canToggleBreakpoints(IWorkbenchPart part, ISelection selection) {
return canToggleLineBreakpoints(part, selection) || canToggleWatchpoints(part, selection);
}
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAEditorAdapterFactory.java
index 4fd2f8504..a81d6d2c8 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
@@ -26,6 +26,7 @@ public class PDAEditorAdapterFactory implements IAdapterFactory {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
*/
+ @Override
public Object getAdapter(Object adaptableObject, Class adapterType) {
if (adaptableObject instanceof PDAEditor) {
ITextEditor editorPart = (ITextEditor) adaptableObject;
@@ -51,6 +52,7 @@ public class PDAEditorAdapterFactory implements IAdapterFactory {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
*/
+ @Override
public Class[] getAdapterList() {
return new Class[]{IToggleBreakpointsTarget.class};
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDARunToLineAdapter.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDARunToLineAdapter.java
index 3d5fa42d0..9855de3c2 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
@@ -39,6 +39,7 @@ 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)
*/
+ @Override
public void runToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) throws CoreException {
IEditorPart editorPart = (IEditorPart)part;
ITextEditor textEditor = (ITextEditor)editorPart;
@@ -64,6 +65,7 @@ public class PDARunToLineAdapter implements IRunToLineTarget {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IRunToLineTarget#canRunToLine(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection, org.eclipse.debug.core.model.ISuspendResume)
*/
+ @Override
public boolean canRunToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) {
//#ifdef ex7
//# // TODO: Exercise 7 - ensure the target is a PDA target
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 f5f6afb89..2e716724c 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
@@ -47,7 +47,8 @@ public class PDAToggleWatchpointsTarget extends PDABreakpointAdapter {
fModificationModeEnabled = modification;
}
- public boolean canToggleWatchpoints(IWorkbenchPart part, ISelection selection) {
+ @Override
+ public boolean canToggleWatchpoints(IWorkbenchPart part, ISelection selection) {
if (super.canToggleWatchpoints(part, selection)) {
return true;
} else {
@@ -62,6 +63,7 @@ public class PDAToggleWatchpointsTarget extends PDABreakpointAdapter {
/* (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);
@@ -88,7 +90,8 @@ public class PDAToggleWatchpointsTarget extends PDABreakpointAdapter {
new Job("Toggle PDA Watchpoint") { //$NON-NLS-1$
{ setSystem(true); }
- protected IStatus run(IProgressMonitor monitor) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
try {
IFile file = getResource(var.getStackFrame());
String varName = var.getName();
@@ -101,7 +104,8 @@ public class PDAToggleWatchpointsTarget extends PDABreakpointAdapter {
new WorkbenchJob(shell.getDisplay(), "Toggle PDA Watchpoint") { //$NON-NLS-1$
{ setSystem(true); }
- public IStatus runInUIThread(IProgressMonitor submonitor) {
+ @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$
return Status.OK_STATUS;
}
@@ -151,7 +155,8 @@ public class PDAToggleWatchpointsTarget extends PDABreakpointAdapter {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#toggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
- public void toggleBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
+ @Override
+ public void toggleBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
if (canToggleWatchpoints(part, selection)) {
toggleWatchpoints(part, selection);
} else {
@@ -162,7 +167,8 @@ public class PDAToggleWatchpointsTarget extends PDABreakpointAdapter {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension#canToggleBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
*/
- public boolean canToggleBreakpoints(IWorkbenchPart part, ISelection selection) {
+ @Override
+ public boolean canToggleBreakpoints(IWorkbenchPart part, ISelection selection) {
return canToggleLineBreakpoints(part, selection) || canToggleWatchpoints(part, selection);
}
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTargetFactory.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTargetFactory.java
index e0f5c2652..65d1ee022 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTargetFactory.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDAToggleWatchpointsTargetFactory.java
@@ -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
@@ -22,8 +22,8 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IWorkbenchPart;
/**
- * Toggle breakpoints target factory for creating PDA watchpoints. It allows the
- * user the select the type of watchpoint that will be created when the watchpoint
+ * Toggle breakpoints target factory for creating PDA watchpoints. It allows the
+ * user the select the type of watchpoint that will be created when the watchpoint
* is toggles inside the editor or variables view.
*/
public class PDAToggleWatchpointsTargetFactory implements IToggleBreakpointsTargetFactory {
@@ -31,19 +31,20 @@ public class PDAToggleWatchpointsTargetFactory implements IToggleBreakpointsTarg
private static final String TOGGLE_WATCHPOINT_TARGET_ACCESS = "org.eclipse.debug.examples.ui.pda.watchpoint_access"; //$NON-NLS-1$
private static final String TOGGLE_WATCHPOINT_TARGET_MODIFICATION = "org.eclipse.debug.examples.ui.pda.watchpoint_modification"; //$NON-NLS-1$
private static final String TOGGLE_WATCHPOINT_TARGET_BOTH = "org.eclipse.debug.examples.ui.pda.watchpoint_both"; //$NON-NLS-1$
-
- private static Set TOGGLE_WATCHPOINTS_TARGETS = new LinkedHashSet();
-
- private final Map fToggleWatchpointTargets = new HashMap(3);
-
+
+ private static Set<String> TOGGLE_WATCHPOINTS_TARGETS = new LinkedHashSet<String>();
+
+ private final Map<String, IToggleBreakpointsTarget> fToggleWatchpointTargets = new HashMap<String, IToggleBreakpointsTarget>(3);
+
static {
TOGGLE_WATCHPOINTS_TARGETS.add(TOGGLE_WATCHPOINT_TARGET_BOTH);
TOGGLE_WATCHPOINTS_TARGETS.add(TOGGLE_WATCHPOINT_TARGET_ACCESS);
TOGGLE_WATCHPOINTS_TARGETS.add(TOGGLE_WATCHPOINT_TARGET_MODIFICATION);
- }
-
- public IToggleBreakpointsTarget createToggleTarget(String targetID) {
- IToggleBreakpointsTarget target = (IToggleBreakpointsTarget)fToggleWatchpointTargets.get(targetID);
+ }
+
+ @Override
+ public IToggleBreakpointsTarget createToggleTarget(String targetID) {
+ IToggleBreakpointsTarget target = fToggleWatchpointTargets.get(targetID);
if (target == null) {
if (TOGGLE_WATCHPOINT_TARGET_BOTH.equals(targetID)) {
target = new PDAToggleWatchpointsTarget(true, true);
@@ -51,35 +52,39 @@ public class PDAToggleWatchpointsTargetFactory implements IToggleBreakpointsTarg
target = new PDAToggleWatchpointsTarget(true, false);
} else if (TOGGLE_WATCHPOINT_TARGET_MODIFICATION.equals(targetID)) {
target = new PDAToggleWatchpointsTarget(false, true);
- } else {
+ } else {
return null;
}
fToggleWatchpointTargets.put(targetID, target);
}
return target;
}
-
- public String getDefaultToggleTarget(IWorkbenchPart part, ISelection selection) {
+
+ @Override
+ public String getDefaultToggleTarget(IWorkbenchPart part, ISelection selection) {
return TOGGLE_WATCHPOINT_TARGET_BOTH;
}
- public Set getToggleTargets(IWorkbenchPart part, ISelection selection) {
+ @Override
+ public Set<String> getToggleTargets(IWorkbenchPart part, ISelection selection) {
return TOGGLE_WATCHPOINTS_TARGETS;
}
- public String getToggleTargetName(String targetID) {
+ @Override
+ public String getToggleTargetName(String targetID) {
if (TOGGLE_WATCHPOINT_TARGET_BOTH.equals(targetID)) {
return "Watchpoints (Read/Write)"; //$NON-NLS-1$
} else if (TOGGLE_WATCHPOINT_TARGET_ACCESS.equals(targetID)) {
return "Watchpoints (Read)"; //$NON-NLS-1$
} else if (TOGGLE_WATCHPOINT_TARGET_MODIFICATION.equals(targetID)) {
return "Watchpoints (Write)"; //$NON-NLS-1$
- } else {
+ } else {
return null;
}
}
- public String getToggleTargetDescription(String targetID) {
+ @Override
+ public String getToggleTargetDescription(String targetID) {
return getToggleTargetName(targetID);
}
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/AnnotationHover.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/AnnotationHover.java
index 6b79056b7..5367419a0 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/AnnotationHover.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/AnnotationHover.java
@@ -1,10 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+ * Copyright (c) 2005, 2013 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.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,11 +25,12 @@ import org.eclipse.jface.text.source.ISourceViewer;
*/
public class AnnotationHover implements IAnnotationHover {
+ @Override
public String getHoverInfo(ISourceViewer sourceViewer, int lineNumber) {
IAnnotationModel annotationModel = sourceViewer.getAnnotationModel();
- Iterator iterator = annotationModel.getAnnotationIterator();
+ Iterator<Annotation> iterator = annotationModel.getAnnotationIterator();
while (iterator.hasNext()) {
- Annotation annotation = (Annotation) iterator.next();
+ Annotation annotation = iterator.next();
Position position = annotationModel.getPosition(annotation);
try {
int lineOfAnnotation = sourceViewer.getDocument().getLineOfOffset(position.getOffset());
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java
index 469bf452f..0e0d4ad7b 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistProcessor.java
@@ -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,7 +25,8 @@ import org.eclipse.jface.text.contentassist.IContextInformationValidator;
public class PDAContentAssistProcessor implements IContentAssistProcessor {
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+ @Override
+ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
int index = offset - 1;
StringBuffer prefix = new StringBuffer();
IDocument document = viewer.getDocument();
@@ -40,8 +41,8 @@ public class PDAContentAssistProcessor implements IContentAssistProcessor {
} catch (BadLocationException e) {
}
}
-
- List proposals = new ArrayList();
+
+ List<CompletionProposal> proposals = new ArrayList<CompletionProposal>();
String[] keywords = PDAScanner.fgKeywords;
if (prefix.length() > 0) {
String word = prefix.toString();
@@ -59,7 +60,7 @@ public class PDAContentAssistProcessor implements IContentAssistProcessor {
}
}
if (!proposals.isEmpty()) {
- return (ICompletionProposal[]) proposals.toArray(new ICompletionProposal[proposals.size()]);
+ return proposals.toArray(new ICompletionProposal[proposals.size()]);
}
return null;
}
@@ -67,35 +68,40 @@ public class PDAContentAssistProcessor implements IContentAssistProcessor {
/* (non-Javadoc)
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer, int)
*/
- public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
+ @Override
+ public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
*/
- public char[] getCompletionProposalAutoActivationCharacters() {
+ @Override
+ public char[] getCompletionProposalAutoActivationCharacters() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationAutoActivationCharacters()
*/
- public char[] getContextInformationAutoActivationCharacters() {
+ @Override
+ public char[] getContextInformationAutoActivationCharacters() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
*/
- public String getErrorMessage() {
+ @Override
+ public String getErrorMessage() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getContextInformationValidator()
*/
- public IContextInformationValidator getContextInformationValidator() {
+ @Override
+ public IContextInformationValidator getContextInformationValidator() {
return null;
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistant.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAContentAssistant.java
index 01f71928e..a051aa268 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
@@ -34,7 +34,8 @@ public class PDAContentAssistant extends ContentAssistant {
private IInformationControlCreator getInformationControlCreator() {
return new IInformationControlCreator() {
- public IInformationControl createInformationControl(Shell parent) {
+ @Override
+ public IInformationControl createInformationControl(Shell parent) {
return new DefaultInformationControl(parent);
}
};
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/PDAEditor.java
index 2d7ab812e..6ab57fdc9 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
@@ -36,7 +36,8 @@ public class PDAEditor extends AbstractDecoratedTextEditor {
/* (non-Javadoc)
* @see org.eclipse.ui.texteditor.AbstractTextEditor#createActions()
*/
- protected void createActions() {
+ @Override
+ protected void createActions() {
super.createActions();
ResourceBundle bundle = ResourceBundle.getBundle("org.eclipse.debug.examples.ui.pda.editor.PDAEditorMessages"); //$NON-NLS-1$
IAction action = new ContentAssistAction(bundle, "ContentAssistProposal.", this); //$NON-NLS-1$
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 2956ada7a..f2e864c7a 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
@@ -41,14 +41,16 @@ public class PDAScanner extends BufferedRuleBasedScanner {
/* (non-Javadoc)
* @see org.eclipse.jface.text.rules.IWordDetector#isWordStart(char)
*/
- public boolean isWordStart(char c) {
+ @Override
+ public boolean isWordStart(char c) {
return Character.isLetter(c);
}
/* (non-Javadoc)
* @see org.eclipse.jface.text.rules.IWordDetector#isWordPart(char)
*/
- public boolean isWordPart(char c) {
+ @Override
+ public boolean isWordPart(char c) {
return Character.isLetter(c) || c == '_';
}
}
@@ -61,14 +63,16 @@ public class PDAScanner extends BufferedRuleBasedScanner {
/* (non-Javadoc)
* @see org.eclipse.jface.text.rules.IWordDetector#isWordStart(char)
*/
- public boolean isWordStart(char c) {
+ @Override
+ public boolean isWordStart(char c) {
return c == ':';
}
/* (non-Javadoc)
* @see org.eclipse.jface.text.rules.IWordDetector#isWordPart(char)
*/
- public boolean isWordPart(char c) {
+ @Override
+ public boolean isWordPart(char c) {
return super.isWordPart(c) || Character.isDigit(c);
}
}
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 6c24c36a0..676906253 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
@@ -29,13 +29,15 @@ public class PDASourceViewerConfiguration extends TextSourceViewerConfiguration
/* (non-Javadoc)
* @see org.eclipse.jface.text.source.SourceViewerConfiguration#getTextHover(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
*/
- public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {
+ @Override
+ public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) {
return new TextHover();
}
/* (non-Javadoc)
* @see org.eclipse.jface.text.source.SourceViewerConfiguration#getAnnotationHover(org.eclipse.jface.text.source.ISourceViewer)
*/
+ @Override
public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
return new AnnotationHover();
}
@@ -43,7 +45,8 @@ public class PDASourceViewerConfiguration extends TextSourceViewerConfiguration
/* (non-Javadoc)
* @see org.eclipse.jface.text.source.SourceViewerConfiguration#getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer)
*/
- public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
+ @Override
+ public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler reconciler = new PresentationReconciler();
reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
DefaultDamagerRepairer dr = new DefaultDamagerRepairer(new PDAScanner());
@@ -55,7 +58,8 @@ public class PDASourceViewerConfiguration extends TextSourceViewerConfiguration
/* (non-Javadoc)
* @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentAssistant(org.eclipse.jface.text.source.ISourceViewer)
*/
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
+ @Override
+ 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 43e35dc26..7fb40ed11 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
@@ -31,12 +31,14 @@ public class PopFrameActionDelegate implements IObjectActionDelegate, IActionDel
/* (non-Javadoc)
* @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
*/
+ @Override
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
}
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
+ @Override
public void run(IAction action) {
//#ifdef ex5
//# // TODO: Exercise 5 - pop the top frame
@@ -51,6 +53,7 @@ public class PopFrameActionDelegate implements IObjectActionDelegate, IActionDel
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
*/
+ @Override
public void selectionChanged(IAction action, ISelection selection) {
if (selection instanceof IStructuredSelection) {
IStructuredSelection ss = (IStructuredSelection) selection;
@@ -76,12 +79,14 @@ public class PopFrameActionDelegate implements IObjectActionDelegate, IActionDel
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
*/
+ @Override
public void init(IAction action) {
}
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate2#dispose()
*/
+ @Override
public void dispose() {
fThread = null;
}
@@ -89,6 +94,7 @@ public class PopFrameActionDelegate implements IObjectActionDelegate, IActionDel
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
*/
+ @Override
public void runWithEvent(IAction action, Event event) {
run(action);
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/editor/TextHover.java
index 26ca31c0c..cbd294fe8 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
@@ -33,7 +33,8 @@ public class TextHover implements ITextHover {
/* (non-Javadoc)
* @see org.eclipse.jface.text.ITextHover#getHoverInfo(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
*/
- public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
+ @Override
+ public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
String varName = null;
try {
varName = textViewer.getDocument().get(hoverRegion.getOffset(), hoverRegion.getLength());
@@ -84,7 +85,8 @@ public class TextHover implements ITextHover {
/* (non-Javadoc)
* @see org.eclipse.jface.text.ITextHover#getHoverRegion(org.eclipse.jface.text.ITextViewer, int)
*/
- public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
+ @Override
+ public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
return WordFinder.findWord(textViewer.getDocument(), offset);
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDALaunchShortcut.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDALaunchShortcut.java
index 78fc73d48..08d4ecefa 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
@@ -35,7 +35,8 @@ public class PDALaunchShortcut implements ILaunchShortcut {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.jface.viewers.ISelection, java.lang.String)
*/
- public void launch(ISelection selection, String mode) {
+ @Override
+ public void launch(ISelection selection, String mode) {
// must be a structured selection with one file selected
IFile file = (IFile) ((IStructuredSelection)selection).getFirstElement();
@@ -71,7 +72,8 @@ public class PDALaunchShortcut implements ILaunchShortcut {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, java.lang.String)
*/
- public void launch(IEditorPart editor, String mode) {
+ @Override
+ public void launch(IEditorPart editor, String mode) {
}
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java
index a99f6834d..4fad594f8 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
@@ -52,6 +52,7 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public void createControl(Composite parent) {
Font font = parent.getFont();
@@ -76,6 +77,7 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
fProgramText.setLayoutData(gd);
fProgramText.setFont(font);
fProgramText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
updateLaunchConfigurationDialog();
}
@@ -83,6 +85,7 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
fProgramButton = createPushButton(comp, "&Browse...", null); //$NON-NLS-1$
fProgramButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
browsePDAFiles();
}
@@ -106,11 +109,13 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
*/
+ @Override
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
*/
+ @Override
public void initializeFrom(ILaunchConfiguration configuration) {
//#ifdef ex1
//# // TODO: Exercise 1 - retrieve the program path attribute from the launch configuration
@@ -133,6 +138,7 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
*/
+ @Override
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
String program = fProgramText.getText().trim();
if (program.length() == 0) {
@@ -160,6 +166,7 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
*/
+ @Override
public String getName() {
return "Main"; //$NON-NLS-1$
}
@@ -167,6 +174,7 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
*/
+ @Override
public boolean isValid(ILaunchConfiguration launchConfig) {
setErrorMessage(null);
setWarningMessage(null);
@@ -197,6 +205,7 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()
*/
+ @Override
public Image getImage() {
return DebugUIPlugin.getDefault().getImageRegistry().get(DebugUIPlugin.IMG_OBJ_PDA);
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDATabGroup.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDATabGroup.java
index 6f1753c45..38e42d4e0 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
@@ -24,6 +24,7 @@ public class PDATabGroup extends AbstractLaunchConfigurationTabGroup {
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String)
*/
+ @Override
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
//#ifdef ex1
//# // TODO: Exercise 1 - add the PDA main tab, source lookup tab and common
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 4f5455edb..821446167 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
@@ -39,12 +39,14 @@ public class PDAModelPresentation extends LabelProvider implements IDebugModelPr
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDebugModelPresentation#setAttribute(java.lang.String, java.lang.Object)
*/
+ @Override
public void setAttribute(String attribute, Object value) {
}
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
*/
+ @Override
public String getText(Object element) {
if (element instanceof PDADebugTarget) {
return getTargetText((PDADebugTarget)element);
@@ -160,6 +162,7 @@ public class PDAModelPresentation extends LabelProvider implements IDebugModelPr
/* (non-Javadoc)
* @see org.eclipse.debug.ui.IDebugModelPresentation#computeDetail(org.eclipse.debug.core.model.IValue, org.eclipse.debug.ui.IValueDetailListener)
*/
+ @Override
public void computeDetail(IValue value, IValueDetailListener listener) {
String detail = ""; //$NON-NLS-1$
try {
@@ -171,6 +174,7 @@ public class PDAModelPresentation extends LabelProvider implements IDebugModelPr
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ISourcePresentation#getEditorInput(java.lang.Object)
*/
+ @Override
public IEditorInput getEditorInput(Object element) {
if (element instanceof IFile) {
return new FileEditorInput((IFile)element);
@@ -183,6 +187,7 @@ public class PDAModelPresentation extends LabelProvider implements IDebugModelPr
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ISourcePresentation#getEditorId(org.eclipse.ui.IEditorInput, java.lang.Object)
*/
+ @Override
public String getEditorId(IEditorInput input, Object element) {
if (element instanceof IFile || element instanceof ILineBreakpoint) {
return "pda.editor"; //$NON-NLS-1$
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 de469e544..73d061936 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
@@ -27,7 +27,8 @@ import org.eclipse.ui.handlers.HandlerUtil;
*/
abstract public class AbstractDataStackViewHandler extends AbstractHandler {
- public Object execute(ExecutionEvent event) throws ExecutionException {
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchPart part = HandlerUtil.getActivePartChecked(event);
if (part instanceof DataStackView) {
DataStackView view = (DataStackView)part;
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CanPushTester.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CanPushTester.java
index f44bf86da..c937d1493 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CanPushTester.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/CanPushTester.java
@@ -25,7 +25,8 @@ public class CanPushTester extends PropertyTester {
private static final String CAN_PUSH_PROPERTY = "canPush"; //$NON-NLS-1$
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
if (CAN_PUSH_PROPERTY.equals(property)) {
if (receiver instanceof IAdaptable) {
PDADebugElement element = (PDADebugElement)
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 5accdf183..a66daf7e2 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
@@ -17,14 +17,17 @@ 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() {
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 d6ec8a50a..78bc82bc8 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
@@ -48,6 +48,7 @@ public class DataStackView extends AbstractDebugView implements IDebugContextLis
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
*/
+ @Override
public Object[] getChildren(Object parentElement) {
if (parentElement instanceof PDAThread) {
try {
@@ -61,6 +62,7 @@ public class DataStackView extends AbstractDebugView implements IDebugContextLis
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
*/
+ @Override
public Object getParent(Object element) {
if (element instanceof PDAThread) {
return null;
@@ -72,6 +74,7 @@ public class DataStackView extends AbstractDebugView implements IDebugContextLis
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
*/
+ @Override
public boolean hasChildren(Object element) {
return element instanceof PDAThread;
}
@@ -79,6 +82,7 @@ public class DataStackView extends AbstractDebugView implements IDebugContextLis
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
*/
+ @Override
public Object[] getElements(Object inputElement) {
return getChildren(inputElement);
}
@@ -86,12 +90,14 @@ public class DataStackView extends AbstractDebugView implements IDebugContextLis
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IContentProvider#dispose()
*/
+ @Override
public void dispose() {
}
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
*/
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
@@ -100,6 +106,7 @@ public class DataStackView extends AbstractDebugView implements IDebugContextLis
/* (non-Javadoc)
* @see org.eclipse.debug.ui.AbstractDebugView#createViewer(org.eclipse.swt.widgets.Composite)
*/
+ @Override
protected Viewer createViewer(Composite parent) {
TreeViewer viewer = new TreeViewer(parent);
viewer.setLabelProvider(DebugUITools.newDebugModelPresentation());
@@ -111,40 +118,47 @@ public class DataStackView extends AbstractDebugView implements IDebugContextLis
/* (non-Javadoc)
* @see org.eclipse.debug.ui.AbstractDebugView#createActions()
*/
+ @Override
protected void createActions() {
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.AbstractDebugView#getHelpContextId()
*/
+ @Override
protected String getHelpContextId() {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.AbstractDebugView#fillContextMenu(org.eclipse.jface.action.IMenuManager)
*/
+ @Override
protected void fillContextMenu(IMenuManager menu) {
menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.AbstractDebugView#configureToolBar(org.eclipse.jface.action.IToolBarManager)
*/
+ @Override
protected void configureToolBar(IToolBarManager tbm) {
}
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPart#dispose()
*/
+ @Override
public void dispose() {
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);
}
- public IStatus runInUIThread(IProgressMonitor monitor) {
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
if (getViewer() != null) { // runs asynchronously, view may be disposed
update(event.getContext());
}
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopHandler.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopHandler.java
index 37157162b..1c7f6b4ba 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopHandler.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/views/PopHandler.java
@@ -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
@@ -28,14 +28,15 @@ import org.eclipse.jface.viewers.TreeViewer;
*/
public class PopHandler extends AbstractDataStackViewHandler {
- protected void doExecute(DataStackView view, PDAThread thread, ISelection selection) throws ExecutionException {
+ @Override
+ protected void doExecute(DataStackView view, PDAThread thread, ISelection selection) throws ExecutionException {
TreeViewer viewer = (TreeViewer)view.getViewer();
- Object popee = selection instanceof IStructuredSelection
+ Object popee = selection instanceof IStructuredSelection
? ((IStructuredSelection)selection).getFirstElement() : null;
if (popee != null) {
try {
IValue[] stack = thread.getDataStack();
- List restore = new ArrayList();
+ List<IValue> restore = new ArrayList<IValue>();
for (int i = 0; i < stack.length; i++) {
Object value = stack[i];
if (popee.equals(value)) {
@@ -48,7 +49,7 @@ public class PopHandler extends AbstractDataStackViewHandler {
}
}
while (!restore.isEmpty()) {
- IValue value = (IValue) restore.remove(restore.size() - 1);
+ IValue value = restore.remove(restore.size() - 1);
thread.pushData(value.getValueString());
}
} catch (DebugException e) {
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 d8fb433cc..88ef28b26 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
@@ -23,7 +23,8 @@ import org.eclipse.jface.window.Window;
*/
public class PushHandler extends AbstractDataStackViewHandler {
- protected void doExecute(DataStackView view, PDAThread thread, ISelection selection) throws ExecutionException {
+ @Override
+protected void doExecute(DataStackView view, PDAThread thread, ISelection selection) throws ExecutionException {
InputDialog dialog = new InputDialog(view.getSite().getShell(), "Specify Value", "Enter value to push", null, null); //$NON-NLS-1$ //$NON-NLS-2$
if (dialog.open() == Window.OK) {
try {

Back to the top