diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionSelectionSynchronizer.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionSelectionSynchronizer.java index 64ef38dceb1729c0be036d877a1ecd0a8d5d6159..d474320b2c9dbafa9e61305f71d55e8367eb22a2 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionSelectionSynchronizer.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionSelectionSynchronizer.java @@ -15,7 +15,7 @@ import org.eclipse.gef.ui.parts.TreeViewer; import de.bmotionstudio.gef.editor.model.BControl; public class BMotionSelectionSynchronizer extends SelectionSynchronizer { - + @Override protected EditPart convert(EditPartViewer viewer, EditPart part) { EditPart p = super.convert(viewer, part); if (viewer instanceof ScrollingGraphicalViewer diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioContributor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioContributor.java index 5f8d9725a4bb24cda49e060f8486d49a66424097..512e7f5be7e528f55c6aa97b540a43a9b1e2f743 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioContributor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioContributor.java @@ -92,6 +92,7 @@ public class BMotionStudioContributor extends ActionBarContributor { } + @Override public void setActiveEditor(IEditorPart editor) { if (editor instanceof BMotionStudioEditor) { super.setActiveEditor(((BMotionStudioEditor) editor).getEditPage()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioEditor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioEditor.java index dea2ce633352ba11e422956260b794eec3fcf239..3343882e451d73a8094434485e601a661439f289 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioEditor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioEditor.java @@ -89,6 +89,7 @@ public class BMotionStudioEditor extends MultiPageEditorPart implements fireRunPageRemovedListener(); if (runPage != null) { Display.getDefault().asyncExec(new Runnable() { + @Override public void run() { removePage(1); } @@ -245,6 +246,7 @@ public class BMotionStudioEditor extends MultiPageEditorPart implements return this.runPage; } + @Override public void reset() { removeRunPage(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioEditorPage.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioEditorPage.java index b61e548929e65188194f138a481ed2fc8dcb8a9e..c50c82315ba675ec96d79d17ba069177d573a25f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioEditorPage.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioEditorPage.java @@ -172,6 +172,7 @@ public class BMotionStudioEditorPage extends GraphicalEditorWithFlyoutPalette { /** * @see org.eclipse.ui.IEditorPart#init(IEditorSite, IEditorInput) **/ + @Override public void init(IEditorSite iSite, IEditorInput iInput) throws PartInitException { super.init(iSite, iInput); @@ -183,6 +184,7 @@ public class BMotionStudioEditorPage extends GraphicalEditorWithFlyoutPalette { /** * @see org.eclipse.gef.ui.parts.GraphicalEditor#initializeGraphicalViewer() **/ + @Override protected void initializeGraphicalViewer() { super.initializeGraphicalViewer(); @@ -204,12 +206,14 @@ public class BMotionStudioEditorPage extends GraphicalEditorWithFlyoutPalette { @Override protected PaletteViewerProvider createPaletteViewerProvider() { return new PaletteViewerProvider(getEditDomain()) { + @Override protected void configurePaletteViewer(PaletteViewer viewer) { super.configurePaletteViewer(viewer); viewer.addDragSourceListener(new TemplateTransferDragSourceListener( viewer)); } + @Override protected void hookPaletteViewer(PaletteViewer viewer) { super.hookPaletteViewer(viewer); } @@ -219,6 +223,7 @@ public class BMotionStudioEditorPage extends GraphicalEditorWithFlyoutPalette { /** * @see org.eclipse.ui.IEditorPart#isSaveAsAllowed() **/ + @Override public boolean isSaveAsAllowed() { return true; } @@ -241,6 +246,7 @@ public class BMotionStudioEditorPage extends GraphicalEditorWithFlyoutPalette { /** * @see org.eclipse.ui.IEditorPart#doSave(IProgressMonitor) **/ + @Override public void doSave(IProgressMonitor iMonitor) { ByteArrayOutputStream out = new ByteArrayOutputStream(); try { @@ -257,6 +263,7 @@ public class BMotionStudioEditorPage extends GraphicalEditorWithFlyoutPalette { } } + @Override public void dispose() { // remove CommandStackListener getCommandStack().removeCommandStackListener(getCommandStackListener()); @@ -271,6 +278,7 @@ public class BMotionStudioEditorPage extends GraphicalEditorWithFlyoutPalette { /** * @see org.eclipse.ui.IEditorPart#doSaveAs() **/ + @Override public void doSaveAs() { // Nothing to do here, this is never allowed throw new IllegalAccessError("No way to enter this method."); @@ -344,6 +352,7 @@ public class BMotionStudioEditorPage extends GraphicalEditorWithFlyoutPalette { return isDirty; } + @Override @SuppressWarnings("unchecked") public void createActions() { @@ -480,10 +489,12 @@ public class BMotionStudioEditorPage extends GraphicalEditorWithFlyoutPalette { } + @Override protected Control getGraphicalControl() { return rulerComp; } + @Override protected void createGraphicalViewer(Composite parent) { rulerComp = new RulerComposite(parent, SWT.NONE); super.createGraphicalViewer(rulerComp); @@ -494,6 +505,7 @@ public class BMotionStudioEditorPage extends GraphicalEditorWithFlyoutPalette { /** * @see org.eclipse.gef.ui.parts.GraphicalEditor#configureGraphicalViewer() **/ + @Override protected void configureGraphicalViewer() { double[] zoomLevels; @@ -598,6 +610,7 @@ public class BMotionStudioEditorPage extends GraphicalEditorWithFlyoutPalette { * <code>CommandStack </code>changes. */ private CommandStackListener commandStackListener = new CommandStackListener() { + @Override public void commandStackChanged(EventObject event) { setDirty(getCommandStack().isDirty()); } @@ -626,6 +639,7 @@ public class BMotionStudioEditorPage extends GraphicalEditorWithFlyoutPalette { /** * Returns the palette root. */ + @Override protected PaletteRoot getPaletteRoot() { if (palette == null) { palette = new EditorPaletteFactory().createPalette(visualization); @@ -655,6 +669,7 @@ public class BMotionStudioEditorPage extends GraphicalEditorWithFlyoutPalette { super(new TreeViewer()); } + @Override public void init(IPageSite pageSite) { super.init(pageSite); IActionBars bars = pageSite.getActionBars(); @@ -767,6 +782,7 @@ public class BMotionStudioEditorPage extends GraphicalEditorWithFlyoutPalette { lws.setContents(thumbnail); disposeListener = new DisposeListener() { + @Override public void widgetDisposed(DisposeEvent e) { if (thumbnail != null) { thumbnail.deactivate(); @@ -776,10 +792,12 @@ public class BMotionStudioEditorPage extends GraphicalEditorWithFlyoutPalette { }; } + @Override public Control getControl() { return sash; } + @Override public void dispose() { unhookOutlineViewer(); gridColor.dispose(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioRunPage.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioRunPage.java index 9f5260c9f6ab77238f35c7b08c3977b3c484703d..5d1ac871949cfd6f110f97b53880e01eca5b0d78 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioRunPage.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BMotionStudioRunPage.java @@ -55,6 +55,7 @@ public class BMotionStudioRunPage extends GraphicalEditor { return super.getAdapter(type); } + @Override public void selectionChanged(IWorkbenchPart part, ISelection selection) { // ignore selection changed. } @@ -118,6 +119,7 @@ public class BMotionStudioRunPage extends GraphicalEditor { /** * @see org.eclipse.gef.ui.parts.GraphicalEditor#configureGraphicalViewer() **/ + @Override protected void configureGraphicalViewer() { double[] zoomLevels; @@ -187,6 +189,7 @@ public class BMotionStudioRunPage extends GraphicalEditor { /** * The run page editor should be never dirty! */ + @Override public boolean isDirty() { return false; } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BindingObject.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BindingObject.java index e4338e73da0878fe9fdf154b6386acdae9b90f15..c5b8ea6d92706de50d84feab461a090f607ab3cc 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BindingObject.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/BindingObject.java @@ -55,6 +55,7 @@ public abstract class BindingObject implements Cloneable { return propertyChangeSupport; } + @Override public BindingObject clone() throws CloneNotSupportedException { BindingObject clone = (BindingObject) super.clone(); clone.setPropertyChangeSupport(null); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/CustomSortPropertySheetEntry.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/CustomSortPropertySheetEntry.java index 1e1f702879937e338076a9568a7cb65b3b6421f0..b9438f1f7b16fc74c33d39dc6c78c9d5b23b1b90 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/CustomSortPropertySheetEntry.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/CustomSortPropertySheetEntry.java @@ -33,6 +33,7 @@ public class CustomSortPropertySheetEntry extends UndoablePropertySheetEntry { super(stack); } + @Override protected PropertySheetEntry createChildEntry() { return new CustomSortPropertySheetEntry(getCommandStack()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/EditorImageRegistry.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/EditorImageRegistry.java index dd179eeded5d580c02492d53675828b10b884958..f7823a95c2bb3e4967ac8f1d1fdc9ec93588740a 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/EditorImageRegistry.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/EditorImageRegistry.java @@ -30,6 +30,7 @@ public class EditorImageRegistry implements IBMotionStudioImageRegistry { public static final String IMG_SPLASH = "splash"; + @Override public void registerImages() { BMotionStudioImage.registerImage(IMG_ICON_ADD, diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/ImageRegistry.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/ImageRegistry.java index 69cd14cc2f2c4628dc29ba8b2485b0da8f36a936..663abe469d03370de98b879450daf18ab5715c3d 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/ImageRegistry.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/ImageRegistry.java @@ -12,6 +12,7 @@ public class ImageRegistry implements IBMotionStudioImageRegistry { public static final String IMG_RADIOBUTTON_CHECKED = "img_radiobutton_checked"; public static final String IMG_RADIOBUTTON_UNCHECKED = "img_radiobutton_unchecked"; + @Override public void registerImages() { BMotionStudioImage.registerImage(IMG_RADIOBUTTON_CHECKED, diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/InstallActions.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/InstallActions.java index feb252464e08a8aa477585bf5566ac775067d677..5f80aef1f9f8b8dc9ff71f8d5c9509ee59ca1ece 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/InstallActions.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/InstallActions.java @@ -17,7 +17,7 @@ import de.bmotionstudio.gef.editor.action.RenameAction; public class InstallActions extends AbstractInstallActions implements IInstallActions { - + @Override public void installActions(final WorkbenchPart part) { installAction(RenameAction.ID, new RenameAction(part)); installAction(FitImageAction.ID, new FitImageAction(part)); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/InstallMenu.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/InstallMenu.java index b2c38c70835292ddb6582fb6a91301eac596504a..3359554c5b8298395687c582af7f9ebb37b17e8f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/InstallMenu.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/InstallMenu.java @@ -21,7 +21,7 @@ import de.bmotionstudio.gef.editor.action.FitImageAction; import de.bmotionstudio.gef.editor.action.RenameAction; public class InstallMenu implements IInstallMenu { - + @Override public void installMenu(IMenuManager menu, ActionRegistry regitry) { IAction action; @@ -48,6 +48,7 @@ public class InstallMenu implements IInstallMenu { } + @Override public void installBar(IActionBars bars, ActionRegistry regitry) { // bars.setGlobalActionHandler(ActionFactory.RENAME.getId(), regitry // .getAction(ActionFactory.RENAME.getId())); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/StaticListenerRegistry.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/StaticListenerRegistry.java index ed344e1d03eaf8593e794e556c3ab74bc81c5fb1..8c4bcdba161332a8a8c4c470a516760fcab00c49 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/StaticListenerRegistry.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/StaticListenerRegistry.java @@ -46,18 +46,21 @@ public class StaticListenerRegistry implements ILifecycleListener, animationListeners.remove(listener); } + @Override public void reset() { for (final ILifecycleListener listener : lifeCycleListeners) { listener.reset(); } } + @Override public void computedState(final State state) { for (final IComputationListener listener : computationListeners) { listener.computedState(state); } } + @Override public void currentStateChanged(final State currentState, final Operation operation) { for (final IAnimationListener listener : animationListeners) { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BMotionAbstractWizardDialog.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BMotionAbstractWizardDialog.java index 754134f8e32d80d9a8c17716c826d847f4d4f20b..e2460804f90eed6967ae5d943ac2abd2251d028a 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BMotionAbstractWizardDialog.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BMotionAbstractWizardDialog.java @@ -79,6 +79,7 @@ public abstract class BMotionAbstractWizardDialog extends WizardDialog { final Cursor cursor = new Cursor(parent.getDisplay(), SWT.CURSOR_HAND); toolBar.setCursor(cursor); toolBar.addDisposeListener(new DisposeListener() { + @Override public void widgetDisposed(DisposeEvent e) { cursor.dispose(); } @@ -87,6 +88,7 @@ public abstract class BMotionAbstractWizardDialog extends WizardDialog { deleteToolItem.setImage(image); deleteToolItem.setToolTipText(deleteToolTip); deleteToolItem.addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent e) { deletePressed(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BringToBottomAction.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BringToBottomAction.java index 390b293e8cfe4ad2faac892170574aa578228e81..f7ab08b1d003612dbe5d23c648e211202173b273 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BringToBottomAction.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BringToBottomAction.java @@ -29,6 +29,7 @@ public class BringToBottomAction extends SelectionAction { setLazyEnablementCalculation(false); } + @Override protected void init() { setText("Bring to bottom"); setToolTipText("Bring to bottom"); @@ -60,6 +61,7 @@ public class BringToBottomAction extends SelectionAction { return command; } + @Override public void run() { List<BControl> modelList = new ArrayList<BControl>(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BringToBottomStepAction.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BringToBottomStepAction.java index 1ab64246202177d6c58434572a1eb49497bca9ac..1d036eab80964fef24b260ca6a208ee023116dfe 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BringToBottomStepAction.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BringToBottomStepAction.java @@ -29,6 +29,7 @@ public class BringToBottomStepAction extends SelectionAction { setLazyEnablementCalculation(false); } + @Override protected void init() { setText("Bring to bottom (Step)"); setToolTipText("Bring to bottom (Step)"); @@ -60,6 +61,7 @@ public class BringToBottomStepAction extends SelectionAction { return command; } + @Override public void run() { List<BControl> modelList = new ArrayList<BControl>(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BringToTopAction.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BringToTopAction.java index 23509f94dd9d1c3d2242690c92f46b64712b8f9e..145a621d32d99828270e9b30e9a0923ed364343f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BringToTopAction.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BringToTopAction.java @@ -29,6 +29,7 @@ public class BringToTopAction extends SelectionAction { setLazyEnablementCalculation(false); } + @Override protected void init() { setText("Bring to top"); setToolTipText("Bring to top"); @@ -59,6 +60,7 @@ public class BringToTopAction extends SelectionAction { return command; } + @Override public void run() { List<BControl> controlList = new ArrayList<BControl>(); List<?> selectedObjects = getSelectedObjects(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BringToTopStepAction.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BringToTopStepAction.java index 19da6546300684289f477bf8c82e3a2b08c48910..b436e7dc21640481f26b548b91c6ad2e75837d85 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BringToTopStepAction.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/BringToTopStepAction.java @@ -29,6 +29,7 @@ public class BringToTopStepAction extends SelectionAction { setLazyEnablementCalculation(false); } + @Override protected void init() { setText("Bring to top (Step)"); setToolTipText("Bring to top (Step)"); @@ -60,6 +61,7 @@ public class BringToTopStepAction extends SelectionAction { return command; } + @Override public void run() { List<BControl> modelList = new ArrayList<BControl>(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/FitImageAction.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/FitImageAction.java index 04170a9a5359524e4d12acccce1dee41172965be..1525d3b05fedadd03b892dbc08bfa939c7b7bb16 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/FitImageAction.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/FitImageAction.java @@ -36,6 +36,7 @@ public class FitImageAction extends SelectionAction { setLazyEnablementCalculation(false); } + @Override protected void init() { setText("Fit size to image"); setToolTipText("Fit size to image"); @@ -74,6 +75,7 @@ public class FitImageAction extends SelectionAction { return command; } + @Override public void run() { List<BControl> modelList = new ArrayList<BControl>(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/OpenSchedulerEventAction.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/OpenSchedulerEventAction.java index 2a26f4136988ccf6084062d73d16ce1a618cf0ce..6dd84ab57269816480a636e21340c3e3bd5bfcee 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/OpenSchedulerEventAction.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/OpenSchedulerEventAction.java @@ -34,6 +34,7 @@ public class OpenSchedulerEventAction extends SelectionAction { setLazyEnablementCalculation(true); } + @Override protected void init() { setEnabled(false); } @@ -43,6 +44,7 @@ public class OpenSchedulerEventAction extends SelectionAction { return true; } + @Override public void run() { BControl bcontrol = getControl(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/PasteAction.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/PasteAction.java index 1619bfb35a1e518105c6d071407d1377c44e9c43..d428b240abcfcbd6d47a1dca3ddfc8fdf0417eb5 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/PasteAction.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/PasteAction.java @@ -28,6 +28,7 @@ public class PasteAction extends SelectionAction { setLazyEnablementCalculation(true); } + @Override protected void init() { super.init(); ISharedImages sharedImages = PlatformUI.getWorkbench() diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/RemoveObserverAction.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/RemoveObserverAction.java index c4eeeb3db7c0eb53c038e0a6b9f003c8b526183a..b9ed05d0ca92e8db5f6442900f801eea7178acad 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/RemoveObserverAction.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/RemoveObserverAction.java @@ -27,6 +27,7 @@ public class RemoveObserverAction extends WorkbenchPartAction { return true; } + @Override public void run() { execute(createRemoveObserverCommand()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/RemoveSchedulerEventAction.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/RemoveSchedulerEventAction.java index 20a2d6f569a9cb57a3d03a938d2ae0dc04422e55..a40042f2a79fc6c43ee1f7dcc4aad3522e09ecac 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/RemoveSchedulerEventAction.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/RemoveSchedulerEventAction.java @@ -27,6 +27,7 @@ public class RemoveSchedulerEventAction extends WorkbenchPartAction { return true; } + @Override public void run() { execute(createRemoveSchedulerEventCommand()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/RenameAction.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/RenameAction.java index 3f3fa1860d09d120c998fc24767c87b642783d19..f3e5ccc685c36b5e51be1164d3ad14eec5fe350f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/RenameAction.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/RenameAction.java @@ -32,6 +32,7 @@ public class RenameAction extends SelectionAction { setLazyEnablementCalculation(false); } + @Override protected void init() { setText("Rename..."); setToolTipText("Rename"); @@ -71,6 +72,7 @@ public class RenameAction extends SelectionAction { return null; } + @Override public void run() { BControl bcontrol = getSelectedBControl(); RenameWizard wizard = new RenameWizard(bcontrol.getAttributeValue( diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/RenameWizard.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/RenameWizard.java index aba4d4c603eef90875c121934b29f6095c579a13..b7ed249e93a4dada8ef39af9116402aa92b85ee2 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/RenameWizard.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/action/RenameWizard.java @@ -27,6 +27,7 @@ public class RenameWizard extends Wizard { setDescription("Rename a control"); } + @Override public void createControl(final Composite parent) { Composite composite = new Composite(parent, SWT.NONE); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AbstractAttribute.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AbstractAttribute.java index e12ab5f33bf69d5fdb9ff4c4107a7bc68232bcf8..45a805e4c3cc194c2575b0fb7265adfdf28226a9 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AbstractAttribute.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AbstractAttribute.java @@ -67,6 +67,7 @@ public abstract class AbstractAttribute implements IPropertySource, Cloneable { propertyDescriptor = preparePropertyDescriptor(); if (propertyDescriptor != null) { propertyDescriptor.setValidator(new ICellEditorValidator() { + @Override public String isValid(Object value) { return validateValue(value, control); } @@ -100,10 +101,12 @@ public abstract class AbstractAttribute implements IPropertySource, Cloneable { return group; } + @Override public Object getEditableValue() { return this; } + @Override public IPropertyDescriptor[] getPropertyDescriptors() { ArrayList<IPropertyDescriptor> descriptor = new ArrayList<IPropertyDescriptor>(); for (AbstractAttribute atr : getChildren().values()) { @@ -112,6 +115,7 @@ public abstract class AbstractAttribute implements IPropertySource, Cloneable { return descriptor.toArray(new IPropertyDescriptor[0]); } + @Override public Object getPropertyValue(Object attrID) { AbstractAttribute atr = getChildren().get(attrID); if (atr.hasChildren()) { @@ -121,13 +125,16 @@ public abstract class AbstractAttribute implements IPropertySource, Cloneable { } } + @Override public boolean isPropertySet(Object id) { return false; } + @Override public void resetPropertyValue(Object id) { } + @Override public void setPropertyValue(Object id, Object value) { AbstractAttribute atr = children.get(id); atr.setValue(value); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeBlocks.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeBlocks.java index fc909432782f26a2781ace883fe198f7402dc0db..e93a3556772400039f1b9e64b1513cd672f26fe8 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeBlocks.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeBlocks.java @@ -17,6 +17,7 @@ public class AttributeBlocks extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeFillColor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeFillColor.java index 3830b106f3cee29637a18df40f18378f8c5d443d..1416ce251d72554a8f5185c43b62799d68761c4c 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeFillColor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeFillColor.java @@ -17,6 +17,7 @@ public class AttributeFillColor extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { return new ColorPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeFillHeight.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeFillHeight.java index 265280e333e9eba3cc96119708b426a410961f6a..545d597af121625729e083a46611873ac77b1e8d 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeFillHeight.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeFillHeight.java @@ -17,6 +17,7 @@ public class AttributeFillHeight extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeLights.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeLights.java index 113f844365124185f5d3c0808501265ec7af38a8..6d27182a1b822a1e5ff0d486eec89a6a1c57a55e 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeLights.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeLights.java @@ -17,6 +17,7 @@ public class AttributeLights extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeMeasureInterval.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeMeasureInterval.java index 52f0ec332b8ca09bb2482a2b740d60bf13cceff2..1034c9d3866daf0484e77d9cfb0fbb18ec2c304f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeMeasureInterval.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeMeasureInterval.java @@ -17,6 +17,7 @@ public class AttributeMeasureInterval extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeMeasureMaxPos.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeMeasureMaxPos.java index f25d34e2b8847e3462d94a70f3ee6463ca40c9ee..d203e2a1499c0118f84199da9c37200c2345de86 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeMeasureMaxPos.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeMeasureMaxPos.java @@ -17,6 +17,7 @@ public class AttributeMeasureMaxPos extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeShowMeasure.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeShowMeasure.java index 244c0ed5be427bc64a40d05591b5dea824077a02..9c5a6099856dc6e29dcb0c42f953a5db2c92075e 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeShowMeasure.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/AttributeShowMeasure.java @@ -17,6 +17,7 @@ public class AttributeShowMeasure extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { return new CheckboxPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeAlpha.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeAlpha.java index ced44636ecd9f445c0418cb1e6064b28bcff8ac2..5136557288987c49ced882deee567b26d306ff2a 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeAlpha.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeAlpha.java @@ -17,6 +17,7 @@ public class BAttributeAlpha extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { SliderPropertyDescriptor descriptor = new SliderPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeBackgroundColor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeBackgroundColor.java index 72d0ad68e8060f0add59abcfb971d8d1fe4461c3..718cf29e78665713a6cac0470143579b6b494e3e 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeBackgroundColor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeBackgroundColor.java @@ -18,6 +18,7 @@ public class BAttributeBackgroundColor extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { return new ColorPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeBackgroundVisible.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeBackgroundVisible.java index 2fe7e5f98645f83461e615a4987962f3ab205895..839c682167890ed43a5c396e62db968cac4f11b8 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeBackgroundVisible.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeBackgroundVisible.java @@ -17,6 +17,7 @@ public class BAttributeBackgroundVisible extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { return new CheckboxPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeColumns.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeColumns.java index cf1521782ae4116cc13c18a546cc485cd0e03db1..36644dee4c16641c8c23b6442024bffb21ede544 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeColumns.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeColumns.java @@ -17,6 +17,7 @@ public class BAttributeColumns extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeConnection.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeConnection.java index c6c418995997b6b13e2636a86e916ddebee7f3e2..e95dd70edfd3f8252d086895335824011fd2deb3 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeConnection.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeConnection.java @@ -20,6 +20,7 @@ public class BAttributeConnection extends AbstractAttribute { PropertyDescriptor descriptor = new PropertyDescriptor(getID(), getName()); descriptor.setLabelProvider(new LabelProvider() { + @Override public String getText(Object element) { return ""; } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeCoordinates.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeCoordinates.java index 0bd357620f5acd09363cf518efff63ebacb4e81c..fc7b6243d0694dedb986fd8d79ff89161d05754e 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeCoordinates.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeCoordinates.java @@ -23,6 +23,7 @@ public class BAttributeCoordinates extends AbstractAttribute { PropertyDescriptor descriptor = new PropertyDescriptor(getID(), getName()); descriptor.setLabelProvider(new LabelProvider() { + @Override public String getText(Object element) { Point point = (Point) element; StringBuffer buf = new StringBuffer(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeEnabled.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeEnabled.java index 90e17ef0f039ba5e219e2213aafc74a6b01b88df..1219a884559e7d68dba255d3800c427bba9f0773 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeEnabled.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeEnabled.java @@ -17,6 +17,7 @@ public class BAttributeEnabled extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { return new CheckboxPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeFont.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeFont.java index 9f8c3d87d53b33eeacc2cc82402a5a971d55a400..53058f71161650c1c57db32f85f8a38cc94871f3 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeFont.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeFont.java @@ -16,6 +16,7 @@ public class BAttributeFont extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { return new FontPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeForegroundColor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeForegroundColor.java index 298d82bff4cd7facdae1c7c68f4f596fedbe1f16..b314f91571802b7021b22136d0fcbbd00a2c1699 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeForegroundColor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeForegroundColor.java @@ -18,6 +18,7 @@ public class BAttributeForegroundColor extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { return new ColorPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeHeight.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeHeight.java index a4eec8e565146d2ea80384a8f9878286e95a3deb..080c003377b6bc5efe469c57bc071129675c7a07 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeHeight.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeHeight.java @@ -17,6 +17,7 @@ public class BAttributeHeight extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeID.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeID.java index 21ce6046376c7d88e8275147f5984fe8ec02ac4b..3ddb02dc5dcea17384f3a4981dad688ee42784b5 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeID.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeID.java @@ -17,6 +17,7 @@ public class BAttributeID extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { TextPropertyDescriptor descriptor = new TextPropertyDescriptor(getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeImage.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeImage.java index d17d58ffc6b6362ec480380b5f2d126026a800d6..de9724473ed2d79c1fae463d48ee5456ab71a576 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeImage.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeImage.java @@ -20,10 +20,12 @@ public class BAttributeImage extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { return new ImagePropertyDescriptor(getID(), getName()); } + @Override public String validateValue(Object value, BControl control) { if (value != null) { String fImage = value.toString(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeLineWidth.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeLineWidth.java index 355cf9863edfae3a391ac04433461845d6fe87b2..889a67963470fa94d3301df1f2455ecc6ba792ea 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeLineWidth.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeLineWidth.java @@ -7,6 +7,7 @@ import de.bmotionstudio.gef.editor.property.IntegerPropertyDescriptor; public class BAttributeLineWidth extends AbstractAttribute { + @Override public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeMain.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeMain.java index 428265636c95876c93c2ccf09c9a80fbfd907f25..212c510cc7dab233dd6d5dd06cd8e4fc44d53063 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeMain.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeMain.java @@ -20,6 +20,7 @@ public class BAttributeMain extends AbstractAttribute { PropertyDescriptor descriptor = new PropertyDescriptor(getID(), getName()); descriptor.setLabelProvider(new LabelProvider() { + @Override public String getText(Object element) { return ""; } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeMisc.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeMisc.java index cffc3cea6c6ccefeb93808ca2a2acb0a31ad8c5b..875c6d5b489642ded949858f30ef5fd41dd49820 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeMisc.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeMisc.java @@ -20,6 +20,7 @@ public class BAttributeMisc extends AbstractAttribute { PropertyDescriptor descriptor = new PropertyDescriptor(getID(), getName()); descriptor.setLabelProvider(new LabelProvider() { + @Override public String getText(Object element) { return ""; } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOffsetH.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOffsetH.java index 89116bc2c1805566c22e7dc36b07a9c9610b602a..b8f465988bc381e8ac8dde8f68d4ba8f4e53a399 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOffsetH.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOffsetH.java @@ -17,6 +17,7 @@ public class BAttributeOffsetH extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOffsetV.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOffsetV.java index 1dd63241d4797ec04756287f9da762b9c87231a6..40fc9e50ec2eea7ebf5acbd4d50b6b0d23dd96b0 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOffsetV.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOffsetV.java @@ -17,6 +17,7 @@ public class BAttributeOffsetV extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOutlineAlpha.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOutlineAlpha.java index dd3ce6d151ad5b70e2e2f2af0578049f3136ab73..f9ddf731bbe2af2bbb5d3e165842c1e35af0521a 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOutlineAlpha.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeOutlineAlpha.java @@ -17,12 +17,14 @@ public class BAttributeOutlineAlpha extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { SliderPropertyDescriptor descriptor = new SliderPropertyDescriptor( getID(), getName()); return descriptor; } + @Override public String validateValue(Object value, BControl control) { if (!(String.valueOf(value)).trim().matches("\\d*")) { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeRows.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeRows.java index 578a8253dcb95f89adeb9889b8651cc2a15d8570..db7653bd3bb2a508d67199598b2ffe38673791df 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeRows.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeRows.java @@ -17,6 +17,7 @@ public class BAttributeRows extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeSize.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeSize.java index 3354a569b3d8d5adcfb31666548c7cb88e1440f5..f88b629c78e79aa923fec71338f2c4f6f2390082 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeSize.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeSize.java @@ -25,6 +25,7 @@ public class BAttributeSize extends AbstractAttribute { PropertyDescriptor descriptor = new PropertyDescriptor(getID(), getName()); descriptor.setLabelProvider(new LabelProvider() { + @Override public String getText(Object element) { Point point = (Point) element; StringBuffer buf = new StringBuffer(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeText.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeText.java index d9d0ab66bd3b789452376e3505bca4542a911033..bf9a6127b4a43b335b32173cd787e705a86f68ff 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeText.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeText.java @@ -15,6 +15,7 @@ public class BAttributeText extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { return new TextPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeTextColor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeTextColor.java index 4e2da94ca5f29e91e6425ae3d25b9f36acfcfa69..02d8c630d375a5f631a6c5c5dec3553bc34ccc40 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeTextColor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeTextColor.java @@ -18,6 +18,7 @@ public class BAttributeTextColor extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { return new ColorPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeVisible.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeVisible.java index 96961a53dab4e56bb39a99a59c2d84b93aea36fe..3fa804773f723233393b8e6cd6b47c8e4555cca0 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeVisible.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeVisible.java @@ -17,6 +17,7 @@ public class BAttributeVisible extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { return new CheckboxPropertyDescriptor(getID(), getName()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeWidth.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeWidth.java index bcb310e77a51b6c9f68576b6de16f70a6c2dd351..18d6b1b01589eb89b856c936f9e3e99d2d979bd1 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeWidth.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeWidth.java @@ -17,6 +17,7 @@ public class BAttributeWidth extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeX.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeX.java index 2ff72c75024892ef73ef0c1edcde72af764a319a..cad838e74d846bd5c8a69c33767210a97e79202e 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeX.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeX.java @@ -17,6 +17,7 @@ public class BAttributeX extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeY.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeY.java index a48a0e28ef74a9324e999255f6c93cf1f8a85385..210e1b2d242a287bc95ee53d6e68abc2f84a2212 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeY.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/attribute/BAttributeY.java @@ -17,6 +17,7 @@ public class BAttributeY extends AbstractAttribute { super(value); } + @Override public PropertyDescriptor preparePropertyDescriptor() { IntegerPropertyDescriptor descriptor = new IntegerPropertyDescriptor( getID(), getName()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/AddCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/AddCommand.java index 6c1fd1e4ca8ef5f096bdb8030726a33508437374..2c2fd5c6b1f641cbcbcf7c63154ad07a63ee0dbb 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/AddCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/AddCommand.java @@ -18,6 +18,7 @@ public class AddCommand extends org.eclipse.gef.commands.Command { super("Add Control"); } + @Override public void execute() { if (index < 0) parent.addChild(child); @@ -29,6 +30,7 @@ public class AddCommand extends org.eclipse.gef.commands.Command { return parent; } + @Override public void redo() { if (index < 0) parent.addChild(child); @@ -48,6 +50,7 @@ public class AddCommand extends org.eclipse.gef.commands.Command { parent = newParent; } + @Override public void undo() { parent.removeChild(child); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BControlChangeLayoutCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BControlChangeLayoutCommand.java index 0362ff942c735c321c4302bd39ce36c6ecf03621..f9649f7f80e0d275da4a8cc785e6b05e1112c00a 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BControlChangeLayoutCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BControlChangeLayoutCommand.java @@ -16,14 +16,17 @@ public class BControlChangeLayoutCommand extends AbstractLayoutCommand { private Rectangle newLayout; private Rectangle oldLayout; + @Override public void execute() { control.setLayout(newLayout); } + @Override public void setConstraint(Rectangle rect) { newLayout = rect; } + @Override public void setModel(Object model) { control = (BControl) model; oldLayout = control.getLayout(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BringToBottomCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BringToBottomCommand.java index b31565dc214f84c1ee7d814c62d3c350a596d65f..8529859bca950cc7690f3249ac727dc65d7d71d9 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BringToBottomCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BringToBottomCommand.java @@ -11,6 +11,7 @@ import de.bmotionstudio.gef.editor.model.BControlPropertyConstants; public class BringToBottomCommand extends AbstractBringToCommand { + @Override public void execute() { for (BControl control : getControlList()) { BControl parent = control.getParent(); @@ -23,6 +24,7 @@ public class BringToBottomCommand extends AbstractBringToCommand { } } + @Override public void undo() { for (BControl control : getControlList()) { BControl parent = control.getParent(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BringToBottomStepCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BringToBottomStepCommand.java index 831cc48715de601d86d7a3a9e4e81029870889ba..6f4a25095897533a6dbe7ddbd05116e45f1ceadb 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BringToBottomStepCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BringToBottomStepCommand.java @@ -11,6 +11,7 @@ import de.bmotionstudio.gef.editor.model.BControlPropertyConstants; public class BringToBottomStepCommand extends AbstractBringToCommand { + @Override public void execute() { for (BControl control : getControlList()) { BControl parent = control.getParent(); @@ -26,6 +27,7 @@ public class BringToBottomStepCommand extends AbstractBringToCommand { } } + @Override public void undo() { for (BControl control : getControlList()) { BControl parent = control.getParent(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BringToTopCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BringToTopCommand.java index aaee09d368034de3c79aa6fcce89f93433eadaee..b01cad1d5c406087b09061048d500d68b425b1a7 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BringToTopCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BringToTopCommand.java @@ -11,6 +11,7 @@ import de.bmotionstudio.gef.editor.model.BControlPropertyConstants; public class BringToTopCommand extends AbstractBringToCommand { + @Override public void execute() { for (BControl control : getControlList()) { BControl parent = control.getParent(); @@ -24,6 +25,7 @@ public class BringToTopCommand extends AbstractBringToCommand { } } + @Override public void undo() { for (BControl control : getControlList()) { BControl parent = control.getParent(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BringToTopStepCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BringToTopStepCommand.java index d5c2cb1f81e8ca1e24630c7742cf8973c3f42461..4e8f71d27f4bc14b998e96841c8ef2c035e50cfb 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BringToTopStepCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/BringToTopStepCommand.java @@ -11,6 +11,7 @@ import de.bmotionstudio.gef.editor.model.BControlPropertyConstants; public class BringToTopStepCommand extends AbstractBringToCommand { + @Override public void execute() { for (BControl control : getControlList()) { BControl parent = control.getParent(); @@ -26,6 +27,7 @@ public class BringToTopStepCommand extends AbstractBringToCommand { } } + @Override public void undo() { for (BControl control : getControlList()) { BControl parent = control.getParent(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ChangeGuideCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ChangeGuideCommand.java index f131dd3af60939e60e6085b58d2a294f2099e15f..02bf74b6c4cc8aaa04cca6ae5934d742eaf84a0f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ChangeGuideCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ChangeGuideCommand.java @@ -40,6 +40,7 @@ public class ChangeGuideCommand extends Command { } + @Override public void execute() { // Cache the old values oldGuide = horizontal ? part.getHorizontalGuide() : part @@ -50,6 +51,7 @@ public class ChangeGuideCommand extends Command { redo(); } + @Override public void redo() { changeGuide(oldGuide, newGuide, newAlign); } @@ -59,6 +61,7 @@ public class ChangeGuideCommand extends Command { newAlign = alignment; } + @Override public void undo() { changeGuide(newGuide, oldGuide, oldAlign); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ConnectionCreateCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ConnectionCreateCommand.java index a28d84a71d99561f20c8cec6abceb3e557dca735..9095f38affada38994648807305094295e7da63f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ConnectionCreateCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ConnectionCreateCommand.java @@ -67,6 +67,7 @@ public class ConnectionCreateCommand extends Command { this.source = source; } + @Override public boolean canExecute() { // disallow source -> source connections if (source.equals(target)) { @@ -83,6 +84,7 @@ public class ConnectionCreateCommand extends Command { return true; } + @Override public void execute() { // create a new connection between source and target connection.setSource(source); @@ -90,6 +92,7 @@ public class ConnectionCreateCommand extends Command { connection.reconnect(); } + @Override public void redo() { connection.reconnect(); } @@ -109,6 +112,7 @@ public class ConnectionCreateCommand extends Command { this.target = target; } + @Override public void undo() { connection.disconnect(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ConnectionDeleteCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ConnectionDeleteCommand.java index 7f6eb5653dac8d590d2c228bda4070cb5a53071f..a1771b632e07765b02648175ad46c7713f753a6f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ConnectionDeleteCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ConnectionDeleteCommand.java @@ -41,10 +41,12 @@ public class ConnectionDeleteCommand extends Command { this.connection = conn; } + @Override public void execute() { connection.disconnect(); } + @Override public void undo() { connection.reconnect(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ConnectionReconnectCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ConnectionReconnectCommand.java index 28c9d0e446f1acb015ef7be778dc03f59cbc0f3b..ca01869318dc4738a2390caa27161866d5fb7f9d 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ConnectionReconnectCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ConnectionReconnectCommand.java @@ -58,6 +58,7 @@ public class ConnectionReconnectCommand extends Command { /** The original target endpoint. */ private BControl oldTarget; + @Override public boolean canExecute() { if (newSource != null) { return checkSourceReconnection(); @@ -117,6 +118,7 @@ public class ConnectionReconnectCommand extends Command { * Reconnect the connection to newSource (if setNewSource(...) was invoked * before) or newTarget (if setNewTarget(...) was invoked before). */ + @Override public void execute() { if (newSource != null) { connection.reconnect(newSource, oldTarget); @@ -186,6 +188,7 @@ public class ConnectionReconnectCommand extends Command { /** * Reconnect the connection to its original source and target endpoints. */ + @Override public void undo() { connection.reconnect(oldSource, oldTarget); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/CreateGuideCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/CreateGuideCommand.java index a4f452e9a6470d05eb606afb8ce1dff0253d8a90..75b86333cfda76d610d0664ec53bac312101ee67 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/CreateGuideCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/CreateGuideCommand.java @@ -23,10 +23,12 @@ public class CreateGuideCommand extends Command { this.position = position; } + @Override public boolean canUndo() { return true; } + @Override public void execute() { if (guide == null) guide = new BMotionGuide(!parent.isHorizontal()); @@ -34,6 +36,7 @@ public class CreateGuideCommand extends Command { parent.addGuide(guide); } + @Override public void undo() { parent.removeGuide(guide); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/DeleteGuideCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/DeleteGuideCommand.java index 4bb0001686e9e2a7eaafc21e19d43fa10d77a24e..23aecb14d8789d8926d1baed50b634bc62b65aad 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/DeleteGuideCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/DeleteGuideCommand.java @@ -27,10 +27,12 @@ public class DeleteGuideCommand extends Command { this.parent = parent; } + @Override public boolean canUndo() { return true; } + @Override public void execute() { oldParts = new HashMap<BControl, Integer>(guide.getMap()); Iterator<BControl> iter = oldParts.keySet().iterator(); @@ -40,6 +42,7 @@ public class DeleteGuideCommand extends Command { parent.removeGuide(guide); } + @Override public void undo() { parent.addGuide(guide); Iterator<BControl> iter = oldParts.keySet().iterator(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/MoveGuideCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/MoveGuideCommand.java index c92ac806e952a899dd516be15005817fea2f8d76..b217f19179eda0dd93f4921c8b297559aaa898c4 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/MoveGuideCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/MoveGuideCommand.java @@ -25,6 +25,7 @@ public class MoveGuideCommand extends Command { pDelta = positionDelta; } + @Override public void execute() { guide.setPosition(guide.getPosition() + pDelta); @@ -43,6 +44,7 @@ public class MoveGuideCommand extends Command { } + @Override public void undo() { guide.setPosition(guide.getPosition() - pDelta); Iterator<BControl> iter = guide.getParts().iterator(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/RemoveObserverCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/RemoveObserverCommand.java index c8afdf5d659feb35e0165701bcd684d97e087060..9f1fdcf21f23dda15752b844f073ff6f1b25cae8 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/RemoveObserverCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/RemoveObserverCommand.java @@ -16,14 +16,17 @@ public class RemoveObserverCommand extends Command { private BControl control; private Observer observer; + @Override public void execute() { control.removeObserver(observer.getID()); } + @Override public boolean canExecute() { return true; } + @Override public void undo() { control.addObserver(observer); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/RemoveSchedulerEventCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/RemoveSchedulerEventCommand.java index 6a13866e86c732cef8b4df7208e1565e2549b027..400c3a25cc5f023820539cdc0a6d88ea77cf4a02 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/RemoveSchedulerEventCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/RemoveSchedulerEventCommand.java @@ -16,14 +16,17 @@ public class RemoveSchedulerEventCommand extends Command { private BControl control; private SchedulerEvent schedulerEvent; + @Override public void execute() { control.removeEvent(schedulerEvent.getEventID()); } + @Override public boolean canExecute() { return true; } + @Override public void undo() { control.addEvent(schedulerEvent.getEventID(), schedulerEvent); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ReorderPartCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ReorderPartCommand.java index d03fbf90f94094cfeb318414e5ba4906630c45e8..c4a636af8ca27f186046dea1d62425ece903c1c7 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ReorderPartCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/ReorderPartCommand.java @@ -22,12 +22,14 @@ public class ReorderPartCommand extends Command { this.newIndex = newIndex; } + @Override public void execute() { oldIndex = parent.getChildrenArray().indexOf(child); parent.removeChild(child); parent.addChild(child, newIndex); } + @Override public void undo() { parent.removeChild(child); parent.addChild(child, oldIndex); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/SchedulerEventCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/SchedulerEventCommand.java index 94f35894d9552d81d311490a9c6381ab1dc39608..e32dd93ca9dbf59e1b01f5079acadd93c58cb5c9 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/SchedulerEventCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/SchedulerEventCommand.java @@ -20,6 +20,7 @@ public class SchedulerEventCommand extends Command { private SchedulerEvent clonedNewSchedulerEvent; private BControl control; + @Override public void execute() { try { @@ -33,10 +34,12 @@ public class SchedulerEventCommand extends Command { } + @Override public boolean canExecute() { return true; } + @Override public void undo() { // Remove completely new Observer @@ -48,6 +51,7 @@ public class SchedulerEventCommand extends Command { } + @Override public void redo() { control.addEvent(eventID, clonedNewSchedulerEvent); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/SetObserverCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/SetObserverCommand.java index 784bba52a584dd0c0222de6311553b1521b3137c..30326a4ecc692d0f418a711d407f3965ccfed860 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/SetObserverCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/command/SetObserverCommand.java @@ -18,6 +18,7 @@ public class SetObserverCommand extends Command { private Observer clonedNewObserver; private BControl control; + @Override public void execute() { // Clone the new observer try { @@ -29,12 +30,14 @@ public class SetObserverCommand extends Command { control.addObserver(newObserver); } + @Override public boolean canExecute() { if (newObserver == null || control == null) return false; return true; } + @Override public void undo() { // If we had an old observer, set the old one if (oldObserver != null) { @@ -45,6 +48,7 @@ public class SetObserverCommand extends Command { } } + @Override public void redo() { // Redo method adds the cloned observer, since the observer could be // changed during set and redo action diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/edit/IntEditingSupport.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/edit/IntEditingSupport.java index ba70873ad51e4d6a363e8e76e92797aadf0c199f..dec6ec89255041e776bdd6c5fd9721b989d45bf9 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/edit/IntEditingSupport.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/edit/IntEditingSupport.java @@ -30,6 +30,7 @@ public class IntEditingSupport extends ObservableValueEditingSupport { this.atr = atr; cellEditor = new TextCellEditor((Composite) tv.getControl()); cellEditor.getControl().addListener(SWT.Verify, new Listener() { + @Override public void handleEvent(Event e) { String string = e.text; char[] chars = new char[string.length()]; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/edit/TextCellEditorLocator.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/edit/TextCellEditorLocator.java index ff822972b3615762b319ee29b5eb33d936c10de9..e9df675b0aee4e684fb246b285a16973ff689386 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/edit/TextCellEditorLocator.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/edit/TextCellEditorLocator.java @@ -20,6 +20,7 @@ public class TextCellEditorLocator implements CellEditorLocator { setTextField(textField); } + @Override public void relocate(CellEditor celleditor) { Text text = (Text) celleditor.getControl(); Rectangle rect = textField.getClientArea(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/edit/TextCellEditorWithContentProposal.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/edit/TextCellEditorWithContentProposal.java index 9aed0adb512006db078ec2440b6fdeaa7063d1aa..b5daaf1e22650f908518c6b336505281531785f9 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/edit/TextCellEditorWithContentProposal.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/edit/TextCellEditorWithContentProposal.java @@ -42,12 +42,13 @@ public class TextCellEditorWithContentProposal extends TextCellEditor { // correctly contentProposalAdapter .addContentProposalListener(new IContentProposalListener2() { - + @Override public void proposalPopupClosed( ContentProposalAdapter adapter) { popupOpen = false; } + @Override public void proposalPopupOpened( ContentProposalAdapter adapter) { popupOpen = true; @@ -64,6 +65,7 @@ public class TextCellEditorWithContentProposal extends TextCellEditor { return contentProposalAdapter; } + @Override protected void focusLost() { if (!popupOpen) { // Focus lost deactivates the cell editor. @@ -73,6 +75,7 @@ public class TextCellEditorWithContentProposal extends TextCellEditor { } } + @Override protected boolean dependsOnExternalFocusListener() { // Always return false; // Otherwise, the ColumnViewerEditor will install an additional focus diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/edit/TextEditManager.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/edit/TextEditManager.java index d26b48a3900774863faa339976b931d01d8c6efe..c4047060479c74a3b52eadac94a91c55c7b6c33b 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/edit/TextEditManager.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/edit/TextEditManager.java @@ -36,6 +36,7 @@ public class TextEditManager extends DirectEditManager { private double cachedZoom = -1.0; private Font scaledFont; private ZoomListener zoomListener = new ZoomListener() { + @Override public void zoomChanged(double newZoom) { updateScaledFont(newZoom); } @@ -48,6 +49,7 @@ public class TextEditManager extends DirectEditManager { /** * @see org.eclipse.gef.tools.DirectEditManager#bringDown() */ + @Override protected void bringDown() { ZoomManager zoomMgr = (ZoomManager) getEditPart().getViewer() .getProperty(ZoomManager.class.toString()); @@ -69,6 +71,7 @@ public class TextEditManager extends DirectEditManager { disposeScaledFont(); } + @Override protected CellEditor createCellEditorOn(Composite composite) { return new TextCellEditor(composite, SWT.NONE); } @@ -80,6 +83,7 @@ public class TextEditManager extends DirectEditManager { } } + @Override protected void initCellEditor() { // update text IFigure figure = (IFigure) getEditPart().getFigure(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/BMSConnectionEditPolicy.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/BMSConnectionEditPolicy.java index 54d63dc1d1200d08f6a8f4176dd19d8beb6eea61..a4cd658715fad31b0211327fba4051895ca014f2 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/BMSConnectionEditPolicy.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/BMSConnectionEditPolicy.java @@ -17,6 +17,7 @@ import de.bmotionstudio.gef.editor.model.BConnection; import de.bmotionstudio.gef.editor.model.BControl; public class BMSConnectionEditPolicy extends GraphicalNodeEditPolicy { + @Override protected Command getConnectionCompleteCommand( CreateConnectionRequest request) { ConnectionCreateCommand cmd = null; @@ -28,6 +29,7 @@ public class BMSConnectionEditPolicy extends GraphicalNodeEditPolicy { return cmd; } + @Override protected Command getConnectionCreateCommand(CreateConnectionRequest request) { ConnectionCreateCommand cmd = null; Object newObject = request.getNewObject(); @@ -42,6 +44,7 @@ public class BMSConnectionEditPolicy extends GraphicalNodeEditPolicy { return cmd; } + @Override protected Command getReconnectSourceCommand(ReconnectRequest request) { ConnectionReconnectCommand cmd = null; Object newObject = request.getConnectionEditPart().getModel(); @@ -55,6 +58,7 @@ public class BMSConnectionEditPolicy extends GraphicalNodeEditPolicy { return cmd; } + @Override protected Command getReconnectTargetCommand(ReconnectRequest request) { ConnectionReconnectCommand cmd = null; Object newObject = request.getConnectionEditPart().getModel(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/BMSDeletePolicy.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/BMSDeletePolicy.java index c29e2b451e8f0f8cc241bba95accdf5d2647913a..b2219b699b1b9c93076959b0c36bce2f1238096b 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/BMSDeletePolicy.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/BMSDeletePolicy.java @@ -14,7 +14,7 @@ import de.bmotionstudio.gef.editor.command.DeleteCommand; import de.bmotionstudio.gef.editor.model.BControl; public class BMSDeletePolicy extends ComponentEditPolicy { - + @Override protected Command createDeleteCommand(GroupRequest deleteRequest) { DeleteCommand command = new DeleteCommand((BControl) getHost() .getModel(), (BControl) getHost().getParent().getModel()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/BMSResizableEditPolicy.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/BMSResizableEditPolicy.java index daff32a91b345ef1225fd48c86048b9f8acadf29..2b28636a045ea83e31ca672329e75d40327c9cd6 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/BMSResizableEditPolicy.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/BMSResizableEditPolicy.java @@ -22,6 +22,7 @@ public class BMSResizableEditPolicy extends ResizableEditPolicy { * * @return the new feedback figure */ + @Override protected IFigure createDragSourceFeedbackFigure() { IFigure figure = createFigure((GraphicalEditPart) getHost(), null); figure.setBounds(getInitialFeedbackBounds()); @@ -69,6 +70,7 @@ public class BMSResizableEditPolicy extends ResizableEditPolicy { * * @return the feedback layer */ + @Override protected IFigure getFeedbackLayer() { return getLayer(LayerConstants.SCALED_FEEDBACK_LAYER); } @@ -76,6 +78,7 @@ public class BMSResizableEditPolicy extends ResizableEditPolicy { /** * @see org.eclipse.gef.editpolicies.NonResizableEditPolicy#getInitialFeedbackBounds() */ + @Override protected Rectangle getInitialFeedbackBounds() { return getHostFigure().getBounds(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/ChangeAttributePolicy.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/ChangeAttributePolicy.java index 73808cfdb9231a0b2e3e30067e014e52e648016c..473b343b61eddfbc1569a98a6527e4452d781bfa 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/ChangeAttributePolicy.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/ChangeAttributePolicy.java @@ -40,6 +40,7 @@ public class ChangeAttributePolicy extends AbstractEditPolicy { return null; } + @Override public EditPart getTargetEditPart(Request request) { if ("change attribute" == request.getType()) return getHost(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/CustomDirectEditPolicy.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/CustomDirectEditPolicy.java index 0c496a2f00996be6e7eb0a9510bd737aba72c888..c9ed87d7c418aa7bebf0730f2b595950aa832661 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/CustomDirectEditPolicy.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/CustomDirectEditPolicy.java @@ -19,6 +19,7 @@ public class CustomDirectEditPolicy extends DirectEditPolicy { /** * @see CustomDirectEditPolicy#getDirectEditCommand(DirectEditRequest) */ + @Override protected Command getDirectEditCommand(DirectEditRequest edit) { String labelText = (String) edit.getCellEditor().getValue(); BMSAbstractEditPart label = (BMSAbstractEditPart) getHost(); @@ -31,6 +32,7 @@ public class CustomDirectEditPolicy extends DirectEditPolicy { /** * @see CustomDirectEditPolicy#showCurrentEditValue(DirectEditRequest) */ + @Override protected void showCurrentEditValue(DirectEditRequest request) { // String value = (String) request.getCellEditor().getValue(); getHostFigure().getUpdateManager().performUpdate(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/SignalLayoutEditPolicy.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/SignalLayoutEditPolicy.java index ff7814857844eae21986957bea7d324cfc011e07..f7bead2b183cdc3bb7874a7a175a6f6998bf6228 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/SignalLayoutEditPolicy.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/SignalLayoutEditPolicy.java @@ -224,6 +224,7 @@ public class SignalLayoutEditPolicy extends FlowLayoutEditPolicy { /** * @see org.eclipse.gef.editpolicies.LayoutEditPolicy#createChildEditPolicy(org.eclipse.gef.EditPart) */ + @Override protected EditPolicy createChildEditPolicy(EditPart child) { BMSResizableEditPolicy policy = new BMSResizableEditPolicy(); policy.setResizeDirections(PositionConstants.EAST diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/TableLayoutEditPolicy.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/TableLayoutEditPolicy.java index 4e2d64056062c9aea01de89eabf8b5ecba38ff06..b8187bdfc87c298550ee777d6055fb35d44db525 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/TableLayoutEditPolicy.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/editpolicy/TableLayoutEditPolicy.java @@ -227,6 +227,7 @@ public class TableLayoutEditPolicy extends FlowLayoutEditPolicy { /** * @see org.eclipse.gef.editpolicies.LayoutEditPolicy#createChildEditPolicy(org.eclipse.gef.EditPart) */ + @Override protected EditPolicy createChildEditPolicy(EditPart child) { BMSResizableEditPolicy policy = new BMSResizableEditPolicy(); policy.setResizeDirections(PositionConstants.EAST diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/eventb/MachineContentObject.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/eventb/MachineContentObject.java index b30211bca12e23ed05e97e16635c2e40ac0686f2..4d03c821f1b0c722b96c71d211bf26eef8d2425a 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/eventb/MachineContentObject.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/eventb/MachineContentObject.java @@ -28,6 +28,7 @@ public class MachineContentObject extends BindingObject { return label; } + @Override public String toString() { return this.label; } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/BMSImageFigure.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/BMSImageFigure.java index 02e828689def7954f2fd52f11e46f6728834219a..5c2ac5b49163b0f0b3233984f9c5196d8cde7c80 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/BMSImageFigure.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/BMSImageFigure.java @@ -119,6 +119,7 @@ public class BMSImageFigure extends AbstractBMotionFigure { } Display.getDefault().asyncExec(new Runnable() { + @Override public void run() { // Increase the variable holding the frame // number diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/CompositeFigure.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/CompositeFigure.java index d9bc6d7173c3b5a481443b1be1ac69bd49ac703b..747e192ecc8edd8719f9a53c055ebe75a1348b47 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/CompositeFigure.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/CompositeFigure.java @@ -60,6 +60,7 @@ public class CompositeFigure extends AbstractBMotionFigure { } } + @Override public void paintFigure(Graphics g) { if (getImage() == null) return; @@ -120,6 +121,7 @@ public class CompositeFigure extends AbstractBMotionFigure { * * @see org.eclipse.draw2d.Figure#getPreferredSize(int, int) */ + @Override public Dimension getPreferredSize(int wHint, int hHint) { if (getInsets() == NO_INSETS) return size; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/FixedConnectionAnchor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/FixedConnectionAnchor.java index 689350bde470ea1f59ef1d0662a2a9afeb96db4a..6c679acca0ed6a64b8f9e63ef3b3e9dd799c2e45 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/FixedConnectionAnchor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/FixedConnectionAnchor.java @@ -31,12 +31,14 @@ public class FixedConnectionAnchor extends AbstractConnectionAnchor { /** * @see org.eclipse.draw2d.AbstractConnectionAnchor#ancestorMoved(IFigure) */ + @Override public void ancestorMoved(IFigure figure) { if (figure instanceof ScalableFigure) return; super.ancestorMoved(figure); } + @Override public Point getLocation(Point reference) { Rectangle r = getOwner().getBounds(); @@ -57,6 +59,7 @@ public class FixedConnectionAnchor extends AbstractConnectionAnchor { } + @Override public Point getReferencePoint() { return getLocation(null); } @@ -79,6 +82,7 @@ public class FixedConnectionAnchor extends AbstractConnectionAnchor { fireAnchorMoved(); } + @Override public boolean equals(Object o) { if (o instanceof FixedConnectionAnchor) { FixedConnectionAnchor fa = (FixedConnectionAnchor) o; @@ -94,6 +98,7 @@ public class FixedConnectionAnchor extends AbstractConnectionAnchor { return false; } + @Override public int hashCode() { return ((this.leftToRight ? 31 : 0) + (this.topDown ? 37 : 0) + this.offsetH * 43 + this.offsetV * 47) diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/MouseClickAdapter.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/MouseClickAdapter.java index 00b0b84817df3ab5ebf9e5baf78abcc65a42ae5f..587073c93059b79d66c06d78ae56fcae2b47dca0 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/MouseClickAdapter.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/MouseClickAdapter.java @@ -20,11 +20,13 @@ public class MouseClickAdapter extends MouseAdapter { this.control = control; } + @Override public void mousePressed(MouseEvent e) { control.executeEvent(AttributeConstants.EVENT_MOUSECLICK); } // TODO: change mouse cursor! + @Override public void mouseEntered(MouseEvent e) { if (control.getEvent(AttributeConstants.EVENT_MOUSECLICK) != null) { if (control.getAttributeValue(AttributeConstants.ATTRIBUTE_ENABLED) != null) { @@ -37,6 +39,7 @@ public class MouseClickAdapter extends MouseAdapter { } // TODO: change mouse cursor! + @Override public void mouseExited(MouseEvent e) { if (control.getEvent(AttributeConstants.EVENT_MOUSECLICK) != null) { } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/ShapeFigure.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/ShapeFigure.java index 1aa8198629b8e57b1253c06a3e4490a8cd0b3855..efaf78dec148ad81f0cb80ff4c8d8cd86760e783 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/ShapeFigure.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/ShapeFigure.java @@ -252,6 +252,7 @@ public class ShapeFigure extends AbstractBMotionFigure { /** * @see IFigure#validate() */ + @Override public void validate() { super.validate(); @@ -337,6 +338,7 @@ public class ShapeFigure extends AbstractBMotionFigure { /** * @see Figure#primTranslate(int, int) */ + @Override public void primTranslate(int dx, int dy) { super.primTranslate(dx, dy); switch (shape) { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/TextFigure.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/TextFigure.java index ce3567bda28b76d2d811cf9f5f4f69c247b54a2d..daf6e7f20bb4301cf30073ef504e0cda65baff5a 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/TextFigure.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/TextFigure.java @@ -75,6 +75,7 @@ public class TextFigure extends AbstractBMotionFigure { } // TODO: CHECK STACK OVERFLOW ERROR!!!! + @Override public Font getFont() { return textFlow.getFont(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/handler/StartVisualizationEditorHandler.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/handler/StartVisualizationEditorHandler.java index a2063106ee957476f5b568a8553dfaddeb89f87a..c61507287d9d9a55d5df5be93bfa25e39a3c0857 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/handler/StartVisualizationEditorHandler.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/handler/StartVisualizationEditorHandler.java @@ -28,6 +28,7 @@ public class StartVisualizationEditorHandler extends AbstractHandler implements private VisualizationProgressBar dpb; + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { if (BMotionEditorPlugin.getActiveEditor().isDirty()) { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/handler/StartVisualizationFileHandler.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/handler/StartVisualizationFileHandler.java index 1accf0bf2bb9b375dbd900778362e1ad4c7a2ba7..271d7eefb1a115e86adce13a31706f2a74e810e8 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/handler/StartVisualizationFileHandler.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/handler/StartVisualizationFileHandler.java @@ -41,6 +41,7 @@ public class StartVisualizationFileHandler extends AbstractHandler implements private VisualizationProgressBar dpb; private BMotionStudioEditor activeEditor; + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { fSelection = HandlerUtil.getCurrentSelection(event); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/BMotionFileInputValidator.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/BMotionFileInputValidator.java index 2f01cc79460af34ee6914aedce3d74e0a7c86ed9..da209d7c10f4bb6b8071ebf2a3aff126aae752b0 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/BMotionFileInputValidator.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/BMotionFileInputValidator.java @@ -20,6 +20,7 @@ public class BMotionFileInputValidator implements IInputValidator { this.prj = prj; } + @Override public String isValid(String newText) { IRodinFile rodinFile = prj.getRodinFile(newText + "." + BMotionEditorPlugin.FILEEXT_STUDIO); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/BMotionLabelProvider.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/BMotionLabelProvider.java index 925bdc09b3ec6f8b265a66abe096f3981af6f701..ff15d029cfd377f2ba344739f9939be5c05a044b 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/BMotionLabelProvider.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/BMotionLabelProvider.java @@ -13,11 +13,12 @@ import org.eclipse.swt.graphics.Image; import de.bmotionstudio.gef.editor.BMotionStudioImage; public class BMotionLabelProvider implements ILabelProvider { - + @Override public Image getImage(final Object element) { return BMotionStudioImage.getImage(BMotionStudioImage.IMG_LOGO_BMOTION); } + @Override public String getText(final Object element) { if (element instanceof BMotionStudioRodinFile) @@ -27,18 +28,22 @@ public class BMotionLabelProvider implements ILabelProvider { } + @Override public void addListener(final ILabelProviderListener listener) { } + @Override public void dispose() { } + @Override public boolean isLabelProperty(final Object element, final String property) { return false; } + @Override public void removeListener(final ILabelProviderListener listener) { } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/BMotionStudioContentProvider.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/BMotionStudioContentProvider.java index ce9ebd9591167d32f0cf8de73584f1ec6c8f7bc1..fe6f9ab8599cd5f92313a160d28c1dcc03f5b342 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/BMotionStudioContentProvider.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/BMotionStudioContentProvider.java @@ -17,7 +17,7 @@ import org.eclipse.jface.viewers.Viewer; public class BMotionStudioContentProvider implements ITreeContentProvider { - + @Override public Object[] getChildren(final Object parentElement) { List<Object> res = new ArrayList<Object>(); @@ -49,24 +49,29 @@ public class BMotionStudioContentProvider implements ITreeContentProvider { } + @Override public Object getParent(final Object element) { // do nothing return null; } + @Override public boolean hasChildren(final Object element) { return false; } + @Override public Object[] getElements(final Object inputElement) { return getChildren(inputElement); } + @Override public void dispose() { // do nothing } + @Override public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) { // do nothing diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/NewBMotionProjectWizard.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/NewBMotionProjectWizard.java index c43736ade824237727c41f35825e477f76d8c0b6..4ec79a12ea6f53f82ff523058f6923dd6f8721c8 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/NewBMotionProjectWizard.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/NewBMotionProjectWizard.java @@ -53,6 +53,7 @@ public class NewBMotionProjectWizard extends Wizard implements INewWizard { addPage(page); } + @Override public void init(final IWorkbench workbench, final IStructuredSelection sel) { this.selection = sel; } @@ -67,6 +68,7 @@ public class NewBMotionProjectWizard extends Wizard implements INewWizard { final String projectRoot = page.getProjectRoot(); final IRunnableWithProgress op = new IRunnableWithProgress() { + @Override public void run(final IProgressMonitor monitor) throws InvocationTargetException { try { @@ -118,7 +120,7 @@ public class NewBMotionProjectWizard extends Wizard implements INewWizard { } RodinCore.run(new IWorkspaceRunnable() { - + @Override public void run(final IProgressMonitor pMonitor) throws CoreException { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/NewBMotionProjectWizardPage.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/NewBMotionProjectWizardPage.java index c56395b712928dd2c43c9835ef17a4a3f9ae4ae0..0e9f56026ae9b9953f7a4b39b306ad33deb85946 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/NewBMotionProjectWizardPage.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/NewBMotionProjectWizardPage.java @@ -230,6 +230,7 @@ public class NewBMotionProjectWizardPage extends WizardPage { } } + @Override public void createControl(final Composite parent) { final Composite container = new Composite(parent, SWT.NULL); @@ -242,6 +243,7 @@ public class NewBMotionProjectWizardPage extends WizardPage { setControl(container); final ModifyListener listener = new ModifyListener() { + @Override public void modifyText(final ModifyEvent e) { validateInput(); } @@ -330,6 +332,7 @@ public class NewBMotionProjectWizardPage extends WizardPage { tableViewer .addSelectionChangedListener(new ISelectionChangedListener() { + @Override public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection selection = (IStructuredSelection) event .getSelection(); @@ -345,11 +348,12 @@ public class NewBMotionProjectWizardPage extends WizardPage { private static class MachineLabelProvider extends LabelProvider implements ITableLabelProvider { - + @Override public Image getColumnImage(final Object element, final int columnIndex) { return null; } + @Override public String getColumnText(final Object element, final int columnIndex) { if (element instanceof MachineEntry) { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/PerspectiveEditFactory.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/PerspectiveEditFactory.java index 2603fee362ae80c07df25e5b1caf8e9e4f367193..b738a4476c7df8b2cd3c6c336557286d9d977ff5 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/PerspectiveEditFactory.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/PerspectiveEditFactory.java @@ -13,7 +13,7 @@ import org.eclipse.ui.IPerspectiveFactory; import de.bmotionstudio.gef.editor.library.LibraryView; public class PerspectiveEditFactory implements IPerspectiveFactory { - + @Override public void createInitialLayout(final IPageLayout layout) { final String editorArea = layout.getEditorArea(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/PerspectiveRunFactory.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/PerspectiveRunFactory.java index 7586a12d5e625a3928e1ff3346fe7a7e5640c0d6..d2b275f8335c148c7451605ad133ed2bb53b5a8e 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/PerspectiveRunFactory.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/PerspectiveRunFactory.java @@ -11,7 +11,7 @@ import org.eclipse.ui.IPageLayout; import org.eclipse.ui.IPerspectiveFactory; public class PerspectiveRunFactory implements IPerspectiveFactory { - + @Override public void createInitialLayout(IPageLayout layout) { String editorArea = layout.getEditorArea(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/ProgressBarDialog.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/ProgressBarDialog.java index 6c9139acd4a2c6ce83c321bfa5a8957abffc8f1d..1541d86875e94364ade3ae198e277fc611c24d0f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/ProgressBarDialog.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/ProgressBarDialog.java @@ -129,6 +129,7 @@ public abstract class ProgressBarDialog extends Dialog { cancelButton = new Button(cancelComposite, SWT.NONE); cancelButton.addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent e) { isClosed = true; } @@ -191,6 +192,7 @@ public abstract class ProgressBarDialog extends Dialog { this.max = max; } + @Override public void run() { doBefore(); for (final int[] i = new int[] { 1 }; i[0] <= max; i[0]++) { @@ -199,6 +201,7 @@ public abstract class ProgressBarDialog extends Dialog { return; } display.syncExec(new Runnable() { + @Override public void run() { if (progressBar.isDisposed()) { return; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/VisualizationProgressBar.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/VisualizationProgressBar.java index 86c289130241ed7983ae5a33ca6c7f7f68e48361..45e33ba66029f50d9bf656bd634bfb06591a3c3f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/VisualizationProgressBar.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/internal/VisualizationProgressBar.java @@ -101,6 +101,7 @@ public class VisualizationProgressBar extends ProgressBarDialog { return "Create Visualization"; case 4: Display.getDefault().asyncExec(new Runnable() { + @Override public void run() { createShell(); } @@ -179,6 +180,7 @@ public class VisualizationProgressBar extends ProgressBarDialog { if (ops.size() > 1) { Display.getDefault().asyncExec(new Runnable() { + @Override public void run() { dialog = new SelectOperationDialog(getShell(), ops); confirm = dialog.open(); @@ -274,6 +276,7 @@ public class VisualizationProgressBar extends ProgressBarDialog { public void openErrorDialog(final String msg) { Display.getDefault().asyncExec(new Runnable() { + @Override public void run() { ErrorDialog.openError(getParent(), "Error", "Error creating visualization", new Status( diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/AbstractLibraryCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/AbstractLibraryCommand.java index e27bf03657bad262315426beb98fcab6f910ca8b..54d1e39b703847f83665e8b7219c482c8f4407c3 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/AbstractLibraryCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/AbstractLibraryCommand.java @@ -24,6 +24,7 @@ public abstract class AbstractLibraryCommand extends Command { protected Object oldAttributeValue; protected Point dropLocation; + @Override public boolean canExecute() { return true; } @@ -36,6 +37,7 @@ public abstract class AbstractLibraryCommand extends Command { return this.editPart; } + @Override public void undo() { if (attributeName != null) getCastedModel() diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/AttributeTransfer.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/AttributeTransfer.java index fb310824371acf27e39310151d31e29727c68481..ab27d5b3f58deea6f25caf05f88966bb866b8f6f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/AttributeTransfer.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/AttributeTransfer.java @@ -18,6 +18,7 @@ public class AttributeTransfer extends SimpleObjectTransfer { /** * @see org.eclipse.swt.dnd.Transfer#getTypeIds() */ + @Override protected int[] getTypeIds() { return new int[] { TYPEID }; } @@ -25,6 +26,7 @@ public class AttributeTransfer extends SimpleObjectTransfer { /** * @see org.eclipse.swt.dnd.Transfer#getTypeNames() */ + @Override protected String[] getTypeNames() { return new String[] { TYPE_NAME }; } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/LibraryImageCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/LibraryImageCommand.java index d162f773743da8b732770ecb893a9b553178a6a8..d8f47d2f7214cc3e62eeed5f785f77f8882688a1 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/LibraryImageCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/LibraryImageCommand.java @@ -22,6 +22,7 @@ public class LibraryImageCommand extends AbstractLibraryCommand { private BControl newImageControl; + @Override public void execute() { attributeName = AttributeConstants.ATTRIBUTE_IMAGE; @@ -75,6 +76,7 @@ public class LibraryImageCommand extends AbstractLibraryCommand { } + @Override public void undo() { super.undo(); getCastedModel().removeChild(newImageControl); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/LibraryPage.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/LibraryPage.java index 7d3752e77101f20ec187a4b987fbda75293b4881..cf98268f0489534ce6190a1c40913a8a0aab5aa4 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/LibraryPage.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/LibraryPage.java @@ -80,6 +80,7 @@ public class LibraryPage extends Page { previewCanvas = new Canvas(libMainContainer, SWT.BORDER); previewCanvas.setLayout(gl); previewCanvas.addPaintListener(new PaintListener() { + @Override public void paintControl(final PaintEvent e) { if (previewImage == null) { e.gc.drawString("No preview...", 0, 0); @@ -98,7 +99,7 @@ public class LibraryPage extends Page { | SWT.V_SCROLL | SWT.MULTI); tvLibrary.getTable().setLayoutData(gd); tvLibrary.addSelectionChangedListener(new ISelectionChangedListener() { - + @Override public void selectionChanged(final SelectionChangedEvent event) { IStructuredSelection selection = (IStructuredSelection) event @@ -125,6 +126,7 @@ public class LibraryPage extends Page { }); tvLibrary.getControl().addKeyListener(new KeyAdapter() { + @Override public void keyPressed(final KeyEvent event) { if (event.character == SWT.DEL && event.stateMask == 0 && deleteItemAction.isEnabled()) { @@ -173,7 +175,7 @@ public class LibraryPage extends Page { tvLibrary.addDragSupport(DND.DROP_COPY, new Transfer[] { AttributeTransfer.getInstance() }, new DragSourceAdapter() { - + @Override public void dragSetData(final DragSourceEvent event) { LibraryObject object = (LibraryObject) ((StructuredSelection) tvLibrary .getSelection()).getFirstElement(); @@ -187,6 +189,7 @@ public class LibraryPage extends Page { event.data = new AttributeTransferObject(object); } + @Override public void dragStart(final DragSourceEvent event) { } @@ -228,6 +231,7 @@ public class LibraryPage extends Page { .replace("file:", ""); File dir = new File(basePath + "/images"); File[] fileList = dir.listFiles(new FilenameFilter() { + @Override public boolean accept(final File dir, final String name) { if (name.toLowerCase().endsWith(".jpg") || name.toLowerCase().endsWith(".gif") diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/LibraryVariableCommand.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/LibraryVariableCommand.java index 77653658e9180937bdf6e9350ec7059ca947dd1b..4180382228c6d5fc038be336ba254ca8cd02171d 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/LibraryVariableCommand.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/LibraryVariableCommand.java @@ -18,6 +18,7 @@ public class LibraryVariableCommand extends AbstractLibraryCommand { private BControl newControl; + @Override public void execute() { attributeName = AttributeConstants.ATTRIBUTE_TEXT; @@ -56,6 +57,7 @@ public class LibraryVariableCommand extends AbstractLibraryCommand { } + @Override public void undo() { super.undo(); getCastedModel().removeChild(newControl); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/LibraryView.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/LibraryView.java index 08240a63b7a45fd3e70872f75bd61fbefeb93742..d7cdf576802024ce6183fc757326077581f29a9f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/LibraryView.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/library/LibraryView.java @@ -64,6 +64,7 @@ public class LibraryView extends PageBookView { return null; } + @Override public void partBroughtToTop(IWorkbenchPart part) { partActivated(part); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BControl.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BControl.java index d83b2770558b39fa9ab0f31d8966d9be5d161a72..78135a376639cfcd949df5321748bd68d6abcaa7 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BControl.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BControl.java @@ -589,6 +589,7 @@ public abstract class BControl implements IAdaptable, Cloneable { getListeners().removePropertyChangeListener(listener); } + @Override public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) { if (adapter == IPropertySource.class) { return new BControlPropertySource(this); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BMotionRulerProvider.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BMotionRulerProvider.java index 97d10cddbecf893dfb18bb68da9aeb6f0d04e55c..53ca625516d6511c471eacf786eab2689758b705 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BMotionRulerProvider.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/BMotionRulerProvider.java @@ -23,6 +23,7 @@ public class BMotionRulerProvider extends RulerProvider { private BMotionRuler ruler; private PropertyChangeListener rulerListener = new PropertyChangeListener() { + @Override public void propertyChange(PropertyChangeEvent evt) { if (evt.getPropertyName().equals(BMotionRuler.PROPERTY_CHILDREN)) { BMotionGuide guide = (BMotionGuide) evt.getNewValue(); @@ -44,6 +45,7 @@ public class BMotionRulerProvider extends RulerProvider { } }; private PropertyChangeListener guideListener = new PropertyChangeListener() { + @Override public void propertyChange(PropertyChangeEvent evt) { if (evt.getPropertyName().equals(BMotionGuide.PROPERTY_CHILDREN)) { for (int i = 0; i < listeners.size(); i++) { @@ -70,22 +72,27 @@ public class BMotionRulerProvider extends RulerProvider { } } + @Override public List<BControl> getAttachedModelObjects(Object guide) { return new ArrayList<BControl>(((BMotionGuide) guide).getParts()); } + @Override public Command getCreateGuideCommand(int position) { return new CreateGuideCommand(ruler, position); } + @Override public Command getDeleteGuideCommand(Object guide) { return new DeleteGuideCommand((BMotionGuide) guide, ruler); } + @Override public Command getMoveGuideCommand(Object guide, int pDelta) { return new MoveGuideCommand((BMotionGuide) guide, pDelta); } + @Override public int[] getGuidePositions() { List<BMotionGuide> guides = getGuides(); int[] result = new int[guides.size()]; @@ -95,22 +102,27 @@ public class BMotionRulerProvider extends RulerProvider { return result; } + @Override public Object getRuler() { return ruler; } + @Override public int getUnit() { return ruler.getUnit(); } + @Override public void setUnit(int newUnit) { ruler.setUnit(newUnit); } + @Override public int getGuidePosition(Object guide) { return ((BMotionGuide) guide).getPosition(); } + @Override public List<BMotionGuide> getGuides() { return ruler.getGuides(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Switch.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Switch.java index 983beb6f8778c899c86eea77ca3bd9c1d7fa8d9e..c7b4b2c30d3a3bf5ab2913861e6520bcf0bf7c0f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Switch.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Switch.java @@ -122,6 +122,7 @@ public class Switch extends BControl { // We have to set the two tracks of the switch, since their are set to // transient + @Override protected Object readResolve() { super.readResolve(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Visualization.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Visualization.java index f3255a40a5ca86306f31ac8743407db71dc17684..beafec9f4d09de52df12ead88a1e8136647021bd 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Visualization.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/model/Visualization.java @@ -249,6 +249,7 @@ public class Visualization extends BControl { return snapToGeometry; } + @Override public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) { return null; } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ListenOperationByPredicate.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ListenOperationByPredicate.java index e97873f78c913ab05b6579ed8d7c1625c374b75b..e8ddb792a31aa45e273f25d5955964dec31f2a5e 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ListenOperationByPredicate.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ListenOperationByPredicate.java @@ -40,6 +40,7 @@ public class ListenOperationByPredicate extends Observer { this.list = list; } + @Override protected Object readResolve() { this.setAttributes = new ArrayList<String>(); return super.readResolve(); @@ -189,6 +190,7 @@ public class ListenOperationByPredicate extends Observer { // return false; // } + @Override public Observer clone() throws CloneNotSupportedException { ListenOperationByPredicate clone = (ListenOperationByPredicate) super .clone(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ListenOperationObject.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ListenOperationObject.java index 6a400b137a11d12db34dea57e2df08b6e7268384..5f89f157cc89355cf04f62f18606538d35dc1d74 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ListenOperationObject.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ListenOperationObject.java @@ -19,6 +19,7 @@ public class ListenOperationObject extends BindingObject implements Cloneable { this.predicate = ""; } + @Override public ListenOperationObject clone() throws CloneNotSupportedException { return (ListenOperationObject) super.clone(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/Observer.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/Observer.java index 4d64076e6b9dae0da8e7981ab58c65a0a16a8e3b..f0231d1eb6f3e0f961544b6406280a45e33e0103 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/Observer.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/Observer.java @@ -57,6 +57,7 @@ public abstract class Observer extends AbstractExpressionControl implements * * @return the cloned observer */ + @Override public Observer clone() throws CloneNotSupportedException { return (Observer) super.clone(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ObserverEvalObject.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ObserverEvalObject.java index fce5f5d7ff8169f02143aa732e04f076d0d36a67..2c77c9397b4a4c3461d85f3f45397bd43aa80b39 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ObserverEvalObject.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ObserverEvalObject.java @@ -62,6 +62,7 @@ public class ObserverEvalObject extends BindingObject implements Cloneable { return eval; } + @Override public ObserverEvalObject clone() throws CloneNotSupportedException { return (ObserverEvalObject) super.clone(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SetAttribute.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SetAttribute.java index 69163126f58e619f9502c00af04822708bf4d925..6b5788d8a315882888a47204ae910dc2e6b5e169 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SetAttribute.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SetAttribute.java @@ -28,6 +28,7 @@ public class SetAttribute extends Observer { setAttributes = new ArrayList<String>(); } + @Override protected Object readResolve() { setAttributes = new ArrayList<String>(); return super.readResolve(); @@ -121,6 +122,7 @@ public class SetAttribute extends Observer { return setAttributeObjects; } + @Override public Observer clone() throws CloneNotSupportedException { SetAttribute clonedObserver = (SetAttribute) super.clone(); List<SetAttributeObject> list = new ArrayList<SetAttributeObject>(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SetAttributeObject.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SetAttributeObject.java index 35b6cc74601451356262244527e0bbf95199a9ef..1e62ac9d520a9482aaf64d7966e9811360ca463c 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SetAttributeObject.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SetAttributeObject.java @@ -17,6 +17,7 @@ public class SetAttributeObject extends ObserverEvalObject implements Cloneable super(type, eval); } + @Override public SetAttributeObject clone() throws CloneNotSupportedException { return (SetAttributeObject) super.clone(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SimpleValueDisplay.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SimpleValueDisplay.java index ab053bc3d612e12eefc82800df7122ddb76abb00..5a9762890f6ba9a0d462c305a42a74898e140885 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SimpleValueDisplay.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SimpleValueDisplay.java @@ -21,6 +21,7 @@ public class SimpleValueDisplay extends Observer { private transient String orgString; private transient boolean isOrgStringSet = false; + @Override public void check(final Animation animation, final BControl bcontrol) { // First evaluate predicate (predicate field) @@ -56,6 +57,7 @@ public class SimpleValueDisplay extends Observer { } + @Override public ObserverWizard getWizard(final BControl bcontrol) { return new WizardObserverSimpleValueDisplay(bcontrol, this); } @@ -92,6 +94,7 @@ public class SimpleValueDisplay extends Observer { return replacementString; } + @Override public Observer clone() throws CloneNotSupportedException { SimpleValueDisplay clonedObserver = (SimpleValueDisplay) super.clone(); clonedObserver.isOrgStringSet = false; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SwitchChildCoordinates.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SwitchChildCoordinates.java index 2708ce2020062abdbd24ec181a45f82e2cec4814..357be1dbb98d0ee2da32ca04fcd076f96cf0a003 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SwitchChildCoordinates.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SwitchChildCoordinates.java @@ -23,6 +23,7 @@ public class SwitchChildCoordinates extends Observer { toggleObjects = new ArrayList<ToggleObjectCoordinates>(); } + @Override public void check(final Animation animation, final BControl control) { // Collect evaluate predicate objects in list @@ -99,6 +100,7 @@ public class SwitchChildCoordinates extends Observer { } + @Override public ObserverWizard getWizard(final BControl bcontrol) { return new WizardObserverCSwitchCoordinates(bcontrol, this); } @@ -111,6 +113,7 @@ public class SwitchChildCoordinates extends Observer { this.toggleObjects = list; } + @Override public Observer clone() throws CloneNotSupportedException { SwitchChildCoordinates clonedObserver = (SwitchChildCoordinates) super .clone(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SwitchCoordinates.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SwitchCoordinates.java index f71dfca1fc293febd9223bc255ec2a6bbe1c0954..1c6cfb0408d78fef562cbd97763a7537f8a83b3e 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SwitchCoordinates.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SwitchCoordinates.java @@ -23,6 +23,7 @@ public class SwitchCoordinates extends Observer { toggleObjects = new ArrayList<ToggleObjectCoordinates>(); } + @Override public void check(final Animation animation, final BControl control) { boolean set = false; @@ -109,6 +110,7 @@ public class SwitchCoordinates extends Observer { } + @Override public ObserverWizard getWizard(final BControl bcontrol) { return new WizardObserverSwitchCoordinates(bcontrol, this); } @@ -121,6 +123,7 @@ public class SwitchCoordinates extends Observer { this.toggleObjects = list; } + @Override public Observer clone() throws CloneNotSupportedException { SwitchCoordinates clonedObserver = (SwitchCoordinates) super.clone(); List<ToggleObjectCoordinates> list = new ArrayList<ToggleObjectCoordinates>(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SwitchImage.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SwitchImage.java index 707251c81413542f56533e6299f75c837b0b21b8..575e2c282b897b5df274471f41c5031cd7c4cbd4 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SwitchImage.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/SwitchImage.java @@ -26,6 +26,7 @@ public class SwitchImage extends Observer { toggleObjects = new ArrayList<ToggleObjectImage>(); } + @Override public void check(final Animation animation, final BControl control) { boolean set = false; @@ -79,6 +80,7 @@ public class SwitchImage extends Observer { } + @Override public ObserverWizard getWizard(final BControl bcontrol) { return new WizardObserverSwitchImage(bcontrol, this); } @@ -91,6 +93,7 @@ public class SwitchImage extends Observer { this.toggleObjects = list; } + @Override public Observer clone() throws CloneNotSupportedException { SwitchImage clonedObserver = (SwitchImage) super.clone(); List<ToggleObjectImage> list = new ArrayList<ToggleObjectImage>(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ToggleObjectCoordinates.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ToggleObjectCoordinates.java index 07765bdc3bfb5b515e6534e378e6bfcd76815d28..14a5ce137a41fd89ddcf5cf81a6f454646828740 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ToggleObjectCoordinates.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ToggleObjectCoordinates.java @@ -76,6 +76,7 @@ public class ToggleObjectCoordinates extends ObserverEvalObject implements // firePropertyChange("animate", oldValue, this.animate); // } + @Override public ToggleObjectCoordinates clone() throws CloneNotSupportedException { return (ToggleObjectCoordinates) super.clone(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ToggleObjectImage.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ToggleObjectImage.java index 5169e967a6ec6bf3c06612d5219e952bba40aff2..1f7cf0b441d1a337adfc0057b41458d9076a13bb 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ToggleObjectImage.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/ToggleObjectImage.java @@ -29,6 +29,7 @@ public class ToggleObjectImage extends ObserverEvalObject implements Cloneable { firePropertyChange("image", oldValue, this.image); } + @Override public ToggleObjectImage clone() throws CloneNotSupportedException { return (ToggleObjectImage) super.clone(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardColumnObserver.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardColumnObserver.java index 9312d519e623825f4b5e58683735a3902123084f..7ef4720a3c98846a994d8fc7b34f7bb8adc306a1 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardColumnObserver.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardColumnObserver.java @@ -42,6 +42,7 @@ public class WizardColumnObserver extends ObserverWizard { super(pageName); } + @Override public void createControl(final Composite parent) { final DataBindingContext dbc = new DataBindingContext(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverCSwitchCoordinates.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverCSwitchCoordinates.java index 0dc136aec801ec93ff30a0071703f58d4e0a9552..975dce4688928810edb1a77c8c7e7ea3d105084c 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverCSwitchCoordinates.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverCSwitchCoordinates.java @@ -60,6 +60,7 @@ public class WizardObserverCSwitchCoordinates extends ObserverWizard { super(pageName, getObserver()); } + @Override public void createControl(Composite parent) { super.createControl(parent); @@ -300,6 +301,7 @@ public class WizardObserverCSwitchCoordinates extends ObserverWizard { return null; } + @Override public Color getBackground(final Object element, final int column) { ToggleObjectCoordinates attributeObject = (ToggleObjectCoordinates) element; if (attributeObject.hasError()) @@ -307,10 +309,12 @@ public class WizardObserverCSwitchCoordinates extends ObserverWizard { return null; } + @Override public Color getForeground(final Object element, final int column) { return null; } + @Override public Font getFont(final Object element, final int column) { // return JFaceResources.getFontRegistry().get( // BMotionStudioConstants.RODIN_FONT_KEY); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverListenOperationByPredicate.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverListenOperationByPredicate.java index 8595875b93209acd693827b1e748a01b0b16e9ba..ef4050548ca4e165068cc88acbe203a87cb27736 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverListenOperationByPredicate.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverListenOperationByPredicate.java @@ -74,6 +74,7 @@ public class WizardObserverListenOperationByPredicate extends ObserverWizard { super(pageName, getObserver()); } + @Override public void createControl(final Composite parent) { super.createControl(parent); @@ -290,6 +291,7 @@ public class WizardObserverListenOperationByPredicate extends ObserverWizard { cellEditor .setContentProvider(new ObservableListContentProvider()); cellEditor.setLabelProvider(new LabelProvider() { + @Override public String getText(Object element) { return getBControl().getAttributes() .get(element.toString()).getName(); @@ -312,12 +314,14 @@ public class WizardObserverListenOperationByPredicate extends ObserverWizard { String oldValue; + @Override public void focusGained(FocusEvent e) { oldValue = ((CCombo) cellEditor .getControl()).getText(); } + @Override public void focusLost(FocusEvent e) { if (!oldValue.equals(((CCombo) cellEditor @@ -447,14 +451,17 @@ public class WizardObserverListenOperationByPredicate extends ObserverWizard { return super.getColumnText(element, columnIndex); } + @Override public Color getBackground(final Object element, final int column) { return null; } + @Override public Color getForeground(final Object element, final int column) { return null; } + @Override public Font getFont(final Object element, final int column) { // return JFaceResources.getFontRegistry().get( // BMotionStudioConstants.RODIN_FONT_KEY); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverSetAttribute.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverSetAttribute.java index 6801af40b2e8b24598739e19014f08022364c4dd..163e69960b775c7d45e94e2861cb29a438761ed9 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverSetAttribute.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverSetAttribute.java @@ -75,6 +75,7 @@ public class WizardObserverSetAttribute extends ObserverWizard { super(pageName, getObserver()); } + @Override public void createControl(Composite parent) { super.createControl(parent); @@ -251,6 +252,7 @@ public class WizardObserverSetAttribute extends ObserverWizard { cellEditor .setContentProvider(new ObservableListContentProvider()); cellEditor.setLabelProvider(new LabelProvider() { + @Override public String getText(Object element) { return getBControl().getAttributes() .get(element.toString()).getName(); @@ -273,12 +275,14 @@ public class WizardObserverSetAttribute extends ObserverWizard { String oldValue; + @Override public void focusGained(FocusEvent e) { oldValue = ((CCombo) cellEditor .getControl()).getText(); } + @Override public void focusLost(FocusEvent e) { if (!oldValue.equals(((CCombo) cellEditor @@ -403,6 +407,7 @@ public class WizardObserverSetAttribute extends ObserverWizard { return super.getColumnText(element, columnIndex); } + @Override public Color getBackground(final Object element, final int column) { SetAttributeObject attributeObject = (SetAttributeObject) element; if (attributeObject.hasError()) @@ -410,10 +415,12 @@ public class WizardObserverSetAttribute extends ObserverWizard { return null; } + @Override public Color getForeground(final Object element, final int column) { return null; } + @Override public Font getFont(final Object element, final int column) { // return JFaceResources.getFontRegistry().get( // BMotionStudioConstants.RODIN_FONT_KEY); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverSimpleValueDisplay.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverSimpleValueDisplay.java index e708b45bd8b70ad74394d97437ef3a3eefdb031e..3d16ff88b9ede559a15dda9e57fcf39ce9c7d9d3 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverSimpleValueDisplay.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverSimpleValueDisplay.java @@ -43,6 +43,7 @@ public class WizardObserverSimpleValueDisplay extends ObserverWizard { super(pageName, getObserver()); } + @Override public void createControl(final Composite parent) { super.createControl(parent); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverSwitchCoordinates.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverSwitchCoordinates.java index 334516db3ba777018d2ed6567f59d781879ba99f..712d7a947c7d1785c52d08c994356cc01e9a11f9 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverSwitchCoordinates.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverSwitchCoordinates.java @@ -59,6 +59,7 @@ public class WizardObserverSwitchCoordinates extends ObserverWizard { super(pageName, getObserver()); } + @Override public void createControl(Composite parent) { super.createControl(parent); @@ -279,6 +280,7 @@ public class WizardObserverSwitchCoordinates extends ObserverWizard { return null; } + @Override public Color getBackground(final Object element, final int column) { ToggleObjectCoordinates attributeObject = (ToggleObjectCoordinates) element; if (attributeObject.hasError()) @@ -286,10 +288,12 @@ public class WizardObserverSwitchCoordinates extends ObserverWizard { return null; } + @Override public Color getForeground(final Object element, final int column) { return null; } + @Override public Font getFont(final Object element, final int column) { // return JFaceResources.getFontRegistry().get( // BMotionStudioConstants.RODIN_FONT_KEY); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverSwitchImage.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverSwitchImage.java index 4f3f429e415a381b16c6b0dbf29a9daf0639eabf..f28fd5137c868f44f48c96b2a7f8dbb058f97f9d 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverSwitchImage.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardObserverSwitchImage.java @@ -61,6 +61,7 @@ public class WizardObserverSwitchImage extends ObserverWizard { super(pageName, getObserver()); } + @Override public void createControl(final Composite parent) { super.createControl(parent); @@ -266,6 +267,7 @@ public class WizardObserverSwitchImage extends ObserverWizard { } + @Override public Color getBackground(final Object element, final int column) { ToggleObjectImage attributeObject = (ToggleObjectImage) element; if (attributeObject.hasError()) @@ -273,10 +275,12 @@ public class WizardObserverSwitchImage extends ObserverWizard { return null; } + @Override public Color getForeground(final Object element, final int column) { return null; } + @Override public Font getFont(final Object element, final int column) { // return JFaceResources.getFontRegistry().get( // BMotionStudioConstants.RODIN_FONT_KEY); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardTableObserver.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardTableObserver.java index 74f3765ba0b4979bf534ca7b29b6b308421d8ec3..53e8145dfd7ee30a67593cce6da457547d25eebe 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardTableObserver.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/observer/wizard/WizardTableObserver.java @@ -55,6 +55,7 @@ public class WizardTableObserver extends ObserverWizard { super(pageName); } + @Override public void createControl(final Composite parent) { final DataBindingContext dbc = new DataBindingContext(); @@ -137,6 +138,7 @@ public class WizardTableObserver extends ObserverWizard { list.setItems(relationList.toArray(new String[relationList.size()])); list.addMouseListener(new MouseAdapter() { + @Override public void mouseDoubleClick(MouseEvent e) { String[] selection = list.getSelection(); if (selection.length > 0) diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BCompositePart.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BCompositePart.java index 8fb3be85002477b2ccd512845411aa8493468bb4..463c8aea405a980d04d9147f07f1acf3417fde59 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BCompositePart.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BCompositePart.java @@ -85,6 +85,7 @@ public class BCompositePart extends BMSAbstractEditPart { return ((BControl) getModel()).getChildrenArray(); } + @Override @SuppressWarnings({ "unchecked", "rawtypes" }) public Object getAdapter(Class adapter) { if (adapter == SnapToHelper.class) { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BConnectionEditPart.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BConnectionEditPart.java index ace0d0cf76312d19debec47a8f36f0cb407136be..90717ba811a1bf52dfeb0b5fa81fea60f86c7d06 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BConnectionEditPart.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BConnectionEditPart.java @@ -80,6 +80,7 @@ public class BConnectionEditPart extends BMSAbstractEditPart implements // element installEditPolicy(EditPolicy.CONNECTION_ROLE, new ConnectionEditPolicy() { + @Override protected Command getDeleteCommand(GroupRequest request) { return new ConnectionDeleteCommand( (BConnection) getModel()); @@ -197,6 +198,7 @@ public class BConnectionEditPart extends BMSAbstractEditPart implements /** * @see AccessibleAnchorProvider#getSourceAnchorLocations() */ + @Override public List<Point> getSourceAnchorLocations() { List<Point> list = new ArrayList<Point>(); if (getFigure() instanceof Connection) { @@ -210,6 +212,7 @@ public class BConnectionEditPart extends BMSAbstractEditPart implements /** * @see AccessibleAnchorProvider#getTargetAnchorLocations() */ + @Override public List<Point> getTargetAnchorLocations() { return getSourceAnchorLocations(); } @@ -230,6 +233,7 @@ public class BConnectionEditPart extends BMSAbstractEditPart implements /** * @see org.eclipse.gef.EditPart#addNotify() */ + @Override public void addNotify() { activateFigure(); super.addNotify(); @@ -258,6 +262,7 @@ public class BConnectionEditPart extends BMSAbstractEditPart implements * the adapter Class * @return the adapter */ + @Override public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) { if (adapter == AccessibleAnchorProvider.class) return new DefaultAccessibleAnchorProvider(); @@ -277,6 +282,7 @@ public class BConnectionEditPart extends BMSAbstractEditPart implements /** * @see org.eclipse.gef.EditPart#getDragTracker(Request) */ + @Override public DragTracker getDragTracker(Request req) { return new SelectEditPartTracker(this); } @@ -284,6 +290,7 @@ public class BConnectionEditPart extends BMSAbstractEditPart implements /** * @see org.eclipse.gef.ConnectionEditPart#getSource() */ + @Override public EditPart getSource() { return sourceEditPart; } @@ -291,6 +298,7 @@ public class BConnectionEditPart extends BMSAbstractEditPart implements /** * @see org.eclipse.gef.ConnectionEditPart#getTarget() */ + @Override public EditPart getTarget() { return targetEditPart; } @@ -346,6 +354,7 @@ public class BConnectionEditPart extends BMSAbstractEditPart implements * * @see org.eclipse.gef.EditPart#refresh() */ + @Override public void refresh() { refreshSourceAnchor(); refreshTargetAnchor(); @@ -374,6 +383,7 @@ public class BConnectionEditPart extends BMSAbstractEditPart implements * * @see org.eclipse.gef.EditPart#removeNotify() */ + @Override public void removeNotify() { deactivateFigure(); super.removeNotify(); @@ -384,6 +394,7 @@ public class BConnectionEditPart extends BMSAbstractEditPart implements * * @see org.eclipse.gef.EditPart#setParent(EditPart) */ + @Override public void setParent(EditPart parent) { boolean wasNull = getParent() == null; boolean becomingNull = parent == null; @@ -400,6 +411,7 @@ public class BConnectionEditPart extends BMSAbstractEditPart implements * @param editPart * EditPart which is the source. */ + @Override public void setSource(EditPart editPart) { if (sourceEditPart == editPart) return; @@ -418,6 +430,7 @@ public class BConnectionEditPart extends BMSAbstractEditPart implements * @param editPart * EditPart which is the target. */ + @Override public void setTarget(EditPart editPart) { if (targetEditPart == editPart) return; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BControlTreeEditPart.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BControlTreeEditPart.java index 59b8248b1087116e9d347d1a0ae9867f7b903fb8..a62ca948444791348f8321f15effdbd7b7f4dc7f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BControlTreeEditPart.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BControlTreeEditPart.java @@ -32,7 +32,7 @@ import de.bmotionstudio.gef.editor.observer.Observer; public class BControlTreeEditPart extends BMSAbstractTreeEditPart implements PropertyChangeListener, IObserverListener { - + @Override public void propertyChange(final PropertyChangeEvent evt) { if (evt.getPropertyName().equals( BControlPropertyConstants.PROPERTY_ADD_CHILD) @@ -85,6 +85,7 @@ public class BControlTreeEditPart extends BMSAbstractTreeEditPart implements } + @Override public void activate() { if (!isActive()) { super.activate(); @@ -93,6 +94,7 @@ public class BControlTreeEditPart extends BMSAbstractTreeEditPart implements } } + @Override public void deactivate() { if (isActive()) { super.deactivate(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BMSAbstractEditPart.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BMSAbstractEditPart.java index 5f2f63429dc48890984c66b8a0e1de3ccc9f8d90..cb70c1800f8cf05b9bd4a9900cf94af5cf5bfe09 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BMSAbstractEditPart.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BMSAbstractEditPart.java @@ -81,6 +81,7 @@ public abstract class BMSAbstractEditPart extends AbstractGraphicalEditPart AttributeConstants.ATTRIBUTE_Y, AttributeConstants.ATTRIBUTE_WIDTH, AttributeConstants.ATTRIBUTE_HEIGHT }; + @Override public void activate() { if (!isActive()) { super.activate(); @@ -94,6 +95,7 @@ public abstract class BMSAbstractEditPart extends AbstractGraphicalEditPart } } + @Override public void deactivate() { if (isActive()) { super.deactivate(); @@ -226,6 +228,7 @@ public abstract class BMSAbstractEditPart extends AbstractGraphicalEditPart } } + @Override public List<BControl> getModelChildren() { return new ArrayList<BControl>(); } @@ -278,28 +281,34 @@ public abstract class BMSAbstractEditPart extends AbstractGraphicalEditPart return anchor; } + @Override protected List<?> getModelSourceConnections() { return getCastedModel().getSourceConnections(); } + @Override protected List<?> getModelTargetConnections() { return getCastedModel().getTargetConnections(); } + @Override public ConnectionAnchor getSourceConnectionAnchor( ConnectionEditPart connection) { return getConnectionAnchor(); } + @Override public ConnectionAnchor getSourceConnectionAnchor(Request request) { return getConnectionAnchor(); } + @Override public ConnectionAnchor getTargetConnectionAnchor( ConnectionEditPart connection) { return getConnectionAnchor(); } + @Override public ConnectionAnchor getTargetConnectionAnchor(Request request) { return getConnectionAnchor(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BMSTreeEditPartFactory.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BMSTreeEditPartFactory.java index c068699f0cebde9c3c81cbb9b26c94d305a3f0f0..b562cd709ae6a3f8130cecb9daa4298d71e29219 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BMSTreeEditPartFactory.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/BMSTreeEditPartFactory.java @@ -17,7 +17,7 @@ import de.bmotionstudio.gef.editor.model.BControl; import de.bmotionstudio.gef.editor.model.Visualization; public class BMSTreeEditPartFactory implements EditPartFactory { - + @Override public EditPart createEditPart(EditPart context, Object model) { BMSAbstractTreeEditPart part = null; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/TrackPart.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/TrackPart.java index d8c5df4ea309778f38c98032d207cb03a654e5de..393bebc2ec38a58d32e9a1891f43c8174830cb47 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/TrackPart.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/TrackPart.java @@ -33,6 +33,7 @@ public class TrackPart extends BConnectionEditPart { // element installEditPolicy(EditPolicy.CONNECTION_ROLE, new ConnectionEditPolicy() { + @Override protected Command getDeleteCommand(GroupRequest request) { return new ConnectionDeleteCommand((Track) getModel()); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/VisualizationPart.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/VisualizationPart.java index c0baa4235c085c852eb5a7eea8e97c4720289f52..ae1ac0a27ef663040b9906d02c66507f25daf94e 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/VisualizationPart.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/part/VisualizationPart.java @@ -82,6 +82,7 @@ public class VisualizationPart extends BMSAbstractEditPart { } + @Override @SuppressWarnings({ "unchecked", "rawtypes" }) public Object getAdapter(final Class adapter) { if (adapter == SnapToHelper.class) { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/FileDialogCellEditor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/FileDialogCellEditor.java index 785557f00bce14de3932cd95986952e8568f2086..c6954d9bcf8c8627547c9cd8817d4b26ce763969 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/FileDialogCellEditor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/FileDialogCellEditor.java @@ -29,6 +29,7 @@ public class FileDialogCellEditor extends DialogCellEditor { /** * @see org.eclipse.jface.viewers.DialogCellEditor#openDialogBox(Control) */ + @Override protected Object openDialogBox(Control cellEditorWindow) { FileDialog ftDialog = new FileDialog(PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/FilePropertyDescriptor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/FilePropertyDescriptor.java index a9ba2cec98b7cfceebd210bec1e9ce37a5b0d443..209b7464b137bc9f7eb499e4f1c79ee811dd6e34 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/FilePropertyDescriptor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/FilePropertyDescriptor.java @@ -27,6 +27,7 @@ public class FilePropertyDescriptor extends PropertyDescriptor { /** * @see org.eclipse.ui.views.properties.IPropertyDescriptor#createPropertyEditor(Composite) */ + @Override public CellEditor createPropertyEditor(Composite parent) { CellEditor editor = new FileDialogCellEditor(parent); if (getValidator() != null) diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/FontDialogCellEditor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/FontDialogCellEditor.java index 0bc590b12885319bd10f2ce6f627c27bc3625bb2..59b581d03f4b5f4fa08c523c079581a574a8e033 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/FontDialogCellEditor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/FontDialogCellEditor.java @@ -40,6 +40,7 @@ public class FontDialogCellEditor extends DialogCellEditor { /** * @see org.eclipse.jface.viewers.DialogCellEditor#openDialogBox(Control) */ + @Override protected Object openDialogBox(Control cellEditorWindow) { FontDialog ftDialog = new FontDialog(PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell()); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/FontPropertyDescriptor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/FontPropertyDescriptor.java index 74061a30c31126cb37c254dd1ee1adc9afe36b5a..e6f6fd676d6c272c19fbb167ff64148557bc77b3 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/FontPropertyDescriptor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/FontPropertyDescriptor.java @@ -44,6 +44,7 @@ public class FontPropertyDescriptor extends PropertyDescriptor { /** * @see org.eclipse.ui.views.properties.IPropertyDescriptor#createPropertyEditor(Composite) */ + @Override public CellEditor createPropertyEditor(Composite parent) { CellEditor editor = new FontDialogCellEditor(parent); if (getValidator() != null) diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/ImageDialog.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/ImageDialog.java index 09ed8db26d1af112aa1ffb118672b9e978a6bb03..36be7b0b8bf476e619e5556f8e8296409719d15d 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/ImageDialog.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/ImageDialog.java @@ -74,6 +74,7 @@ public class ImageDialog extends Dialog { previewCanvas = new Canvas(preContainer, SWT.BORDER); previewCanvas.addPaintListener(new PaintListener() { + @Override public void paintControl(final PaintEvent e) { if (previewImage == null) { e.gc.drawString("No image selected ...", 0, 0); @@ -91,7 +92,7 @@ public class ImageDialog extends Dialog { | SWT.V_SCROLL); tvLibrary.getTable().setLayoutData(gd); tvLibrary.addSelectionChangedListener(new ISelectionChangedListener() { - + @Override public void selectionChanged(final SelectionChangedEvent event) { IStructuredSelection selection = (IStructuredSelection) event @@ -177,6 +178,7 @@ public class ImageDialog extends Dialog { .getLocation().toString()).replace("file:", ""); File dir = new File(basePath + "/images"); File[] fileList = dir.listFiles(new FilenameFilter() { + @Override public boolean accept(final File dir, final String name) { if (name.toLowerCase().endsWith(".jpg") || name.toLowerCase().endsWith(".gif") diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/ImagePropertyDescriptor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/ImagePropertyDescriptor.java index 011db14eefce6dd9df661b171eeb9063f400b3c0..950c3e4a9808204e03c7d74c470571e63bae9e5e 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/ImagePropertyDescriptor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/ImagePropertyDescriptor.java @@ -27,6 +27,7 @@ public class ImagePropertyDescriptor extends PropertyDescriptor { /** * @see org.eclipse.ui.views.properties.IPropertyDescriptor#createPropertyEditor(Composite) */ + @Override public CellEditor createPropertyEditor(Composite parent) { CellEditor editor = new ImageDialogCellEditor(parent); if (getValidator() != null) diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/IntegerCellEditor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/IntegerCellEditor.java index 24b73044c7e9a6f7a02276df5d8614579b3d79e0..e231338a77c8c53bd92025ce5f94c9d9f727e4f9 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/IntegerCellEditor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/IntegerCellEditor.java @@ -38,6 +38,7 @@ public class IntegerCellEditor extends CellEditor { public IntegerCellEditor(Composite composite) { super(composite); setValidator(new ICellEditorValidator() { + @Override public String isValid(Object object) { if (object instanceof Integer) { return null; @@ -91,15 +92,18 @@ public class IntegerCellEditor extends CellEditor { } } + @Override protected Control createControl(Composite parent) { text = new Text(parent, getStyle()); text.addSelectionListener(new SelectionAdapter() { + @Override public void widgetDefaultSelected(SelectionEvent e) { handleDefaultSelection(e); } }); text.addKeyListener(new KeyAdapter() { // hook key pressed - see PR 14201 + @Override public void keyPressed(KeyEvent e) { keyReleaseOccured(e); @@ -114,6 +118,7 @@ public class IntegerCellEditor extends CellEditor { } }); text.addTraverseListener(new TraverseListener() { + @Override public void keyTraversed(TraverseEvent e) { if (e.detail == SWT.TRAVERSE_ESCAPE || e.detail == SWT.TRAVERSE_RETURN) { @@ -126,6 +131,7 @@ public class IntegerCellEditor extends CellEditor { // changes // may have occurred text.addMouseListener(new MouseAdapter() { + @Override public void mouseUp(MouseEvent e) { checkSelection(); checkDeleteable(); @@ -133,6 +139,7 @@ public class IntegerCellEditor extends CellEditor { } }); text.addFocusListener(new FocusAdapter() { + @Override public void focusLost(FocusEvent e) { IntegerCellEditor.this.focusLost(); } @@ -150,10 +157,12 @@ public class IntegerCellEditor extends CellEditor { * * @return the text string */ + @Override protected Object doGetValue() { return Integer.valueOf(Integer.parseInt(text.getText())); } + @Override protected void doSetFocus() { if (text != null) { text.selectAll(); @@ -172,6 +181,7 @@ public class IntegerCellEditor extends CellEditor { * @param value * a text string (type <code>String</code>) */ + @Override protected void doSetValue(Object value) { Assert.isTrue(text != null && (value instanceof Integer)); text.removeModifyListener(getModifyListener()); @@ -209,6 +219,7 @@ public class IntegerCellEditor extends CellEditor { /** * Since a text editor field is scrollable we don't set a minimumSize. */ + @Override public LayoutData getLayoutData() { return new LayoutData(); } @@ -219,6 +230,7 @@ public class IntegerCellEditor extends CellEditor { private ModifyListener getModifyListener() { if (modifyListener == null) { modifyListener = new ModifyListener() { + @Override public void modifyText(ModifyEvent e) { editOccured(e); } @@ -247,6 +259,7 @@ public class IntegerCellEditor extends CellEditor { * <code>CellEditor</code> method returns <code>true</code> if the current * selection is not empty. */ + @Override public boolean isCopyEnabled() { if (text == null || text.isDisposed()) { return false; @@ -259,6 +272,7 @@ public class IntegerCellEditor extends CellEditor { * <code>CellEditor</code> method returns <code>true</code> if the current * selection is not empty. */ + @Override public boolean isCutEnabled() { if (text == null || text.isDisposed()) { return false; @@ -271,6 +285,7 @@ public class IntegerCellEditor extends CellEditor { * <code>CellEditor</code> method returns <code>true</code> if there is a * selection or if the caret is not positioned at the end of the text. */ + @Override public boolean isDeleteEnabled() { if (text == null || text.isDisposed()) { return false; @@ -283,6 +298,7 @@ public class IntegerCellEditor extends CellEditor { * The <code>TextCellEditor</code> implementation of this * <code>CellEditor</code> method always returns <code>true</code>. */ + @Override public boolean isPasteEnabled() { if (text == null || text.isDisposed()) { return false; @@ -315,6 +331,7 @@ public class IntegerCellEditor extends CellEditor { * @return <code>true</code> if select all is possible, <code>false</code> * otherwise */ + @Override public boolean isSelectAllEnabled() { if (text == null || text.isDisposed()) { return false; @@ -335,6 +352,7 @@ public class IntegerCellEditor extends CellEditor { * @param keyEvent * the key event */ + @Override protected void keyReleaseOccured(KeyEvent keyEvent) { if (keyEvent.character == '\r') { // Return key // Enter is handled in handleDefaultSelection. @@ -362,6 +380,7 @@ public class IntegerCellEditor extends CellEditor { * <code>CellEditor</code> method copies the current selection to the * clipboard. */ + @Override public void performCopy() { text.copy(); } @@ -371,6 +390,7 @@ public class IntegerCellEditor extends CellEditor { * <code>CellEditor</code> method cuts the current selection to the * clipboard. */ + @Override public void performCut() { text.cut(); checkSelection(); @@ -383,6 +403,7 @@ public class IntegerCellEditor extends CellEditor { * <code>CellEditor</code> method deletes the current selection or, if there * is no selection, the character next character from the current position. */ + @Override public void performDelete() { if (text.getSelectionCount() > 0) { // remove the contents of the current selection @@ -405,6 +426,7 @@ public class IntegerCellEditor extends CellEditor { * <code>CellEditor</code> method pastes the the clipboard contents over the * current selection. */ + @Override public void performPaste() { text.paste(); checkSelection(); @@ -416,6 +438,7 @@ public class IntegerCellEditor extends CellEditor { * The <code>TextCellEditor</code> implementation of this * <code>CellEditor</code> method selects all of the current text. */ + @Override public void performSelectAll() { text.selectAll(); checkSelection(); @@ -431,6 +454,7 @@ public class IntegerCellEditor extends CellEditor { * * @since 3.4 */ + @Override protected boolean dependsOnExternalFocusListener() { return getClass() != IntegerCellEditor.class; } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/IntegerPropertyDescriptor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/IntegerPropertyDescriptor.java index 4079b8ff1624c6e1081a7ff6b9626442f0a6af1a..329944aa288928787a75b05858ef60a73c38dc0f 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/IntegerPropertyDescriptor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/IntegerPropertyDescriptor.java @@ -16,6 +16,7 @@ public class IntegerPropertyDescriptor extends PropertyDescriptor { super(id, displayName); } + @Override public CellEditor createPropertyEditor(Composite parent) { CellEditor editor = new IntegerCellEditor(parent); if (getValidator() != null) { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/SliderCellEditor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/SliderCellEditor.java index fea6f682862b592cae8f776d4a50ead4c9340078..57fc9f27ce07f5075129e2c46853814c4acb4bcb 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/SliderCellEditor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/SliderCellEditor.java @@ -47,12 +47,14 @@ public class SliderCellEditor extends CellEditor { * Internal class for laying out the dialog. */ private class SliderSampleCellLayout extends Layout { + @Override public void layout(Composite editor, boolean force) { Rectangle bounds = editor.getClientArea(); slider.setBounds(30, 0, bounds.width - 30, bounds.height); countLabel.setBounds(5, 1, 25, bounds.height); } + @Override public Point computeSize(Composite editor, int wHint, int hHint, boolean force) { if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT) { @@ -125,6 +127,7 @@ public class SliderCellEditor extends CellEditor { return result; } + @Override protected Control createControl(Composite parent) { Font font = parent.getFont(); Color bg = parent.getBackground(); @@ -143,6 +146,7 @@ public class SliderCellEditor extends CellEditor { slider.addFocusListener(getButtonFocusListener()); slider.addListener(SWT.Selection, new Listener() { + @Override public void handleEvent(Event event) { slider.removeFocusListener(getButtonFocusListener()); @@ -163,6 +167,7 @@ public class SliderCellEditor extends CellEditor { }); slider.addListener(SWT.MouseUp, new Listener() { + @Override public void handleEvent(Event event) { fireApplyEditorValue(); } @@ -177,6 +182,7 @@ public class SliderCellEditor extends CellEditor { * Override in order to remove the button's focus listener if * the celleditor is deactivating. */ + @Override public void deactivate() { if (slider != null && !slider.isDisposed()) { slider.removeFocusListener(getButtonFocusListener()); @@ -185,6 +191,7 @@ public class SliderCellEditor extends CellEditor { super.deactivate(); } + @Override protected Object doGetValue() { return value; } @@ -192,6 +199,7 @@ public class SliderCellEditor extends CellEditor { /** * The focus is set to the cell editor's button. */ + @Override protected void doSetFocus() { slider.setFocus(); // add a FocusListener to the button slider.addFocusListener(getButtonFocusListener()); @@ -205,10 +213,12 @@ public class SliderCellEditor extends CellEditor { private FocusListener getButtonFocusListener() { if (buttonFocusListener == null) { buttonFocusListener = new FocusListener() { + @Override public void focusGained(FocusEvent e) { // Do nothing } + @Override public void focusLost(FocusEvent e) { SliderCellEditor.this.focusLost(); } @@ -218,6 +228,7 @@ public class SliderCellEditor extends CellEditor { return buttonFocusListener; } + @Override protected void doSetValue(Object value) { this.value = value; updateContents(value); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/SliderPropertyDescriptor.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/SliderPropertyDescriptor.java index a4af6f930971e15927f20be06b6de295d42c6a17..4433bf42c49e9de5cdd873bb0fe1e8215dec10a7 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/SliderPropertyDescriptor.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/property/SliderPropertyDescriptor.java @@ -16,6 +16,7 @@ public class SliderPropertyDescriptor extends PropertyDescriptor { super(id, displayName); } + @Override public CellEditor createPropertyEditor(Composite parent) { CellEditor editor = new SliderCellEditor(parent); if (getValidator() != null) { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/AnimationScriptObject.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/AnimationScriptObject.java index affa2870ea07527a1311fc18490579235437f7cd..a520ad917040dcd01fa6b70b40a0a81d686acfb7 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/AnimationScriptObject.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/AnimationScriptObject.java @@ -51,6 +51,7 @@ public class AnimationScriptObject extends BindingObject implements Cloneable { return predicate; } + @Override public AnimationScriptObject clone() throws CloneNotSupportedException { Vector<AnimationScriptStep> tmpVector = new Vector<AnimationScriptStep>(); for (AnimationScriptStep p : getSteps()) { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/AnimationScriptStep.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/AnimationScriptStep.java index 4c9d39a1f1f97c91570e202d5fed6c6f97c7bc3b..51591164a692bcd8e76b73426a3ac719dd0906fc 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/AnimationScriptStep.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/AnimationScriptStep.java @@ -72,6 +72,7 @@ public class AnimationScriptStep extends BindingObject implements Cloneable { callBackList.remove(callBackObj); } + @Override public AnimationScriptStep clone() throws CloneNotSupportedException { ArrayList<ObserverCallBackObject> tmpList = new ArrayList<ObserverCallBackObject>(); for (ObserverCallBackObject p : getCallBackList()) { diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/ExecuteAnimationScript.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/ExecuteAnimationScript.java index dc5dd3e1d72abab6616d3ad484709cf97242e89d..135a96be587520969bc9920bfa4b225af28663d6 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/ExecuteAnimationScript.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/ExecuteAnimationScript.java @@ -101,6 +101,7 @@ public class ExecuteAnimationScript extends SchedulerEvent { return new WizardExecuteScheduler(bcontrol, this); } + @Override public ExecuteAnimationScript clone() throws CloneNotSupportedException { ExecuteAnimationScript nse = (ExecuteAnimationScript) super.clone(); List<AnimationScriptObject> list = new ArrayList<AnimationScriptObject>(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/ExecuteOperationByPredicate.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/ExecuteOperationByPredicate.java index 9b192f74a084c9bd45a1f6d90d7cd8129fd3edad..e28bdf2b9dc14c23ef5f70bb71957cdda3ecd305 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/ExecuteOperationByPredicate.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/ExecuteOperationByPredicate.java @@ -31,6 +31,7 @@ public class ExecuteOperationByPredicate extends SchedulerEvent { public void execute(final Animation animation, final BControl control) { new Thread(new Runnable() { + @Override public void run() { try { @@ -89,6 +90,7 @@ public class ExecuteOperationByPredicate extends SchedulerEvent { return this.predicateOperation; } + @Override public ExecuteOperationByPredicate clone() throws CloneNotSupportedException { ExecuteOperationByPredicate nse = (ExecuteOperationByPredicate) super diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/ExecuteOperationByPredicateMulti.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/ExecuteOperationByPredicateMulti.java index 4f41cb5b2607551072959f69fc69834caf7913c8..202989fa0e28d02664f90099e86b9a8b066154dc 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/ExecuteOperationByPredicateMulti.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/ExecuteOperationByPredicateMulti.java @@ -63,6 +63,7 @@ public class ExecuteOperationByPredicateMulti extends SchedulerEvent { return operationList; } + @Override public ExecuteOperationByPredicateMulti clone() throws CloneNotSupportedException { ExecuteOperationByPredicateMulti nse = (ExecuteOperationByPredicateMulti) super diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/ObserverCallBackObject.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/ObserverCallBackObject.java index aadd6277b011f5e48aaa71d8624fff674e683746..3c6a97c88f72af69603969b3056bcd848e2db2e3 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/ObserverCallBackObject.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/ObserverCallBackObject.java @@ -43,6 +43,7 @@ public class ObserverCallBackObject extends BindingObject implements Cloneable { firePropertyChange("observerID", oldValue, this.observerID); } + @Override public ObserverCallBackObject clone() throws CloneNotSupportedException { ObserverCallBackObject tmpObj = (ObserverCallBackObject) super.clone(); return tmpObj; diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/PredicateOperation.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/PredicateOperation.java index a8b27599bfeabc3a4fcd8321f972457109ee848f..485d6ed9603d6f30416fd315a3a84fde96755358 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/PredicateOperation.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/PredicateOperation.java @@ -69,6 +69,7 @@ public class PredicateOperation extends ObserverEvalObject implements Cloneable return maxrandom; } + @Override public PredicateOperation clone() throws CloneNotSupportedException { return (PredicateOperation) super.clone(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/SchedulerEvent.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/SchedulerEvent.java index 1b2a5edc0eb94a803f07b58af01125fec7e5d2c5..c7ceff51bad6bb66208811cf9612d4511352085c 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/SchedulerEvent.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/SchedulerEvent.java @@ -83,6 +83,7 @@ public abstract class SchedulerEvent extends AbstractExpressionControl * * @return the cloned scheduler event */ + @Override public SchedulerEvent clone() throws CloneNotSupportedException { return (SchedulerEvent) super.clone(); } diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/SchedulerWizard.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/SchedulerWizard.java index b52aae605165b62520d4d77e8d4306ff3338fdcc..17b9ca79b73b0f8a5be9879417e280e5b3798f59 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/SchedulerWizard.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/SchedulerWizard.java @@ -35,6 +35,7 @@ public abstract class SchedulerWizard extends BMotionAbstractWizard { return this.event; } + @Override protected abstract Boolean prepareToFinish(); @Override diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/wizard/WizardExecuteOperationByPredicate.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/wizard/WizardExecuteOperationByPredicate.java index 2cc81c497dafe9c62763b779f911372fe427626d..c71064f9006373d7bf3ccfdde89d9045dbc050b3 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/wizard/WizardExecuteOperationByPredicate.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/wizard/WizardExecuteOperationByPredicate.java @@ -82,6 +82,7 @@ public class WizardExecuteOperationByPredicate extends SchedulerWizard { super(pageName); } + @Override public void createControl(final Composite parent) { final DataBindingContext dbc = new DataBindingContext(); @@ -198,6 +199,7 @@ public class WizardExecuteOperationByPredicate extends SchedulerWizard { .observe(((ExecuteOperationByPredicate) getScheduler()).getPredicateOperation())); observeSelection.addValueChangeListener(new IValueChangeListener() { + @Override public void handleValueChange(ValueChangeEvent event) { Object sel = event.getObservableValue().getValue(); createRenderedOperationContainer((MachineOperation) sel); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/wizard/WizardExecuteOperationByPredicateMulti.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/wizard/WizardExecuteOperationByPredicateMulti.java index 5afd578451d761bf371cd2cf8da73e51f3db321d..9afe41d574b806257fb97ae274ab92725a66236b 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/wizard/WizardExecuteOperationByPredicateMulti.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/wizard/WizardExecuteOperationByPredicateMulti.java @@ -57,6 +57,7 @@ public class WizardExecuteOperationByPredicateMulti extends SchedulerWizard { super(pageName); } + @Override public void createControl(final Composite parent) { DataBindingContext dbc = new DataBindingContext(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/wizard/WizardExecuteScheduler.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/wizard/WizardExecuteScheduler.java index c0de0d6baab3c7cd6fd452d7ea1844b57b3b7367..6b01d29ce56addb3a2dc592ccf2a4a602d42eeb0 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/wizard/WizardExecuteScheduler.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/scheduler/wizard/WizardExecuteScheduler.java @@ -56,6 +56,7 @@ public class WizardExecuteScheduler extends SchedulerWizard { super(pageName); } + @Override public void createControl(final Composite parent) { DataBindingContext dbc = new DataBindingContext(); diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/util/BMotionWizardUtil.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/util/BMotionWizardUtil.java index d2c74e1d63ab6382e87499403bfcbbe6aa8de9d2..eebeb91b898996995b26ae2d2bf6f024cf9cc2ef 100644 --- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/util/BMotionWizardUtil.java +++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/util/BMotionWizardUtil.java @@ -58,6 +58,7 @@ public class BMotionWizardUtil { manager.add(new BMotionWizardAddItemAction(tableViewer, itemClass)); tableViewer.getTable().addListener(SWT.MouseDown, new Listener() { + @Override public void handleEvent(Event event) { tableViewer.setData("editElement", false); } @@ -65,7 +66,7 @@ public class BMotionWizardUtil { tableViewer.getTable().addListener(SWT.MouseDoubleClick, new Listener() { - + @Override public void handleEvent(Event event) { tableViewer.setData("editElement", true); diff --git a/de.prob.core/src/de/prob/core/ListenerRegistry.java b/de.prob.core/src/de/prob/core/ListenerRegistry.java index 6c547ba1af7f6d18d669bbab9a6c0f8d6d37e6b8..2cebb3e6964b0b3270b61c41b357ef51dbab47c7 100644 --- a/de.prob.core/src/de/prob/core/ListenerRegistry.java +++ b/de.prob.core/src/de/prob/core/ListenerRegistry.java @@ -46,6 +46,7 @@ public class ListenerRegistry implements ILifecycleListener, animationListeners.remove(listener); } + @Override public void reset() { for (final ILifecycleListener listener : lifeCycleListeners) { try { @@ -59,6 +60,7 @@ public class ListenerRegistry implements ILifecycleListener, } } + @Override public void computedState(final State state) { for (final IComputationListener listener : computationListeners) { try { @@ -72,6 +74,7 @@ public class ListenerRegistry implements ILifecycleListener, } } + @Override public void currentStateChanged(final State currentState, final Operation operation) { for (final IAnimationListener listener : animationListeners) { diff --git a/de.prob.core/src/de/prob/core/StaticListenerRegistry.java b/de.prob.core/src/de/prob/core/StaticListenerRegistry.java index cd3ebe87e6785ca5fe2217ed91ccb4287119d37f..7f7329e0917bd4523693faec36e5cd5dd75d170a 100644 --- a/de.prob.core/src/de/prob/core/StaticListenerRegistry.java +++ b/de.prob.core/src/de/prob/core/StaticListenerRegistry.java @@ -51,14 +51,17 @@ public final class StaticListenerRegistry implements ILifecycleListener, registry.unregisterAnimationListener(listener); } + @Override public void reset() { registry.reset(); } + @Override public void computedState(final State state) { registry.computedState(state); } + @Override public void currentStateChanged(final State currentState, final Operation operation) { registry.currentStateChanged(currentState, operation); diff --git a/de.prob.core/src/de/prob/core/command/CheckBooleanPropertyCommand.java b/de.prob.core/src/de/prob/core/command/CheckBooleanPropertyCommand.java index 8756433b07d35e51699f71a2c70fa2f2c25e9afe..ff2700cf808fb52cdd1271bde1d1497d650f14c2 100644 --- a/de.prob.core/src/de/prob/core/command/CheckBooleanPropertyCommand.java +++ b/de.prob.core/src/de/prob/core/command/CheckBooleanPropertyCommand.java @@ -46,6 +46,7 @@ public class CheckBooleanPropertyCommand implements IComposableCommand { // IComposableCommand // + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -70,6 +71,7 @@ public class CheckBooleanPropertyCommand implements IComposableCommand { pto.closeTerm(); } + @Override public void writeCommand(final IPrologTermOutput pto) { writeCommand(pto, propertyName, stateId); } diff --git a/de.prob.core/src/de/prob/core/command/ClearMachineCommand.java b/de.prob.core/src/de/prob/core/command/ClearMachineCommand.java index 74b12d911446d7d72e2616bfa8bec529b9461717..adfb2947a0cd5f037bf58b7fb7220abb2a877357 100644 --- a/de.prob.core/src/de/prob/core/command/ClearMachineCommand.java +++ b/de.prob.core/src/de/prob/core/command/ClearMachineCommand.java @@ -20,10 +20,12 @@ public class ClearMachineCommand implements IComposableCommand { animator.execute(new ClearMachineCommand()); } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException {} + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("clear_loaded_machines").closeTerm(); } diff --git a/de.prob.core/src/de/prob/core/command/ComposedCommand.java b/de.prob.core/src/de/prob/core/command/ComposedCommand.java index 34c98a1f3110dca746719f754ad2fff1b2226726..84036f3239abdcfa54fd6eb7a68f9d2da7945af7 100644 --- a/de.prob.core/src/de/prob/core/command/ComposedCommand.java +++ b/de.prob.core/src/de/prob/core/command/ComposedCommand.java @@ -32,6 +32,7 @@ public class ComposedCommand implements IComposableCommand { this.cmds = cmds.toArray(new IComposableCommand[0]); } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -48,6 +49,7 @@ public class ComposedCommand implements IComposableCommand { cmds[i].processResult(prefixMap); } + @Override public void writeCommand(final IPrologTermOutput orig) throws CommandException { PrologPrefixVarOutput pto = new PrologPrefixVarOutput(orig); @@ -120,6 +122,7 @@ public class ComposedCommand implements IComposableCommand { this.map = map; } + @Override public V get(final String key) { return map.get(prefix == null ? key : prefix + key); } diff --git a/de.prob.core/src/de/prob/core/command/EvaluateRawExpressionsCommand.java b/de.prob.core/src/de/prob/core/command/EvaluateRawExpressionsCommand.java index 34a8ce9231adb3c2b26b7e70093da31ce4b2f92e..97c75b4461bdfae4734189658b3d2597ce42549f 100644 --- a/de.prob.core/src/de/prob/core/command/EvaluateRawExpressionsCommand.java +++ b/de.prob.core/src/de/prob/core/command/EvaluateRawExpressionsCommand.java @@ -43,6 +43,7 @@ public class EvaluateRawExpressionsCommand implements IComposableCommand { return values; } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -51,6 +52,7 @@ public class EvaluateRawExpressionsCommand implements IComposableCommand { values = PrologTerm.atomicStrings(prologTerm); } + @Override public void writeCommand(final IPrologTermOutput pout) { pout.openTerm("evaluate_raw_expressions"); pout.printAtomOrNumber(stateId); diff --git a/de.prob.core/src/de/prob/core/command/EvaluationExpandCommand.java b/de.prob.core/src/de/prob/core/command/EvaluationExpandCommand.java index bd3c6a830479c976b8055c477b9d25996caeb897..76f1735dc1919e19e4775cefd544bb2952c953f3 100644 --- a/de.prob.core/src/de/prob/core/command/EvaluationExpandCommand.java +++ b/de.prob.core/src/de/prob/core/command/EvaluationExpandCommand.java @@ -30,6 +30,7 @@ public class EvaluationExpandCommand implements IComposableCommand { this.evaluationElement = evaluationElement; } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -37,6 +38,7 @@ public class EvaluationExpandCommand implements IComposableCommand { children = (ListPrologTerm) bindings.get(CHILDREN_VARNAME); } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("evaluation_expand_formula"); evaluationElement.toTermOutput(pto); diff --git a/de.prob.core/src/de/prob/core/command/EvaluationGetTopLevelCommand.java b/de.prob.core/src/de/prob/core/command/EvaluationGetTopLevelCommand.java index 091564a467ee4abdb12681ef770bcaa063897a3d..b2c66df46ce8f0049017b5e84b226371d13e03f6 100644 --- a/de.prob.core/src/de/prob/core/command/EvaluationGetTopLevelCommand.java +++ b/de.prob.core/src/de/prob/core/command/EvaluationGetTopLevelCommand.java @@ -41,6 +41,7 @@ public class EvaluationGetTopLevelCommand implements IComposableCommand { this.animator = animator; } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -71,6 +72,7 @@ public class EvaluationGetTopLevelCommand implements IComposableCommand { return top; } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("evaluation_get_top_level"); pto.printVariable(FIRST_EXPANSION_VARNAME); diff --git a/de.prob.core/src/de/prob/core/command/EvaluationGetValuesCommand.java b/de.prob.core/src/de/prob/core/command/EvaluationGetValuesCommand.java index 70a97a1b096b72874f8425d0192a982b7b923128..cdb11a4514b7bbcb54360bceba3938e61c750127 100644 --- a/de.prob.core/src/de/prob/core/command/EvaluationGetValuesCommand.java +++ b/de.prob.core/src/de/prob/core/command/EvaluationGetValuesCommand.java @@ -155,6 +155,7 @@ public class EvaluationGetValuesCommand implements IComposableCommand { this.elements = new ArrayList<EvaluationElement>(elements); } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -209,6 +210,7 @@ public class EvaluationGetValuesCommand implements IComposableCommand { return results; } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm(COMMAND_NAME); pto.openList(); diff --git a/de.prob.core/src/de/prob/core/command/EvaluationInsertFormulaCommand.java b/de.prob.core/src/de/prob/core/command/EvaluationInsertFormulaCommand.java index e9f12dd56a36272914e6af6c96c62e01061e339b..eab39c516f97785568d530f1b70ceab1c5271905 100644 --- a/de.prob.core/src/de/prob/core/command/EvaluationInsertFormulaCommand.java +++ b/de.prob.core/src/de/prob/core/command/EvaluationInsertFormulaCommand.java @@ -90,12 +90,14 @@ public class EvaluationInsertFormulaCommand implements IComposableCommand { this.rawExpression = rawExpression; } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { id = bindings.get(VARNAME_ID); } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("evaluation_insert_formula"); rawExpression.toTermOutput(pto); diff --git a/de.prob.core/src/de/prob/core/command/ExecuteOperationCommand.java b/de.prob.core/src/de/prob/core/command/ExecuteOperationCommand.java index 9e225706dcdcaa4dfe01318944bd63c0f1637717..1627f7cb624035c851ff37bb7d95b6a17c744f07 100644 --- a/de.prob.core/src/de/prob/core/command/ExecuteOperationCommand.java +++ b/de.prob.core/src/de/prob/core/command/ExecuteOperationCommand.java @@ -58,6 +58,7 @@ public final class ExecuteOperationCommand implements IComposableCommand { a.execute(executeOperationCommand); } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -73,6 +74,7 @@ public final class ExecuteOperationCommand implements IComposableCommand { } } + @Override public void writeCommand(final IPrologTermOutput pto) throws CommandException { LimitedLogger.getLogger().log("execute operation", operation.getName(), null); diff --git a/de.prob.core/src/de/prob/core/command/GetCurrentStateIdCommand.java b/de.prob.core/src/de/prob/core/command/GetCurrentStateIdCommand.java index fde2247dae1677df84d912201425d5517ae07c17..0b99c6113a9495911bcf7da7af6380530e72cd74 100644 --- a/de.prob.core/src/de/prob/core/command/GetCurrentStateIdCommand.java +++ b/de.prob.core/src/de/prob/core/command/GetCurrentStateIdCommand.java @@ -51,12 +51,14 @@ public final class GetCurrentStateIdCommand implements IComposableCommand { return currentID; } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { currentID = getStateID(bindings.get("ID")); } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("getCurrentStateID").printVariable("ID").closeTerm(); } diff --git a/de.prob.core/src/de/prob/core/command/GetEnabledOperationsCommand.java b/de.prob.core/src/de/prob/core/command/GetEnabledOperationsCommand.java index dd0f7283115224e4f5bad92408d58d06a80469aa..d77a7d196228feed7c366c31f75037aa43175e68 100644 --- a/de.prob.core/src/de/prob/core/command/GetEnabledOperationsCommand.java +++ b/de.prob.core/src/de/prob/core/command/GetEnabledOperationsCommand.java @@ -40,6 +40,7 @@ public final class GetEnabledOperationsCommand implements IComposableCommand { // IComposableCommand // + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) { enabledOperations = new ArrayList<Operation>(); @@ -52,6 +53,7 @@ public final class GetEnabledOperationsCommand implements IComposableCommand { } } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("computeOperationsForState"); pto.printAtomOrNumber(id); diff --git a/de.prob.core/src/de/prob/core/command/GetFullTraceCommand.java b/de.prob.core/src/de/prob/core/command/GetFullTraceCommand.java index 0d78d2c895ac6f9c87b4303b3635a9e2db44dc92..30bc164536dd645501695068a77ed6c435dfd0cd 100644 --- a/de.prob.core/src/de/prob/core/command/GetFullTraceCommand.java +++ b/de.prob.core/src/de/prob/core/command/GetFullTraceCommand.java @@ -58,6 +58,7 @@ public final class GetFullTraceCommand implements IComposableCommand { return trace; } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -68,6 +69,7 @@ public final class GetFullTraceCommand implements IComposableCommand { trace = new TraceResult(operations, states); } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("find_shortest_trace_to_current_state2"); pto.printVariable(ACTIONS_VARIABLE); diff --git a/de.prob.core/src/de/prob/core/command/GetMachineObjectsCommand.java b/de.prob.core/src/de/prob/core/command/GetMachineObjectsCommand.java index 13ae047c452038dafc98f2a413f0e460a08b7557..f4256deb158e94124965e0141bee58d5eab769d5 100644 --- a/de.prob.core/src/de/prob/core/command/GetMachineObjectsCommand.java +++ b/de.prob.core/src/de/prob/core/command/GetMachineObjectsCommand.java @@ -124,6 +124,7 @@ public class GetMachineObjectsCommand implements IComposableCommand { return term; } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -139,6 +140,7 @@ public class GetMachineObjectsCommand implements IComposableCommand { constants, variables, operations); } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("get_machine_objects").printVariable("Sections") .printVariable("SetElements").printVariable("Constants") diff --git a/de.prob.core/src/de/prob/core/command/GetOperationByPredicateCommand.java b/de.prob.core/src/de/prob/core/command/GetOperationByPredicateCommand.java index 62d7767af6297c27d88a434da524878cd9c332b2..733f76ff44086e6dfd1bedf59fec90e351341542 100644 --- a/de.prob.core/src/de/prob/core/command/GetOperationByPredicateCommand.java +++ b/de.prob.core/src/de/prob/core/command/GetOperationByPredicateCommand.java @@ -115,6 +115,7 @@ public final class GetOperationByPredicateCommand implements IComposableCommand * * @see de.prob.core.command.IComposableCommand#writeCommand(de.prob.prolog.output.IPrologTermOutput) */ + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("execute_custom_operations").printAtomOrNumber(stateId) .printAtom(name); @@ -132,6 +133,7 @@ public final class GetOperationByPredicateCommand implements IComposableCommand * * @see de.prob.core.command.IComposableCommand#writeCommand(de.prob.prolog.output.IPrologTermOutput) */ + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { diff --git a/de.prob.core/src/de/prob/core/command/GetPreferencesCommand.java b/de.prob.core/src/de/prob/core/command/GetPreferencesCommand.java index bdf9a11a46f17eeb16fa347954df49b987b8f760..bc0b4f6e591143892c6fd38abdbbf3fbd2b8a30c 100644 --- a/de.prob.core/src/de/prob/core/command/GetPreferencesCommand.java +++ b/de.prob.core/src/de/prob/core/command/GetPreferencesCommand.java @@ -54,6 +54,7 @@ public final class GetPreferencesCommand implements IComposableCommand { return new ProBPreference(compoundTerm); } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -66,6 +67,7 @@ public final class GetPreferencesCommand implements IComposableCommand { } } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("list_eclipse_preferences").printVariable(PREFS_VARIABLE) .closeTerm(); diff --git a/de.prob.core/src/de/prob/core/command/GetStateBasedErrorsCommand.java b/de.prob.core/src/de/prob/core/command/GetStateBasedErrorsCommand.java index fb16e1ccd954d52f6960df1ce64fde90085b5006..02c5e68609401451a81386ab6a906bf9379875b4 100644 --- a/de.prob.core/src/de/prob/core/command/GetStateBasedErrorsCommand.java +++ b/de.prob.core/src/de/prob/core/command/GetStateBasedErrorsCommand.java @@ -44,6 +44,7 @@ public class GetStateBasedErrorsCommand implements IComposableCommand { // ComposableCommand // + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -79,6 +80,7 @@ public class GetStateBasedErrorsCommand implements IComposableCommand { this.stateErrors = errors; } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("get_state_errors").printAtomOrNumber(stateId) .printVariable("Errors").closeTerm(); diff --git a/de.prob.core/src/de/prob/core/command/GetStateValuesCommand.java b/de.prob.core/src/de/prob/core/command/GetStateValuesCommand.java index 22d58e9ac9298a74e1853909dec0bbe4aeaec4f1..24b8c9f43cadd10acb3506d13aa40668cb65dd70 100644 --- a/de.prob.core/src/de/prob/core/command/GetStateValuesCommand.java +++ b/de.prob.core/src/de/prob/core/command/GetStateValuesCommand.java @@ -31,6 +31,7 @@ public final class GetStateValuesCommand implements IComposableCommand { return result; } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -62,6 +63,7 @@ public final class GetStateValuesCommand implements IComposableCommand { result = variables; } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("getStateValues").printAtomOrNumber(stateId) .printVariable("Bindings").closeTerm(); diff --git a/de.prob.core/src/de/prob/core/command/GetTimeoutedOperationsCommand.java b/de.prob.core/src/de/prob/core/command/GetTimeoutedOperationsCommand.java index ec4030b68e4b7706d5baaecb5aa4ab27fe65d4a5..0e05b145507d348f54c0200875d1fffc5c9a94a5 100644 --- a/de.prob.core/src/de/prob/core/command/GetTimeoutedOperationsCommand.java +++ b/de.prob.core/src/de/prob/core/command/GetTimeoutedOperationsCommand.java @@ -18,6 +18,7 @@ public class GetTimeoutedOperationsCommand implements IComposableCommand { this.state = state; } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -32,6 +33,7 @@ public class GetTimeoutedOperationsCommand implements IComposableCommand { } } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("op_timeout_occurred").printAtomOrNumber(state) .printVariable(TIMEOUT_VARIABLE).closeTerm(); diff --git a/de.prob.core/src/de/prob/core/command/GetTraceCommand.java b/de.prob.core/src/de/prob/core/command/GetTraceCommand.java index ad61e041189c519c1e334011ebd0a249beee06ee..af1ad822cf679a9b9658b0bfed3c3c6c0100f240 100644 --- a/de.prob.core/src/de/prob/core/command/GetTraceCommand.java +++ b/de.prob.core/src/de/prob/core/command/GetTraceCommand.java @@ -57,6 +57,7 @@ public final class GetTraceCommand implements IComposableCommand { return trace; } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -82,6 +83,7 @@ public final class GetTraceCommand implements IComposableCommand { this.trace = actions; } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("find_shortest_trace_to_current_state") .printVariable(TRACE_VARIABLE).closeTerm(); diff --git a/de.prob.core/src/de/prob/core/command/SetPreferenceCommand.java b/de.prob.core/src/de/prob/core/command/SetPreferenceCommand.java index fa5103f927f2ab0385ff5fc14da09b5b66c001f9..828febcd6c6253f58ca8acae70284c7d3c910c0c 100644 --- a/de.prob.core/src/de/prob/core/command/SetPreferenceCommand.java +++ b/de.prob.core/src/de/prob/core/command/SetPreferenceCommand.java @@ -28,12 +28,14 @@ public final class SetPreferenceCommand implements IComposableCommand { a.execute(command); } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { // no result } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("set_eclipse_preference").printAtom(key).printAtom(value) .closeTerm(); diff --git a/de.prob.core/src/de/prob/core/command/SetPreferencesCommand.java b/de.prob.core/src/de/prob/core/command/SetPreferencesCommand.java index 7ff9ee72ce72efada8127ea8fffee23b6f8a7d60..ebd43bfd54a23f75ddf8ca465824dd7d35633f15 100644 --- a/de.prob.core/src/de/prob/core/command/SetPreferencesCommand.java +++ b/de.prob.core/src/de/prob/core/command/SetPreferencesCommand.java @@ -85,12 +85,14 @@ public final class SetPreferencesCommand implements IComposableCommand { return !INVALID_PROPERTIES.contains(key); } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { cmds.processResult(bindings); } + @Override public void writeCommand(final IPrologTermOutput pto) throws CommandException { cmds.writeCommand(pto); } diff --git a/de.prob.core/src/de/prob/core/command/SetStateCommand.java b/de.prob.core/src/de/prob/core/command/SetStateCommand.java index 0f4bb4115ffa2761bc54d26a54d10a7d04cc95e9..2116c98bbf3ac6aaf44592864ed444fc87707258 100644 --- a/de.prob.core/src/de/prob/core/command/SetStateCommand.java +++ b/de.prob.core/src/de/prob/core/command/SetStateCommand.java @@ -25,12 +25,14 @@ public final class SetStateCommand implements IComposableCommand { a.execute(command); } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { // no results, do nothing } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("setCurrentState").printAtomOrNumber(stateId).closeTerm(); } diff --git a/de.prob.core/src/de/prob/core/command/StartAnimationCommand.java b/de.prob.core/src/de/prob/core/command/StartAnimationCommand.java index b6eb46cafc7656f0a374ca01be2e99239270be07..901350f15dbae0014b7089cf633424bd1edd3b6e 100644 --- a/de.prob.core/src/de/prob/core/command/StartAnimationCommand.java +++ b/de.prob.core/src/de/prob/core/command/StartAnimationCommand.java @@ -13,12 +13,14 @@ public class StartAnimationCommand implements IComposableCommand { a.execute(cmd); } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { // nothing to do } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.printAtom("start_animation"); } diff --git a/de.prob.core/src/de/prob/core/command/internal/GetAllOperationsNamesCommand.java b/de.prob.core/src/de/prob/core/command/internal/GetAllOperationsNamesCommand.java index 145d2875ddd7fae8b816aa649a45b809ab6d9c40..9fd519b60a4e9ed5c4e2f5393dd0721f437a13e0 100644 --- a/de.prob.core/src/de/prob/core/command/internal/GetAllOperationsNamesCommand.java +++ b/de.prob.core/src/de/prob/core/command/internal/GetAllOperationsNamesCommand.java @@ -16,12 +16,14 @@ public class GetAllOperationsNamesCommand implements IComposableCommand { return term; } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { term = (ListPrologTerm) bindings.get(NAMES_VARIABLE); } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("getAllOperations").printVariable(NAMES_VARIABLE) .closeTerm(); diff --git a/de.prob.core/src/de/prob/core/command/internal/GetOperationParameterNames.java b/de.prob.core/src/de/prob/core/command/internal/GetOperationParameterNames.java index 2abbb0773eed69dfd513827dc16d1152d1d44175..3cdf30b39a8c569a83a44395fb3894c6f559e294 100644 --- a/de.prob.core/src/de/prob/core/command/internal/GetOperationParameterNames.java +++ b/de.prob.core/src/de/prob/core/command/internal/GetOperationParameterNames.java @@ -19,6 +19,7 @@ public class GetOperationParameterNames implements IComposableCommand { this.name = name; } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -26,6 +27,7 @@ public class GetOperationParameterNames implements IComposableCommand { .get(PARAMETER_NAMES_VARIABLE)); } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("getOperationParameterNames"); pto.printAtom(name); diff --git a/de.prob.core/src/de/prob/core/domainobjects/History.java b/de.prob.core/src/de/prob/core/domainobjects/History.java index fffda952c890e4f4433fa9a28fc4770077e19b15..ccec0d47296fec062d3d21e4c247028108501dbe 100644 --- a/de.prob.core/src/de/prob/core/domainobjects/History.java +++ b/de.prob.core/src/de/prob/core/domainobjects/History.java @@ -38,6 +38,7 @@ public class History implements Iterable<HistoryItem>, IComputationListener { * @ */ + @Override public synchronized/* @ pure @ */Iterator<HistoryItem> iterator() { return Collections.unmodifiableList(items).iterator(); } @@ -187,6 +188,7 @@ public class History implements Iterable<HistoryItem>, IComputationListener { return currentPosition; } + @Override public void computedState(final State state) { if (isEmpty()) { add(state, null); diff --git a/de.prob.core/src/de/prob/core/domainobjects/HistoryBasedCache.java b/de.prob.core/src/de/prob/core/domainobjects/HistoryBasedCache.java index 7e5e4d66bd8ae2adb153617af3b5c0c1cf0742df..9254141998c020f23f762ac7a9445b46ca108fa8 100644 --- a/de.prob.core/src/de/prob/core/domainobjects/HistoryBasedCache.java +++ b/de.prob.core/src/de/prob/core/domainobjects/HistoryBasedCache.java @@ -24,11 +24,13 @@ public class HistoryBasedCache<T> implements HistoryListener { } } + @Override public void stateEntersHistory(final State state, final int position) { final Integer counter = stateCounter.get(state); stateCounter.put(state, counter == null ? 1 : counter + 1); } + @Override public void stateLeavesHistory(final State state, final int position) { final Integer counter = stateCounter.get(state); if (counter != null) { diff --git a/de.prob.core/src/de/prob/core/internal/AnimationListenerProxy.java b/de.prob.core/src/de/prob/core/internal/AnimationListenerProxy.java index 341150b1a7464b663cfff382b75301728a9b763a..f0a9e4d10882ae6eab33180a767586b444458679 100644 --- a/de.prob.core/src/de/prob/core/internal/AnimationListenerProxy.java +++ b/de.prob.core/src/de/prob/core/internal/AnimationListenerProxy.java @@ -23,6 +23,7 @@ public class AnimationListenerProxy implements IAnimationListener { this.config = config; } + @Override public void currentStateChanged(final State currentState, final Operation operation) { if (instance == null) { diff --git a/de.prob.core/src/de/prob/core/internal/ComputationListenerProxy.java b/de.prob.core/src/de/prob/core/internal/ComputationListenerProxy.java index 41ce640df888d7ddcc55b52b9146b2146d4a6573..977ffd847fa0b2eb72977f64b4017a7758b70991 100644 --- a/de.prob.core/src/de/prob/core/internal/ComputationListenerProxy.java +++ b/de.prob.core/src/de/prob/core/internal/ComputationListenerProxy.java @@ -22,6 +22,7 @@ public class ComputationListenerProxy implements IComputationListener { this.config = config; } + @Override public void computedState(final State state) { if (instance == null) { instance = init(); diff --git a/de.prob.core/src/de/prob/core/internal/LifeCycleListenerProxy.java b/de.prob.core/src/de/prob/core/internal/LifeCycleListenerProxy.java index bdc8753fc4fcde9f113c2bf544ba8bec9c491169..bef078e3ce8d2b6afe335c060d9a3e5d72d6cd44 100644 --- a/de.prob.core/src/de/prob/core/internal/LifeCycleListenerProxy.java +++ b/de.prob.core/src/de/prob/core/internal/LifeCycleListenerProxy.java @@ -21,6 +21,7 @@ public class LifeCycleListenerProxy implements ILifecycleListener { this.config = config; } + @Override public void reset() { if (instance == null) { instance = init(); diff --git a/de.prob.core/src/de/prob/core/langdep/EventBAnimatorPart.java b/de.prob.core/src/de/prob/core/langdep/EventBAnimatorPart.java index ce5c43bbe88897436291d44ce685366271618d06..019e2678ab4281f3fdbc8ccb7e5229a74dbe3db8 100644 --- a/de.prob.core/src/de/prob/core/langdep/EventBAnimatorPart.java +++ b/de.prob.core/src/de/prob/core/langdep/EventBAnimatorPart.java @@ -60,6 +60,7 @@ public class EventBAnimatorPart implements LanguageDependendAnimationPart { this.root = root; } + @Override public void parseExpression(final IPrologTermOutput pto, final String expression1, final boolean wrap) throws ProBParseException { @@ -75,6 +76,7 @@ public class EventBAnimatorPart implements LanguageDependendAnimationPart { toPrologTerm(pto, expr, wrap, EXPR_WRAPPER); } + @Override public void parsePredicate(final IPrologTermOutput pto, final String predicate1, final boolean wrap) throws ProBParseException { @@ -150,10 +152,12 @@ public class EventBAnimatorPart implements LanguageDependendAnimationPart { throw new ProBParseException(parseResult.getProblems().toString()); } + @Override public void reload(final Animator animator) throws ProBException { LoadEventBModelCommand.load(animator, root); } + @Override public void parseTransitionPredicate(final IPrologTermOutput pto, final String transPredicate, final boolean wrap) throws ProBParseException, UnsupportedOperationException { diff --git a/de.prob.core/src/de/prob/core/prolog/TypedIdentifierGenerator.java b/de.prob.core/src/de/prob/core/prolog/TypedIdentifierGenerator.java index 98d0c6184a08d70d67c88e175d76e036d6a7a927..a446c7731ca1186d18cf93bb47f296618a430b55 100644 --- a/de.prob.core/src/de/prob/core/prolog/TypedIdentifierGenerator.java +++ b/de.prob.core/src/de/prob/core/prolog/TypedIdentifierGenerator.java @@ -163,6 +163,7 @@ public class TypedIdentifierGenerator { this.type = type; } + @Override public ProbDataType handle(final CompoundPrologTerm term) { return type; } @@ -170,24 +171,28 @@ public class TypedIdentifierGenerator { } private static class SetHandler implements Handler { + @Override public ProbDataType handle(final CompoundPrologTerm term) { return new SetProbType(extractType(term.getArgument(1))); } } private static class SeqHandler implements Handler { + @Override public ProbDataType handle(final CompoundPrologTerm term) { return new SequenceDataType(extractType(term.getArgument(1))); } } private static class GivenSetHandler implements Handler { + @Override public ProbDataType handle(final CompoundPrologTerm term) { return new GivenSetProbType(getString(term.getArgument(1))); } } private static class CoupleHandler implements Handler { + @Override public ProbDataType handle(final CompoundPrologTerm term) { return new CoupleProbType(extractType(term.getArgument(1)), extractType(term.getArgument(2))); @@ -195,6 +200,7 @@ public class TypedIdentifierGenerator { } private static class OperationHandler implements Handler { + @Override public ProbDataType handle(final CompoundPrologTerm term) { ProbDataType[] results = createList(term.getArgument(1)); ProbDataType[] params = createList(term.getArgument(2)); @@ -203,12 +209,14 @@ public class TypedIdentifierGenerator { } private static class FreetypeHandler implements Handler { + @Override public ProbDataType handle(final CompoundPrologTerm term) { return new FreetypeProbType(getString(term.getArgument(1))); } } private static class RecordHandler implements Handler { + @Override public ProbDataType handle(final CompoundPrologTerm term) { if (term.getArgument(1) instanceof ListPrologTerm) { ListPrologTerm list = (ListPrologTerm) term.getArgument(1); diff --git a/de.prob.core/src/de/prob/core/types/BaseProbType.java b/de.prob.core/src/de/prob/core/types/BaseProbType.java index 22448a168798d1533fd9419aa9d97a7a561882e3..d88eeffb3b3210a2d364b8bbdc5030fbb856a1dc 100644 --- a/de.prob.core/src/de/prob/core/types/BaseProbType.java +++ b/de.prob.core/src/de/prob/core/types/BaseProbType.java @@ -30,10 +30,12 @@ public class BaseProbType extends ProbDataType { this.type = type; } + @Override public int getOperatorPriority() { return 1000; } + @Override public void prettyprint(final StringBuilder builder) { builder.append(type); } diff --git a/de.prob.core/src/de/prob/core/types/CoupleProbType.java b/de.prob.core/src/de/prob/core/types/CoupleProbType.java index 0f41568ba222cf655ce6992db1b9fa02ea7381ba..6c8d6f6df60f72632a625b2d46dc1fc4be6f8183 100644 --- a/de.prob.core/src/de/prob/core/types/CoupleProbType.java +++ b/de.prob.core/src/de/prob/core/types/CoupleProbType.java @@ -27,10 +27,12 @@ public class CoupleProbType extends ProbDataType { this.right = right; } + @Override public int getOperatorPriority() { return 190; } + @Override public void prettyprint(final StringBuilder builder) { printWithParenthesis(builder, left, getOperatorPriority()); builder.append('*'); diff --git a/de.prob.core/src/de/prob/core/types/FreetypeProbType.java b/de.prob.core/src/de/prob/core/types/FreetypeProbType.java index fe2d3d008e8c1f371da05c504fd120df1a83997f..3a039e2ce527ccb911f77caa2dc85a4a2d3a2445 100644 --- a/de.prob.core/src/de/prob/core/types/FreetypeProbType.java +++ b/de.prob.core/src/de/prob/core/types/FreetypeProbType.java @@ -26,10 +26,12 @@ public class FreetypeProbType extends ProbDataType { this.identifier = identifier; } + @Override public int getOperatorPriority() { return 500; } + @Override public void prettyprint(final StringBuilder builder) { // builder.append("freetype("); builder.append(identifier); diff --git a/de.prob.core/src/de/prob/core/types/GivenSetProbType.java b/de.prob.core/src/de/prob/core/types/GivenSetProbType.java index cf8aefc445e51bf7d39b54fc52a693e7d8b65c12..c680cbc4c89752ffebc94a3e5ff6b2c4af8cc787 100644 --- a/de.prob.core/src/de/prob/core/types/GivenSetProbType.java +++ b/de.prob.core/src/de/prob/core/types/GivenSetProbType.java @@ -23,10 +23,12 @@ public class GivenSetProbType extends ProbDataType { this.name = name; } + @Override public int getOperatorPriority() { return 1000; } + @Override public void prettyprint(final StringBuilder builder) { builder.append(name); } diff --git a/de.prob.core/src/de/prob/core/types/OperationProbType.java b/de.prob.core/src/de/prob/core/types/OperationProbType.java index cdb6e7653ffeecf1684f7868784df28acce9a668..b5150f492609576164d4c92b0fd0910f5d210b7a 100644 --- a/de.prob.core/src/de/prob/core/types/OperationProbType.java +++ b/de.prob.core/src/de/prob/core/types/OperationProbType.java @@ -44,10 +44,12 @@ public class OperationProbType extends ProbDataType { } } + @Override public int getOperatorPriority() { return results.length == 0 ? 500 : 150; } + @Override public void prettyprint(final StringBuilder builder) { if (results.length > 0) { printTypeList(builder, results); diff --git a/de.prob.core/src/de/prob/core/types/RecordProbType.java b/de.prob.core/src/de/prob/core/types/RecordProbType.java index 86357b70e901d0285eed1167a58b8e4bc4c419d8..922e82b6e6aac6980909cd912beaaeab9da76689 100644 --- a/de.prob.core/src/de/prob/core/types/RecordProbType.java +++ b/de.prob.core/src/de/prob/core/types/RecordProbType.java @@ -43,10 +43,12 @@ public class RecordProbType extends ProbDataType { throw new IllegalStateException("no null field found"); } + @Override public int getOperatorPriority() { return 500; } + @Override public void prettyprint(final StringBuilder builder) { builder.append("struct("); boolean first = true; diff --git a/de.prob.core/src/de/prob/core/types/SetLikeProbType.java b/de.prob.core/src/de/prob/core/types/SetLikeProbType.java index a45063c770efc577502725bdeb6f28a6441a4a7b..96e2bc65e5184f19aee7ee8be4bd1397f34baca3 100644 --- a/de.prob.core/src/de/prob/core/types/SetLikeProbType.java +++ b/de.prob.core/src/de/prob/core/types/SetLikeProbType.java @@ -28,10 +28,12 @@ public abstract class SetLikeProbType extends ProbDataType { this.innerType = innerType; } + @Override public int getOperatorPriority() { return 500; } + @Override public void prettyprint(final StringBuilder builder) { builder.append(variant); builder.append('('); diff --git a/de.prob.core/src/de/prob/eventb/translator/flow/EventTuple.java b/de.prob.core/src/de/prob/eventb/translator/flow/EventTuple.java index 23027566328017cdfa8fa6a89c1c1d78e09895a6..9e9eecfa4fc3a4642b452ef2be27d53177709d5c 100644 --- a/de.prob.core/src/de/prob/eventb/translator/flow/EventTuple.java +++ b/de.prob.core/src/de/prob/eventb/translator/flow/EventTuple.java @@ -23,6 +23,7 @@ public class EventTuple implements Comparable<EventTuple> { return "(" + first.toString() + "," + second.toString() + ")"; } + @Override public int compareTo(final EventTuple o) { return this.toString().compareTo(o.toString()); } diff --git a/de.prob.core/src/de/prob/eventb/translator/internal/LabelPositionPrinter.java b/de.prob.core/src/de/prob/eventb/translator/internal/LabelPositionPrinter.java index 0fd5ac40ff00f0c6d0868712f06cfccc79039a3e..f648960b4dfae0a1b617787c2d1a4b4d4ac223b7 100644 --- a/de.prob.core/src/de/prob/eventb/translator/internal/LabelPositionPrinter.java +++ b/de.prob.core/src/de/prob/eventb/translator/internal/LabelPositionPrinter.java @@ -78,6 +78,7 @@ public class LabelPositionPrinter implements PositionPrinter { } } + @Override public void printPosition(final Node node) { final NodeInfo info = nodeInfos.get(node); if (info == null) { @@ -103,6 +104,7 @@ public class LabelPositionPrinter implements PositionPrinter { } } + @Override public void setPrologTermOutput(final IPrologTermOutput pout) { this.pout = pout; } diff --git a/de.prob.core/src/de/prob/sap/commands/FindTestPathCommand.java b/de.prob.core/src/de/prob/sap/commands/FindTestPathCommand.java index c6ddc772953bbe65a18c35be465c8c549c5b5acf..61118c000fa35bb76fc45c0a45f176bd0082bbd2 100644 --- a/de.prob.core/src/de/prob/sap/commands/FindTestPathCommand.java +++ b/de.prob.core/src/de/prob/sap/commands/FindTestPathCommand.java @@ -70,6 +70,7 @@ public class FindTestPathCommand implements IComposableCommand { this(events, endPredicate, 0); } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -104,6 +105,7 @@ public class FindTestPathCommand implements IComposableCommand { this.trace = trace; } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm(COMMAND); pto.openList(); diff --git a/de.prob.core/src/de/prob/sap/commands/GenerateLocalTestcasesCommand.java b/de.prob.core/src/de/prob/sap/commands/GenerateLocalTestcasesCommand.java index e1c43110ac4e67f75d4f3a167b351bba08ad1e1e..e2bf8779c4e8f4ed871804d6b9f50ef2ee607ca2 100644 --- a/de.prob.core/src/de/prob/sap/commands/GenerateLocalTestcasesCommand.java +++ b/de.prob.core/src/de/prob/sap/commands/GenerateLocalTestcasesCommand.java @@ -38,6 +38,7 @@ public class GenerateLocalTestcasesCommand implements IComposableCommand { return command.result; } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -47,6 +48,7 @@ public class GenerateLocalTestcasesCommand implements IComposableCommand { } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("sap_generate_testcases").printAtom(global) .printAtom(local).printNumber(maxNodes).printVariable("SAT") diff --git a/de.prob.core/src/de/prob/sap/commands/GenerateTestcaseCommand.java b/de.prob.core/src/de/prob/sap/commands/GenerateTestcaseCommand.java index 5cfa51cedb7abb4c4c114254d459880e73eb597b..a439ccdfe8314d945b4abc810d51437e4182f06a 100644 --- a/de.prob.core/src/de/prob/sap/commands/GenerateTestcaseCommand.java +++ b/de.prob.core/src/de/prob/sap/commands/GenerateTestcaseCommand.java @@ -130,6 +130,7 @@ public class GenerateTestcaseCommand implements IComposableCommand { return predicate; } + @Override public void processResult( final ISimplifiedROMap<String, PrologTerm> bindings) throws CommandException { @@ -148,6 +149,7 @@ public class GenerateTestcaseCommand implements IComposableCommand { result = new GlobalTestcaseResult(numberOfTests, uncovered); } + @Override public void writeCommand(final IPrologTermOutput pto) { pto.openTerm("sap_generate_testcases"); diff --git a/de.prob.eventb.disprover.core/src/de/prob/eventb/disprover/core/internal/CounterExample.java b/de.prob.eventb.disprover.core/src/de/prob/eventb/disprover/core/internal/CounterExample.java index 56a4e0232f6459046bec5570324a6e47d0f187cd..6bb13e1c4bdcb217ec668bd73edf72d37f51a5d8 100644 --- a/de.prob.eventb.disprover.core/src/de/prob/eventb/disprover/core/internal/CounterExample.java +++ b/de.prob.eventb.disprover.core/src/de/prob/eventb/disprover/core/internal/CounterExample.java @@ -88,6 +88,7 @@ class CounterExample implements ICounterExample { doubleCheckFailed = b; } + @Override public boolean doubleCheckFailed() { return doubleCheckFailed; } diff --git a/de.prob.ui/src/de/prob/ui/LimitedLogView.java b/de.prob.ui/src/de/prob/ui/LimitedLogView.java index 5fc2a21070483137ed329453c6e6a59f37b822eb..9667efa76d937b183cc6d6f51ffe6483460af77c 100644 --- a/de.prob.ui/src/de/prob/ui/LimitedLogView.java +++ b/de.prob.ui/src/de/prob/ui/LimitedLogView.java @@ -80,6 +80,7 @@ public class LimitedLogView extends ViewPart implements logger = null; } + @Override public void newLoggingInfo() { if (viewer != null) { updateLoggingStart(); @@ -95,6 +96,7 @@ public class LimitedLogView extends ViewPart implements private void asyncRefresh() { Display.getDefault().asyncExec(new Runnable() { + @Override public void run() { viewer.refresh(); } @@ -103,7 +105,7 @@ public class LimitedLogView extends ViewPart implements private static class LogContentProvider implements IStructuredContentProvider { - + @Override public Object[] getElements(Object object) { if (object != null && object instanceof LimitedLogger) { LimitedLogger logger = (LimitedLogger) object; @@ -113,14 +115,17 @@ public class LimitedLogView extends ViewPart implements } } + @Override public void dispose() { } + @Override public void inputChanged(Viewer viewer, Object arg1, Object arg2) { } } private class LogViewerDoubleClick implements IDoubleClickListener { + @Override public void doubleClick(DoubleClickEvent event) { ISelection selection = event.getSelection(); if (selection != null && !selection.isEmpty()) { @@ -134,11 +139,12 @@ public class LimitedLogView extends ViewPart implements private class LogLabelProvider extends LabelProvider implements ITableLabelProvider { - + @Override public Image getColumnImage(Object object, int column) { return null; } + @Override public String getColumnText(Object object, int column) { final String result; if (object != null && object instanceof LogEntry) { diff --git a/de.prob.ui/src/de/prob/ui/ProBGeneralPreferences.java b/de.prob.ui/src/de/prob/ui/ProBGeneralPreferences.java index 7562adf19fc3539f594b4172733fc5d76d93e606..f431178e7fe4344ec9b1148b8bb51600af4fcf79 100644 --- a/de.prob.ui/src/de/prob/ui/ProBGeneralPreferences.java +++ b/de.prob.ui/src/de/prob/ui/ProBGeneralPreferences.java @@ -116,6 +116,7 @@ public class ProBGeneralPreferences extends FieldEditorPreferencePage implements } } + @Override public void init(final IWorkbench workbench) { } diff --git a/de.prob.ui/src/de/prob/ui/StaticListenerRegistry.java b/de.prob.ui/src/de/prob/ui/StaticListenerRegistry.java index aff5a162479650725c76f09d7157305d2f3601c5..ca25b9ba80c8123bd1fd38bbadeaf8c24004e12f 100644 --- a/de.prob.ui/src/de/prob/ui/StaticListenerRegistry.java +++ b/de.prob.ui/src/de/prob/ui/StaticListenerRegistry.java @@ -42,14 +42,17 @@ public class StaticListenerRegistry implements ILifecycleListener, registry.unregisterAnimationListener(listener); } + @Override public void reset() { registry.reset(); } + @Override public void computedState(final State state) { registry.computedState(state); } + @Override public void currentStateChanged(final State currentState, final Operation operation) { registry.currentStateChanged(currentState, operation); diff --git a/de.prob.ui/src/de/prob/ui/errorview/ErrorContentProvider.java b/de.prob.ui/src/de/prob/ui/errorview/ErrorContentProvider.java index 566a09c7c4ed7df00fb371c6371f8d7448956bc4..ab9c29c1210fc61532a3eb294fc0f89ba51b6da4 100644 --- a/de.prob.ui/src/de/prob/ui/errorview/ErrorContentProvider.java +++ b/de.prob.ui/src/de/prob/ui/errorview/ErrorContentProvider.java @@ -14,7 +14,7 @@ import de.prob.ui.errorview.ShownErrors.ShownStateError; * */ public class ErrorContentProvider implements ITreeContentProvider { - + @Override public Object[] getChildren(Object parent) { ShownStateError[] errors; if (parent != null && parent instanceof ErrorEvent) { @@ -27,6 +27,7 @@ public class ErrorContentProvider implements ITreeContentProvider { return errors; } + @Override public Object getParent(Object arg) { if (arg != null) { if (arg instanceof ShownStateError) { @@ -39,11 +40,13 @@ public class ErrorContentProvider implements ITreeContentProvider { return null; } + @Override public boolean hasChildren(Object parent) { // empty nodes are not even created return parent != null && parent instanceof ErrorEvent; } + @Override public Object[] getElements(Object object) { ErrorEvent[] events; if (object != null && object instanceof ShownErrors) { @@ -55,9 +58,11 @@ public class ErrorContentProvider implements ITreeContentProvider { return events; } + @Override public void dispose() { } + @Override public void inputChanged(Viewer arg0, Object arg1, Object arg2) { } diff --git a/de.prob.ui/src/de/prob/ui/errorview/ErrorLabelProvider.java b/de.prob.ui/src/de/prob/ui/errorview/ErrorLabelProvider.java index c97ec85b6b702181581a15ae477ab64a818186f3..6bb0400777b240be976341dcd4051b6ff058660f 100644 --- a/de.prob.ui/src/de/prob/ui/errorview/ErrorLabelProvider.java +++ b/de.prob.ui/src/de/prob/ui/errorview/ErrorLabelProvider.java @@ -16,11 +16,12 @@ import de.prob.ui.errorview.ShownErrors.ShownStateError; */ public class ErrorLabelProvider extends BaseLabelProvider implements ITableLabelProvider { - + @Override public Image getColumnImage(Object object, int column) { return null; } + @Override public String getColumnText(Object object, int column) { final String text; if (column == 0) { diff --git a/de.prob.ui/src/de/prob/ui/errorview/StateErrorView.java b/de.prob.ui/src/de/prob/ui/errorview/StateErrorView.java index c139479ae54d50a17c9fe8e4995be90b19564449..155899857eeebca65e7e920252a6a92ffb7f3549 100644 --- a/de.prob.ui/src/de/prob/ui/errorview/StateErrorView.java +++ b/de.prob.ui/src/de/prob/ui/errorview/StateErrorView.java @@ -70,7 +70,7 @@ public class StateErrorView extends StateBasedViewPart { } private class ErrorSelection implements ISelectionChangedListener { - + @Override public void selectionChanged(final SelectionChangedEvent event) { IStructuredSelection selection = (IStructuredSelection) event .getSelection(); diff --git a/de.prob.ui/src/de/prob/ui/eventb/ClassicPreferences.java b/de.prob.ui/src/de/prob/ui/eventb/ClassicPreferences.java index c2daeeb5369ff5279ae7b73984a7887c572738f0..987014e98a7a0f79ef3941c95ec063b6795d8c28 100644 --- a/de.prob.ui/src/de/prob/ui/eventb/ClassicPreferences.java +++ b/de.prob.ui/src/de/prob/ui/eventb/ClassicPreferences.java @@ -121,6 +121,7 @@ public class ClassicPreferences extends PreferencePage implements return super.performOk(); } + @Override public void init(final IWorkbench workbench) { prefNode = Platform.getPreferencesService().getRootNode().node( InstanceScope.SCOPE).node("prob_classic_preferences"); diff --git a/de.prob.ui/src/de/prob/ui/eventb/CreateConfigurationHandler.java b/de.prob.ui/src/de/prob/ui/eventb/CreateConfigurationHandler.java index ece9a541a8b579462c19a02ee3d702dc68613f84..1d2f6ace2ac66aeadd1f84927f3f715ae232cf9d 100644 --- a/de.prob.ui/src/de/prob/ui/eventb/CreateConfigurationHandler.java +++ b/de.prob.ui/src/de/prob/ui/eventb/CreateConfigurationHandler.java @@ -13,7 +13,7 @@ import de.prob.ui.PerspectiveFactory; public class CreateConfigurationHandler extends AbstractHandler implements IHandler { - + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { ISelection fSelection = HandlerUtil.getCurrentSelection(event); diff --git a/de.prob.ui/src/de/prob/ui/eventb/ExportNewCoreHandler.java b/de.prob.ui/src/de/prob/ui/eventb/ExportNewCoreHandler.java index 110bec4cc89a7f33cc2b87d23cc804415548edfe..b1de3b7643fe2170f9617d3adb430edcf9262141 100644 --- a/de.prob.ui/src/de/prob/ui/eventb/ExportNewCoreHandler.java +++ b/de.prob.ui/src/de/prob/ui/eventb/ExportNewCoreHandler.java @@ -29,7 +29,7 @@ import de.prob.eventb.translator.TranslatorFactory; import de.prob.logging.Logger; public class ExportNewCoreHandler extends AbstractHandler implements IHandler { - + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { final IEventBRoot root = getSelectedEventBRoot(event); if (root != null) { diff --git a/de.prob.ui/src/de/prob/ui/eventb/FileInputValidator.java b/de.prob.ui/src/de/prob/ui/eventb/FileInputValidator.java index a351f9fc0ac8f142316b16194ade2f37c5fb7db9..32c6bc13bec742c479440f465d840ad577c48fa6 100644 --- a/de.prob.ui/src/de/prob/ui/eventb/FileInputValidator.java +++ b/de.prob.ui/src/de/prob/ui/eventb/FileInputValidator.java @@ -18,6 +18,7 @@ public class FileInputValidator implements IInputValidator { this.prj = (IEventBProject) prj.getAdapter(IEventBProject.class); } + @Override public String isValid(final String newText) { if (newText.equals("")) { return "Name must not be empty."; diff --git a/de.prob.ui/src/de/prob/ui/eventb/OpenClassicHandler.java b/de.prob.ui/src/de/prob/ui/eventb/OpenClassicHandler.java index dc2f3e06c4b46ad77f24e014d05fb167c60c13fd..1e891af07612b399708e694b25cb1fd9a93beff5 100644 --- a/de.prob.ui/src/de/prob/ui/eventb/OpenClassicHandler.java +++ b/de.prob.ui/src/de/prob/ui/eventb/OpenClassicHandler.java @@ -31,6 +31,7 @@ public class OpenClassicHandler extends AbstractHandler implements IHandler { private static final String PROB_STANDALONE_NAME = "ProB Standalone"; private static final String PROB2_NAME = "ProB2-UI"; + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { fSelection = HandlerUtil.getCurrentSelection(event); @@ -66,6 +67,7 @@ public class OpenClassicHandler extends AbstractHandler implements IHandler { this.output = output; } + @Override public void run() { try { while (true) { diff --git a/de.prob.ui/src/de/prob/ui/eventb/StartAnimationHandler.java b/de.prob.ui/src/de/prob/ui/eventb/StartAnimationHandler.java index 88c9ed078678e552a7402401b7a7f3c3a6d80a6c..92a8b8b48d572d3fd6d2799ae65bc0fb49d4c1af 100644 --- a/de.prob.ui/src/de/prob/ui/eventb/StartAnimationHandler.java +++ b/de.prob.ui/src/de/prob/ui/eventb/StartAnimationHandler.java @@ -52,6 +52,7 @@ public class StartAnimationHandler extends AbstractHandler implements IHandler { } } + @Override public void resourceChanged(final IResourceChangeEvent event) { if (path != null) { final IResourceDelta delta = event.getDelta(); @@ -66,6 +67,7 @@ public class StartAnimationHandler extends AbstractHandler implements IHandler { private ISelection fSelection; private ModificationListener listener; + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { fSelection = HandlerUtil.getCurrentSelection(event); diff --git a/de.prob.ui/src/de/prob/ui/historyview/HistoryView.java b/de.prob.ui/src/de/prob/ui/historyview/HistoryView.java index 74eded7bc6fb388117f2411ad3c2b3c53b243088..201d5a32ac46a103cc1d79c947e2306622d8131e 100644 --- a/de.prob.ui/src/de/prob/ui/historyview/HistoryView.java +++ b/de.prob.ui/src/de/prob/ui/historyview/HistoryView.java @@ -150,6 +150,7 @@ public class HistoryView extends StateBasedViewPart { public void addColumns(final Collection<StaticStateElement> elements) { final Runnable update = new Runnable() { + @Override public void run() { final Composite parent = tableViewer.getTable().getParent(); final TableColumnLayout layout = (TableColumnLayout) parent @@ -296,14 +297,16 @@ public class HistoryView extends StateBasedViewPart { private static class HistContentProvider implements IStructuredContentProvider { - + @Override public Object[] getElements(final Object data) { return data == null ? new HistViewItem[0] : (HistViewItem[]) data; } + @Override public void dispose() { } + @Override public void inputChanged(final Viewer arg0, final Object arg1, final Object arg2) { } @@ -313,6 +316,7 @@ public class HistoryView extends StateBasedViewPart { IDoubleClickListener { private static final String EXCEPTION_MSG = "exception raised while trying to jump to state"; + @Override public void doubleClick(final DoubleClickEvent event) { IStructuredSelection sel = (IStructuredSelection) event .getSelection(); diff --git a/de.prob.ui/src/de/prob/ui/internal/ShowProBConfigCommand.java b/de.prob.ui/src/de/prob/ui/internal/ShowProBConfigCommand.java index 8d75af40058f9eb8f57b7daf864ff431bdea360e..a1924ec21c29497c4239c66ac45b5030e8c063e8 100644 --- a/de.prob.ui/src/de/prob/ui/internal/ShowProBConfigCommand.java +++ b/de.prob.ui/src/de/prob/ui/internal/ShowProBConfigCommand.java @@ -14,7 +14,7 @@ import org.eventb.core.IEventBRoot; import de.prob.ui.eventb.AnimationPreferencesDialog; public class ShowProBConfigCommand extends AbstractHandler implements IHandler { - + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { IEventBRoot selectedObject = null; diff --git a/de.prob.ui/src/de/prob/ui/operationview/DoubleClickBehaviorHandler.java b/de.prob.ui/src/de/prob/ui/operationview/DoubleClickBehaviorHandler.java index 4c8813d705b1d7099e8537f27e55674dfaa490f7..b23683beca81fdc448a180b00f9a0954c6b579d8 100644 --- a/de.prob.ui/src/de/prob/ui/operationview/DoubleClickBehaviorHandler.java +++ b/de.prob.ui/src/de/prob/ui/operationview/DoubleClickBehaviorHandler.java @@ -9,7 +9,7 @@ import org.eclipse.ui.handlers.RadioState; public class DoubleClickBehaviorHandler extends AbstractHandler implements IHandler { - + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { if (HandlerUtil.matchesRadioState(event)) return null; // we are already in the updated state - do nothing diff --git a/de.prob.ui/src/de/prob/ui/operationview/ExecuteEventHandler.java b/de.prob.ui/src/de/prob/ui/operationview/ExecuteEventHandler.java index e958df33d6d2cd2c16f406b7b7c81db8c99bd18b..d04469df5ddcdc2f2b1cf44eb5ba685b57b457c1 100644 --- a/de.prob.ui/src/de/prob/ui/operationview/ExecuteEventHandler.java +++ b/de.prob.ui/src/de/prob/ui/operationview/ExecuteEventHandler.java @@ -14,7 +14,7 @@ import de.prob.exceptions.ProBException; import de.prob.logging.Logger; public class ExecuteEventHandler extends AbstractHandler implements IHandler { - + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { long id = -1; try { diff --git a/de.prob.ui/src/de/prob/ui/operationview/ExecuteRandomHandler.java b/de.prob.ui/src/de/prob/ui/operationview/ExecuteRandomHandler.java index 9961f1c3287d687ed5203bdef6b46e43fd2a9525..7941d618df75d9bd0b26e38dc8a93c493afab185 100644 --- a/de.prob.ui/src/de/prob/ui/operationview/ExecuteRandomHandler.java +++ b/de.prob.ui/src/de/prob/ui/operationview/ExecuteRandomHandler.java @@ -14,7 +14,7 @@ import de.prob.core.command.ExecuteRandomStepsCommand; import de.prob.exceptions.ProBException; public class ExecuteRandomHandler extends AbstractHandler implements IHandler { - + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { Shell shell = HandlerUtil.getActiveShell(event); int steps = -1; @@ -61,6 +61,7 @@ public class ExecuteRandomHandler extends AbstractHandler implements IHandler { "Number of steps:", "1", new IInputValidator() { String errormsg = "Number must be a non-negative Integer."; + @Override public String isValid(final String newText) { Integer num; try { diff --git a/de.prob.ui/src/de/prob/ui/operationview/Filter.java b/de.prob.ui/src/de/prob/ui/operationview/Filter.java index 3b885837e588f1ab56ed174ea7db24e5e09bb2e8..f1e4798f0aad29054b2e8b5bea4751f05c79863c 100644 --- a/de.prob.ui/src/de/prob/ui/operationview/Filter.java +++ b/de.prob.ui/src/de/prob/ui/operationview/Filter.java @@ -35,6 +35,7 @@ public class Filter { return pattern; } + @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(name); stringBuilder.append(" pattern:"); diff --git a/de.prob.ui/src/de/prob/ui/operationview/FilterDialog.java b/de.prob.ui/src/de/prob/ui/operationview/FilterDialog.java index ebcb896db3eaacc69295a256ba9c879841d8ab3a..62ddd65535478826beb2a040041bd1c76a36a0a2 100644 --- a/de.prob.ui/src/de/prob/ui/operationview/FilterDialog.java +++ b/de.prob.ui/src/de/prob/ui/operationview/FilterDialog.java @@ -161,10 +161,12 @@ public class FilterDialog extends Dialog implements SelectionListener { return filters; } + @Override public void widgetDefaultSelected(final SelectionEvent e) { } + @Override public void widgetSelected(final SelectionEvent e) { if (e.getSource() == buttonNew) { // InputDialog inputDialog = new InputDialog(dialog, "Add New @@ -313,18 +315,21 @@ public class FilterDialog extends Dialog implements SelectionListener { buttonOk.setEnabled(false); buttonCancel.addListener(SWT.Selection, new Listener() { + @Override public void handleEvent(final Event event) { pattern = null; shell.dispose(); } }); buttonOk.addListener(SWT.Selection, new Listener() { + @Override public void handleEvent(final Event event) { name = textName.getText(); shell.dispose(); } }); textPattern.addListener(SWT.Modify, new Listener() { + @Override public void handleEvent(final Event event) { if (textPattern.getText().length() == 0) { pattern = null; diff --git a/de.prob.ui/src/de/prob/ui/operationview/FilterManager.java b/de.prob.ui/src/de/prob/ui/operationview/FilterManager.java index 100c18c1abf82449ef3f697457ec16a2e361db41..d7a5f65f12ee95e83afb09b0d4a60129e7c154df 100644 --- a/de.prob.ui/src/de/prob/ui/operationview/FilterManager.java +++ b/de.prob.ui/src/de/prob/ui/operationview/FilterManager.java @@ -137,9 +137,11 @@ public class FilterManager implements SelectionListener { listeners.remove(listener); } + @Override public void widgetDefaultSelected(final SelectionEvent e) { } + @Override public void widgetSelected(final SelectionEvent e) { if (e.getSource() instanceof MenuItem) { MenuItem item = (MenuItem) e.getSource(); diff --git a/de.prob.ui/src/de/prob/ui/operationview/HistoryBackHandler.java b/de.prob.ui/src/de/prob/ui/operationview/HistoryBackHandler.java index a01908b73c42468496bbafc5295c4c9c3ea4ecf8..6f82ccbebc4125203daf7232db1ccbd2d56fcef6 100644 --- a/de.prob.ui/src/de/prob/ui/operationview/HistoryBackHandler.java +++ b/de.prob.ui/src/de/prob/ui/operationview/HistoryBackHandler.java @@ -11,7 +11,7 @@ import de.prob.exceptions.ProBException; import de.prob.logging.Logger; public class HistoryBackHandler extends AbstractHandler implements IHandler { - + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { History history = Animator.getAnimator().getHistory(); diff --git a/de.prob.ui/src/de/prob/ui/operationview/HistoryForwardHandler.java b/de.prob.ui/src/de/prob/ui/operationview/HistoryForwardHandler.java index 04d6cf7cbd03575b3c18b04dc3f69bb1a3e23b48..a2d4a90c44e437078d41b9ba392576868cd0aec5 100644 --- a/de.prob.ui/src/de/prob/ui/operationview/HistoryForwardHandler.java +++ b/de.prob.ui/src/de/prob/ui/operationview/HistoryForwardHandler.java @@ -11,7 +11,7 @@ import de.prob.exceptions.ProBException; import de.prob.logging.Logger; public class HistoryForwardHandler extends AbstractHandler implements IHandler { - + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { History history = Animator.getAnimator().getHistory(); Logger.assertProB("history != null", history != null); diff --git a/de.prob.ui/src/de/prob/ui/operationview/NullHandler.java b/de.prob.ui/src/de/prob/ui/operationview/NullHandler.java index 04358299e8fff2ea956c670adcba3a8ec7a019ad..134249ea6e3eec1719296bc8b74ae51e72a3f457 100644 --- a/de.prob.ui/src/de/prob/ui/operationview/NullHandler.java +++ b/de.prob.ui/src/de/prob/ui/operationview/NullHandler.java @@ -6,7 +6,7 @@ import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.commands.IHandler; public class NullHandler extends AbstractHandler implements IHandler { - + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { return null; } diff --git a/de.prob.ui/src/de/prob/ui/operationview/OperationSelectionDialog.java b/de.prob.ui/src/de/prob/ui/operationview/OperationSelectionDialog.java index a3ec5a04d18db325a37b327372eb66882495566b..6ee962abada131e2bf5e1f6f16626fa6ad3be10d 100644 --- a/de.prob.ui/src/de/prob/ui/operationview/OperationSelectionDialog.java +++ b/de.prob.ui/src/de/prob/ui/operationview/OperationSelectionDialog.java @@ -188,10 +188,11 @@ public class OperationSelectionDialog extends TrayDialog { btSwitchOperation = new Button(gpOperations, SWT.PUSH); btSwitchOperation.setText("Show/Hide equal columns"); btSwitchOperation.addSelectionListener(new SelectionListener() { - + @Override public void widgetDefaultSelected(final SelectionEvent e) { } + @Override public void widgetSelected(final SelectionEvent e) { hideSameArguments(); } @@ -434,7 +435,7 @@ public class OperationSelectionDialog extends TrayDialog { tbvOps.setLabelProvider(new OperationsLabelProvider()); tbvOps.setInput(opList); tbvOps.addDoubleClickListener(new IDoubleClickListener() { - + @Override public void doubleClick(final DoubleClickEvent event) { okPressed(); } @@ -455,13 +456,14 @@ public class OperationSelectionDialog extends TrayDialog { column.getColumn().setResizable(true); column.getColumn().pack(); column.getColumn().addSelectionListener(new SelectionListener() { - + @Override public void widgetDefaultSelected(final SelectionEvent e) { hiddenColumns.set(index, !hiddenColumns.get(index)); tbViewer.refresh(); packTableColumns(tbViewer); } + @Override public void widgetSelected(final SelectionEvent e) { } }); @@ -494,10 +496,12 @@ public class OperationSelectionDialog extends TrayDialog { private class OperationsLabelProvider extends LabelProvider implements ITableLabelProvider { + @Override public Image getColumnImage(final Object element, final int columnIndex) { return null; } + @Override public String getColumnText(final Object element, final int columnIndex) { if (hiddenColumns.get(columnIndex)) return "-"; @@ -542,14 +546,16 @@ public class OperationSelectionDialog extends TrayDialog { private static class OperationsContentProvider implements IStructuredContentProvider { - + @Override public void dispose() { } + @Override public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) { } + @Override @SuppressWarnings("unchecked") public Object[] getElements(final Object inputElement) { final Collection<Operation> operations = (List<Operation>) inputElement; @@ -569,7 +575,7 @@ public class OperationSelectionDialog extends TrayDialog { private class ArgRepLabelProvider extends LabelProvider implements ITableLabelProvider { - + @Override public Image getColumnImage(final Object element, final int columnIndex) { if (columnIndex == 0) { if (hiddenArguments.contains(element)) @@ -584,6 +590,7 @@ public class OperationSelectionDialog extends TrayDialog { } + @Override public String getColumnText(final Object element, final int columnIndex) { if (columnIndex == 1) { int index = arguments.indexOf(element); @@ -601,14 +608,16 @@ public class OperationSelectionDialog extends TrayDialog { * method. */ private class ArgRepContentProvider implements IStructuredContentProvider { - + @Override public void dispose() { } + @Override public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) { } + @Override @SuppressWarnings("unchecked") public Object[] getElements(final Object inputElement) { List<Operation> operations = (List<Operation>) inputElement; diff --git a/de.prob.ui/src/de/prob/ui/operationview/OperationsContentProvider.java b/de.prob.ui/src/de/prob/ui/operationview/OperationsContentProvider.java index 3396cb605d79abb28979173fd1847778ddc47311..2c8eadf129b6d68046e879c33691a9890c7f089c 100644 --- a/de.prob.ui/src/de/prob/ui/operationview/OperationsContentProvider.java +++ b/de.prob.ui/src/de/prob/ui/operationview/OperationsContentProvider.java @@ -26,13 +26,16 @@ class OperationsContentProvider implements IStructuredContentProvider { this.allOperations = allOperations; } + @Override public void dispose() { } + @Override public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) { } + @Override public Object[] getElements(final Object inputElement) { List<Object> mergedOperations = new ArrayList<Object>(); diff --git a/de.prob.ui/src/de/prob/ui/operationview/RestartHandler.java b/de.prob.ui/src/de/prob/ui/operationview/RestartHandler.java index 80de56c123317e84786f8abaa768ba2bb85a850d..7f7ba379b468df8f94e2c1995175e171c704044c 100644 --- a/de.prob.ui/src/de/prob/ui/operationview/RestartHandler.java +++ b/de.prob.ui/src/de/prob/ui/operationview/RestartHandler.java @@ -9,7 +9,7 @@ import de.prob.core.Animator; import de.prob.exceptions.ProBException; public class RestartHandler extends AbstractHandler implements IHandler { - + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { Animator animator = Animator.getAnimator(); try { diff --git a/de.prob.ui/src/de/prob/ui/operationview/ShowOnlyEnabledOpsHandler.java b/de.prob.ui/src/de/prob/ui/operationview/ShowOnlyEnabledOpsHandler.java index 823c5f04ed8aa1b84520a5598e4224577da7702c..5e6751fcee1b9e288c10ef7230b3a63f9f82d0b5 100644 --- a/de.prob.ui/src/de/prob/ui/operationview/ShowOnlyEnabledOpsHandler.java +++ b/de.prob.ui/src/de/prob/ui/operationview/ShowOnlyEnabledOpsHandler.java @@ -5,7 +5,7 @@ import org.eclipse.ui.handlers.HandlerUtil; public class ShowOnlyEnabledOpsHandler extends AbstractHandler implements IHandler { - + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { Command command = event.getCommand(); boolean showOnlyEnabledStates = !HandlerUtil diff --git a/de.prob.ui/src/de/prob/ui/operationview/ShowParameterDialogHandler.java b/de.prob.ui/src/de/prob/ui/operationview/ShowParameterDialogHandler.java index ec410a7cfd8e33066a7d82c4ca56cb838a29993d..bf6916155ec1c47aa6fb7a0599fa1d9b283ab63d 100644 --- a/de.prob.ui/src/de/prob/ui/operationview/ShowParameterDialogHandler.java +++ b/de.prob.ui/src/de/prob/ui/operationview/ShowParameterDialogHandler.java @@ -14,7 +14,7 @@ import de.prob.exceptions.ProBException; public class ShowParameterDialogHandler extends AbstractHandler implements IHandler { - + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { List<Operation> s = OperationTableViewer.getInstance() diff --git a/de.prob.ui/src/de/prob/ui/services/AbstractBoolProvider.java b/de.prob.ui/src/de/prob/ui/services/AbstractBoolProvider.java index f18362d3c7b784b81a24ee71435cb11a039fa857..8f0fc2ec16d73b8d26bfed6c67f3c3f97b86974b 100644 --- a/de.prob.ui/src/de/prob/ui/services/AbstractBoolProvider.java +++ b/de.prob.ui/src/de/prob/ui/services/AbstractBoolProvider.java @@ -18,10 +18,12 @@ public abstract class AbstractBoolProvider extends AbstractSourceProvider { this.service = service; } + @Override public void dispose() { } + @Override public Map<String, String> getCurrentState() { Map<String, String> currentState = new HashMap<String, String>(1); String current = enabled ? ENABLED : DISABLED; @@ -29,6 +31,7 @@ public abstract class AbstractBoolProvider extends AbstractSourceProvider { return currentState; } + @Override public String[] getProvidedSourceNames() { return new String[] { service }; } diff --git a/de.prob.ui/src/de/prob/ui/stateview/AddFormulaHandler.java b/de.prob.ui/src/de/prob/ui/stateview/AddFormulaHandler.java index 134bf771662499fe3a69f7dcefda9621c4302409..697838056441e22af1744512c0aac2c61d506df8 100644 --- a/de.prob.ui/src/de/prob/ui/stateview/AddFormulaHandler.java +++ b/de.prob.ui/src/de/prob/ui/stateview/AddFormulaHandler.java @@ -23,9 +23,10 @@ import de.prob.parserbase.ProBParserBaseAdapter; import de.prob.prolog.term.PrologTerm; public class AddFormulaHandler extends AbstractHandler implements IHandler { - + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { final Runnable runnable = new Runnable() { + @Override public void run() { Shell shell = HandlerUtil.getActiveShell(event); final String title = StateViewStrings.dialogTitleEnterNewFormula; @@ -86,6 +87,7 @@ public class AddFormulaHandler extends AbstractHandler implements IHandler { this.parser = parser; } + @Override public String isValid(final String input) { String error = null; if (input.trim().length() == 0) { diff --git a/de.prob.ui/src/de/prob/ui/stateview/BooleanLabelProvider.java b/de.prob.ui/src/de/prob/ui/stateview/BooleanLabelProvider.java index 4cd243180d4cfe8c8cd23562a191e93819cac438..429273e870c3775880031e8e1b8134eaa47e61d1 100644 --- a/de.prob.ui/src/de/prob/ui/stateview/BooleanLabelProvider.java +++ b/de.prob.ui/src/de/prob/ui/stateview/BooleanLabelProvider.java @@ -52,26 +52,32 @@ public class BooleanLabelProvider extends BaseLabelProvider implements return state; } + @Override public Color getBackground(Object element) { return backgroundColors[toState(element)]; } + @Override public Color getForeground(Object element) { return foregroundColors[toState(element)]; } + @Override public Image getImage(Object element) { return images[toState(element)]; } + @Override public String getText(Object element) { return texts[toState(element)]; } + @Override public Font getFont(Object element) { return fonts[toState(element)]; } + @Override public boolean isVisible(Object element) { return !(hideInactive && toState(element) == INACTIVE); } diff --git a/de.prob.ui/src/de/prob/ui/stateview/LoadShortestTraceHandler.java b/de.prob.ui/src/de/prob/ui/stateview/LoadShortestTraceHandler.java index 298aefbdf675d27108bea061aeb163bb0dbf4458..26d82e075785e9411b1b40cf8f8b05ad4189d33c 100644 --- a/de.prob.ui/src/de/prob/ui/stateview/LoadShortestTraceHandler.java +++ b/de.prob.ui/src/de/prob/ui/stateview/LoadShortestTraceHandler.java @@ -25,6 +25,7 @@ public class LoadShortestTraceHandler extends AbstractHandler implements animator = Animator.getAnimator(); } + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { String stateId = animator.getCurrentState().getId(); diff --git a/de.prob.ui/src/de/prob/ui/stateview/ShowInHistoryHandler.java b/de.prob.ui/src/de/prob/ui/stateview/ShowInHistoryHandler.java index e32a50cb284a9c0058db782de59b1898d410fddf..e798213bc4dd6ac342cc8b8722503eadffbd8ccb 100644 --- a/de.prob.ui/src/de/prob/ui/stateview/ShowInHistoryHandler.java +++ b/de.prob.ui/src/de/prob/ui/stateview/ShowInHistoryHandler.java @@ -30,7 +30,7 @@ import de.prob.ui.stateview.statetree.StaticStateElement; * @author plagge */ public class ShowInHistoryHandler extends AbstractHandler implements IHandler { - + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { final ISelection selection = HandlerUtil .getActiveWorkbenchWindow(event).getActivePage().getSelection(); diff --git a/de.prob.ui/src/de/prob/ui/stateview/SimpleContentProvider.java b/de.prob.ui/src/de/prob/ui/stateview/SimpleContentProvider.java index 503be7af7bad44c05e78d83fe6f6d6a52a5b9bd6..73a2474ee2ec6224d3d3bd1928eac3b5f21b0045 100644 --- a/de.prob.ui/src/de/prob/ui/stateview/SimpleContentProvider.java +++ b/de.prob.ui/src/de/prob/ui/stateview/SimpleContentProvider.java @@ -20,10 +20,11 @@ import de.prob.ui.stateview.LabelViewer.ISimpleContentProvider; */ public abstract class SimpleContentProvider implements LabelViewer.ISimpleContentProvider { - + @Override public void dispose() { } + @Override public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { } diff --git a/de.prob.ui/src/de/prob/ui/stateview/ToggleShowDuplicatesHandler.java b/de.prob.ui/src/de/prob/ui/stateview/ToggleShowDuplicatesHandler.java index 4501f95e0ec3bdb07e8a53c3275840abaf2ae79b..074f8455bc1b21dd3bdaa778c081931a574585b4 100644 --- a/de.prob.ui/src/de/prob/ui/stateview/ToggleShowDuplicatesHandler.java +++ b/de.prob.ui/src/de/prob/ui/stateview/ToggleShowDuplicatesHandler.java @@ -29,6 +29,7 @@ public class ToggleShowDuplicatesHandler extends AbstractHandler implements private static final String COMMAND_ID = "de.prob.ui.stateview.toggleShowDuplicates"; private static final String STATE_ID = "de.prob.ui.stateview.duplicateFilterState"; + @Override public Object execute(final ExecutionEvent event) throws ExecutionException { final State state = event.getCommand().getState(STATE_ID); if (state != null) { @@ -59,6 +60,7 @@ public class ToggleShowDuplicatesHandler extends AbstractHandler implements return !filterSet; } + @Override public void updateElement(final UIElement element, @SuppressWarnings("rawtypes") final Map parameters) { final State state = getCurrentState(element.getServiceLocator()); diff --git a/de.prob.ui/src/de/prob/ui/stateview/VarContentProvider.java b/de.prob.ui/src/de/prob/ui/stateview/VarContentProvider.java index b633e150b496d0020fe9c59e01ef31354781beec..11f2b339c39de3b20fae366c22252d26e6a43094 100644 --- a/de.prob.ui/src/de/prob/ui/stateview/VarContentProvider.java +++ b/de.prob.ui/src/de/prob/ui/stateview/VarContentProvider.java @@ -26,6 +26,7 @@ class VarContentProvider implements ITreeContentProvider { public VarContentProvider() { } + @Override public Object[] getChildren(final Object parentElement) { StateTreeElement ste = toTreeElement(parentElement); StaticStateElement[] children; @@ -37,11 +38,13 @@ class VarContentProvider implements ITreeContentProvider { return children; } + @Override public Object getParent(final Object element) { StateTreeElement ste = toTreeElement(element); return ste != null ? ste.getParent() : null; } + @Override public boolean hasChildren(final Object element) { StateTreeElement ste = toTreeElement(element); return ste != null && ste.hasChildren(); @@ -57,6 +60,7 @@ class VarContentProvider implements ITreeContentProvider { return ste; } + @Override public Object[] getElements(final Object inputElement) { final StateTreeElement[] elements; if (inputElement != null && inputElement instanceof StateTreeElement[]) { @@ -67,10 +71,12 @@ class VarContentProvider implements ITreeContentProvider { return elements; } + @Override public void dispose() { } + @Override public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) { } diff --git a/de.prob.ui/src/de/prob/ui/stateview/statetree/AbstractStateTreeElement.java b/de.prob.ui/src/de/prob/ui/stateview/statetree/AbstractStateTreeElement.java index 5b183e0cf2affdb7364f7a2de8e400856355ded3..7165599004ad0f84961e92bfc3cd6211e3b678ec 100644 --- a/de.prob.ui/src/de/prob/ui/stateview/statetree/AbstractStateTreeElement.java +++ b/de.prob.ui/src/de/prob/ui/stateview/statetree/AbstractStateTreeElement.java @@ -15,6 +15,7 @@ public abstract class AbstractStateTreeElement implements StateTreeElement { this.parent = parent; } + @Override public StaticStateElement getParent() { return parent; } diff --git a/de.prob.ui/src/de/prob/ui/stateview/statetree/StateTreeExpression.java b/de.prob.ui/src/de/prob/ui/stateview/statetree/StateTreeExpression.java index cca8adeb32d73216c60f35c6d41b4e0c0d18d863..378532e7e5fa72d7b1b6b05f2b34257783d39bfb 100644 --- a/de.prob.ui/src/de/prob/ui/stateview/statetree/StateTreeExpression.java +++ b/de.prob.ui/src/de/prob/ui/stateview/statetree/StateTreeExpression.java @@ -30,6 +30,7 @@ public class StateTreeExpression extends AbstractStateTreeElement { } + @Override public StaticStateElement[] getChildren() { checkForChildren(); return children.toArray(StateTreeElement.EMPTY_ARRAY); @@ -54,6 +55,7 @@ public class StateTreeExpression extends AbstractStateTreeElement { } } + @Override public String getLabel() { try { return staticElement.getLabel(); @@ -63,11 +65,13 @@ public class StateTreeExpression extends AbstractStateTreeElement { } } + @Override public boolean hasChildren() { checkForChildren(); return !children.isEmpty(); } + @Override public boolean hasChanged(final State current, final State last) { final String curval, lastval; try { @@ -91,6 +95,7 @@ public class StateTreeExpression extends AbstractStateTreeElement { return staticElement; } + @Override public StateDependendElement getValue(final State state) { StateDependendElement sd; try { diff --git a/de.prob.ui/src/de/prob/ui/stateview/statetree/StateTreeExpressionSection.java b/de.prob.ui/src/de/prob/ui/stateview/statetree/StateTreeExpressionSection.java index 10286c0b789987eda00cfb3bb72a60f57257bb79..4e141f6e9c345ece8f73829a89d45d5cf43ce73c 100644 --- a/de.prob.ui/src/de/prob/ui/stateview/statetree/StateTreeExpressionSection.java +++ b/de.prob.ui/src/de/prob/ui/stateview/statetree/StateTreeExpressionSection.java @@ -34,18 +34,22 @@ public class StateTreeExpressionSection extends AbstractStateTreeElement { } } + @Override public StaticStateElement[] getChildren() { return children.toArray(StateTreeElement.EMPTY_ARRAY); } + @Override public String getLabel() { return label; } + @Override public boolean hasChildren() { return !children.isEmpty(); } + @Override public boolean hasChanged(State current, State last) { return false; } @@ -56,6 +60,7 @@ public class StateTreeExpressionSection extends AbstractStateTreeElement { this.children.add(child); } + @Override public StateDependendElement getValue(final State state) { return new StateDependendElement(state, null, EStateTreeElementProperty.NONBOOLEAN); diff --git a/de.prob.ui/src/de/prob/ui/stateview/statetree/StateTreeSection.java b/de.prob.ui/src/de/prob/ui/stateview/statetree/StateTreeSection.java index c86dfbb816d0b3ba9216589c8eb8ea70633d0bdc..b04ec939c37339445e956e8566d0b1bf259ecbbb 100644 --- a/de.prob.ui/src/de/prob/ui/stateview/statetree/StateTreeSection.java +++ b/de.prob.ui/src/de/prob/ui/stateview/statetree/StateTreeSection.java @@ -35,14 +35,17 @@ public class StateTreeSection extends AbstractStateTreeElement { this.isMainSectionOfVariable = isMainSectionOfVariable; } + @Override public StaticStateElement[] getChildren() { return children.toArray(StateTreeVariable.EMPTY_ARRAY); } + @Override public String getLabel() { return section; } + @Override public boolean hasChildren() { return !children.isEmpty(); } @@ -51,6 +54,7 @@ public class StateTreeSection extends AbstractStateTreeElement { return isMainSectionOfVariable; } + @Override public boolean hasChanged(final State current, final State last) { for (final StateTreeElement child : children) { if (child.hasChanged(current, last)) @@ -59,6 +63,7 @@ public class StateTreeSection extends AbstractStateTreeElement { return false; } + @Override public StateDependendElement getValue(final State state) { return new StateDependendElement(state, null, hasChildren() ? EStateTreeElementProperty.NONBOOLEAN diff --git a/de.prob.ui/src/de/prob/ui/stateview/statetree/StateTreeVariable.java b/de.prob.ui/src/de/prob/ui/stateview/statetree/StateTreeVariable.java index d83d76b0598ee5f69ab5aa2c1b6d7f1e89602709..3a2e9df323ab91e47a51e9ed8545206d40350026 100644 --- a/de.prob.ui/src/de/prob/ui/stateview/statetree/StateTreeVariable.java +++ b/de.prob.ui/src/de/prob/ui/stateview/statetree/StateTreeVariable.java @@ -26,14 +26,17 @@ public class StateTreeVariable extends AbstractStateTreeElement { this.isInMainSection = isInMainSection; } + @Override public StaticStateElement[] getChildren() { return StateTreeElement.EMPTY_ARRAY; } + @Override public String getLabel() { return name; } + @Override public boolean hasChildren() { return false; } @@ -42,6 +45,7 @@ public class StateTreeVariable extends AbstractStateTreeElement { return isInMainSection; } + @Override public boolean hasChanged(final State current, final State last) { final String curVal = getValueOfVar(current); final String lastVal = getValueOfVar(last); @@ -59,6 +63,7 @@ public class StateTreeVariable extends AbstractStateTreeElement { return result; } + @Override public StateDependendElement getValue(final State state) { final Variable variable = state.getValues().get(name); final StateDependendElement element; diff --git a/de.prob.ui/src/de/prob/ui/ticket/ProBLogListener.java b/de.prob.ui/src/de/prob/ui/ticket/ProBLogListener.java index 44f5b4828d0af10d29b9efc06c096e001bcfc4ca..e178cc70283cdd9b5b0d1449d43aff3c949897fb 100644 --- a/de.prob.ui/src/de/prob/ui/ticket/ProBLogListener.java +++ b/de.prob.ui/src/de/prob/ui/ticket/ProBLogListener.java @@ -18,6 +18,7 @@ public final class ProBLogListener implements ILogListener { public ProBLogListener() { } + @Override public void logging(final IStatus status, final String plugin) { if (display == null || display.isDisposed()) { return; @@ -25,6 +26,7 @@ public final class ProBLogListener implements ILogListener { if (status.getSeverity() == IStatus.ERROR || status.getSeverity() == IStatus.WARNING) { display.asyncExec(new Runnable() { + @Override public void run() { String title = (status.getSeverity() == IStatus.ERROR) ? "An Error occured" : "Warning";