Skip to main content



      Home
Home » Modeling » Papyrus » Is there an api for writing classes from a dsl?
Is there an api for writing classes from a dsl? [message #470234] Mon, 18 May 2009 09:30 Go to next message
Eclipse UserFriend
Hi

I have a DSL & GMF editor which references uml.ecore.

I can load UML classes into a list within my GMF editor.

I would like to display these classes (a subset of a uml
model with 1000+ classes) in a uml class diag editor for
editing, subclassing. Save then have my DSL store the saved
uml edits. Rather than saving the DSL classes to a file
is there a way to pass them back and forth through RAM?

ie press button on DSL editor and the classes open a new
class diag editor, press a button on the class diag and the
edits are saved in the DSL.

regards
Steve
Re: Is there an api for writing classes from a dsl? [message #470237 is a reply to message #470234] Fri, 29 May 2009 05:51 Go to previous message
Eclipse UserFriend
Hi,
In papyrus, I will be possible to acces to the model in memory.
--> add a plugin with the extension popup menu. (for example in the class
diagram)
<extension point="org.eclipse.ui.popupMenus">
<objectContribution adaptable="false"
id=" org.eclipse.papyrus.diagram.clazz.objectContribution.depende ncybranchdeletion "
objectClass=" org.eclipse.papyrus.diagram.clazz.edit.parts.DependencyBranc hEditPart ">
<action
class=" org.eclipse.papyrus.diagram.clazz.custom.command.DependencyB ranchDeletion "
definitionId=" org.eclipse.papyrus.diagram.clazz.dependencybranchdeletionID "
enablesFor="1" icon="icons/Delete_16x16.gif"
id=" org.eclipse.papyrus.diagram.clazz.dependencybranchdeletionAc tionID "
label="Delete dependency branch " menubarPath="editGroup">
</action>
</objectContribution>
</extension>
->create an action that can be run on a editpart for example :
org.eclipse.papyrus.diagram.clazz.custom.command.DisplayAllA ssociationBranchCommand
in the class diagram. In your case, look for a DiagramEditPart.

The diagram is always associated to a notation node . if you execute
getElement on this done you will get the uml element. In the case of
diagram, you will access to package model or profile uml Element. this is
your model in memory. If you want to obtain the tip package of you model,
verify if this the case by testing owner == null on package uml element.

In the future, we will add plugin example that access to the model in order
to help people to add plugin in htis environment.

-------------------------
Patrick

"Bill Hinge" <steve.orobec@btopenworld.com> a
Re: Is there an api for writing classes from a dsl? [message #586299 is a reply to message #470234] Fri, 29 May 2009 05:51 Go to previous message
Eclipse UserFriend
Hi,
In papyrus, I will be possible to acces to the model in memory.
--> add a plugin with the extension popup menu. (for example in the class
diagram)
<extension point="org.eclipse.ui.popupMenus">
<objectContribution adaptable="false"
id=" org.eclipse.papyrus.diagram.clazz.objectContribution.depende ncybranchdeletion "
objectClass=" org.eclipse.papyrus.diagram.clazz.edit.parts.DependencyBranc hEditPart ">
<action
class=" org.eclipse.papyrus.diagram.clazz.custom.command.DependencyB ranchDeletion "
definitionId=" org.eclipse.papyrus.diagram.clazz.dependencybranchdeletionID "
enablesFor="1" icon="icons/Delete_16x16.gif"
id=" org.eclipse.papyrus.diagram.clazz.dependencybranchdeletionAc tionID "
label="Delete dependency branch " menubarPath="editGroup">
</action>
</objectContribution>
</extension>
->create an action that can be run on a editpart for example :
org.eclipse.papyrus.diagram.clazz.custom.command.DisplayAllA ssociationBranchCommand
in the class diagram. In your case, look for a DiagramEditPart.

The diagram is always associated to a notation node . if you execute
getElement on this done you will get the uml element. In the case of
diagram, you will access to package model or profile uml Element. this is
your model in memory. If you want to obtain the tip package of you model,
verify if this the case by testing owner == null on package uml element.

In the future, we will add plugin example that access to the model in order
to help people to add plugin in htis environment.

-------------------------
Patrick

"Bill Hinge" <steve.orobec@btopenworld.com> a
Previous Topic:Is there an api for writing classes from a dsl?
Next Topic:bug in UML validation
Goto Forum:
  


Current Time: Wed Jul 02 22:17:02 EDT 2025

Powered by FUDForum. Page generated in 0.24521 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top