Author: dazarov
Date: 2008-12-16 13:04:09 -0500 (Tue, 16 Dec 2008)
New Revision: 12628
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3409
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java 2008-12-16
17:30:32 UTC (rev 12627)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java 2008-12-16
18:04:09 UTC (rev 12628)
@@ -13,10 +13,13 @@
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import org.eclipse.draw2d.ArrowLocator;
import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.ConnectionLocator;
import org.eclipse.draw2d.FreeformViewport;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.PolygonDecoration;
import org.eclipse.draw2d.geometry.PointList;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
@@ -56,6 +59,7 @@
PagesEditor.class, "icons/shortcut.gif").createImage();
private static final Font pathFont =
SeamPagesPreference.getFont(SeamPagesPreference.LINK_PATH_FONT.getValue(), null);
+
AccessibleEditPart acc;
@@ -118,12 +122,19 @@
new LinkEndpointEditPolicy());
installEditPolicy(EditPolicy.CONNECTION_ROLE, new LinkEditPolicy());
}
+
+ PolygonDecoration arrow;
protected IFigure createFigure() {
if (getLink() == null)
return null;
ConnectionFigure conn = FigureFactory.createNewBendableWire(this,
getLink());
+ arrow = (PolygonDecoration)conn.getChildren().get(0);
+
+ if (getLink().isShortcut())
+ conn.remove(arrow);
+
PointList list = getLink().getPointList();
if (list.size() > 0) {
conn.setManual(true);
@@ -299,9 +310,11 @@
if (shortcut) {
getLinkFigure().add(shortcutLabel, shortcutLocator);
getLinkFigure().remove(pathLabel);
+ getLinkFigure().remove(arrow);
} else {
getLinkFigure().remove(shortcutLabel);
getLinkFigure().add(pathLabel, pathLocator);
+ getLinkFigure().add(arrow, new ArrowLocator(getLinkFigure(),
ConnectionLocator.TARGET));
}
refresh();
}