Commit f0866d27 authored by Simon Barner's avatar Simon Barner
Browse files

RED

refs 3240
parent e872cfb4
ConnectionCompositionDropTargetListener.java 03918f22ce9043444693d5f6414561e5550f34db YELLOW
ElementCompositionDropTargetListener.java 2ab905e1c9e877a11156236dee7b26a61a51eb9b YELLOW
ConnectionCompositionDropTargetListener.java ba861adbef5ca39644386be53826a939be5110a3 RED
ElementCompositionDropTargetListener.java ab0fd4910f84790d72ec76ad20d87542019ed206 RED
......@@ -25,6 +25,7 @@ import org.fortiss.tooling.kernel.service.IConnectionCompositorService;
import org.fortiss.tooling.kernel.ui.dnd.CompositionServiceLocalDNDTransfer;
import org.fortiss.tooling.kernel.ui.dnd.ConnectionCompositionSource;
// TODO(SB,6) (x2)
/**
* This class implements a drop target listener for {@link EditPartViewer}s,
* which creates {@link CreateConnectionCompositionRequest}s. The request
......@@ -34,6 +35,7 @@ import org.fortiss.tooling.kernel.ui.dnd.ConnectionCompositionSource;
* the completed DND operation to the {@link IConnectionCompositorService}.
* <p>
* This class mimics the behavior of the kernel's SWT-based
*
* {@link ConnectionCompositionDropTargetAdapter}, but uses the GEF abstraction
* {@link AbstractTransferDropTargetListener} super class.
*
......@@ -66,12 +68,14 @@ public class ConnectionCompositionDropTargetListener extends AbstractTransferDro
ConnectionCompositionSource sourceData = null;
if(getCurrentEvent().data instanceof ConnectionCompositionSource) {
sourceData = (ConnectionCompositionSource)getCurrentEvent().data;
// TODO(SB,20)
} else if(CompositionServiceLocalDNDTransfer.getInstance().getObject() instanceof ConnectionCompositionSource) {
// there have been reports about SWT platform inconsistencies:
// on OSX getCurrentEvent().data might be null during dragging
// while it is not null on other platforms. Therefore, we use this
// fallback.
sourceData =
// TODO(SB,20)
(ConnectionCompositionSource)CompositionServiceLocalDNDTransfer.getInstance()
.getObject();
}
......
......@@ -25,6 +25,7 @@ import org.fortiss.tooling.kernel.service.IElementCompositorService;
import org.fortiss.tooling.kernel.ui.dnd.CompositionServiceLocalDNDTransfer;
import org.fortiss.tooling.kernel.ui.dnd.ElementCompositionSource;
// TODO(SB,6) (x2)
/**
* This class implements a drop target listener for {@link EditPartViewer}s,
* which creates {@link CreateElementCompositionRequest}s. The request contains
......@@ -33,7 +34,8 @@ import org.fortiss.tooling.kernel.ui.dnd.ElementCompositionSource;
* the DND operation with the target information. It then relays the completed
* DND operation to the {@link IElementCompositorService}.
* <p>
* This class mimics the behavior of the kernel's SWT-based
* This class mimics the behavior of the kernel's SWT-based // TODO(SB,20)
*
* {@link ElementCompositionDropTargetAdapter}, but uses the GEF abstraction
* {@link AbstractTransferDropTargetListener} super class.
*
......@@ -65,11 +67,13 @@ public class ElementCompositionDropTargetListener extends AbstractTransferDropTa
ElementCompositionSource sourceData = null;
if(getCurrentEvent().data instanceof ElementCompositionSource) {
sourceData = (ElementCompositionSource)getCurrentEvent().data;
// TODO(SB,20)
} else if(CompositionServiceLocalDNDTransfer.getInstance().getObject() instanceof ElementCompositionSource) {
// there have been reports about SWT platform inconsistencies:
// on OSX getCurrentEvent().data might be null during dragging
// while it is not null on other platforms. Therefore, we use this
// fallback.
// TODO(SB,20)
sourceData =
(ElementCompositionSource)CompositionServiceLocalDNDTransfer.getInstance()
.getObject();
......
ViewerElementCompositionDropAdapter.java d08b48bfa97f7367bed015a42e8875ee36553481 YELLOW
ViewerElementCompositionDropAdapter.java 7f3adb61b8e7caba17e501a7260f72853f995606 RED
......@@ -32,6 +32,7 @@ import org.fortiss.tooling.kernel.service.IElementCompositorService;
import org.fortiss.tooling.kernel.ui.dnd.CompositionServiceLocalDNDTransfer;
import org.fortiss.tooling.kernel.ui.util.DragAndDropUtils;
//TODO(SB,6) (x2)
/**
* {@link ViewerDropAdapter} implementation for a JFace {@link TreeViewer}. This
* implementation mimics the behavior of SWT-based {@link ElementCompositionDropTargetAdapter}, but
......@@ -76,11 +77,14 @@ public class ViewerElementCompositionDropAdapter extends ViewerDropAdapter {
public boolean performDrop(Object data) {
if(lastTarget instanceof EObject) {
final EObject target = (EObject)lastTarget;
// TODO(SB,25)
final EObject dropped = DragAndDropUtils.extractDroppedEObject(data);
// TODO(SB,20)
if(IElementCompositorService.getInstance().canCompose(target, dropped, null)) {
runAsCommand(target, new Runnable() {
@Override
public void run() {
// TODO(SB,20)
IElementCompositorService.getInstance().compose(target, dropped, null);
}
});
......
......@@ -5,4 +5,4 @@ AllocationFreeConnectorEditPartBase.java d6f602170056b5c020477a8863e753f19a8cc44
AllocationPositionService.java 0efc15deec12730ac7ba02fb2ccb66833b783ffd GREEN
AllocationStickyConnectorEditPartBase.java 52d43906d4eedd9d3e31058fff67d40c43ffddb2 GREEN
AllocationSubDiagramEditPartBase.java e46342ed93d0214cf1b5c74f37ea813822d94650 GREEN
IAllocationPositionService.java 3c04e83abe17215906364570b0e4e2289f0fa278 YELLOW
IAllocationPositionService.java 9578a007b9dd4087f1e833a67d21fde1090c98bc RED
......@@ -19,6 +19,7 @@ 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
......
......@@ -10,6 +10,6 @@ PropertiesViewUtils.java 009d390b8aa41bb79b45b1e09a3375d0374fa139 GREEN
RectangleLayoutUIUtils.java b64f2f86b8254363689bf0809f681fc59a87a04a GREEN
SnapToGridUtils.java 0ee536d1c1028aec313c59d533d6717b68febc85 GREEN
StatusUtils.java c0630d0c51d978831b3657541c78f6f07e8ace0a RED
TableViewerUtils.java 891912232b9c0d7783de9f9f718e2ca3e78b962a YELLOW
TableViewerUtils.java b8f1c5986318299df611d3011c3a50240a7bfc04 RED
TreeViewerUtils.java 296ae7efad3a472c00522be723d7853710069177 GREEN
ZoomUIUtils.java 0e04976d43076e7e4b3f2d244a303463c71390f5 YELLOW
......@@ -173,6 +173,7 @@ public class TableViewerUtils {
@Override
public String isValid(Object value) {
try {
// TODO(SB,25)
Integer.parseInt(value.toString());
} catch(NumberFormatException nfe) {
return "Not a valid integer";
......@@ -198,6 +199,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 |
......
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