Home » Modeling » UML2 » How to : UML deep modifications(How, in fact, to build the UML2 plug-in)
How to : UML deep modifications [message #519242] |
Mon, 08 March 2010 09:21 |
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 #519329 is a reply to message #519250] |
Mon, 08 March 2010 09:24 |
Ed Merks Messages: 33217 Registered: July 2009 |
Senior Member |
|
|
Vlad,
Coments below.
Vlad Varnica wrote:
> 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.
Normally of one wishes to add/modify something one has the choice of
either extending classes normally in a new package or modifying the
existing classes directly, which is generally a bad design approach.
I'm not sure how this is an EMF limitation, it's just the way the
universe works.
> 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 !!
Your line of reasoning is bizarre.
>
> 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.
Only three months now? I though it would take 1 or 2 years.
>
> 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.
The OMG defines the concept of package merging where independently
defined aspects of a given "element" are merged. The UML project
implements this merging algorithm and applies to UML's definition to
arrive at a merged definition. Note that I said the UML project defines
this and applies it, not EMF itself.
>
>
> 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.
Have you not dished out this drivel enough times yet?
>
> 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.
To answer the actual question that's been asked, there are two choices.
Defining a heavy weight extension, which involves extending the UML
model and generating that extension, or defining a light weight
extension, which involves defining a profile that can be used to
stereotype UMLs base artifacts. The latter approach is much more
amenable to reusing all the existing tools so unless it proves
inadequate for your needs, that's the easier way to go.
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: How to : UML deep modifications [message #519351 is a reply to message #519242] |
Mon, 08 March 2010 15:11 |
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 #519416 is a reply to message #519351] |
Mon, 08 March 2010 18:20 |
Ed Merks Messages: 33217 Registered: July 2009 |
Senior Member |
|
|
Comments below.
CaribeanAlien wrote:
> 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.
Don't take offense. Vlad tends not to address the actual issues that
are raised. It seems he can't help it.
>
> So, if you tell me there is no documentation to enter into UML2, I
> would be happy to write it during my "investigation".
There's not a lot of information for UML2.
>
>
> (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.
Extending UML is a very complex task for a beginner. You'd need to
extend UML's UML2.ecore (if you have UML2 installed in the ID, you can
load UML's Ecore modeling into the Sample Ecore Editor using Load
Resource...->Browse Registered Packages to find UML's namespace. You
also need to and be sure you're using UML's extended GenModel, not just
EMF's base GenModel; I think the importer only creates UML's extended
GenModel if you load Ecore from a UML model though so you'll need to
fiddle with the GenModel namespace in the document...
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| |
Re: How to : UML deep modifications [message #523762 is a reply to message #519242] |
Mon, 29 March 2010 08:48 |
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 : wiki-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 #523813 is a reply to message #523762] |
Mon, 29 March 2010 08:46 |
Ed Merks Messages: 33217 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!
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| | | | |
Re: How to : UML deep modifications [message #628316 is a reply to message #519250] |
Mon, 08 March 2010 14:04 |
Ed Merks Messages: 33217 Registered: July 2009 |
Senior Member |
|
|
Vlad,
Coments below.
Vlad Varnica wrote:
> 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.
Normally of one wishes to add/modify something one has the choice of
either extending classes normally in a new package or modifying the
existing classes directly, which is generally a bad design approach.
I'm not sure how this is an EMF limitation, it's just the way the
universe works.
> 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 !!
Your line of reasoning is bizarre.
>
> 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.
Only three months now? I though it would take 1 or 2 years.
>
> 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.
The OMG defines the concept of package merging where independently
defined aspects of a given "element" are merged. The UML project
implements this merging algorithm and applies to UML's definition to
arrive at a merged definition. Note that I said the UML project defines
this and applies it, not EMF itself.
>
>
> 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.
Have you not dished out this drivel enough times yet?
>
> 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.
To answer the actual question that's been asked, there are two choices.
Defining a heavy weight extension, which involves extending the UML
model and generating that extension, or defining a light weight
extension, which involves defining a profile that can be used to
stereotype UMLs base artifacts. The latter approach is much more
amenable to reusing all the existing tools so unless it proves
inadequate for your needs, that's the easier way to go.
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: How to : UML deep modifications [message #628322 is a reply to message #519351] |
Mon, 08 March 2010 18:20 |
Ed Merks Messages: 33217 Registered: July 2009 |
Senior Member |
|
|
Comments below.
CaribeanAlien wrote:
> 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.
Don't take offense. Vlad tends not to address the actual issues that
are raised. It seems he can't help it.
>
> So, if you tell me there is no documentation to enter into UML2, I
> would be happy to write it during my "investigation".
There's not a lot of information for UML2.
>
>
> (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.
Extending UML is a very complex task for a beginner. You'd need to
extend UML's UML2.ecore (if you have UML2 installed in the ID, you can
load UML's Ecore modeling into the Sample Ecore Editor using Load
Resource...->Browse Registered Packages to find UML's namespace. You
also need to and be sure you're using UML's extended GenModel, not just
EMF's base GenModel; I think the importer only creates UML's extended
GenModel if you load Ecore from a UML model though so you'll need to
fiddle with the GenModel namespace in the document...
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| | |
Goto Forum:
Current Time: Mon Sep 23 10:28:09 GMT 2024
Powered by FUDForum. Page generated in 0.05650 seconds
|