Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 11:20:42 -0500
committerJonah Graham2018-11-22 16:51:31 -0500
commit8985c7b63f04ad139e8b93160798e642d2addc55 (patch)
treef47208be3bf39983209f2433f307bf73a3474952 /visualizer
parenta923614c73274179d56e78d35d17aef149c23a03 (diff)
downloadorg.eclipse.cdt-8985c7b63f04ad139e8b93160798e642d2addc55.tar.gz
org.eclipse.cdt-8985c7b63f04ad139e8b93160798e642d2addc55.tar.xz
org.eclipse.cdt-8985c7b63f04ad139e8b93160798e642d2addc55.zip
Bug 540373: Cleanup: Add missing annotations
This was done by selecting all projects in Eclipse then Source -> Clean Up... -> choosing: - Add missing Annotations - and selecting all three types: - @Override - @Override on interface methods - @Deprecated and completing the wizard Change-Id: I5d367dacb04327107f25e147edc08efc4eb1c2fe
Diffstat (limited to 'visualizer')
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/plugin/CDTVisualizerCorePlugin.java2
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/IVisualizer.java4
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/Visualizer.java24
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerAction.java2
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerView.java9
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerViewer.java23
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/BufferedCanvas.java5
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicCanvas.java3
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicCanvasVisualizer.java6
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicObject.java6
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/events/VisualizerViewerEvent.java2
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/plugin/CDTVisualizerUIPlugin.java2
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/test/TestCanvas.java2
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/test/TestCanvasVisualizer.java7
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/Event.java1
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/MouseMonitor.java7
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/RunnableWithResult.java2
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/ScrollPanel.java2
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionManager.java5
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionProviderAdapter.java4
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionUtils.java6
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/Timer.java2
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/UIResourceManager.java3
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/WorkbenchSelectionAdapter.java6
24 files changed, 135 insertions, 0 deletions
diff --git a/visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/plugin/CDTVisualizerCorePlugin.java b/visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/plugin/CDTVisualizerCorePlugin.java
index 5a38244499..b696de4dc2 100755
--- a/visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/plugin/CDTVisualizerCorePlugin.java
+++ b/visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/plugin/CDTVisualizerCorePlugin.java
@@ -57,6 +57,7 @@ public class CDTVisualizerCorePlugin extends AbstractUIPlugin {
// --- plugin startup/shutdown methods ---
/** Invoked when plugin is loaded. */
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
s_plugin = this;
@@ -70,6 +71,7 @@ public class CDTVisualizerCorePlugin extends AbstractUIPlugin {
}
/** Invoked when plugin is stopped. */
+ @Override
public void stop(BundleContext context) throws Exception {
// clean up resource management
cleanupPluginResources();
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/IVisualizer.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/IVisualizer.java
index 7e504c8752..f329d775d8 100644
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/IVisualizer.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/IVisualizer.java
@@ -151,15 +151,19 @@ public interface IVisualizer extends ISelectionProvider {
// --- selection changed event handling ---
/** Adds external listener for selection change events. */
+ @Override
public void addSelectionChangedListener(ISelectionChangedListener listener);
/** Removes external listener for selection change events. */
+ @Override
public void removeSelectionChangedListener(ISelectionChangedListener listener);
/** Gets current externally-visible selection. */
+ @Override
public ISelection getSelection();
/** Sets current externally-visible selection. */
+ @Override
public void setSelection(ISelection selection);
}
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/Visualizer.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/Visualizer.java
index d7e820eaca..ee4ff98a91 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/Visualizer.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/Visualizer.java
@@ -86,12 +86,14 @@ abstract public class Visualizer implements IVisualizer, ISelectionProvider, ISe
/** Invoked when visualizer is created, to permit any initialization.
* Intended to be overridden. Default implementation does nothing.
*/
+ @Override
public void initializeVisualizer() {
}
/** Invoked when visualizer is disposed, to permit any cleanup.
* Intended to be overridden. Default implementation calls dispose().
*/
+ @Override
public void disposeVisualizer() {
dispose();
}
@@ -99,31 +101,37 @@ abstract public class Visualizer implements IVisualizer, ISelectionProvider, ISe
// --- accessors ---
/** Sets non-localized name. */
+ @Override
public void setName(String name) {
m_name = name;
}
/** Gets non-localized name. */
+ @Override
public String getName() {
return m_name;
}
/** Sets localized display name. */
+ @Override
public void setDisplayName(String displayName) {
m_displayName = displayName;
}
/** Gets localized display name. */
+ @Override
public String getDisplayName() {
return m_displayName;
}
/** Sets localized description string. */
+ @Override
public void setDescription(String description) {
m_description = description;
}
/** Gets localized description string. */
+ @Override
public String getDescription() {
return m_description;
}
@@ -131,11 +139,13 @@ abstract public class Visualizer implements IVisualizer, ISelectionProvider, ISe
// --- viewer management ---
/** Sets viewer we're associated with. */
+ @Override
public void setViewer(IVisualizerViewer viewer) {
m_viewer = viewer;
}
/** Gets viewer we're associated with. */
+ @Override
public IVisualizerViewer getViewer() {
return m_viewer;
}
@@ -143,16 +153,19 @@ abstract public class Visualizer implements IVisualizer, ISelectionProvider, ISe
// --- visualizer selection management ---
/** Invoked when visualizer has been selected. */
+ @Override
public void visualizerSelected() {
};
/** Invoked when another visualizer has been selected, hiding this one. */
+ @Override
public void visualizerDeselected() {
};
// --- control management ---
/** Creates and returns visualizer's UI control on specified parent control. */
+ @Override
abstract public Control createControl(Composite parent);
/** Invoked when visualizer control should be disposed. */
@@ -169,6 +182,7 @@ abstract public class Visualizer implements IVisualizer, ISelectionProvider, ISe
/** Gets visualizer control.
* Returns null if createControl() has not yet been called.
*/
+ @Override
public Control getControl() {
return m_control;
}
@@ -176,16 +190,19 @@ abstract public class Visualizer implements IVisualizer, ISelectionProvider, ISe
// --- menu/toolbar management ---
/** Invoked by VisualizerViewer when toolbar needs to be populated. */
+ @Override
public void populateToolBar(IToolBarManager toolBarManager) {
}
/** Invoked by VisualizerViewer when toolbar menu needs to be populated. */
+ @Override
public void populateMenu(IMenuManager menuManager) {
}
// --- context menu handling ---
/** Invoked by VisualizerViewer when context menu needs to be populated. */
+ @Override
public void populateContextMenu(IMenuManager menuManager) {
}
@@ -195,6 +212,7 @@ abstract public class Visualizer implements IVisualizer, ISelectionProvider, ISe
* Tests whether if the IVisualizer can display the selection
* (or something reachable from it).
*/
+ @Override
public int handlesSelection(ISelection selection) {
// Default implementation doesn't know how to display anything.
return 0;
@@ -203,6 +221,7 @@ abstract public class Visualizer implements IVisualizer, ISelectionProvider, ISe
/**
* Invoked by VisualizerViewer when workbench selection changes.
*/
+ @Override
public void workbenchSelectionChanged(ISelection selection) {
// Default implementation does nothing.
}
@@ -212,11 +231,13 @@ abstract public class Visualizer implements IVisualizer, ISelectionProvider, ISe
// Delegate to selection manager.
/** Adds external listener for selection change events. */
+ @Override
public void addSelectionChangedListener(ISelectionChangedListener listener) {
m_selectionManager.addSelectionChangedListener(listener);
}
/** Removes external listener for selection change events. */
+ @Override
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
m_selectionManager.removeSelectionChangedListener(listener);
}
@@ -227,11 +248,13 @@ abstract public class Visualizer implements IVisualizer, ISelectionProvider, ISe
}
/** Gets current externally-visible selection. */
+ @Override
public ISelection getSelection() {
return m_selectionManager.getSelection();
}
/** Sets externally-visible selection. */
+ @Override
public void setSelection(ISelection selection) {
m_selectionManager.setSelection(selection);
}
@@ -253,6 +276,7 @@ abstract public class Visualizer implements IVisualizer, ISelectionProvider, ISe
* Sets control selection as its own selection,
* and raises selection changed event for any listeners.
*/
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
setSelection(event.getSelection());
}
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerAction.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerAction.java
index 5b3edb8af1..acfe3611ef 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerAction.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerAction.java
@@ -71,12 +71,14 @@ public class VisualizerAction extends Action {
// --- methods ---
/** Invoked when action is triggered. */
+ @Override
public void run() {
}
/** Invoked when action is triggered,
* with the event that caused it.
*/
+ @Override
public void runWithEvent(Event event) {
run();
}
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerView.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerView.java
index fe84287e3f..4ee16d0019 100644
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerView.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerView.java
@@ -95,6 +95,7 @@ public class VisualizerView extends ViewPart implements IVisualizerViewerListene
}
/** Dispose method */
+ @Override
public void dispose() {
super.dispose();
setViewer(null);
@@ -143,6 +144,7 @@ public class VisualizerView extends ViewPart implements IVisualizerViewerListene
// these controls have been created.
/** Invoked when UI controls need to be created */
+ @Override
public void createPartControl(Composite parent) {
m_parentControl = parent;
@@ -172,6 +174,7 @@ public class VisualizerView extends ViewPart implements IVisualizerViewerListene
* (for example, when loading views from workspace memento information),
* in which case it should silently do nothing.
*/
+ @Override
public void setFocus() {
if (m_viewer != null)
m_viewer.setFocus();
@@ -247,6 +250,7 @@ public class VisualizerView extends ViewPart implements IVisualizerViewerListene
/** Invoked by WorkbenchSelectionAdapter when selection changes,
* and by viewer when visualizer selection changes.
*/
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
Object source = event.getSource();
if (source instanceof SelectionProviderAdapter) {
@@ -300,6 +304,7 @@ public class VisualizerView extends ViewPart implements IVisualizerViewerListene
// --- IVisulizerViewerListener implementation ---
/** Invoked when visualizer in view has changed. */
+ @Override
public void visualizerEvent(IVisualizerViewer source, VisualizerViewerEvent event) {
switch (event.getType()) {
case VisualizerViewerEvent.VISUALIZER_CHANGED:
@@ -371,10 +376,12 @@ public class VisualizerView extends ViewPart implements IVisualizerViewerListene
protected void initializeMenu() {
IMenuManager menuManager = getViewMenuManager();
menuManager.addMenuListener(new IMenuListener2() {
+ @Override
public void menuAboutToShow(IMenuManager m) {
viewMenuShow(m);
}
+ @Override
public void menuAboutToHide(IMenuManager m) {
viewMenuHide(m);
}
@@ -408,10 +415,12 @@ public class VisualizerView extends ViewPart implements IVisualizerViewerListene
protected void initializeContextMenu() {
m_contextMenuManager = new MenuManager();
m_contextMenuManager.addMenuListener(new IMenuListener2() {
+ @Override
public void menuAboutToShow(IMenuManager m) {
VisualizerView.this.contextMenuShow(m);
}
+ @Override
public void menuAboutToHide(IMenuManager m) {
VisualizerView.this.contextMenuHide(m);
}
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerViewer.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerViewer.java
index 5e9958bce4..5d548bd7a9 100644
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerViewer.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerViewer.java
@@ -109,12 +109,14 @@ public class VisualizerViewer extends PageBook
}
/** Dispose method. */
+ @Override
public void dispose() {
cleanupVisualizerViewer();
super.dispose();
}
/** Overridden to permit subclassing of SWT component */
+ @Override
protected void checkSubclass() {
// Do nothing.
// (Superclass implementation throws "Subclassing not allowed" exception.)
@@ -129,6 +131,7 @@ public class VisualizerViewer extends PageBook
// Event listener support
m_listeners = new ListenerList(this, "VisualizerViewer event listeners") {
+ @Override
public void raise(Object listener, Object event) {
if (listener instanceof IVisualizerViewerListener && event instanceof VisualizerViewerEvent) {
IVisualizerViewerListener typedListener = (IVisualizerViewerListener) listener;
@@ -148,6 +151,7 @@ public class VisualizerViewer extends PageBook
// Listen to paint event to draw "No visualizers" warning if needed.
this.addPaintListener(new PaintListener() {
+ @Override
public void paintControl(PaintEvent e) {
VisualizerViewer.this.paint(e.gc);
}
@@ -170,11 +174,13 @@ public class VisualizerViewer extends PageBook
// --- accessors ---
/** Gets containing view. */
+ @Override
public VisualizerView getView() {
return m_view;
}
/** Returns non-localized unique name for selected visualizer. */
+ @Override
public String getVisualizerName() {
String result = "visualizer";
if (m_currentVisualizer != null)
@@ -183,6 +189,7 @@ public class VisualizerViewer extends PageBook
}
/** Returns localized name to display for selected visualizer. */
+ @Override
public String getVisualizerDisplayName() {
String result = "Visualizer";
if (m_currentVisualizer != null)
@@ -191,6 +198,7 @@ public class VisualizerViewer extends PageBook
}
/** Returns localized tooltip text to display for selected visualizer. */
+ @Override
public String getVisualizerDescription() {
String result = "Visualizer";
if (m_currentVisualizer != null)
@@ -201,6 +209,7 @@ public class VisualizerViewer extends PageBook
// --- control management ---
/** Gets viewer control. */
+ @Override
public Control getControl() {
return this;
}
@@ -211,6 +220,7 @@ public class VisualizerViewer extends PageBook
* Invoked by VisualizerView when currently selected presentation,
* if any, should take the focus.
*/
+ @Override
public boolean setFocus() {
boolean result = false;
if (m_currentVisualizer != null) {
@@ -226,11 +236,13 @@ public class VisualizerViewer extends PageBook
// --- viewer events ---
/** Adds listener for viewer events. */
+ @Override
public void addVisualizerViewerListener(IVisualizerViewerListener listener) {
m_listeners.addListener(listener);
}
/** Removes listener for viewer events. */
+ @Override
public void removeVisualizerViewerListener(IVisualizerViewerListener listener) {
m_listeners.removeListener(listener);
}
@@ -352,12 +364,14 @@ public class VisualizerViewer extends PageBook
// --- menu/toolbar management ---
/** Invoked when visualizer is selected, to populate the toolbar. */
+ @Override
public void populateToolBar(IToolBarManager toolBarManager) {
if (m_currentVisualizer != null)
m_currentVisualizer.populateToolBar(toolBarManager);
}
/** Invoked when visualizer is selected, to populate the toolbar's menu. */
+ @Override
public void populateMenu(IMenuManager menuManager) {
if (m_currentVisualizer != null)
m_currentVisualizer.populateMenu(menuManager);
@@ -368,12 +382,14 @@ public class VisualizerViewer extends PageBook
/** Invoked when context menu gesture happens on current
* visualizer control.
*/
+ @Override
public void menuDetected(MenuDetectEvent e) {
// raise event to allow view to show context menu
raiseContextMenuEvent(e.x, e.y);
}
/** Invoked when context menu is about to be shown. */
+ @Override
public void populateContextMenu(IMenuManager m) {
if (m_currentVisualizer != null) {
m_currentVisualizer.populateContextMenu(m);
@@ -381,6 +397,7 @@ public class VisualizerViewer extends PageBook
}
/** Gets context menu location. */
+ @Override
public Point getContextMenuLocation() {
return m_view.getContextMenuLocation();
}
@@ -405,11 +422,13 @@ public class VisualizerViewer extends PageBook
// Delegate to selection manager.
/** Adds external listener for selection change events. */
+ @Override
public void addSelectionChangedListener(ISelectionChangedListener listener) {
m_selectionManager.addSelectionChangedListener(listener);
}
/** Removes external listener for selection change events. */
+ @Override
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
if (m_selectionManager != null) {
m_selectionManager.removeSelectionChangedListener(listener);
@@ -422,11 +441,13 @@ public class VisualizerViewer extends PageBook
}
/** Gets current externally-visible selection. */
+ @Override
public ISelection getSelection() {
return m_selectionManager.getSelection();
}
/** Sets externally-visible selection. */
+ @Override
public void setSelection(ISelection selection) {
m_selectionManager.setSelection(selection);
}
@@ -452,6 +473,7 @@ public class VisualizerViewer extends PageBook
* selection. Also invokes workbenchSelectionChanged() on visualizer
* so it can update itself accordingly.
*/
+ @Override
public void workbenchSelectionChanged(ISelection selection) {
// See if we need to change visualizers to handle selection type.
IVisualizer handles = null;
@@ -511,6 +533,7 @@ public class VisualizerViewer extends PageBook
}
/** Invoked when visualizer's selection changes. */
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
// Publish changed visualizer selection to any listeners.
setSelection(event.getSelection());
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/BufferedCanvas.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/BufferedCanvas.java
index 9ce04c690e..7264a15c8f 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/BufferedCanvas.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/BufferedCanvas.java
@@ -52,6 +52,7 @@ public class BufferedCanvas extends Canvas implements PaintListener, ControlList
}
/** Dispose method. */
+ @Override
public void dispose() {
super.dispose();
cleanupBufferedCanvas();
@@ -80,11 +81,13 @@ public class BufferedCanvas extends Canvas implements PaintListener, ControlList
// --- event handlers ---
/** Invoked when control is moved/resized */
+ @Override
public void controlMoved(ControlEvent e) {
// do nothing, we don't care
}
/** Invoked when control is resized */
+ @Override
public void controlResized(ControlEvent e) {
resized(getBounds());
}
@@ -124,6 +127,7 @@ public class BufferedCanvas extends Canvas implements PaintListener, ControlList
// --- paint methods ---
/** Invoked when control needs to be repainted */
+ @Override
public void paintControl(PaintEvent e) {
// Handle last paint event of a cluster.
if (e.count <= 1) {
@@ -184,6 +188,7 @@ public class BufferedCanvas extends Canvas implements PaintListener, ControlList
// --- update methods ---
/** Redraws control */
+ @Override
public void update() {
// guard against update events that happen
// after app has shut down
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicCanvas.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicCanvas.java
index b23b9f3d64..1dd1559e41 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicCanvas.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicCanvas.java
@@ -48,6 +48,7 @@ public class GraphicCanvas extends BufferedCanvas {
super(parent);
m_objects = new ArrayList<IGraphicObject>();
Listener mouseListener = new Listener() {
+ @Override
public void handleEvent(Event event) {
switch (event.type) {
case SWT.MouseEnter:
@@ -66,6 +67,7 @@ public class GraphicCanvas extends BufferedCanvas {
}
/** Dispose method. */
+ @Override
public void dispose() {
if (m_objects != null) {
m_objects.clear();
@@ -113,6 +115,7 @@ public class GraphicCanvas extends BufferedCanvas {
// --- painting methods ---
/** Paints elements on canvas. */
+ @Override
public void paintCanvas(GC gc) {
// paint background first
clearCanvas(gc);
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicCanvasVisualizer.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicCanvasVisualizer.java
index 8eedd081c7..3ab811ea20 100644
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicCanvasVisualizer.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicCanvasVisualizer.java
@@ -49,6 +49,7 @@ public class GraphicCanvasVisualizer extends Visualizer {
}
/** Dispose method. */
+ @Override
public void dispose() {
super.dispose();
}
@@ -56,6 +57,7 @@ public class GraphicCanvasVisualizer extends Visualizer {
// --- control management ---
/** Creates and returns visualizer control on specified parent. */
+ @Override
public Control createControl(Composite parent) {
if (m_control == null) {
GraphicCanvas canvas = createCanvas(parent);
@@ -67,6 +69,7 @@ public class GraphicCanvasVisualizer extends Visualizer {
}
/** Invoked when visualizer control should be disposed. */
+ @Override
public void disposeControl() {
if (m_control != null) {
disposeCanvas();
@@ -101,16 +104,19 @@ public class GraphicCanvasVisualizer extends Visualizer {
// --- menu/toolbar management ---
/** Invoked when visualizer is selected, to populate the toolbar. */
+ @Override
public void populateToolBar(IToolBarManager toolBarManager) {
}
/** Invoked when visualizer is selected, to populate the toolbar's menu. */
+ @Override
public void populateMenu(IMenuManager menuManager) {
}
// --- context menu handling ---
/** Invoked when visualizer view's context menu is invoked, to populate it. */
+ @Override
public void populateContextMenu(IMenuManager menuManager) {
}
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicObject.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicObject.java
index 41f822dfa8..eb46669896 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicObject.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicObject.java
@@ -139,11 +139,13 @@ public class GraphicObject implements IGraphicObject, ITooltipProvider {
// --- accessors ---
/** Gets data object associated with this view element. */
+ @Override
public Object getData() {
return m_data;
}
/** Sets data object associated with this view element. */
+ @Override
public void setData(Object data) {
m_data = data;
}
@@ -222,11 +224,13 @@ public class GraphicObject implements IGraphicObject, ITooltipProvider {
}
/** Returns true if element bounds contains point. */
+ @Override
public boolean contains(int x, int y) {
return m_bounds.contains(x, y);
}
/** Returns true if element bounds are within specified rectangle. */
+ @Override
public boolean isWithin(Rectangle region) {
return (region.x <= m_bounds.x && region.y <= m_bounds.y
&& region.x + region.width >= m_bounds.x + m_bounds.width
@@ -276,6 +280,7 @@ public class GraphicObject implements IGraphicObject, ITooltipProvider {
// --- methods ---
/** Invoked to allow element to paint itself on the viewer canvas */
+ @Override
public void paint(GC gc, boolean decorations) {
if (isVisible()) {
// Set GC to reflect object properties, if set.
@@ -329,6 +334,7 @@ public class GraphicObject implements IGraphicObject, ITooltipProvider {
}
/** Returns true if object has decorations to paint. */
+ @Override
public boolean hasDecorations() {
return false;
}
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/events/VisualizerViewerEvent.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/events/VisualizerViewerEvent.java
index 5554c8c8ba..6026433212 100644
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/events/VisualizerViewerEvent.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/events/VisualizerViewerEvent.java
@@ -56,6 +56,7 @@ public class VisualizerViewerEvent extends Event {
}
/** Dispose method. */
+ @Override
public void dispose() {
super.dispose();
}
@@ -63,6 +64,7 @@ public class VisualizerViewerEvent extends Event {
// --- Object methods ---
/** Converts event type to string */
+ @Override
public String typeToString(int type) {
String result = "";
switch (type) {
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/plugin/CDTVisualizerUIPlugin.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/plugin/CDTVisualizerUIPlugin.java
index 4f867be9d4..cdac0456c9 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/plugin/CDTVisualizerUIPlugin.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/plugin/CDTVisualizerUIPlugin.java
@@ -67,6 +67,7 @@ public class CDTVisualizerUIPlugin extends AbstractUIPlugin {
// --- plugin startup/shutdown methods ---
/** Invoked when plugin is loaded. */
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
s_plugin = this;
@@ -80,6 +81,7 @@ public class CDTVisualizerUIPlugin extends AbstractUIPlugin {
}
/** Invoked when plugin is stopped. */
+ @Override
public void stop(BundleContext context) throws Exception {
// clean up resource management
cleanupPluginResources();
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/test/TestCanvas.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/test/TestCanvas.java
index 40a83e2d75..d6e3e27394 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/test/TestCanvas.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/test/TestCanvas.java
@@ -40,6 +40,7 @@ public class TestCanvas extends GraphicCanvas {
}
/** Dispose method. */
+ @Override
public void dispose() {
cleanupDefaultCanvas();
super.dispose();
@@ -68,6 +69,7 @@ public class TestCanvas extends GraphicCanvas {
/** Invoked when canvas repaint event is raised.
* Default implementation clears canvas to background color.
*/
+ @Override
public void paintCanvas(GC gc) {
super.paintCanvas(gc);
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/test/TestCanvasVisualizer.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/test/TestCanvasVisualizer.java
index 2a0a5aa2fd..e6b68efd02 100644
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/test/TestCanvasVisualizer.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/test/TestCanvasVisualizer.java
@@ -53,29 +53,34 @@ public class TestCanvasVisualizer extends GraphicCanvasVisualizer {
// --- IVisualizer implementation ---
/** Returns non-localized unique name for this visualizer. */
+ @Override
public String getName() {
return "default";
}
/** Returns localized name to display for this visualizer. */
+ @Override
public String getDisplayName() {
// TODO: use a string resource here.
return "Test Visualizer";
}
/** Returns localized tooltip text to display for this visualizer. */
+ @Override
public String getDescription() {
// TODO: use a string resource here.
return "Test visualizer (for debugging only).";
}
/** Creates and returns visualizer canvas control. */
+ @Override
public GraphicCanvas createCanvas(Composite parent) {
m_canvas = new TestCanvas(parent);
return m_canvas;
}
/** Invoked after visualizer control creation, */
+ @Override
protected void initializeCanvas(GraphicCanvas canvas) {
m_canvas.setBackground(canvas.getDisplay().getSystemColor(SWT.COLOR_WHITE));
m_canvas.setForeground(canvas.getDisplay().getSystemColor(SWT.COLOR_BLACK));
@@ -87,6 +92,7 @@ public class TestCanvasVisualizer extends GraphicCanvasVisualizer {
* Tests whether if the IVisualizer can display the selection
* (or something reachable from it).
*/
+ @Override
public int handlesSelection(ISelection selection) {
// By default, we don't support anything.
// Changing this to return 1 enables the test canvas.
@@ -96,6 +102,7 @@ public class TestCanvasVisualizer extends GraphicCanvasVisualizer {
/**
* Invoked by VisualizerViewer when workbench selection changes.
*/
+ @Override
public void workbenchSelectionChanged(ISelection selection) {
String text = SelectionUtils.toString(selection);
m_canvas.setText(text);
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/Event.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/Event.java
index 6a89719e46..f13e0973b6 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/Event.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/Event.java
@@ -57,6 +57,7 @@ public class Event {
// --- Object methods ---
/** Returns string representation of event */
+ @Override
public String toString() {
StringBuilder result = new StringBuilder();
result.append(getClass().getSimpleName());
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/MouseMonitor.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/MouseMonitor.java
index 81b85d1918..46fe203857 100644
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/MouseMonitor.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/MouseMonitor.java
@@ -108,32 +108,39 @@ public class MouseMonitor {
protected void attach(Control control) {
detach(m_control);
control.addMouseListener(m_mouseButtonListener = new MouseListener() {
+ @Override
public void mouseDown(MouseEvent e) {
mouseDownHandler(e.button, e.x, e.y, e.stateMask);
}
+ @Override
public void mouseUp(MouseEvent e) {
mouseUpHandler(e.button, e.x, e.y, e.stateMask);
}
+ @Override
public void mouseDoubleClick(MouseEvent e) {
mouseDoubleClickHandler(e.button, e.x, e.y, e.stateMask);
}
});
control.addMouseMoveListener(m_mouseMoveListener = new MouseMoveListener() {
+ @Override
public void mouseMove(MouseEvent e) {
mouseMoveHandler(e.x, e.y, e.stateMask);
}
});
control.addMouseTrackListener(m_mouseTrackListener = new MouseTrackListener() {
+ @Override
public void mouseEnter(MouseEvent e) {
mouseEnterHandler(e.x, e.y);
}
+ @Override
public void mouseExit(MouseEvent e) {
mouseExitHandler(e.x, e.y);
}
+ @Override
public void mouseHover(MouseEvent e) {
mouseHoverHandler(e.x, e.y);
}
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/RunnableWithResult.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/RunnableWithResult.java
index ffe5165c52..67b7bff137 100644
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/RunnableWithResult.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/RunnableWithResult.java
@@ -81,6 +81,7 @@ public class RunnableWithResult<V> implements Runnable, Callable<V> {
/** Run method.
* Derived types should override call() rather than this method.
*/
+ @Override
public void run() {
m_done = false;
setResult(call());
@@ -95,6 +96,7 @@ public class RunnableWithResult<V> implements Runnable, Callable<V> {
/** Method that returns the value.
* Default implementation returns null.
*/
+ @Override
public V call() {
return null;
}
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/ScrollPanel.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/ScrollPanel.java
index 6424fd5f7f..64c6264c9d 100644
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/ScrollPanel.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/ScrollPanel.java
@@ -46,12 +46,14 @@ public class ScrollPanel extends ScrolledComposite {
}
/** Dispose method. */
+ @Override
public void dispose() {
cleanupScrollPanel();
super.dispose();
}
/** Overridden to permit subclassing */
+ @Override
protected void checkSubclass() {
// do nothing -- superclass implementation throws a "Subclassing not allowed" exception
}
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionManager.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionManager.java
index 55b406d64e..8dcf478f26 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionManager.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionManager.java
@@ -51,6 +51,7 @@ public class SelectionManager implements ISelectionProvider {
m_source = (source == null) ? this : source;
m_label = label;
m_selectionListeners = new ListenerList(this, label + ", listener list") {
+ @Override
public void raise(Object listener, Object event) {
if (listener instanceof ISelectionChangedListener && event instanceof SelectionChangedEvent) {
ISelectionChangedListener typedListener = (ISelectionChangedListener) listener;
@@ -76,6 +77,7 @@ public class SelectionManager implements ISelectionProvider {
// --- ISelectionProvider implementation ---
/** Adds selection changed listener. */
+ @Override
public void addSelectionChangedListener(ISelectionChangedListener listener) {
if (listener == null)
return;
@@ -85,6 +87,7 @@ public class SelectionManager implements ISelectionProvider {
}
/** Removes selection changed listener. */
+ @Override
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
if (listener == null)
return;
@@ -92,11 +95,13 @@ public class SelectionManager implements ISelectionProvider {
}
/** Returns current selection. */
+ @Override
public ISelection getSelection() {
return m_selection;
}
/** Sets selection, and raises change event. */
+ @Override
public void setSelection(ISelection selection) {
setSelection(selection, true);
}
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionProviderAdapter.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionProviderAdapter.java
index 020999fbc0..f516f443db 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionProviderAdapter.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionProviderAdapter.java
@@ -64,6 +64,7 @@ public class SelectionProviderAdapter implements ISelectionProvider {
/** Adds selection change listener.
* Default implementation does nothing.
*/
+ @Override
public void addSelectionChangedListener(ISelectionChangedListener listener) {
m_selectionManager.addSelectionChangedListener(listener);
}
@@ -71,6 +72,7 @@ public class SelectionProviderAdapter implements ISelectionProvider {
/** Removes selection change listener.
* Default implementation does nothing.
*/
+ @Override
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
m_selectionManager.removeSelectionChangedListener(listener);
}
@@ -78,6 +80,7 @@ public class SelectionProviderAdapter implements ISelectionProvider {
/** Gets selection.
* Default implementation does nothing.
*/
+ @Override
public ISelection getSelection() {
return m_selectionManager.getSelection();
}
@@ -85,6 +88,7 @@ public class SelectionProviderAdapter implements ISelectionProvider {
/** Sets selection.
* Default implementation does nothing.
*/
+ @Override
public void setSelection(ISelection selection) {
m_selectionManager.setSelection(selection);
}
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionUtils.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionUtils.java
index 4c4d48e11c..f84b3a2943 100644
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionUtils.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionUtils.java
@@ -42,26 +42,32 @@ public class SelectionUtils {
/** "Empty" or undefined selection. */
public static class EmptySelection implements ISelection, IStructuredSelection {
+ @Override
public boolean isEmpty() {
return true;
}
+ @Override
public Iterator<Object> iterator() {
return new ArrayList<Object>().iterator();
}
+ @Override
public List<Object> toList() {
return new ArrayList<Object>();
}
+ @Override
public int size() {
return 0;
}
+ @Override
public Object getFirstElement() {
return null;
}
+ @Override
public Object[] toArray() {
return new Object[0];
}
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/Timer.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/Timer.java
index 76c1d529e8..cbd06119cc 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/Timer.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/Timer.java
@@ -88,11 +88,13 @@ public class Timer implements ActionListener, Runnable {
* Invoked each time the timer fires.
* Default implementation invokes the run() method on the UI thread.
*/
+ @Override
public void actionPerformed(ActionEvent e) {
GUIUtils.exec(this);
}
/** Invoked each time the timer fires. */
+ @Override
public void run() {
}
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/UIResourceManager.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/UIResourceManager.java
index f271c888d4..8a3b2eacc1 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/UIResourceManager.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/UIResourceManager.java
@@ -75,6 +75,7 @@ public class UIResourceManager extends ResourceManager {
}
/** Dispose method */
+ @Override
public void dispose() {
disposeImageRegistry();
disposeFontRegistry();
@@ -84,6 +85,7 @@ public class UIResourceManager extends ResourceManager {
// --- parent manager management ---
/** Sets parent resource manager, if any */
+ @Override
public void setParentManager(ResourceManager parentManager) {
super.setParentManager(parentManager);
if (parentManager instanceof UIResourceManager) {
@@ -94,6 +96,7 @@ public class UIResourceManager extends ResourceManager {
}
/** Gets parent UI resource manager, if any */
+ @Override
public UIResourceManager getParentManager() {
return m_parentUIManager;
}
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/WorkbenchSelectionAdapter.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/WorkbenchSelectionAdapter.java
index 4e3f72181d..8f557ee171 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/WorkbenchSelectionAdapter.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/WorkbenchSelectionAdapter.java
@@ -57,6 +57,7 @@ public class WorkbenchSelectionAdapter implements ISelectionListener, ISelection
m_selectionListeners = new ListenerList(view,
"WorkbenchSelectionAdapter for view " + view.getClass().getSimpleName()) {
/** Dispatches event to listeners */
+ @Override
public void raise(Object listener, Object event) {
if (listener instanceof ISelectionChangedListener && event instanceof SelectionChangedEvent) {
ISelectionChangedListener typedListener = (ISelectionChangedListener) listener;
@@ -106,6 +107,7 @@ public class WorkbenchSelectionAdapter implements ISelectionListener, ISelection
// --- ISelectionListener implementation ---
/** Invoked when selection changes externally. */
+ @Override
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
// ignore selection change events that came from us
if (part == m_view)
@@ -139,11 +141,13 @@ public class WorkbenchSelectionAdapter implements ISelectionListener, ISelection
// --- ISelectionProvider implementation ---
/** Gets current selection. */
+ @Override
public ISelection getSelection() {
return m_selection;
}
/** Sets current selection, and raises selection changed event. */
+ @Override
public void setSelection(ISelection selection) {
// for some reason, SelectionChangedEvent can't stand a null selection
if (selection == null)
@@ -171,11 +175,13 @@ public class WorkbenchSelectionAdapter implements ISelectionListener, ISelection
}
/** Adds external listener for selection change events. */
+ @Override
public void addSelectionChangedListener(ISelectionChangedListener listener) {
m_selectionListeners.addListener(listener);
}
/** Removes external listener for selection change events. */
+ @Override
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
m_selectionListeners.removeListener(listener);
}

Back to the top