Commit 8cbd2ce6 authored by Filip Reaboi's avatar Filip Reaboi
Browse files

YELLOW

parent 4fad41da
......@@ -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() {
......
......@@ -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);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment