JBoss Tools SVN: r8461 - in trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor: figures and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-05-30 09:17:40 -0400 (Fri, 30 May 2008)
New Revision: 8461
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/NodeFigure.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1189
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java 2008-05-30 12:21:18 UTC (rev 8460)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java 2008-05-30 13:17:40 UTC (rev 8461)
@@ -7,12 +7,11 @@
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.seam.ui.pages.editor.edit;
-import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
-import java.util.*;
+import java.util.List;
import org.eclipse.draw2d.ConnectionAnchor;
import org.eclipse.draw2d.IFigure;
@@ -22,21 +21,25 @@
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
-import org.jboss.tools.common.model.ui.dnd.DnDUtil;
-import org.eclipse.gef.*;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartListener;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
import org.eclipse.gef.requests.DropRequest;
+import org.eclipse.gef.requests.SelectionRequest;
import org.eclipse.swt.accessibility.AccessibleControlEvent;
import org.eclipse.swt.accessibility.AccessibleEvent;
-
-import org.jboss.tools.common.meta.action.XAction;
-import org.jboss.tools.common.model.XModelException;
-import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Page;
import org.jboss.tools.seam.ui.pages.editor.figures.NodeFigure;
import org.jboss.tools.seam.ui.pages.editor.figures.PageFigure;
-public class PageEditPart extends PagesEditPart implements PropertyChangeListener, EditPartListener, Adapter {
+public class PageEditPart extends PagesEditPart implements
+ PropertyChangeListener, EditPartListener, Adapter {
private PageFigure fig = null;
public void doControlUp() {
@@ -72,8 +75,6 @@
return true;
}
-
-
private void refreshTargetLink(Link link) {
if (link == null)
return;
@@ -84,7 +85,6 @@
gep.refreshTargetConnections();
}
-
protected AccessibleEditPart createAccessible() {
return new AccessibleGraphicalEditPart() {
@@ -106,14 +106,28 @@
return getPageModel().getOutputLinks();
}
+ public void performRequest(Request req) {
+ if (RequestConstants.REQ_OPEN.equals(req.getType())) {
+ SelectionRequest request = (SelectionRequest) req;
+ Point mouseLocation = request.getLocation()
+ .translate(-getGroupFigure().getLocation().x,
+ -getGroupFigure().getLocation().y);
+ if (mouseLocation.x < 16 && mouseLocation.y > getGroupFigure().getSize().height-16) {
+ getPageModel().setParamsVisible(!getPageModel().isParamsVisible());
+ refresh();
+ fig.repaint();
+ }
+ }
+ }
+
protected void createEditPolicies() {
super.createEditPolicies();
installEditPolicy(EditPolicy.NODE_ROLE, null);
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, null);
- //installEditPolicy(EditPolicy.COMPONENT_ROLE, new PageEditPolicy());
- //installEditPolicy(EditPolicy.LAYOUT_ROLE, new JSFFlowEditPolicy());
- //installEditPolicy(EditPolicy.CONNECTION_ENDPOINTS_ROLE,
- // new PageEditPolicy());
+ // installEditPolicy(EditPolicy.COMPONENT_ROLE, new PageEditPolicy());
+ // installEditPolicy(EditPolicy.LAYOUT_ROLE, new JSFFlowEditPolicy());
+ // installEditPolicy(EditPolicy.CONNECTION_ENDPOINTS_ROLE,
+ // new PageEditPolicy());
}
/**
@@ -143,15 +157,14 @@
Dimension size;
-
-
protected void refreshVisuals() {
Point loc = getPageModel().getLocation();
- int height = 23 + getPageModel().getOutputLinks().size()*NodeFigure.LINK_HEIGHT;
-
- if(getPageModel().getOutputLinks().size() == 0)
- height = 23+NodeFigure.LINK_HEIGHT;
-
+ int height = 23 + getPageModel().getOutputLinks().size()
+ * NodeFigure.LINK_HEIGHT;
+
+ if (getPageModel().getOutputLinks().size() == 0)
+ height = 23 + NodeFigure.LINK_HEIGHT;
+
size = new Dimension(50, height);
loc.x -= loc.x % 8;
loc.y -= loc.y % 8;
@@ -175,19 +188,19 @@
public ConnectionAnchor getSourceConnectionAnchor(
ConnectionEditPart connEditPart) {
- Link link = (Link) connEditPart.getModel();
- int index = getPageModel().getOutputLinks().indexOf(link);
- return getNodeFigure().getConnectionAnchor((index + 1) + "_OUT");
+ Link link = (Link) connEditPart.getModel();
+ int index = getPageModel().getOutputLinks().indexOf(link);
+ return getNodeFigure().getConnectionAnchor((index + 1) + "_OUT");
}
public ConnectionAnchor getSourceConnectionAnchor(Request request) {
- Point pt = new Point(((DropRequest) request).getLocation());
- return getNodeFigure().getSourceConnectionAnchorAt(pt);
+ Point pt = new Point(((DropRequest) request).getLocation());
+ return getNodeFigure().getSourceConnectionAnchorAt(pt);
}
-// protected List getModelChildren() {
-// return getPageModel().getChildren();
-// }
+ // protected List getModelChildren() {
+ // return getPageModel().getChildren();
+ // }
protected void refreshChildren() {
super.refreshChildren();
@@ -196,7 +209,7 @@
}
}
-
+
/**
* @see org.eclipse.gef.EditPart#activate()
*/
@@ -206,14 +219,14 @@
((Notifier) getModel()).eAdapters().add(this);
super.activate();
}
-
- public void deactivate(){
+
+ public void deactivate() {
if (!isActive())
return;
((Notifier) getModel()).eAdapters().remove(this);
super.deactivate();
}
-
+
/**
* @see org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
*/
@@ -221,6 +234,7 @@
refresh();
refreshVisuals();
}
+
/**
* )
*
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/NodeFigure.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/NodeFigure.java 2008-05-30 12:21:18 UTC (rev 8460)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/NodeFigure.java 2008-05-30 13:17:40 UTC (rev 8461)
@@ -58,6 +58,11 @@
public static final Color exceptionForegroundColor = new Color(null, 0x99, 0x07, 0x02);
+ public static final Color button1Color = new Color(null, 0xff, 0xf6, 0xc8);
+ public static final Color button2Color = new Color(null, 0x98, 0x99, 0x98);
+ public static final Color button3Color = new Color(null, 0xff, 0xe8, 0x79);
+ public static final Color button4Color = new Color(null, 0xdb, 0xc7, 0x68);
+
public static final Font exceptionFont = new Font(null, "default", 8, SWT.BOLD);
public static final Image errorIcon = ModelUIImages
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java 2008-05-30 12:21:18 UTC (rev 8460)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java 2008-05-30 13:17:40 UTC (rev 8461)
@@ -268,7 +268,54 @@
g.fillPolygon(shadowPointlist);
g.fillPolygon(shadow2Pointlist);
-
+ if(page.getChildren().size() != 0){
+ if(page.isParamsVisible()){
+ g.setForegroundColor(blackColor);
+ g.drawLine(4, height-13, 11, height-13);
+ g.drawLine(4, height-13, 4, height-6);
+
+ g.drawLine(6, height-9, 10, height-9);
+
+ g.setForegroundColor(button2Color);
+ g.drawLine(12, height-13, 12, height-5);
+ g.drawLine(4, height-5, 12, height-5);
+
+ g.setForegroundColor(button3Color);
+ g.setBackgroundColor(button3Color);
+ g.drawLine(5, height-4, 13, height-4);
+ g.drawLine(13, height-4, 13, height-12);
+ g.fillRectangle(6, height-11, 5, 2);
+ g.fillRectangle(6, height-8, 5, 2);
+
+ g.setForegroundColor(button4Color);
+ g.drawLine(5, height-7, 5, height-12);
+ g.drawLine(5, height-12, 10, height-12);
+ }else{
+
+ g.setForegroundColor(button2Color);
+ g.drawLine(4, height-13, 11, height-13);
+ g.drawLine(4, height-13, 4, height-6);
+
+ g.setForegroundColor(blackColor);
+
+ g.drawLine(6, height-9, 10, height-9);
+ g.drawLine(8, height-11, 8, height-7);
+
+ g.drawLine(12, height-13, 12, height-5);
+ g.drawLine(4, height-5, 12, height-5);
+
+ g.setForegroundColor(button3Color);
+ g.drawLine(5, height-4, 13, height-4);
+ g.drawLine(13, height-4, 13, height-12);
+
+ g.drawLine(6, height-6, 11, height-6);
+ g.drawLine(11, height-6, 11, height-12);
+
+ g.setForegroundColor(whiteColor);
+ g.drawLine(5, height-6, 5, height-12);
+ g.drawLine(5, height-12, 11, height-12);
+ }
+ }
}
class GroupBorder extends LineBorder {
@@ -279,7 +326,6 @@
public void paint(IFigure figure, Graphics graphics, Insets insets) {
Rectangle r = getPaintRectangle(figure, insets).getCopy();
graphics.translate(r.getLocation());
- int start = 0;
int width = r.width - 1;
int height = r.height - 1;
@@ -288,14 +334,14 @@
else
graphics.setForegroundColor(darkGrayColor);
- graphics.drawLine(start + 1, 0, width - 15, 0);
- graphics.drawLine(start, 1, start, height - 2);
- graphics.drawLine(start + 1, height - 1, width - 2, height - 1);
+ graphics.drawLine(1, 0, width - 15, 0);
+ graphics.drawLine(0, 1, 0, height - 2);
+ graphics.drawLine(1, height - 1, width - 2, height - 1);
graphics.drawLine(width - 1, 14, width - 1, height - 2);
graphics.drawLine(width - 15, 0, width - 1, 14);
- graphics.drawLine(start, 1, start + 1, 0);
- graphics.drawLine(start, height - 2, start + 1, height - 1);
+ graphics.drawLine(0, 1, 1, 0);
+ graphics.drawLine(0, height - 2, 1, height - 1);
graphics.drawLine(width - 2, height - 1, width - 1, height - 2);
graphics.drawLine(width - 15, 0, width - 14, 4);
@@ -304,16 +350,9 @@
graphics.drawLine(width - 18, 10, width - 1, 14);
- graphics.drawLine(start + 23, 0, start + 23, 19);
- graphics.drawLine(start, 20, start + 22, 20);
- graphics.drawLine(start + 22, 20, start + 23, 19);
-
-
- if (page != null /*&& group.isConfirmed()*/)
- graphics.setForegroundColor(borderColor);
- else
- graphics.setForegroundColor(darkGrayColor);
-
+ graphics.drawLine(23, 0, 23, 19);
+ graphics.drawLine(0, 20, 22, 20);
+ graphics.drawLine(22, 20, 23, 19);
}
public void mouseDoubleClicked(MouseEvent me) {
16 years, 7 months
JBoss Tools SVN: r8460 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-05-30 08:21:18 -0400 (Fri, 30 May 2008)
New Revision: 8460
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectAction.java
Log:
JBIDE-1189
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectAction.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectAction.java 2008-05-30 12:20:50 UTC (rev 8459)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectAction.java 2008-05-30 12:21:18 UTC (rev 8460)
@@ -54,15 +54,20 @@
}
public void actionPerformed() {
try {
+ XAction runAction = action;
+ XModelObject runObject = object;
+
XRedirect redirect = action.getRedirect();
XAction redirectAction = null;
XModelObject redirectObject = null;
- if(redirect != null) {
- redirectAction = redirect.getRedirectAction(object);
- redirectObject = redirect.getRedirectSource(object);
+ while(redirect != null) {
+ redirectAction = redirect.getRedirectAction(runObject);
+ redirectObject = redirect.getRedirectSource(runObject);
+ redirect = redirectAction == null ? null : redirectAction.getRedirect();
+ if(redirect != null) {
+ runObject = redirectObject;
+ }
}
- XAction runAction = action;
- XModelObject runObject = object;
if(redirectAction != null && redirectObject != null) {
runAction = redirectAction;
runObject = redirectObject;
16 years, 7 months
JBoss Tools SVN: r8459 - in trunk/seam/plugins/org.jboss.tools.seam.pages.xml: src/org/jboss/tools/seam/pages/xml/model/handlers and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-05-30 08:20:50 -0400 (Fri, 30 May 2008)
New Revision: 8459
Modified:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages.meta
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddExceptionHandler.java
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java
Log:
JBIDE-1189
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages.meta 2008-05-30 11:37:32 UTC (rev 8458)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages.meta 2008-05-30 12:20:50 UTC (rev 8459)
@@ -2819,6 +2819,11 @@
<AttributeData AttributeName="template" Mandatory="no"/>
</EntityData>
</XActionItem>
+ <XActionItem
+ HandlerClassName="org.jboss.tools.jsf.model.handlers.JSFProcessRegirectHandler"
+ ICON="action.empty"
+ PROPERTIES="actionpath=CreateActions/AddException"
+ displayName="New Exception..." kind="action" name="AddException"/>
</XActionItem>
<XActionItem HIDE="always"
HandlerClassName="org.jboss.tools.jsf.model.handlers.CreateCommentHandler"
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddExceptionHandler.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddExceptionHandler.java 2008-05-30 11:37:32 UTC (rev 8458)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddExceptionHandler.java 2008-05-30 12:20:50 UTC (rev 8459)
@@ -3,13 +3,29 @@
import java.util.Properties;
import org.jboss.tools.common.meta.action.impl.handlers.DefaultCreateHandler;
+import org.jboss.tools.common.model.XModelException;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.util.XModelObjectLoaderUtil;
+import org.jboss.tools.seam.pages.xml.model.helpers.SeamPagesProcessStructureHelper;
public class AddExceptionHandler extends DefaultCreateHandler {
public AddExceptionHandler() {}
+ public void executeHandler(XModelObject object, Properties prop) throws XModelException {
+ super.executeHandler(object, prop);
+ if(prop == null) return;
+ XModelObject created = (XModelObject)prop.get("created");
+ if(created == null) return;
+ String path = created.getPathPart();
+ XModelObject item = SeamPagesProcessStructureHelper.getInstance().getProcess(object).getChildByPath(path);
+ String shape = getShape(prop);
+ if(item != null && shape != null) {
+ item.setAttributeValue("shape", shape);
+ }
+
+ }
+
protected XModelObject modifyCreatedObject(XModelObject o) {
Properties p = extractProperties(data[0]);
String childEntity = action.getProperty("childEntity");
@@ -18,4 +34,10 @@
return o;
}
+ public static String getShape(Properties p) {
+ String x = p.getProperty("process.mouse.x");
+ String y = p.getProperty("process.mouse.y");
+ return (x == null || y == null) ? null : x + "," + y + ",0,0";
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java 2008-05-30 11:37:32 UTC (rev 8458)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/handlers/AddViewSupport.java 2008-05-30 12:20:50 UTC (rev 8459)
@@ -201,9 +201,7 @@
}
private String getShape() {
- String x = getProperties().getProperty("process.mouse.x");
- String y = getProperties().getProperty("process.mouse.y");
- return (x == null || y == null) ? null : x + "," + y + ",0,0";
+ return AddExceptionHandler.getShape(getProperties());
}
public static String revalidatePath(String path) {
16 years, 7 months
JBoss Tools SVN: r8458 - in trunk/seam/plugins/org.jboss.tools.seam.ui.pages: src/org/jboss/tools/seam/ui/pages/editor/edit and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-05-30 07:37:32 -0400 (Fri, 30 May 2008)
New Revision: 8458
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/.classpath
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1189
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/.classpath
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/.classpath 2008-05-30 11:26:21 UTC (rev 8457)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/.classpath 2008-05-30 11:37:32 UTC (rev 8458)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java 2008-05-30 11:26:21 UTC (rev 8457)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java 2008-05-30 11:37:32 UTC (rev 8458)
@@ -185,9 +185,9 @@
return getNodeFigure().getSourceConnectionAnchorAt(pt);
}
- protected List getModelChildren() {
- return getPageModel().getChildren();
- }
+// protected List getModelChildren() {
+// return getPageModel().getChildren();
+// }
protected void refreshChildren() {
super.refreshChildren();
16 years, 7 months
JBoss Tools SVN: r8457 - in trunk/seam/plugins/org.jboss.tools.seam.pages.xml: src/org/jboss/tools/seam/pages/xml/model and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-05-30 07:26:21 -0400 (Fri, 30 May 2008)
New Revision: 8457
Modified:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages.meta
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/SeamPagesConstants.java
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers/SeamPagesProcessHelper.java
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers/SeamPagesProcessStructureHelper.java
Log:
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages.meta 2008-05-30 11:26:05 UTC (rev 8456)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/resources/meta/seam-pages.meta 2008-05-30 11:26:21 UTC (rev 8457)
@@ -2911,6 +2911,7 @@
</Constraint>
<Editor name="Uneditable"/>
</XModelAttribute>
+ <XModelAttribute name="params"/>
</XModelAttributes>
<XActionItem kind="list">
<XActionItem ICON="action.empty" displayName="New" group="1"
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/SeamPagesConstants.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/SeamPagesConstants.java 2008-05-30 11:26:05 UTC (rev 8456)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/SeamPagesConstants.java 2008-05-30 11:26:21 UTC (rev 8457)
@@ -35,6 +35,10 @@
public String ENT_RULE_12 = "SeamPageRule" + SUFF_12;
public String ENT_RULE_20 = "SeamPageRule" + SUFF_20;
+ public String ENT_PARAM = "SeamPageParam";
+ public String ENT_PARAM_12 = ENT_PARAM + SUFF_12;
+ public String ENT_PARAM_20 = ENT_PARAM + SUFF_20;
+
public String ATTR_NAME = "name"; //$NON-NLS-1$
public String ATTR_PATH = "path"; //$NON-NLS-1$
public String ATTR_VALUE = "value"; //$NON-NLS-1$
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers/SeamPagesProcessHelper.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers/SeamPagesProcessHelper.java 2008-05-30 11:26:05 UTC (rev 8456)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers/SeamPagesProcessHelper.java 2008-05-30 11:26:21 UTC (rev 8457)
@@ -202,6 +202,12 @@
XModelObject sourcePage = item.getReference();
item.setAttributeValue(ATTR_ID, sourcePage.getPathPart());
item.setAttributeValue(ATTR_PATH, sourcePage.getAttributeValue(ATTR_VIEW_ID));
+ String[][] params = SeamPagesProcessStructureHelper.getInstance().getParams(item);
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < params.length; i++) {
+ sb.append(params[i][0]).append('=').append(params[i][1]).append(';');
+ }
+ item.setAttributeValue("params", sb.toString());
XModelObject[] cs = getPageTargets(sourcePage);
updateOutputs(item, cs);
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers/SeamPagesProcessStructureHelper.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers/SeamPagesProcessStructureHelper.java 2008-05-30 11:26:05 UTC (rev 8456)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers/SeamPagesProcessStructureHelper.java 2008-05-30 11:26:21 UTC (rev 8457)
@@ -1,5 +1,8 @@
package org.jboss.tools.seam.pages.xml.model.helpers;
+import java.util.ArrayList;
+import java.util.List;
+
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.jst.web.model.ReferenceObject;
import org.jboss.tools.jst.web.model.helpers.WebProcessStructureHelper;
@@ -58,5 +61,20 @@
}
return null;
}
+
+ public String[][] getParams(XModelObject item) {
+ XModelObject o = getReference(item);
+ if(o == null) return new String[0][];
+ XModelObject[] os = o.getChildren();
+ List<String[]> list = new ArrayList<String[]>();
+ for (int i = 0; i < os.length; i++) {
+ if(os[i].getModelEntity().getName().startsWith(ENT_PARAM)) {
+ String n = os[i].getAttributeValue(ATTR_NAME);
+ String v = os[i].getAttributeValue(ATTR_VALUE);
+ list.add(new String[]{n, v});
+ }
+ }
+ return list.toArray(new String[0][]);
+ }
}
16 years, 7 months
JBoss Tools SVN: r8456 - trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-05-30 07:26:05 -0400 (Fri, 30 May 2008)
New Revision: 8456
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PageImpl.java
Log:
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PageImpl.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PageImpl.java 2008-05-30 11:19:58 UTC (rev 8455)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PageImpl.java 2008-05-30 11:26:05 UTC (rev 8456)
@@ -6,6 +6,9 @@
*/
package org.jboss.tools.seam.ui.pages.editor.ecore.pages.impl;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.emf.common.notify.Notification;
@@ -17,7 +20,9 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.seam.pages.xml.model.helpers.SeamPagesProcessStructureHelper;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Page;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesFactory;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesPackage;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Param;
/**
* <!-- begin-user-doc -->
@@ -33,6 +38,9 @@
* @generated
*/
public class PageImpl extends PagesElementImpl implements Page {
+
+ private String params = "";
+
/**
* The default value of the '{@link #isParamsVisible() <em>Params Visible</em>}' attribute.
* <!-- begin-user-doc -->
@@ -186,7 +194,42 @@
if(shape != null && shape.length >= 4) {
setSize(new Dimension(shape[2],shape[3]));
}
+
+ String newParams = item.getAttributeValue("params");
+ if(newParams == null) newParams = "";
+ if(!params.equals(newParams)) {
+ params = newParams;
+ String[][] ps1 = h.getParams(item);
+ List<Param> ps2 = getParams();
+ for (int i = 0; i < ps1.length && i < ps2.size(); i++) {
+ Param p = ps2.get(i);
+ p.setName(ps1[i][0]);
+ p.setValue(ps1[i][1]);
+ }
+ if(ps1.length > ps2.size()) {
+ for (int i = ps2.size(); i < ps1.length; i++) {
+ Param p = PagesFactory.eINSTANCE.createParam();
+ p.setName(ps1[i][0]);
+ p.setValue(ps1[i][1]);
+ getChildren().add(p);
+ }
+ } else if(ps1.length < ps2.size()) {
+ for (int i = ps1.length; i < ps2.size(); i++) {
+ getChildren().remove(ps2.get(i));
+ }
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ List<Param> getParams() {
+ List<Param> ps = new ArrayList<Param>();
+ return ps;
}
} //PageImpl
16 years, 7 months
JBoss Tools SVN: r8455 - in trunk/documentation/jboss-tools-docs: index and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-05-30 07:19:58 -0400 (Fri, 30 May 2008)
New Revision: 8455
Modified:
trunk/documentation/jboss-tools-docs/all-guides.xml
trunk/documentation/jboss-tools-docs/index/master.xml
trunk/documentation/jboss-tools-docs/index/pom.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-344 - applying nightly docs page styles
Modified: trunk/documentation/jboss-tools-docs/all-guides.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/all-guides.xml 2008-05-30 11:03:06 UTC (rev 8454)
+++ trunk/documentation/jboss-tools-docs/all-guides.xml 2008-05-30 11:19:58 UTC (rev 8455)
@@ -22,12 +22,12 @@
-->
<fileSets>
<fileSet>
- <directory>index/target/docbook/publish/en-US</directory>
- <outputDirectory>../index</outputDirectory>
+ <directory>index/target/docbook/publish/en-US/html_single/</directory>
+ <outputDirectory>../</outputDirectory>
<filtered>false</filtered>
<lineEnding>keep</lineEnding>
<includes>
- <include>**/*.*</include>
+ <include>index.html</include>
</includes>
<useStrictFiltering>false</useStrictFiltering>
<useDefaultExcludes>true</useDefaultExcludes>
@@ -35,6 +35,19 @@
<directoryMode>0755</directoryMode>
</fileSet>
<fileSet>
+ <directory>index/target/docbook/publish/en-US/html_single/</directory>
+ <outputDirectory>../</outputDirectory>
+ <filtered>false</filtered>
+ <lineEnding>keep</lineEnding>
+ <excludes>
+ <exclude>index.html</exclude>
+ </excludes>
+ <useStrictFiltering>false</useStrictFiltering>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ <fileMode>0644</fileMode>
+ <directoryMode>0755</directoryMode>
+ </fileSet>
+ <fileSet>
<directory>../guides/Exadel-migration/target/docbook/publish/en-US</directory>
<outputDirectory>/Exadel-migration</outputDirectory>
<filtered>false</filtered>
Modified: trunk/documentation/jboss-tools-docs/index/master.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/index/master.xml 2008-05-30 11:03:06 UTC (rev 8454)
+++ trunk/documentation/jboss-tools-docs/index/master.xml 2008-05-30 11:19:58 UTC (rev 8455)
@@ -11,105 +11,110 @@
<holder>JBoss, a division of Red Hat Inc.</holder>
</copyright>
</bookinfo>
- <itemizedlist>
-
- <listitem>
- <para>Getting Started with JBoss Developer Studio Guide
- <ulink url="../../en/GettingStartedGuide/html/index.html">(html)</ulink>
- <ulink url="../../en/GettingStartedGuide/html_single/index.html">(html single)</ulink>
- <ulink url="../../en/GettingStartedGuide/pdf/Getting_Started_Guide.pdf">(pdf)</ulink>
- </para>
- </listitem>
+ <index>
+ <title/>
+ <indexentry>
+ <primaryie>Getting Started with JBoss Developer Studio Guide <ulink
+ url="en/GettingStartedGuide/html/index.html">(html)</ulink>
+ <ulink url="en/GettingStartedGuide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/GettingStartedGuide/pdf/Getting_Started_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
- <listitem>
- <para>Seam Dev Tools Reference Guide
- <ulink url="../../en/seam/html/index.html">(html)</ulink>
- <ulink url="../../en/seam/html_single/index.html">(html single)</ulink>
- <ulink url="../../en/seam/pdf/Seam_Reference_Guide.pdf">(pdf)</ulink>
- </para>
- </listitem>
-
- <listitem>
- <para>Visual Web Tools Reference Guide
- <ulink url="../../en/jsf/html/index.html">(html)</ulink>
- <ulink url="../../en/jsf/html_single/index.html">(html single)</ulink>
- <ulink url="../../en/jsf/pdf/Visual_Web_Tools_Reference_Guide.pdf">(pdf)</ulink>
- </para>
- </listitem>
-
- <listitem>
- <para>JBoss Server Manager Reference Guide
- <ulink url="../../en/as/html/index.html">(html)</ulink>
- <ulink url="../../en/as/html_single/index.html">(html single)</ulink>
- <ulink url="../../en/as/pdf/AS_Reference_Guide.pdf">(pdf)</ulink>
- </para>
- </listitem>
-
- <listitem>
- <para>jBPM Tools Reference Guide
- <ulink url="../../en/jbpm/html/index.html">(html)</ulink>
- <ulink url="../../en/jbpm/html_single/index.html">(html single)</ulink>
- <ulink url="../../en/jbpm/pdf/JBPM_Reference_Guide.pdf">(pdf)</ulink>
- </para>
- </listitem>
-
- <listitem>
- <para>Hibernate Tools Reference Guide
- <ulink url="../../en/hibernatetools/html/index.html">(html)</ulink>
- <ulink url="../../en/hibernatetools/html_single/index.html">(html single)</ulink>
- <ulink url="../../en/hibernatetools/pdf/Hibernatetools_Reference_Guide.pdf">(pdf)</ulink>
- </para>
- </listitem>
-
- <listitem>
- <para>ESB Editor Reference Guide
- <ulink url="../../en/esb_ref_Guide/html/index.html">(html)</ulink>
- <ulink url="../../en/esb_ref_Guide/html_single/index.html">(html single)</ulink>
- <ulink url="../../en/esb_ref_Guide/pdf/Hibernatetools_Reference_Guide.pdf">(pdf)</ulink>
- </para>
- </listitem>
-
- <listitem>
- <para>JSF Tools Reference Guide
- <ulink url="../../en/jsf_tools_ref_Guide/html/index.html">(html)</ulink>
- <ulink url="../../en/jsf_tools_ref_Guide/html_single/index.html">(html single)</ulink>
- <ulink url="../../en/jsf_tools_ref_Guide/pdf/JSF_Tools_Reference_Guide.pdf">(pdf)</ulink>
- </para>
- </listitem>
-
- <listitem>
- <para>JSF Tools Tutorial
- <ulink url="../../en/jsf_tools_tutorial/html/index.html">(html)</ulink>
- <ulink url="../../en/jsf_tools_tutorial/html_single/index.html">(html single)</ulink>
- <ulink url="../../en/jsf_tools_tutorial/pdf/JSF_Tools_Tutorial.pdf">(pdf)</ulink>
- </para>
- </listitem>
-
- <listitem>
- <para>Struts Tools Reference Guide
- <ulink url="../../en/struts_tools_ref_Guide/html/index.html">(html)</ulink>
- <ulink url="../../en/struts_tools_ref_Guide/html_single/index.html">(html single)</ulink>
- <ulink url="../../en/struts_tools_ref_Guide/pdf/Struts_Tools_Reference_Guide.pdf">(pdf)</ulink>
- </para>
- </listitem>
+ <indexentry>
+ <primaryie>Seam Dev Tools Reference Guide <ulink url="en/seam/html/index.html"
+ >(html)</ulink>
+ <ulink url="en/seam/html_single/index.html">(html single)</ulink>
+ <ulink url="en/seam/pdf/Seam_Reference_Guide.pdf">(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+ <indexentry>
+ <primaryie>Visual Web Tools Reference Guide <ulink url="en/jsf/html/index.html"
+ >(html)</ulink>
+ <ulink url="en/jsf/html_single/index.html">(html single)</ulink>
+ <ulink url="en/jsf/pdf/Visual_Web_Tools_Reference_Guide.pdf">(pdf)</ulink>
+ </primaryie>
+ </indexentry>
- <listitem>
- <para>Struts Tools Tutorial
- <ulink url="../../en/struts_tools_tutorial/html/index.html">(html)</ulink>
- <ulink url="../../en/struts_tools_tutorial/html_single/index.html">(html single)</ulink>
- <ulink url="../../en/struts_tools_tutorial/pdf/Struts_Tools_Tutorial.pdf">(pdf)</ulink>
- </para>
- </listitem>
-
-
- <listitem>
- <para>Exadel Studio Migration Guide
- <ulink url="../../en/Exadel-migration/html/index.html">(html)</ulink>
- <ulink url="../../en/Exadel-migration/html_single/index.html">(html single)</ulink>
- <ulink url="../../en/Exadel-migration/pdf/Exadel_Studio_Migration_Guide.pdf">(pdf)</ulink>
- </para>
- </listitem>
-
- </itemizedlist>
+ <indexentry>
+ <primaryie>JBoss Server Manager Reference Guide <ulink url="en/as/html/index.html"
+ >(html)</ulink>
+ <ulink url="en/as/html_single/index.html">(html single)</ulink>
+ <ulink url="en/as/pdf/AS_Reference_Guide.pdf">(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>jBPM Tools Reference Guide <ulink url="en/jbpm/html/index.html">(html)</ulink>
+ <ulink url="en/jbpm/html_single/index.html">(html single)</ulink>
+ <ulink url="en/jbpm/pdf/JBPM_Reference_Guide.pdf">(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>Hibernate Tools Reference Guide
+ <ulink url="en/hibernatetools/html/index.html">(html)</ulink>
+ <ulink url="en/hibernatetools/html_single/index.html">(html single)</ulink>
+ <ulink url="en/hibernatetools/pdf/Hibernatetools_Reference_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>ESB Editor Reference Guide <ulink
+ url="en/esb_ref_Guide/html/index.html">(html)</ulink>
+ <ulink url="en/esb_ref_Guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/esb_ref_Guide/pdf/Hibernatetools_Reference_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>JSF Tools Reference Guide <ulink
+ url="en/jsf_tools_ref_Guide/html/index.html">(html)</ulink>
+ <ulink url="en/jsf_tools_ref_Guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/jsf_tools_ref_Guide/pdf/JSF_Tools_Reference_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>JSF Tools Tutorial <ulink url="en/jsf_tools_tutorial/html/index.html"
+ >(html)</ulink>
+ <ulink url="en/jsf_tools_tutorial/html_single/index.html">(html single)</ulink>
+ <ulink url="en/jsf_tools_tutorial/pdf/JSF_Tools_Tutorial.pdf">(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>Struts Tools Reference Guide <ulink
+ url="en/struts_tools_ref_Guide/html/index.html">(html)</ulink>
+ <ulink url="en/struts_tools_ref_Guide/html_single/index.html">(html single)</ulink>
+ <ulink url="en/struts_tools_ref_Guide/pdf/Struts_Tools_Reference_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ <indexentry>
+ <primaryie>Struts Tools Tutorial <ulink
+ url="en/struts_tools_tutorial/html/index.html">(html)</ulink>
+ <ulink url="en/struts_tools_tutorial/html_single/index.html">(html single)</ulink>
+ <ulink url="en/struts_tools_tutorial/pdf/Struts_Tools_Tutorial.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+
+ <indexentry>
+ <primaryie>Exadel Studio Migration Guide <ulink
+ url="en/Exadel-migration/html/index.html">(html)</ulink>
+ <ulink url="en/Exadel-migration/html_single/index.html">(html single)</ulink>
+ <ulink url="en/Exadel-migration/pdf/Exadel_Studio_Migration_Guide.pdf"
+ >(pdf)</ulink>
+ </primaryie>
+ </indexentry>
+
+ </index>
</book>
Modified: trunk/documentation/jboss-tools-docs/index/pom.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/index/pom.xml 2008-05-30 11:03:06 UTC (rev 8454)
+++ trunk/documentation/jboss-tools-docs/index/pom.xml 2008-05-30 11:19:58 UTC (rev 8455)
@@ -42,8 +42,8 @@
<formats>
<format>
- <formatName>html</formatName>
- <stylesheetResource>file:${pom.basedir}/${stylesdir}/xslt/org/jboss/tools/xhtml.xsl</stylesheetResource>
+ <formatName>html_single</formatName>
+ <stylesheetResource>file:${pom.basedir}/${stylesdir}/xslt/org/jboss/tools/xhtml-single.xsl</stylesheetResource>
<finalName>index.html</finalName>
</format>
</formats>
16 years, 7 months
JBoss Tools SVN: r8454 - in trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages: impl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-05-30 07:03:06 -0400 (Fri, 30 May 2008)
New Revision: 8454
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/Link.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/LinkImpl.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesElementImpl.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesModelImpl.java
Log:
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/Link.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/Link.java 2008-05-30 11:02:21 UTC (rev 8453)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/Link.java 2008-05-30 11:03:06 UTC (rev 8454)
@@ -89,4 +89,6 @@
* @generated
*/
void setData(Object value);
+
+ public void dataChanged();
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/LinkImpl.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/LinkImpl.java 2008-05-30 11:02:21 UTC (rev 8453)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/LinkImpl.java 2008-05-30 11:03:06 UTC (rev 8454)
@@ -15,8 +15,11 @@
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.seam.pages.xml.model.helpers.SeamPagesProcessStructureHelper;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesElement;
+import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesModel;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.PagesPackage;
/**
@@ -475,4 +478,33 @@
return result.toString();
}
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public void dataChanged() {
+ if(data instanceof XModelObject) {
+ XModelObject object = (XModelObject)data;
+ PagesModel pagesModel = null;
+ if(getFromElement() != null) {
+ pagesModel = getFromElement().getPagesModel();
+ } else if(getToElement() != null) {
+ pagesModel = getToElement().getPagesModel();
+ } else {
+ return;
+ }
+ SeamPagesProcessStructureHelper h = SeamPagesProcessStructureHelper.getInstance();
+ XModelObject t = h.getItemOutputTarget(object);
+ if(t != null) {
+ PagesElement to = pagesModel.findElement(t);
+ if(to != getToElement()) {
+ setToElement(to);
+ }
+ }
+ setName(h.getItemOutputPresentation(object));
+ setShortcut(h.isShortcut(object));
+ }
+ }
+
} //LinkImpl
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesElementImpl.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesElementImpl.java 2008-05-30 11:02:21 UTC (rev 8453)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesElementImpl.java 2008-05-30 11:03:06 UTC (rev 8454)
@@ -617,9 +617,7 @@
Link link = PagesFactory.eINSTANCE.createLink();
pagesModel.bindLink(childData, link);
link.setFromElement(from);
- link.setToElement(to);
- link.setName(h.getItemOutputPresentation(object));
- link.setShortcut(h.isShortcut(object));
+ link.dataChanged();
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesModelImpl.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesModelImpl.java 2008-05-30 11:02:21 UTC (rev 8453)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/ecore/pages/impl/PagesModelImpl.java 2008-05-30 11:03:06 UTC (rev 8454)
@@ -292,11 +292,14 @@
if(!event.getModelObject().getPath().startsWith(installedProcess.getPath())) {
return;
}
- PagesElement item = findElement(event.getModelObject());
+ PagesElement item = findElement(event.getInfo().toString());
if(item != null) {
item.dataChanged();
}
- //TODO update link
+ Link link = findLink(event.getInfo().toString());
+ if(link != null) {
+ link.dataChanged();
+ }
}
/**
@@ -323,7 +326,6 @@
if(target == installedProcess) {
PagesElement removed = findElement(event.getInfo());
if(removed != null) {
-
Link[] ls = removed.getOutputLinks().toArray(new Link[0]);
for (int i = 0; i < ls.length; i++) {
ls[i].setFromElement(null);
16 years, 7 months
JBoss Tools SVN: r8453 - in trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor: figures and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-05-30 07:02:21 -0400 (Fri, 30 May 2008)
New Revision: 8453
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1189
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java 2008-05-30 10:01:41 UTC (rev 8452)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/PageEditPart.java 2008-05-30 11:02:21 UTC (rev 8453)
@@ -39,12 +39,6 @@
public class PageEditPart extends PagesEditPart implements PropertyChangeListener, EditPartListener, Adapter {
private PageFigure fig = null;
- private boolean single = true;
-
- public boolean isSingle() {
- return single;
- }
-
public void doControlUp() {
}
@@ -181,20 +175,14 @@
public ConnectionAnchor getSourceConnectionAnchor(
ConnectionEditPart connEditPart) {
- if (single) {
Link link = (Link) connEditPart.getModel();
int index = getPageModel().getOutputLinks().indexOf(link);
return getNodeFigure().getConnectionAnchor((index + 1) + "_OUT");
- } else
- return super.getSourceConnectionAnchor(connEditPart);
}
public ConnectionAnchor getSourceConnectionAnchor(Request request) {
- if (single) {
Point pt = new Point(((DropRequest) request).getLocation());
return getNodeFigure().getSourceConnectionAnchorAt(pt);
- } else
- return super.getSourceConnectionAnchor(request);
}
protected List getModelChildren() {
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java 2008-05-30 10:01:41 UTC (rev 8452)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/PageFigure.java 2008-05-30 11:02:21 UTC (rev 8453)
@@ -117,13 +117,12 @@
public void addConnectionAnchor(int number) {
FixedConnectionAnchor c;
- if (number == 1)
- return;
+ //if (number == 1)
+ //return;
c = new FixedConnectionAnchor(this);
- c.offsetV = 32 + LINK_HEIGHT * (number - 1);
- // c.offsetH = -1;
+ c.offsetV = 32 + LINK_HEIGHT * number;
c.leftToRight = false;
- connectionAnchors.put(number + "_OUT", c);
+ connectionAnchors.put((number + 1) + "_OUT", c);
outputConnectionAnchors.addElement(c);
}
@@ -164,7 +163,14 @@
}
}
-
+ public ConnectionAnchor getConnectionAnchor(String terminal) {
+ ConnectionAnchor anchor = (ConnectionAnchor)connectionAnchors.get(terminal);
+ while(anchor == null){
+ addConnectionAnchor(outputConnectionAnchors.size());
+ anchor = (ConnectionAnchor)connectionAnchors.get(terminal);
+ }
+ return anchor;
+ }
/**
* @see org.eclipse.gef.handles.HandleBounds#getHandleBounds()
*/
@@ -261,6 +267,8 @@
g.fillPolygon(shadowPointlist);
g.fillPolygon(shadow2Pointlist);
+
+
}
class GroupBorder extends LineBorder {
16 years, 7 months
JBoss Tools SVN: r8452 - trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-05-30 06:01:41 -0400 (Fri, 30 May 2008)
New Revision: 8452
Modified:
trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers/SeamPagesProcessHelper.java
Log:
Modified: trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers/SeamPagesProcessHelper.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers/SeamPagesProcessHelper.java 2008-05-30 10:01:34 UTC (rev 8451)
+++ trunk/seam/plugins/org.jboss.tools.seam.pages.xml/src/org/jboss/tools/seam/pages/xml/model/helpers/SeamPagesProcessHelper.java 2008-05-30 10:01:41 UTC (rev 8452)
@@ -313,6 +313,11 @@
output.setAttributeValue(ATTR_PATH, rulecase.getAttributeValue(ATTR_VIEW_ID));
String name = XModelObjectUtil.createNewChildName("output", item);
output.setAttributeValue(ATTR_NAME, name);
+
+ ReferenceObjectImpl r = (ReferenceObjectImpl)output;
+ r.setReference(rulecase);
+ updateOutput(r);
+
item.addChild(output);
return output;
}
16 years, 7 months