From 8cbd2ce6c3316b96714b84b065e0fd3a92508945 Mon Sep 17 00:00:00 2001 From: Filip Reaboi <reaboi@fortiss.org> Date: Tue, 13 Mar 2018 15:44:39 +0000 Subject: [PATCH] YELLOW --- .../IAllocationPositionService.java | 5 ++--- .../base/ui/utils/TableViewerUtils.java | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/editpart/allocation/IAllocationPositionService.java b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/editpart/allocation/IAllocationPositionService.java index a6d5454f8..ca0996141 100644 --- a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/editpart/allocation/IAllocationPositionService.java +++ b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/editpart/allocation/IAllocationPositionService.java @@ -19,14 +19,13 @@ import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.gef.RootEditPart; -//TODO(SB,6) /** * Interface for allocation target elements. - * Stores the position of allocation sources and allocation targets in the diagram editor. Connects - * the position to the {@link SubDiagramEditPartBase}s and stores their bounds. + * Stores the position of allocation sources and allocation targets in the diagram editor. * * @author eder */ + public interface IAllocationPositionService { /** Returns the service instance. */ public static IAllocationPositionService getInstance() { diff --git a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/utils/TableViewerUtils.java b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/utils/TableViewerUtils.java index 98f473a6c..c14b4295b 100644 --- a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/utils/TableViewerUtils.java +++ b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/utils/TableViewerUtils.java @@ -15,11 +15,16 @@ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.base.ui.utils; +import static java.lang.Integer.parseInt; +import static org.eclipse.jface.viewers.ColumnViewerEditor.KEYBOARD_ACTIVATION; +import static org.eclipse.jface.viewers.ColumnViewerEditor.TABBING_HORIZONTAL; +import static org.eclipse.jface.viewers.ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR; +import static org.eclipse.jface.viewers.ColumnViewerEditor.TABBING_VERTICAL; + import org.eclipse.jface.layout.TableColumnLayout; import org.eclipse.jface.viewers.CellEditor; import org.eclipse.jface.viewers.ColumnLabelProvider; import org.eclipse.jface.viewers.ColumnViewer; -import org.eclipse.jface.viewers.ColumnViewerEditor; import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy; import org.eclipse.jface.viewers.ColumnWeightData; import org.eclipse.jface.viewers.EditingSupport; @@ -38,6 +43,7 @@ import org.eclipse.swt.widgets.Composite; * * @author hoelzl */ + public class TableViewerUtils { /** @@ -173,8 +179,7 @@ public class TableViewerUtils { @Override public String isValid(Object value) { try { - // TODO(SB,25) - Integer.parseInt(value.toString()); + parseInt(value.toString()); } catch(NumberFormatException nfe) { return "Not a valid integer"; } @@ -199,11 +204,7 @@ public class TableViewerUtils { ColumnViewerEditorActivationStrategy activationSupport = new ColumnViewerEditorActivationStrategy(table); - // TODO(SB,25) (x5) - TableViewerEditor.create(table, focusCellManager, activationSupport, - ColumnViewerEditor.TABBING_HORIZONTAL | - ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR | - ColumnViewerEditor.TABBING_VERTICAL | - ColumnViewerEditor.KEYBOARD_ACTIVATION); + TableViewerEditor.create(table, focusCellManager, activationSupport, TABBING_HORIZONTAL | + TABBING_MOVE_TO_ROW_NEIGHBOR | TABBING_VERTICAL | KEYBOARD_ACTIVATION); } } -- GitLab