Problems loading UML Classes....

Problems loading UML Classes....

Postby Guest » Wed Nov 03, 2004 5:23 pm

Hi..
I am developing a pluggin with my own stereos....In this pluggin I add my own diagram (makeCommandCreateDiagram(....)), and in this diagram's toolbar I add some rappid buttons. I can see the buttons with his own icons, thats work fine. The problem is that tha action associated with one button makes a new UML Class (factoryDiSm.makeCommandCreateClass...), and its seem to create it right in the model, but i just can see it in my new diagram.
If I define this rappid button in a diagramClass it works fine (creates the class in the model and render it in the ClassDiagram).
I think that I might solve the problem if I register (or something like) my new diagram to be able to render UML classes, but I don't know how to do it.
what i have to do?

thanks in advance!!
Guest
 

Re: Problems loading UML Classes....

Postby beth » Thu Nov 04, 2004 11:01 am

Hi, the command you use creates the class in the (semantic) model only.
Use this command to create both the class and a representation in a DI container:

umlProject.getUml1SmCommandFactory().makeCommandCreateNode(
refClass, newNodeSmId, null, newNodeDiId, newNodeContainerDiId, position, presentation,
nameResourceId, commandResourceId);

refClass = umlProject.getUml1SmFactory().getCorePackage().getUmlClass()
newNodeSmId = project.getNextSmId()
newNodeDiId = project.getNextDiId()
newNodeContainerDiId = di id of your diagram
presentation = SemanticModelBridgePresentation.DEFAULT

You can also pass a fixed name instead of null and use null for the nameResourceId.
beth
Site Admin
 
Posts: 0
Joined: Tue Feb 20, 2007 3:39 pm

Re: Problems loading UML Classes....

Postby Guest » Thu Nov 04, 2004 1:37 pm

Hi Stephen!
Thank you for your fast answer. I try with the umlProject.getUml1SmCommandFactory().makeCommandCreateNode (...) as you mention, but I keep having the same problem.... I see the new class created in the semantic model, but I can't see it in my new Diagram. I try to add a comment instead, with the
factoryDiSm.makeCommandCreateComment(...) and this time "the comment" appears in the diagram.
Its seems I have a particular problem creating classes in my new diagram.
Do you have any others suggestions?
Any help would be great.......

Thanks in advance.

Regards

Sebastian
Guest
 

Re: Problems loading UML Classes....

Postby beth » Thu Nov 04, 2004 3:02 pm

Ok, I have looked somewhat deeper: Currently Poseidon cannot create classes in any diagram with a simple type info other than CLASS_DIAGRAM and DEPLOYMENT_DIAGRAM.
Unfortunately there is no possibility in the OpenAPI to change this.
Can you make do with giving your diagram the simple type info CLASS_DIAGRAM?
beth
Site Admin
 
Posts: 0
Joined: Tue Feb 20, 2007 3:39 pm


Return to Plug-Ins

Who is online

Users browsing this forum: No registered users and 3 guests

cron