Skip to content
Snippets Groups Projects
Commit 8cbd2ce6 authored by Filip Reaboi's avatar Filip Reaboi
Browse files

YELLOW

parent 4fad41da
No related branches found
No related tags found
No related merge requests found
...@@ -19,14 +19,13 @@ import org.eclipse.draw2d.geometry.Point; ...@@ -19,14 +19,13 @@ import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gef.RootEditPart; import org.eclipse.gef.RootEditPart;
//TODO(SB,6)
/** /**
* Interface for allocation target elements. * Interface for allocation target elements.
* Stores the position of allocation sources and allocation targets in the diagram editor. Connects * Stores the position of allocation sources and allocation targets in the diagram editor.
* the position to the {@link SubDiagramEditPartBase}s and stores their bounds.
* *
* @author eder * @author eder
*/ */
public interface IAllocationPositionService { public interface IAllocationPositionService {
/** Returns the service instance. */ /** Returns the service instance. */
public static IAllocationPositionService getInstance() { public static IAllocationPositionService getInstance() {
......
...@@ -15,11 +15,16 @@ ...@@ -15,11 +15,16 @@
+--------------------------------------------------------------------------*/ +--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.ui.utils; 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.layout.TableColumnLayout;
import org.eclipse.jface.viewers.CellEditor; import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ColumnLabelProvider; import org.eclipse.jface.viewers.ColumnLabelProvider;
import org.eclipse.jface.viewers.ColumnViewer; import org.eclipse.jface.viewers.ColumnViewer;
import org.eclipse.jface.viewers.ColumnViewerEditor;
import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy; import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy;
import org.eclipse.jface.viewers.ColumnWeightData; import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.EditingSupport; import org.eclipse.jface.viewers.EditingSupport;
...@@ -38,6 +43,7 @@ import org.eclipse.swt.widgets.Composite; ...@@ -38,6 +43,7 @@ import org.eclipse.swt.widgets.Composite;
* *
* @author hoelzl * @author hoelzl
*/ */
public class TableViewerUtils { public class TableViewerUtils {
/** /**
...@@ -173,8 +179,7 @@ public class TableViewerUtils { ...@@ -173,8 +179,7 @@ public class TableViewerUtils {
@Override @Override
public String isValid(Object value) { public String isValid(Object value) {
try { try {
// TODO(SB,25) parseInt(value.toString());
Integer.parseInt(value.toString());
} catch(NumberFormatException nfe) { } catch(NumberFormatException nfe) {
return "Not a valid integer"; return "Not a valid integer";
} }
...@@ -199,11 +204,7 @@ public class TableViewerUtils { ...@@ -199,11 +204,7 @@ public class TableViewerUtils {
ColumnViewerEditorActivationStrategy activationSupport = ColumnViewerEditorActivationStrategy activationSupport =
new ColumnViewerEditorActivationStrategy(table); new ColumnViewerEditorActivationStrategy(table);
// TODO(SB,25) (x5) TableViewerEditor.create(table, focusCellManager, activationSupport, TABBING_HORIZONTAL |
TableViewerEditor.create(table, focusCellManager, activationSupport, TABBING_MOVE_TO_ROW_NEIGHBOR | TABBING_VERTICAL | KEYBOARD_ACTIVATION);
ColumnViewerEditor.TABBING_HORIZONTAL |
ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR |
ColumnViewerEditor.TABBING_VERTICAL |
ColumnViewerEditor.KEYBOARD_ACTIVATION);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment