svn commit: r16640 - trunk/src: argouml-app/src/org/argouml/uml argouml-app/src/org/argouml/uml/diagram argouml-app/src/org/argouml/uml/diagram/collaboration/ui argouml-app/src/org/argouml/uml/diagram/deployment/ui argouml-app/src/org/argouml/uml/diagram/sequence/ui argouml-app/src/org/argouml/uml/diagram/state/ui argouml-app/src/org/argouml/uml/diagram/static_structure/ui argouml-app/src/org/argouml/uml/diagram/use_case/ui argouml-app/tests/org/argouml/cognitive argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram
Tom Morris <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: tfmorris Date: 2009-01-17 14:06:52-0800 New Revision: 16640 Modified: trunk/src/argouml-app/src/org/argouml/uml/CommentEdge.java trunk/src/argouml-app/src/org/argouml/uml/diagram/UmlDiagramRenderer.java trunk/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/CollabDiagramRenderer.java trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/DeploymentDiagramRenderer.java trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/SequenceDiagramRenderer.java trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/StateDiagramRenderer.java trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/ClassDiagramRenderer.java trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEdgeNote.java trunk/src/argouml-app/src/org/argouml/uml/diagram/use_case/ui/UseCaseDiagramRenderer.java trunk/src/argouml-app/tests/org/argouml/cognitive/TestItemUID.java trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SequenceDiagramRenderer.java Log: Issue 5500: Update FigEdgeNote to new constructor. No longer a subclass of FigEdgeModelElement since it has a non model element owner (CommentEdge) Modified: trunk/src/argouml-app/src/org/argouml/uml/CommentEdge.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/CommentEdge.java?view=diff&pathrev=16640&r1=16639&r2=16640 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/uml/CommentEdge.java (original) +++ trunk/src/argouml-app/src/org/argouml/uml/CommentEdge.java 2009-01-17 14:06:52-0800 @@ -39,6 +39,10 @@ * The source and destination are ModelElements. * At least one of them is a Comment - but they may be both Comments. * + * TODO: There's tons of special case code scattered around ArgoUML for this + * one class since it is the only "owner" of a FigEdgeModelElement which is not + * a UML element. We should find a way to generalize this.<p> + * * @since Jul 17, 2004 * @author [email protected] */ @@ -146,9 +150,10 @@ if (Model.getFacade().isAComment(source)) { Model.getCoreHelper().removeAnnotatedElement(source, dest); } else { - // not save to presume the destination is the comment - if (Model.getFacade().isAComment(dest)) + // not safe to presume the destination is the comment + if (Model.getFacade().isAComment(dest)) { Model.getCoreHelper().removeAnnotatedElement(dest, source); + } } this.sendNotification(new Notification("remove", this, 0)); } Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/UmlDiagramRenderer.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/UmlDiagramRenderer.java?view=diff&pathrev=16640&r1=16639&r2=16640 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/uml/diagram/UmlDiagramRenderer.java (original) +++ trunk/src/argouml-app/src/org/argouml/uml/diagram/UmlDiagramRenderer.java 2009-01-17 14:06:52-0800 @@ -275,7 +275,7 @@ newEdge = new FigDependency(); } } else if (edge instanceof CommentEdge) { - newEdge = new FigEdgeNote(); + newEdge = null; } else if (Model.getFacade().isAAssociationRole(edge)) { newEdge = new FigAssociationRole(); } else if (Model.getFacade().isATransition(edge)) { Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/CollabDiagramRenderer.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/CollabDiagramRenderer.java?view=diff&pathrev=16640&r1=16639&r2=16640 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/CollabDiagramRenderer.java (original) +++ trunk/src/argouml-app/src/org/argouml/uml/diagram/collaboration/ui/CollabDiagramRenderer.java 2009-01-17 14:06:52-0800 @@ -131,7 +131,7 @@ } else if (Model.getFacade().isADependency(edge)) { newEdge = new FigDependency(edge , settings); } else if (edge instanceof CommentEdge) { - newEdge = new FigEdgeNote(edge, lay); // TODO -> settings + newEdge = new FigEdgeNote(edge, settings); // TODO -> settings } if (newEdge == null) { Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/DeploymentDiagramRenderer.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/DeploymentDiagramRenderer.java?view=diff&pathrev=16640&r1=16639&r2=16640 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/DeploymentDiagramRenderer.java (original) +++ trunk/src/argouml-app/src/org/argouml/uml/diagram/deployment/ui/DeploymentDiagramRenderer.java 2009-01-17 14:06:52-0800 @@ -159,7 +159,7 @@ } else if (Model.getFacade().isAGeneralization(edge)) { newEdge = new FigGeneralization(edge, settings); } else if (edge instanceof CommentEdge) { - newEdge = new FigEdgeNote(edge, lay); + newEdge = new FigEdgeNote(edge, settings); } if (newEdge == null) { throw new IllegalArgumentException( Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/SequenceDiagramRenderer.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/SequenceDiagramRenderer.java?view=diff&pathrev=16640&r1=16639&r2=16640 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/SequenceDiagramRenderer.java (original) +++ trunk/src/argouml-app/src/org/argouml/uml/diagram/sequence/ui/SequenceDiagramRenderer.java 2009-01-17 14:06:52-0800 @@ -95,7 +95,7 @@ if (edge instanceof CommentEdge) { - figEdge = new FigEdgeNote(edge, lay); + figEdge = new FigEdgeNote(edge, settings); } else { figEdge = getFigEdgeFor(edge, styleAttributes); } Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/StateDiagramRenderer.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/StateDiagramRenderer.java?view=diff&pathrev=16640&r1=16639&r2=16640 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/StateDiagramRenderer.java (original) +++ trunk/src/argouml-app/src/org/argouml/uml/diagram/state/ui/StateDiagramRenderer.java 2009-01-17 14:06:52-0800 @@ -117,7 +117,7 @@ if (Model.getFacade().isATransition(edge)) { newEdge = new FigTransition(edge, settings); } else if (edge instanceof CommentEdge) { - newEdge = new FigEdgeNote(edge, lay); // TODO -> settings + newEdge = new FigEdgeNote(edge, settings); // TODO -> settings } if (newEdge == null) { LOG.debug("TODO: StateDiagramRenderer getFigEdgeFor"); Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/ClassDiagramRenderer.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/ClassDiagramRenderer.java?view=diff&pathrev=16640&r1=16639&r2=16640 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/ClassDiagramRenderer.java (original) +++ trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/ClassDiagramRenderer.java 2009-01-17 14:06:52-0800 @@ -153,7 +153,7 @@ ArgoDiagram diag = (ArgoDiagram) ((LayerPerspective) lay).getDiagram(); DiagramSettings settings = diag.getDiagramSettings(); - FigEdgeModelElement newEdge = null; + FigEdge newEdge = null; if (Model.getFacade().isAAssociationClass(edge)) { newEdge = new FigAssociationClass(edge, settings); } else if (Model.getFacade().isAAssociationEnd(edge)) { @@ -231,7 +231,7 @@ newEdge = depFig; } } else if (edge instanceof CommentEdge) { - newEdge = new FigEdgeNote(edge, lay); + newEdge = new FigEdgeNote(edge, settings); } if (newEdge == null) { @@ -244,8 +244,8 @@ assert newEdge != null : "There has been no FigEdge created"; - newEdge.setDiElement( - GraphChangeAdapter.getInstance().createElement(gm, edge)); +// newEdge.setDiElement( +// GraphChangeAdapter.getInstance().createElement(gm, edge)); assert newEdge != null : "There has been no FigEdge created"; assert (newEdge.getDestFigNode() != null) Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEdgeNote.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEdgeNote.java?view=diff&pathrev=16640&r1=16639&r2=16640 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEdgeNote.java (original) +++ trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/FigEdgeNote.java 2009-01-17 14:06:52-0800 @@ -24,138 +24,74 @@ package org.argouml.uml.diagram.static_structure.ui; -import java.awt.event.KeyListener; import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; -import java.beans.VetoableChangeListener; -import javax.swing.Action; + import org.apache.log4j.Logger; import org.argouml.i18n.Translator; -import org.argouml.kernel.DelayedVChangeListener; +import org.argouml.kernel.Project; import org.argouml.model.Model; import org.argouml.model.RemoveAssociationEvent; import org.argouml.uml.CommentEdge; -import org.argouml.uml.diagram.ui.FigEdgeModelElement; -import org.argouml.uml.diagram.ui.FigNodeModelElement; -import org.tigris.gef.base.Layer; -import org.tigris.gef.base.LayerPerspectiveMutable; +import org.argouml.uml.diagram.DiagramSettings; +import org.argouml.uml.diagram.ui.ArgoFig; +import org.argouml.uml.diagram.ui.ArgoFigUtil; +import org.argouml.util.IItemUID; +import org.argouml.util.ItemUID; import org.tigris.gef.presentation.Fig; +import org.tigris.gef.presentation.FigEdgePoly; import org.tigris.gef.presentation.FigNode; - /** - * Class to display a UML note connection to a - * annotated model element.<p> - * - * The owner of this fig is always CommentEdge - * + * Class to display a UML note connection to a annotated model element. + * <p> + * + * The owner of this fig is always a CommentEdge. Because it is different from + * most every other FigEdge in ArgoUML, it doesn't subclass FigEdgeModelElement. + * * @author Andreas Rueckert [email protected] * @author [email protected] */ -public class FigEdgeNote - extends FigEdgeModelElement - implements VetoableChangeListener, - DelayedVChangeListener, - MouseListener, - KeyListener, - PropertyChangeListener { - - private static final long serialVersionUID = 7210384676965727564L; +public class FigEdgeNote extends FigEdgePoly implements ArgoFig, IItemUID, + PropertyChangeListener { private static final Logger LOG = Logger.getLogger(FigEdgeNote.class); - private CommentEdge owner; - private Object comment; private Object annotatedElement; - /** - * Construct a new note connection. Use the same layout as for - * other edges. - * @deprecated only for use by PGML parser - */ - @SuppressWarnings("deprecation") - @Deprecated - public FigEdgeNote() { - super(); - LOG.info("Constructing a FigEdgeNote"); - setBetweenNearestPoints(true); - getFig().setDashed(true); - allowRemoveFromDiagram(false); - } + private DiagramSettings settings; + private ItemUID itemUid; + /** - * Constructor that hooks the Fig to a CommentEdge. - * - * TODO: What do we need to do about this constructor? It's different - * from all the rest. - * - * @param commentEdge the CommentEdge - * @param theLayer the layer (ignored) - * @deprecated for 0.27.4 by tfmorris. Need to define replacement... - */ - @Deprecated - public FigEdgeNote(Object commentEdge, Layer theLayer) { - this(); - - if (!(theLayer instanceof LayerPerspectiveMutable)) { - throw new IllegalArgumentException( - "The layer must be a mutable perspective. Got " - + theLayer); - } - - if (!(commentEdge instanceof CommentEdge)) { - throw new IllegalArgumentException( - "The owner must be a CommentEdge. Got " + commentEdge); - } - - Object fromNode = ((CommentEdge) commentEdge).getSource(); - if (!(Model.getFacade().isAModelElement(fromNode))) { - throw new IllegalArgumentException( - "The given comment edge must start at a model element. " - + "Got " + fromNode); - } - - Object toNode = ((CommentEdge) commentEdge).getDestination(); - if (!(Model.getFacade().isAModelElement(toNode))) { - throw new IllegalArgumentException( - "The given comment edge must end at a model element. Got " - + toNode); - } - - Fig destFig = theLayer.presentationFor(toNode); - if (destFig instanceof FigEdgeModelElement) { - destFig = ((FigEdgeModelElement) destFig).getEdgePort(); - } - if (!(destFig instanceof FigNodeModelElement)) { - throw new IllegalArgumentException( - "The given comment edge must end at a model element" - + " in the given layer."); - } + * @param element owning CommentEdge object. This is a special case since it + * is not a UML element. + * @param theSettings render settings + */ + public FigEdgeNote(Object element, DiagramSettings theSettings) { + // element will normally be null when called from PGML parser + // It will get it's source & destination set later in attachEdges + super(); + settings = theSettings; - Fig sourceFig = theLayer.presentationFor(fromNode); - if (sourceFig instanceof FigEdgeModelElement) { - sourceFig = ((FigEdgeModelElement) sourceFig).getEdgePort(); + if (element != null) { + setOwner(element); + } else { + setOwner(new CommentEdge()); } - if (!(sourceFig instanceof FigNodeModelElement)) { - throw new IllegalArgumentException( - "The given comment edge must start at a model element " - + "in the given layer."); - } - - setLayer(theLayer); - setDestFigNode((FigNode) destFig); - setDestPortFig(destFig); - setSourceFigNode((FigNode) sourceFig); - setSourcePortFig(sourceFig); - computeRoute(); - - setOwner(commentEdge); + + setBetweenNearestPoints(true); + getFig().setLineWidth(LINE_WIDTH); + getFig().setDashed(true); + + // Unfortunately the Fig and it's associated CommentEdge will not be + // fully initialized yet here if we're being loaded from a PGML file. + // The remainder of the initialization will happen when + // set{Dest|Source}FigNode are called from PGMLStackParser.attachEdges() } - /* * @see org.tigris.gef.presentation.FigEdge#setFig(org.tigris.gef.presentation.Fig) */ @@ -164,14 +100,8 @@ LOG.info("Setting the internal fig to " + f); super.setFig(f); getFig().setDashed(true); - //throw new IllegalArgumentException(); } - /* - * @see org.argouml.uml.diagram.ui.FigEdgeModelElement#canEdit(org.tigris.gef.presentation.Fig) - */ - @Override - protected boolean canEdit(Fig f) { return false; } /* * @see java.lang.Object#toString() @@ -187,7 +117,6 @@ * and this FigEdgeNote. * @see org.argouml.uml.diagram.ui.FigEdgeModelElement#modelChanged(java.beans.PropertyChangeEvent) */ - @Override protected void modelChanged(PropertyChangeEvent e) { if (e instanceof RemoveAssociationEvent && e.getOldValue() == annotatedElement) { @@ -203,81 +132,8 @@ return "Comment Edge"; // TODO: get tip string from comment } - - /* - * @see org.tigris.gef.presentation.Fig#setOwner(java.lang.Object) - */ - @Deprecated - public void setOwner(Object newOwner) { - if (newOwner == null) { - // hack to avoid loading problems since we cannot store - // the whole model yet in XMI - newOwner = new CommentEdge(comment, annotatedElement); - } - owner = (CommentEdge) newOwner; - } - - /* - * @see org.tigris.gef.presentation.Fig#getOwner() - */ - @Override - public Object getOwner() { - if (owner == null) { - // hack to avoid loading problems since we cannot store - // the whole model yet in XMI - owner = new CommentEdge(); - } - return owner; - } - - /** - * Overrides the standard method to return null. A note edge - * cannot have a stereotype. - * - * @return empty array of actions. - */ - @Override - protected final Action[] getApplyStereotypeActions() { - return new Action[0]; - } /* - * @see org.tigris.gef.presentation.Fig#postLoad() - */ - @Override - public void postLoad() { - super.postLoad(); - // TODO: Why is a Fig modifying the underlying model?!?! -// CommentEdge o = (CommentEdge) getOwner(); -// o.setDestination(getDestFigNode().getOwner()); -// o.setSource(getSourceFigNode().getOwner()); - } - - /** - * generate the notation for the modelelement and stuff it into the text Fig - */ - @Override - protected void updateNameText() { - return; - } - - /** - * generate the notation for the stereotype and stuff it into the text Fig - */ - @Override - protected void updateStereotypeText() { - return; - } - - /* - * @see org.argouml.uml.diagram.ui.FigEdgeModelElement#updateListeners(java.lang.Object) - */ - @Override - protected void updateListeners(Object oldOwner, Object newOwner) { - // no listeners to update - } - - /* * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent) */ @Override @@ -285,15 +141,22 @@ modelChanged(pve); } - + + /* * @see org.tigris.gef.presentation.Fig#removeFromDiagram() */ @Override - public void removeFromDiagramImpl() { - superRemoveFromDiagram(); + public final void removeFromDiagram() { + Object o = getOwner(); + if (o != null) { + removeElementListener(o); + } + + super.removeFromDiagram(); + damage(); } - + /** * Returns the source of the edge. The source is the owner of the @@ -301,7 +164,6 @@ * instance: for a classifierrole, this is the sender. * @return MModelElement */ - @Override protected Object getSource() { Object theOwner = getOwner(); if (theOwner != null) { @@ -316,7 +178,6 @@ * receiver. * @return Object */ - @Override protected Object getDestination() { Object theOwner = getOwner(); if (theOwner != null) { @@ -330,6 +191,8 @@ */ @Override public void setDestFigNode(FigNode fn) { + // When this is called from PGMLStackParser.attachEdges, we finished + // the initialization of owning pseudo element (CommentEdge) if (fn != null && Model.getFacade().isAComment(fn.getOwner())) { Object oldComment = comment; if (oldComment != null) { @@ -355,6 +218,8 @@ */ @Override public void setSourceFigNode(FigNode fn) { + // When this is called from PGMLStackParser.attachEdges, we finished + // the initialization of owning pseudo element (CommentEdge) if (fn != null && Model.getFacade().isAComment(fn.getOwner())) { Object oldComment = comment; if (oldComment != null) { @@ -372,4 +237,52 @@ } super.setSourceFigNode(fn); } + + private void addElementListener(Object element) { + Model.getPump().addModelEventListener(this, element); + } + + private void removeElementListener(Object element) { + Model.getPump().removeModelEventListener(this, element); + } + + @SuppressWarnings("deprecation") + @Deprecated + public Project getProject() { + return ArgoFigUtil.getProject(this); + } + + public DiagramSettings getSettings() { + return settings; + } + + public void renderingChanged() { + + } + + @SuppressWarnings("deprecation") + @Deprecated + public void setProject(Project project) { + // unimplemented + } + + public void setSettings(DiagramSettings theSettings) { + settings = theSettings; + } + + /** + * Setter for the UID + * @param newId the new UID + */ + public void setItemUID(ItemUID newId) { + itemUid = newId; + } + + /** + * Getter for the UID + * @return the UID + */ + public ItemUID getItemUID() { + return itemUid; + } } Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/use_case/ui/UseCaseDiagramRenderer.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/use_case/ui/UseCaseDiagramRenderer.java?view=diff&pathrev=16640&r1=16639&r2=16640 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/uml/diagram/use_case/ui/UseCaseDiagramRenderer.java (original) +++ trunk/src/argouml-app/src/org/argouml/uml/diagram/use_case/ui/UseCaseDiagramRenderer.java 2009-01-17 14:06:52-0800 @@ -161,7 +161,7 @@ DiagramSettings settings = ((ArgoDiagram) ((LayerPerspective) lay) .getDiagram()).getDiagramSettings(); - FigEdgeModelElement newEdge = null; + FigEdge newEdge = null; if (Model.getFacade().isAAssociation(edge)) { newEdge = new FigAssociation(edge, settings); @@ -226,7 +226,7 @@ newEdge.setDestFigNode(supplierFN); } else if (edge instanceof CommentEdge) { - newEdge = new FigEdgeNote(edge, lay); + newEdge = new FigEdgeNote(edge, settings); } if (newEdge == null) { @@ -240,8 +240,8 @@ lay.add(newEdge); newEdge.setLayer(lay); - newEdge.setDiElement( - GraphChangeAdapter.getInstance().createElement(gm, edge)); +// newEdge.setDiElement( +// GraphChangeAdapter.getInstance().createElement(gm, edge)); return newEdge; } Modified: trunk/src/argouml-app/tests/org/argouml/cognitive/TestItemUID.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/tests/org/argouml/cognitive/TestItemUID.java?view=diff&pathrev=16640&r1=16639&r2=16640 ============================================================================== --- trunk/src/argouml-app/tests/org/argouml/cognitive/TestItemUID.java (original) +++ trunk/src/argouml-app/tests/org/argouml/cognitive/TestItemUID.java 2009-01-17 14:06:52-0800 @@ -58,7 +58,8 @@ import org.argouml.uml.diagram.state.ui.FigShallowHistoryState; import org.argouml.uml.diagram.state.ui.FigTransition; import org.argouml.uml.diagram.state.ui.UMLStateDiagram; -import org.argouml.uml.diagram.static_structure.ui.FigEdgeNote; +import org.argouml.uml.diagram.static_structure.ui.FigClass; +import org.argouml.uml.diagram.static_structure.ui.FigInterface; import org.argouml.uml.diagram.static_structure.ui.FigLink; import org.argouml.uml.diagram.static_structure.ui.FigPackage; import org.argouml.uml.diagram.static_structure.ui.UMLClassDiagram; @@ -67,7 +68,6 @@ import org.argouml.uml.diagram.use_case.ui.FigInclude; import org.argouml.uml.diagram.use_case.ui.FigUseCase; import org.argouml.uml.diagram.use_case.ui.UMLUseCaseDiagram; -import org.argouml.uml.ui.InitUmlUI; import org.argouml.util.ItemUID; @@ -190,21 +190,17 @@ //FigState figstate = new FigState(); FigTransition figtransition = new FigTransition(); - // TODO: Someone apparently disabled this test rather than fixing it! -// Object clazz = Model.getCoreFactory().createClass(); -// FigClass figclass = new FigClass(clazz, bounds, settings); -// checkAssignIDToObject(figclass, true, true); -// Model.getUmlFactory().delete(clazz); - - FigEdgeNote figedgenote = new FigEdgeNote(); - checkAssignIDToObject(figedgenote, true, true); -// Model.getUmlFactory().delete(clazz); - - // TODO: Someone apparently disabled this test rather than fixing it! -// Object iface = Model.getCoreFactory().createInterface(); -// FigInterface figinterface = new FigInterface(iface, bounds, settings); -// checkAssignIDToObject(figinterface, true, true); -// Model.getUmlFactory().delete(iface); + Object clazz = Model.getCoreFactory().createClass(); + FigClass figclass = new FigClass(clazz, bounds, settings); + checkAssignIDToObject(figclass, true, true); + Model.getUmlFactory().delete(clazz); + + // FigEdgeNote has no UUID + + Object iface = Model.getCoreFactory().createInterface(); + FigInterface figinterface = new FigInterface(iface, bounds, settings); + checkAssignIDToObject(figinterface, true, true); + Model.getUmlFactory().delete(iface); Object link = Model.getCommonBehaviorFactory().createLink(); FigLink figlink = new FigLink(); @@ -217,7 +213,6 @@ Model.getUmlFactory().delete(pkg); - checkAssignIDToObject(figactionstate, true, true); //checkAssignIDToObject(figassociationrole, true, true); Modified: trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SequenceDiagramRenderer.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SequenceDiagramRenderer.java?view=diff&pathrev=16640&r1=16639&r2=16640 ============================================================================== --- trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SequenceDiagramRenderer.java (original) +++ trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/sequence2/diagram/SequenceDiagramRenderer.java 2009-01-17 14:06:52-0800 @@ -89,7 +89,7 @@ DiagramSettings settings = diag.getDiagramSettings(); if (edge instanceof CommentEdge) { - figEdge = new FigEdgeNote(edge, lay); + figEdge = new FigEdgeNote(edge, settings); } else if (Model.getFacade().isAMessage(edge)) { figEdge = new FigMessage(edge, settings); } else { ------------------------------------------------------ http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=1031301 To unsubscribe from this discussion, e-mail: [[email protected]].