my project partner and I are pleased to announce our work is
progressing nicely. We've already succeeded in loading our profile,
extracting the stereotypes, adding them to an element and exporting
the results back to xmi.
If you'd like my project partner and I could give a sketch how
we accomplished this.
Greets
Hello Sam!
You are working in one of the areas where ArgoUML is not as developed as I would like and that is the handling of UML Profiles. For this reason you will have to more or less write your UML Profile as java code instead of some file that you are importing but you seem to already have understood that.
Answering the question that you are asking. Since you are creating your own diagram, you are creating buttons to create your new elements. What you need to do is to provide functions for those buttons that create uml elements as you want them to be created. I have not done this myself but I guess that a technique like the one used for Pseudostates is possible to use. See org.argouml.uml.diagram.activity.ui.UMLActivityDiagram starting with getUmlActions(). You will then create a normal UML element (class or state), find the stereotype and attach the stereotype to the uml element before returning it.
Once that is working you have the challenge of having a stereotyped normal UML element (class, state, transition, …) appear using some new graphical figure. I think this is also a challenge.
You should be using the basic UML elements (like classes, packages, and states) and stereotyping and tagging them.
Please keep us posted on your progress in this area. Handling UML Profiles, adding them or adding support for them is a very interesting area for ArgoUML.
/Linus
From: Sam [mailto:[EMAIL PROTECTED]]
Sent: den 1 juni 2006 13:36
To: [email protected]
Subject: [argouml-dev] UML Profiles
Hi,
I'm having a problem with the module I'm developping.
We're trying to add Story driven modeling ( Story diagrams )
which is based on uml profile on the uml metamodel.
This means we don't have our own uml elements like those
found in org.omg.uml.*
This brings us to the problem of building/displaying a node with
the GEF framework. When a button is pushed in the toolbar of a
diagram, the makeNode() function is called in the CmdCreateNode class,
which builds a node using ( in argouml ) Model.getUmlFactory().buildNode()
and returns the node to GEF. This node is created by calling functions in org.omg.uml.*
eg. org.omg.uml.behavioralelements.statemachines.SimpleStateClass . createSimpleState()
for a simple state.
The problem is that those functions don't exist in org.omg.uml for the
nodes that we need since they're recognised by uml classes with stereotypes
attatched to them. Of course we do have to return something to GEF or the whole
thing comes crashing down.
Currently whe're just "stealing" node object for other elements that do
exist in org.omg.uml. Is there a better way to do this in argouml?
Is there a way to build a diagram based on uml profiles instead of standard
uml elements?
I hope the problem is clearly stated.
Kind regards,
Sam Verboven
