Thanks Bob for your support.
<group name="Fig12"
description="org.argouml.uml.diagram.rolemodelplan.ui.FigMriTransitionRoleModelPlan"
href=".:00000000000008D0"
stroke="1"
strokecolor="black"
>
<private>
sourcePortFig="Fig3.0"
destPortFig="Fig6.0"
sourceFigNode="Fig3"
destFigNode="Fig6"
</private>
<path name="Fig12.0"
description="org.tigris.gef.presentation.FigPoly"
fill="0"
fillcolor="white"
stroke="1"
strokecolor="black"
>
<moveto x="70"
y="292" />
<lineto x="152"
y="352" />
</path>
</group>
<group name="Fig13"
description="org.argouml.uml.diagram.rolemodelplan.ui.FigMriTransitionRoleModelPlan"
href=".:00000000000008D1"
stroke="1"
strokecolor="black"
>
<private>
sourcePortFig="Fig4.0"
destPortFig="Fig6.0"
sourceFigNode="Fig4"
destFigNode="Fig6"
</private>
<path name="Fig13.0"
description="org.tigris.gef.presentation.FigPoly"
fill="0"
fillcolor="white"
stroke="1"
strokecolor="black"
>
<moveto x="248"
y="292" />
<lineto x="184"
y="352" />
</path>
</group>
On 11/29/06, Bob Tarling <[EMAIL PROTECTED]> wrote:
Try saving with just one FigMriTransitionRoleModelPlan edge and send
me the snippet of PGML for that.
On 29/11/06, Christian López Espínola <[EMAIL PROTECTED]> wrote:
> Hi,
>
> This was one problem... I have defined the constructors looking on the
> classes I inherited from. Now this works, thanks Bob!
>
> But the problem is still there. Now the exception is:
>
> Caused by: java.lang.IllegalArgumentException: A source port must be supplied
> at org.tigris.gef.presentation.FigEdge.setSourcePortFig(FigEdge.java:712)
> at org.argouml.uml.diagram.rolemodelplan.ui.FigMriTransitionRoleModelPlan.
> (FigMriTransitionRoleModelPlan.java:105)
>
> My constructor are:
>
> public FigMriTransitionRoleModelPlan() {
> super();
> addPathItem(getNameFig(),
> new PathConvPercent2(this, getNameFig(), 50, 10));
> getFig().setLineColor(Color.black);
> setDestArrowHead(endArrow);
> allowRemoveFromDiagram(false);
> }
>
> public FigMriTransitionRoleModelPlan(Object edge, Layer lay) {
> this();
> if (Model.getFacade().isATransition(edge)) {
> Object tr = /* (MTransition) */edge;
> Object sourceSV = Model.getFacade().getSource(tr);
> Object destSV = Model.getFacade().getTarget(tr);
> FigNode sourceFN = (FigNode) lay.presentationFor(sourceSV);
> FigNode destFN = (FigNode) lay.presentationFor(destSV);
> setSourcePortFig(sourceFN);
> setSourceFigNode(sourceFN);
> setDestPortFig(destFN);
> setDestFigNode(destFN);
> }
> setLayer(lay);
> setOwner(edge);
> }
>
> Any help? TIA
>
>
> On 11/29/06, Bob Tarling <[EMAIL PROTECTED]> wrote:
> > Try creating an empty constructor FigLayer()
> >
> > I can't remember the list at the moment but GEF looks for several
> > different patterns of constructor when reading the PGML file. I know
> > the empty constructor is one.
> >
> > The constructor you already have is the one used when you press the
> > toolbutton and click on the diagram.
> >
> > There are plans to align the two methods to use the same constructor
> > but there is some rework for this and more important bugs and
> > improvements required in the meantime.
> >
> > Bob.
> >
> > On 29/11/06, Christian López Espínola <[EMAIL PROTECTED]> wrote:
> > > I have only one constructor.
> > >
> > > public FigLayer(GraphModel gm, Object node)
> > >
> > >
> > > On 11/29/06, Bob Tarling <[EMAIL PROTECTED]> wrote:
> > > > What constructors do you have for FigLayer?
> > > >
> > > >
> > > > On 29/11/06, Christian López Espínola <[EMAIL PROTECTED]> wrote:
> > > > > I all,
> > > > >
> > > > > I have seen that If I run Argo + MaCMAS on Eclipse, it doesn't crash.
> > > > > But If I use the jar files, It crashes (the exception I pasted)
> > > > >
> > > > > We have a presentation of the tool on next week, and we have to finish
> > > > > this before.
> > > > >
> > > > > Any help will be appreciated.
> > > > >
> > > > > Thanks
> > > > >
> > > > > On 11/25/06, Christian López Espínola <[EMAIL PROTECTED]> wrote:
> > > > > > Sorry, I forget to paste it.
> > > > > >
> > > > > > Cause : java.lang.InstantiationException:
> > > > > > org.argouml.uml.diagram.traceability.ui.FigLayer
> > > > > > at
org.tigris.gef.persistence.pgml.PGMLStackParser.constructFig(PGMLStackParser.java:593)
> > > > > > at
org.tigris.gef.persistence.pgml.PGMLStackParser.getHandler(PGMLStackParser.java:386)
> > > > > > at
org.argouml.persistence.PGMLStackParser.getHandler(PGMLStackParser.java:119)
> > > > > > at
org.tigris.gef.persistence.pgml.BaseHandler.getElementHandler(BaseHandler.java:141)
> > > > > > at
org.tigris.gef.persistence.pgml.BaseHandler.getElementOrUnknownHandler(BaseHandler.java:110)
> > > > > > at
org.tigris.gef.persistence.pgml.BaseHandler.startElement(BaseHandler.java:159)
> > > > > > at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
> > > > > > Source)
> > > > > > at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
> > > > > > Source)
> > > > > > at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
> > > > > > Source)
> > > > > > at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> > > > > > Source)
> > > > > > at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> > > > > > Source)
> > > > > > at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> > > > > > Source)
> > > > > > at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
> > > > > > at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
> > > > > > Source)
> > > > > > at javax.xml.parsers.SAXParser.parse(Unknown Source)
> > > > > > at
org.tigris.gef.persistence.pgml.PGMLStackParser.readDiagram(PGMLStackParser.java:158)
> > > > > > at
org.tigris.gef.persistence.pgml.PGMLStackParser.readDiagram(PGMLStackParser.java:124)
> > > > > > at
org.argouml.persistence.PGMLStackParser.readDiagram(PGMLStackParser.java:267)
> > > > > > at
org.argouml.persistence.DiagramMemberFilePersister.load(DiagramMemberFilePersister.java:67)
> > > > > > at
org.argouml.persistence.UmlFilePersister.doLoad(UmlFilePersister.java:380)
> > > > > > at
org.argouml.persistence.ZargoFilePersister.doLoad(ZargoFilePersister.java:349)
> > > > > > at
org.argouml.ui.ProjectBrowser.loadProject(ProjectBrowser.java:1471)
> > > > > > at
org.argouml.swingext.LoadSwingWorker.construct(LoadSwingWorker.java:69)
> > > > > > at
org.argouml.swingext.SwingWorker.doConstruct(SwingWorker.java:129)
> > > > > > at org.argouml.swingext.SwingWorker$2.run(SwingWorker.java:257)
> > > > > > at java.lang.Thread.run(Unknown Source)
> > > > > >
> > > > > >
> > > > > > On 11/25/06, Michiel van der Wulp <[EMAIL PROTECTED]> wrote:
> > > > > > > Hi Christian,
> > > > > > >
> > > > > > > The pgml and Fig code you show look good.
> > > > > > > What exception do you get?
> > > > > > >
> > > > > > > Michiel
> > > > > > >
> > > > > > >
> > > > > > > ----- Original Message -----
> > > > > > > From: "Christian López Espínola" <[EMAIL PROTECTED]>
> > > > > > > To: <[email protected]>
> > > > > > > Sent: Saturday, November 25, 2006 9:07 PM
> > > > > > > Subject: Re: [argouml-dev] Problem with the persistence/load of
diagrams.
> > > > > > >
> > > > > > >
> > > > > > > > Hi all again,
> > > > > > > >
> > > > > > > > First at all, I want to thanks all the efforts you are doing
for help
> > > > > > > > me. Im sorry for replying to late.
> > > > > > > >
> > > > > > > > After some work, and adding the classpath in my manifest, now I
have a
> > > > > > > > different exception.
> > > > > > > >
> > > > > > > > Now the problem with the Diagram doesn't occurs, the problem is
> > > > > > > > loading a fig. If I unzip my zargo file, my
> > > > > > > > test2_TraceabilityDiagram1.pgml file begins like follows:
> > > > > > > >
> > > > > > > > <pgml
> > > > > > > >
description="org.argouml.uml.diagram.traceability.ui.MACMASTraceabilityDiagram|-64--88-0-35--46d6af98:10f20989c0a:-8000:000000000000077B"
> > > > > > > > name="Traceability Diagram 1"
> > > > > > > >>
> > > > > > > > <group name="Fig0"
> > > > > > > >
description="org.argouml.uml.diagram.traceability.ui.FigLayer[40,
> > > > > > > > 56, 750,
> > > > > > > >
200];pathVisible=false;stereotypeVisible=true;visibilityVisible=false"
> > > > > > > >
href="-64--88-0-35--46d6af98:10f20989c0a:-8000:000000000000077E"
> > > > > > > > fill="1"
> > > > > > > > fillcolor="white"
> > > > > > > > stroke="1"
> > > > > > > > strokecolor="black"
> > > > > > > > >
> > > > > > > >
> > > > > > > > As you can see, and if I'm not wrong, now the parser know what
is a
> > > > > > > > MACMASTraceabilityDiagram. But it fails in the FigLayer parsing.
> > > > > > > >
> > > > > > > > In my FigLayer I have the following method:
> > > > > > > >
> > > > > > > > /**
> > > > > > > > * USED BY PGML.tee.
> > > > > > > > * @return the class name and bounds together with
compartment
> > > > > > > > * visibility.
> > > > > > > > */
> > > > > > > > public String classNameAndBounds() {
> > > > > > > > return super.classNameAndBounds()
> > > > > > > > + "stereotypeVisible=" + isStereotypeVisible()
> > > > > > > > + ";"
> > > > > > > > + "visibilityVisible=" + isVisibilityVisible();
> > > > > > > > }
> > > > > > > >
> > > > > > > > If I save and load as a Model zipped, I have no problem in the
model
> > > > > > > > loading.
> > > > > > > >
> > > > > > > > I think we are near to the solution. Thanks again.
> > > > > > > >
> > > > > > > > p.s. for Tom Morris: I have changed the manifest. Thanks for the
> > > > > > > > suggestion.
> > > > > > > >
> > > > > > > > On 11/17/06, Bob Tarling <[EMAIL PROTECTED]> wrote:
> > > > > > > >> Forbidding may be a bit strong. But in general think it better
to find
> > > > > > > >> some pattern to avoid it.
> > > > > > > >>
> > > > > > > >> Bob.
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> On 17/11/06, Linus Tolke <[EMAIL PROTECTED]> wrote:
> > > > > > > >> > Well said!
> > > > > > > >> >
> > > > > > > >> > I had started a mail to say part of this but I was not this
clear in
> > > > > > > >> > the
> > > > > > > >> > problem analysis.
> > > > > > > >> >
> > > > > > > >> > Isn't there a design rule forbidding reflection already?
Shall we add
> > > > > > > >> > one?
> > > > > > > >> >
> > > > > > > >> > /Linus
> > > > > > > >> >
> > > > > > > >> > > -----Original Message-----
> > > > > > > >> > > From: Tom Morris [mailto:[EMAIL PROTECTED]
> > > > > > > >> > > Sent: den 14 november 2006 23:18
> > > > > > > >> > > To: [email protected]
> > > > > > > >> > > Subject: RE: [argouml-dev] Problem with the
persistence/load of
> > > > > > > >> > diagrams.
> > > > > > > >> > >
> > > > > > > >> > > I think that the the classloader problem, while perhaps
tricky, is
> > > > > > > >> > > definitely solvable.
> > > > > > > >> > >
> > > > > > > >> > > I don't think Bob's workaround is necessary, but as a
general comment
> > > > > > > >> > on
> > > > > > > >> > > the
> > > > > > > >> > > topic he raised:
> > > > > > > >> > >
> > > > > > > >> > > > It seems that you can call the constructors of your own
Figs
> > > > > > > >> > > > but creating by reflection has problems.
> > > > > > > >> > > >
> > > > > > > >> > > > So what I can do is provide an API in GEF where an
> > > > > > > >> > > > application can register a factory object to create
diagrams.
> > > > > > > >> > >
> > > > > > > >> > > I think moving away from using reflection is a good idea.
Having the
> > > > > > > >> > > diagram parser depend on an implied interface based on our
internal
> > > > > > > >> > class
> > > > > > > >> > > structure has proven to be quite fragile and I think a
more formal
> > > > > > > >> > > interface
> > > > > > > >> > > is needed. Using reflection removes that formality. For
something
> > > > > > > >> > like a
> > > > > > > >> > > file format, having a stable, formally reviewed, slowly
changing (or
> > > > > > > >> > > non-changing) interface is a good thing.
> > > > > > > >> > >
> > > > > > > >> > > Having said that if we're going to support pluggable
diagram types, I
> > > > > > > >> > > think
> > > > > > > >> > > we should think through how this is done. What happens if
I send my
> > > > > > > >> > > project
> > > > > > > >> > > to someone that doesn't have the module installed? Can
they see the
> > > > > > > >> > shape
> > > > > > > >> > > of the diagram, but not act on it? Does the whole project
fail to
> > > > > > > >> > load?
> > > > > > > >> > > How are they informed what module they need and where they
get it?
> > > > > > > >> > > Personally, I think they should be able to see and print
the diagram
> > > > > > > >> > even
> > > > > > > >> > > if
> > > > > > > >> > > they don't have the module installed.
> > > > > > > >> > >
> > > > > > > >> > > Also, since GEF is nominally separate from ArgoUML, we
shouldn't be
> > > > > > > >> > > directly
> > > > > > > >> > > exposing any of its internal APIs since this makes it
impossible to
> > > > > > > >> > > change/replace in the future. (cf LeakyAbstraction)
> > > > > > > >> > >
> > > > > > > >> > > Tom
> > > > > > > >> > >
> > > > > > > >> > >
---------------------------------------------------------------------
> > > > > > > >> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > > > >> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> >
---------------------------------------------------------------------
> > > > > > > >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > > > >> > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >>
> > > > > > > >>
---------------------------------------------------------------------
> > > > > > > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > > > >> For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > > > >>
> > > > > > > >>
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Regards,
> > > > > > > >
> > > > > > > > Christian López Espínola
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > No virus found in this outgoing message.
> > > > > > > Checked by AVG Free Edition.
> > > > > > > Version: 7.1.409 / Virus Database: 268.14.16/551 - Release Date:
25/11/2006
> > > > > > >
> > > > > > >
---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Regards,
> > > > > >
> > > > > > Christian López Espínola
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Regards,
> > > > >
> > > > > Christian López Espínola
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > > Regards,
> > >
> > > Christian López Espínola
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Regards,
>
> Christian López Espínola
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Regards,
Christian López Espínola