Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » dealing with Papyrus's files
dealing with Papyrus's files [message #990508] Wed, 12 December 2012 19:52 Go to next message
Chriss Matt is currently offline Chriss MattFriend
Messages: 38
Registered: December 2012
Member
Hello all
i'd like to ask about adding attributes and operations to xml file of UML class diagram(one attribute and one operation for each class)and then reverse them to graphical as viewed in *.di
My question is :the addition operation should be on *.uml and *.anotation?or this need other transformations before adding those stuffs?

Remark:i use JDOM for editing XML file

Greetings
Chriss
Re: dealing with Papyrus's files [message #990576 is a reply to message #990508] Thu, 13 December 2012 09:31 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hello Chriss,

The UML file contains all the semantic information of your model.
The Notation file contains the diagrams.
The DI file contains information about the available editors (e.g. diagrams, tables, ...), and their layout.

So, in your case, you only need to edit the *.uml file, then reverse it to generate the changes in your *.notation file.

If the diagram already exists, you don't have to edit the *.di file.


Regards,
Camille


Camille Letavernier
Re: dealing with Papyrus's files [message #990688 is a reply to message #990576] Thu, 13 December 2012 19:48 Go to previous messageGo to next message
Chriss Matt is currently offline Chriss MattFriend
Messages: 38
Registered: December 2012
Member
Hello Camille

i appreciate your efforts
i just want to confirm what you said simply because i recently switched to Papyrus.

i- Do you mean that viewing the semantic information of model happen through
right click on *.UML-->"open with" --> text editor?
and then use these content as input for jdom (for editing)
or directly use *.uml saved in workspace as input for jdom

ii- Please clarify this sentence:
"If the diagram already exists, you don't have to edit the *.di file"

Greetings

Chriss
Re: dealing with Papyrus's files [message #990713 is a reply to message #990508] Wed, 12 December 2012 20:40 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Chriss,

Rather than use JDOM, you really should be using the Eclipse UML API to
modify the contents of a UML model. It will be difficult, in general,
to ensure the correct structure of a UML model using JDOM.

Using the UML API, it is as easy as asking a Class to
createOwnedAttribute(...) and createOwnedOperation(...) . The diagram
should automatically present the new attribute and operation of each
class, so you shouldn't have to modify the *.notation file.

HTH,

Christian


On 2012-12-12 20:34:36 +0000, chriss matt said:

> Hello all
> i'd like to ask about adding attributes and operations to xml file of
> UML class diagram(one attribute and one operation for each class)and
> then reverse them to graphical as viewed in *.di
> My question is :the addition operation should be on *.uml and
> *.anotation?or this need other transformations before adding those
> stuffs?
> Remark:i use JDOM for editing XML file
>
> Greetings
> Chriss
Re: dealing with Papyrus's files [message #990769 is a reply to message #990688] Fri, 14 December 2012 08:25 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hello Chriss, Hello Christian,


> The diagram
> should automatically present the new attribute and operation of each
> class, so you shouldn't have to modify the *.notation file.

Actually, in Papyrus, the diagrams only display a subset of the model. If you create a new Operation/Property in the semantic model (i.e. using Class#createOwnedAttribute), they won't appear in the diagram, until you explicitly add them.

> ii- Please clarify this sentence:
> "If the diagram already exists, you don't have to edit the *.di file"

The *.di file contains links to all existing "pages", i.e. nested editor. If you create a new diagram, it needs to be known by the *.di model. But if you modify an already-existing diagram, you won't have anything to do in the *.di model.


Regards,
Camille


Camille Letavernier
Re: dealing with Papyrus's files [message #990916 is a reply to message #990769] Fri, 14 December 2012 20:48 Go to previous messageGo to next message
Chriss Matt is currently offline Chriss MattFriend
Messages: 38
Registered: December 2012
Member
Hello Christian, Hello Camille

thank you for the fruitful discussion.

i-in the case of using Eclipse UML API instead of jdom , so, performing modifications on UML file reflected in other files?in other words, the other files automatically will updated?only adding them explicitly(drag and drop)is required ?

ii-Do Eclipse UML API supports the operations of different kind of model elements and applying standard and user-defined profile?

iii-Where I can find examples of using the Eclipse UML API and from where I can download the latest version of it?

Greetings
Chriss
Re: dealing with Papyrus's files [message #997664 is a reply to message #990916] Mon, 07 January 2013 15:33 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Chriss,

On 2012-12-14 20:48:31 +0000, chriss matt said:

> Hello Christian, Hello Camille
>
> thank you for the fruitful discussion.
>
> i-in the case of using Eclipse UML API instead of jdom , so, performing
> modifications on UML file reflected in other files?in other words, the
> other files automatically will updated?only adding them explicitly(drag
> and drop)is required ?

No, sorry, this was a misunderstanding on my part, corrected by
Camille. I had thought that the attribute and operation compartments
in Papyrus class diagrams use a "canonical edit policy" as in Ecore
Tools diagrams. That's not the case. So, the Eclipse UML API helps to
construct structurally sound models (which is considerably more
complicated than you might expect) and Papyrus/GMF provides the API
required to update the notation model (diagrams) to visualize new
elements that you add to the UML content.


> ii-Do Eclipse UML API supports the operations of different kind of
> model elements and applying standard and user-defined profile?

The Eclipse UML API provides complete coverage of the entire UML
metamodel, including working with profiles and stereotypes. The
"getting started" articles on the Wiki should help:

http://wiki.eclipse.org/MDT-UML2#Articles


> iii-Where I can find examples of using the Eclipse UML API and from
> where I can download the latest version of it?

The Eclipse UML2 SDK is available for installation from the Eclipse
simultaneous release update site along with most other Eclipse modeling
projects. If you need it for non-Eclipse deployment, you can download
the latest releases here:

http://www.eclipse.org/modeling/mdt/downloads/?project=uml2


>
> Greetings
> Chriss
Previous Topic:About Papyrus model
Next Topic:diagram palette
Goto Forum:
  


Current Time: Tue Apr 16 08:50:50 GMT 2024

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

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

Back to the top