Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » How to : UML deep modifications
How to : UML deep modifications [message #628311] Mon, 08 March 2010 09:21 Go to next message
CaribeanAlien is currently offline CaribeanAlien
Messages: 15
Registered: February 2010
Junior Member
Hi everybody,

in my quest of understanding EMF, I'm currently trying to make modifications on UML.
Starting from the tutorial "Customizing UML", I got the point that what I have to do is an heavyweight modification.
In fact, what I have to do is to add/modify elements and associations in UML with adding a new package.

My first thought was to start from the UML2 plug-in, to modify the meta-model inside, to regenerate the plug-in / java classes, and to push this new plug-in to check the modifications.

But it seems to be a massive set of plug-ins (I downloaded the package "SDK" at this address : http://www.eclipse.org/modeling/mdt/downloads/?project=uml2)
which is composed of a lot of jars. I started to check the uml package : (org.eclipse.uml2.uml.source_3.0.1.v200908281330.jar), composed itself by a lot of UML files (L1, L2, L3, uml.uml, ...)

My questions are very simple :
1 - Is it correct to modify the plug-in like that?
2 - Where can I find documentation for developers about UML2 project? (just found javadoc)
3 - I guess there is a reason to have so many files...?
4 - The UML specification is divided into packages. My extension should be made in the same kind : making a new package, merging another one. But in the file UML.uml, I didn't found this package structure. Is it normal?

Thank you for the help!
Re: How to : UML deep modifications [message #628313 is a reply to message #628311] Mon, 08 March 2010 09:43 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad Varnica
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
Hi Alien :p ,


IQuote:
> n fact, what I have to do is to add/modify elements and associations in UML with adding a new package.


This is an EMF limitation as soon as you try you deal with associations modification and nested packages creation. All open source UML solutions are built on the top of EMF and GMF, therefore you can not get what you expect using one of them !!

Quote:
> My questions are very simple :
> 1 - Is it correct to modify the plug-in like that?
> 2 - Where can I find documentation for developers about UML2 project? (just found javadoc)
> 3 - I guess there is a reason to have so many files...?


This is a logical way to work because you have the model, the editor, the mapping between the model and the editor, and the transformation stage. The best for each project is look directly in the code and don't forget that without the 3 month required training you will not be able to understand the framework and change it for your needs. It is better to contribute in this case.

Quote:
> The UML specification is divided into packages. My extension should be made in the same kind : making a new package, merging another one. But in the file UML.uml, I didn't found this package structure. Is it normal?


Yes, you are right and UML model information should be saved inside packages. If you use EclipseUML2 metamodel then you will see that this package architecture is already respected. The problem is the EMF transformation stage, so you can not change it.


My personal feeling in order not to waste your time is that you should consider two options and have a clear view of you need.
You either want to create an UML solution or to be an UML user.

If you want to create your own tool from scratch then you have a personal investment of about 18 months.
You should learn EMF, GMF or GEF and UML 2. For each framework a 3 months book reading and exercices and then 3 months first project test (e.g. your first project will be mediocre but it is more a test). After 18 months if your motivation is still high then you should start your modeling project.

If you want to use open source tool and see missing features then you should contribute and not just ask other to do the job for you. I mean that you can contribute by many ways, even writing a documentation is a contribution.

If you don't want to create your tools, or to contribute then you have two choices which are using open source, say thanks never complain or pay to use professional tools and have the right to compalin because you have paid.
Re: How to : UML deep modifications [message #628315 is a reply to message #628311] Mon, 08 March 2010 11:22 Go to previous messageGo to next message
Eike Stepper is currently offline Eike Stepper
Messages: 5527
Registered: July 2009
Senior Member
Am 08.03.2010 10:21, schrieb CaribeanAlien:
>
> My questions are very simple : 1 - Is it correct to modify the plug-in
> like that?
It's usually better to check out the needed projects directly from CVS:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.mdt/org .eclipse.uml2/plugins/?root=Modeling_Project

> 2 - Where can I find documentation for developers about UML2 project?
> (just found javadoc)
I guess the homepage http://www.eclipse.org/uml2 is a good place to
start. The left nav has a link to the wiki, too:
http://wiki.eclipse.org/MDT-UML2

> 3 - I guess there is a reason to have so many files...?
Certainly ;-)

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Re: How to : UML deep modifications [message #628320 is a reply to message #628311] Mon, 08 March 2010 15:11 Go to previous messageGo to next message
CaribeanAlien is currently offline CaribeanAlien
Messages: 15
Registered: February 2010
Junior Member
To Vlad,

thank you for the reply. I totally agree with the philosophy of contributing to open source projects.

Quote:
> If you want to use open source tool and see missing features then you should contribute and not just ask other to do the job for you. I mean that you can contribute by many ways, even writing a documentation is a contribution.


I'm not asking others to do my job! I'm currently trying to get into UML2 and EMF, and to apply a simple modification (adding a class, or modify a class to have relationships with another elements for example). I guess this would be doable, but I haven't found information about how to do that. I have checked the different tutorials, the long talk inside the Eclipsepedia UML page, etc... I have ordered the EMF book, and will start study it soon. But still, I didn't get any information about UML2 development.

What I asked was more something like "hey guys, I'm a newbie, I desperately try to get into the project, but the documents I read didn't help me. Did I miss something?", and not "I don't understand, please do my job in my place". I just want to know if there is an entry point to this big project.

So, if you tell me there is no documentation to enter into UML2, I would be happy to write it during my "investigation".


(For the packages, I think I found them in "Infrastructure.uml")


To Eike : thanks for the CVS root, I'will check it.

To Ed :
Thanks for the precisions. I don't remember where I found this information, but I think it won't be possible with a profile (light weight extension) to alter existing associations.
But still, even if my solution can be solved with a lightweight modification, I'm curious to know how these heavyweight modifications can be applied, and I will try to experiment it one day, just for curiosity of seeing how this works.
Re: How to : UML deep modifications [message #628351 is a reply to message #628311] Mon, 29 March 2010 08:48 Go to previous messageGo to next message
CaribeanAlien is currently offline CaribeanAlien
Messages: 15
Registered: February 2010
Junior Member
Hi guys,

a few weeks after my last post, I just wanted to tell about my work on modifying UML2.

Well, as it was said previously, it's way not easy to do it! Being rigorous is really important in this kind of task.
First advice : check the build details! It's really important to set up the environment correctly. By that, I mean having the correct version of EMF, the correct JDK/JRE, ... In order to do that, I had to download the latest dev. version of Eclipse (with EMF 2.6 => couldn't migrate from 2.5 to 2.6 on a Galileo Eclipse, don't know why)

Then, checking out from CVS the sources. Here come the first trick: you got on CVS a lot of projects. I was interested in org.eclipse.uml2.uml, but then I realize there was also a "releng" version of this project. What is this "releng"? If I understood correctly, it's a project you need to use to build the former. Reading some documentation, I conclude that in this project, there is a file you can use to check out the former project and its dependency.

At this point, I got all needed projects. So I started to browse the main project (uml2.uml), in order to understand what is the goal of those files. It's important from there to understand the goal of this project : http://wiki.eclipse.org/MDT-UML2

* a useable implementation of the UML metamodel to support the development of modeling tools
* a common XMI schema to facilitate interchange of semantic models
* test cases as a means of validating the specification
* validation rules as a means of defining and enforcing levels of compliance

I'm still working on understanding the meaning of each file, in order to do my own modifications. I'm unfortunately missing time, so I hope I'll get a chance to go deeper, and write a documentation from what I learned.
But it's really, really difficult, and a little bit frustrating.

So, here is my simple question :

During this browsing, I understood that, as in any EMF project, code is generated from the genmodel. I just finished regenerating it, it seems to work. But, as long as I'm doing a slight difference "adding an element 'foo', supertyped by Element, on the UML.ecore, I'm having troubles. I succeed in generating the genmodel, but then, when generating code, it fails.
So : is there a way to make this modification? Where should I look closer? Is the genmodel customized, or something?

Thank you for your help!
Re: How to : UML deep modifications [message #628352 is a reply to message #628351] Mon, 29 March 2010 13:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26088
Registered: July 2009
Senior Member
What specifically do you mean by "it fails"? Are you updating the UML
model of UML and reloading the Ecore version from that?


CaribeanAlien wrote:
> Hi guys,
>
> a few weeks after my last post, I just wanted to tell about my work on
> modifying UML2.
>
> Well, as it was said previously, it's way not easy to do it! Being
> rigorous is really important in this kind of task. First advice :
> check the build details! It's really important to set up the
> environment correctly. By that, I mean having the correct version of
> EMF, the correct JDK/JRE, ... In order to do that, I had to download
> the latest dev. version of Eclipse (with EMF 2.6 => couldn't migrate
> from 2.5 to 2.6 on a Galileo Eclipse, don't know why)
>
> Then, checking out from CVS the sources. Here come the first trick:
> you got on CVS a lot of projects. I was interested in
> org.eclipse.uml2.uml, but then I realize there was also a "releng"
> version of this project. What is this "releng"? If I understood
> correctly, it's a project you need to use to build the former. Reading
> some documentation, I conclude that in this project, there is a file
> you can use to check out the former project and its dependency.
>
> At this point, I got all needed projects. So I started to browse the
> main project (uml2.uml), in order to understand what is the goal of
> those files. It's important from there to understand the goal of this
> project : http://wiki.eclipse.org/MDT-UML2
>
> * a useable implementation of the UML metamodel to support the
> development of modeling tools
> * a common XMI schema to facilitate interchange of semantic models
> * test cases as a means of validating the specification
> * validation rules as a means of defining and enforcing levels of
> compliance
> I'm still working on understanding the meaning of each file, in order
> to do my own modifications. I'm unfortunately missing time, so I hope
> I'll get a chance to go deeper, and write a documentation from what I
> learned. But it's really, really difficult, and a little bit frustrating.
>
> So, here is my simple question :
>
> During this browsing, I understood that, as in any EMF project, code
> is generated from the genmodel. I just finished regenerating it, it
> seems to work. But, as long as I'm doing a slight difference "adding
> an element 'foo', supertyped by Element, on the UML.ecore, I'm having
> troubles. I succeed in generating the genmodel, but then, when
> generating code, it fails. So : is there a way to make this
> modification? Where should I look closer? Is the genmodel customized,
> or something?
>
> Thank you for your help!
>
Re: How to : UML deep modifications [message #628353 is a reply to message #628352] Mon, 29 March 2010 17:30 Go to previous messageGo to next message
CaribeanAlien is currently offline CaribeanAlien
Messages: 15
Registered: February 2010
Junior Member
actually, I'm currently making modification on uml.merge.uml, which is the "source" of the genmodel (I was wrong previously, it's not the UML.ecore).
I'm currently facing 2 situations :
- modification of .uml -> update .genmodel -> generate model code : calculation, modifications, but no file creation for the new element

- same as before, but first delete .java files : compilation errors. I'm currently exploring this solution : started with 13 errors, 5 remaining.

It seems that the genmodel is not the only one file generating code, or there are human-added files also. I hope an improving tomorrow :)
Re: How to : UML deep modifications [message #628354 is a reply to message #628353] Mon, 29 March 2010 18:02 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26088
Registered: July 2009
Senior Member
Be sure to monitor the Error Log view for potential problems there.


CaribeanAlien wrote:
> actually, I'm currently making modification on uml.merge.uml, which is
> the "source" of the genmodel (I was wrong previously, it's not the
> UML.ecore).
> I'm currently facing 2 situations :
> - modification of .uml -> update .genmodel -> generate model code :
> calculation, modifications, but no file creation for the new element
>
> - same as before, but first delete .java files : compilation errors.
> I'm currently exploring this solution : started with 13 errors, 5
> remaining.
> It seems that the genmodel is not the only one file generating code,
> or there are human-added files also. I hope an improving tomorrow :)
Re: How to : UML deep modifications [message #628355 is a reply to message #628354] Thu, 01 April 2010 09:13 Go to previous message
CaribeanAlien is currently offline CaribeanAlien
Messages: 15
Registered: February 2010
Junior Member
Thanks Ed, you were right, it was a memory issue causing the missing classes. (java heap space). I fix it, and kind of succeed making some modifications in the generations.

So I'm now testing it. I think I made my modifications in a wrong way; since I didn't know exactly on which uml level to put my modifications, I modified directly the uml.merged.uml. Seems to work, but now I realized that standalone applications have to load at the beginning the uml2.uml.resource jar file. I manage to regenerate this jar file, but it seems it doesn't take modifications from the same uml.merged.uml file. So I have an old version of resource, and a new implementation in the uml2.uml plug-in.

I'll try to figure out how to fix it. But still, the lack of docs make the work hard. Does anyone else feel this lack? Do you think it could be possible to organize a group with some people to write this documentation? I would be interested to work on it. :)
Previous Topic:UML2 sequence diagram metamodel
Next Topic:[Announce] MoDELS 2010 Call for Papers
Goto Forum:
  


Current Time: Wed Oct 01 08:32:10 GMT 2014

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

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