Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » strange Types package?
strange Types package? [message #895740] Sun, 15 July 2012 11:17 Go to next message
Joel Greenyer is currently offline Joel Greenyer
Messages: 170
Registered: July 2009
Senior Member
Hi,
In e4 Juno (UML UML 4.0.0.v20120604-0919), if I create genmodels of EMF models that reference the uml.ecore (these genmodels reference then reference also the uml.genmodel), I find a strange package "Types". What is the meaning of this package? Is it supposed to be there? Am I supposed to generate code for this package, for every UML-dependent model/plug-in that I have?
I can't find any documentation on this, only this post seems related: http://www.eclipse.org/forums/index.php/m/892848/


Joel
Re: strange Types package? [message #895750 is a reply to message #895740] Sun, 15 July 2012 13:40 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4003
Registered: July 2009
Senior Member
Hi

You will find references to the Types package in
http://wiki.eclipse.org/MDT/UML2/UML2_4.0_Migration_Guide. The Types
package is the MDT/UML2 realisation of the UML 2.4.1 PrimtiveTypes package.

The post (thread) you reference says "The intention is that the Types
package is a hidden secret, so that users should not notice a UML2
3.0/4.0 change."

If you have a real problem with the Types package please raise a Bugzilla.

Regards

Ed Willibnk


On 15/07/2012 16:17, Joel Greenyer wrote:
> Hi,
> In e4 Juno (UML UML 4.0.0.v20120604-0919), if I create genmodels of
> EMF models that reference the uml.ecore (these genmodels reference
> then reference also the uml.genmodel), I find a strange package
> "Types". What is the meaning of this package? Is it supposed to be
> there? Am I supposed to generate code for this package, for every
> UML-dependent model/plug-in that I have?
> I can't find any documentation on this, only this post seems related:
> http://www.eclipse.org/forums/index.php/m/892848/
>
>
> Joel
Re: strange Types package? [message #895806 is a reply to message #895750] Mon, 16 July 2012 02:46 Go to previous messageGo to next message
Joel Greenyer is currently offline Joel Greenyer
Messages: 170
Registered: July 2009
Senior Member
Hi Ed,
thanks for the info.
I don't have a "real problem" so far, but I'd still just like to know whether it is intended that I now generate my own types packages in all my plugins that reference UML.

Thanks

Joel

On 15.07.2012 19:40, Ed Willink wrote:
> Hi
>
> You will find references to the Types package in http://wiki.eclipse.org/MDT/UML2/UML2_4.0_Migration_Guide. The Types package is the MDT/UML2 realisation of the UML 2.4.1 PrimtiveTypes package.
>
> The post (thread) you reference says "The intention is that the Types package is a hidden secret, so that users should not notice a UML2 3.0/4.0 change."
>
> If you have a real problem with the Types package please raise a Bugzilla.
>
> Regards
>
> Ed Willibnk
>
>
> On 15/07/2012 16:17, Joel Greenyer wrote:
>> Hi,
>> In e4 Juno (UML UML 4.0.0.v20120604-0919), if I create genmodels of EMF models that reference the uml.ecore (these genmodels reference then reference also the uml.genmodel), I find a strange package "Types". What is the meaning of this package? Is it supposed to be there? Am I supposed to generate code for this package, for every UML-dependent model/plug-in that I have?
>> I can't find any documentation on this, only this post seems related: http://www.eclipse.org/forums/index.php/m/892848/
>>
>>
>> Joel
>
>
Re: strange Types package? [message #895833 is a reply to message #895806] Mon, 16 July 2012 04:51 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4003
Registered: July 2009
Senior Member
Hi

(I'm not the developer, just the first closely related user as an OCL
developer.) My understanding is that the Types package should be shared
by all users (just the same as the Java version of Ecore.ecore). No user
should recreate it. The attempt to make it a hidden secret is a nice
idea for migration, but I'm not convinced that it can really be secret.
There are indications that it makes itself known. It appears that study
of a couple of associated bugs may reveal whether there are just a
couple of additional paths on which to keep it secret or whether it
should be an explicit model just like any other.

So the mechanisms by which the visibility of the Types package became a
problem to you are important to know and understand. For instance,
perhaps the genmodel reload dialog is confusing and encourages an unwise
choice. Perhaps some third party tool automates this unwise choice.
Perhaps something should be more tolerant of this unwise choice.

Regards

Ed Willink


On 16/07/2012 07:46, Joel Greenyer wrote:
> Hi Ed,
> thanks for the info.
> I don't have a "real problem" so far, but I'd still just like to know
> whether it is intended that I now generate my own types packages in
> all my plugins that reference UML.
>
> Thanks
>
> Joel
>
> On 15.07.2012 19:40, Ed Willink wrote:
>> Hi
>>
>> You will find references to the Types package in
>> http://wiki.eclipse.org/MDT/UML2/UML2_4.0_Migration_Guide. The Types
>> package is the MDT/UML2 realisation of the UML 2.4.1 PrimtiveTypes
>> package.
>>
>> The post (thread) you reference says "The intention is that the Types
>> package is a hidden secret, so that users should not notice a UML2
>> 3.0/4.0 change."
>>
>> If you have a real problem with the Types package please raise a
>> Bugzilla.
>>
>> Regards
>>
>> Ed Willibnk
>>
>>
>> On 15/07/2012 16:17, Joel Greenyer wrote:
>>> Hi,
>>> In e4 Juno (UML UML 4.0.0.v20120604-0919), if I create genmodels of
>>> EMF models that reference the uml.ecore (these genmodels reference
>>> then reference also the uml.genmodel), I find a strange package
>>> "Types". What is the meaning of this package? Is it supposed to be
>>> there? Am I supposed to generate code for this package, for every
>>> UML-dependent model/plug-in that I have?
>>> I can't find any documentation on this, only this post seems
>>> related: http://www.eclipse.org/forums/index.php/m/892848/
>>>
>>>
>>> Joel
>>
>>
>
>
Re: strange Types package? [message #895844 is a reply to message #895833] Mon, 16 July 2012 05:37 Go to previous messageGo to next message
Joel Greenyer is currently offline Joel Greenyer
Messages: 170
Registered: July 2009
Senior Member
Well, so the package appears in the genmodel. Let's say before I had "mymodel", now there appears "mymodel" and "Types", and if I generate code from "mymodel" alone, it misses the Types package. My solution right now is to generate the Types package. But that feels redundant. I guess I should reference the org.eclipse.uml2.types plugin instead. But referencing the genmodel (org.eclipse.uml2.types\model\Types.genmodel) from my genmodel does not work. I guess I could manually modify the generated code to use the types in org.eclipse.uml2.types...

But I can do many things... I would just like to know how to use it right.

Joel

On 16.07.2012 10:51, Ed Willink wrote:
> Hi
>
> (I'm not the developer, just the first closely related user as an OCL developer.) My understanding is that the Types package should be shared by all users (just the same as the Java version of Ecore.ecore). No user should recreate it. The attempt to make it a hidden secret is a nice idea for migration, but I'm not convinced that it can really be secret. There are indications that it makes itself known. It appears that study of a couple of associated bugs may reveal whether there are just a couple of additional paths on which to keep it secret or whether it should be an explicit model just like any other.
>
> So the mechanisms by which the visibility of the Types package became a problem to you are important to know and understand. For instance, perhaps the genmodel reload dialog is confusing and encourages an unwise choice. Perhaps some third party tool automates this unwise choice. Perhaps something should be more tolerant of this unwise choice.
>
> Regards
>
> Ed Willink
>
>
> On 16/07/2012 07:46, Joel Greenyer wrote:
>> Hi Ed,
>> thanks for the info.
>> I don't have a "real problem" so far, but I'd still just like to know whether it is intended that I now generate my own types packages in all my plugins that reference UML.
>>
>> Thanks
>>
>> Joel
>>
>> On 15.07.2012 19:40, Ed Willink wrote:
>>> Hi
>>>
>>> You will find references to the Types package in http://wiki.eclipse.org/MDT/UML2/UML2_4.0_Migration_Guide. The Types package is the MDT/UML2 realisation of the UML 2.4.1 PrimtiveTypes package.
>>>
>>> The post (thread) you reference says "The intention is that the Types package is a hidden secret, so that users should not notice a UML2 3.0/4.0 change."
>>>
>>> If you have a real problem with the Types package please raise a Bugzilla.
>>>
>>> Regards
>>>
>>> Ed Willibnk
>>>
>>>
>>> On 15/07/2012 16:17, Joel Greenyer wrote:
>>>> Hi,
>>>> In e4 Juno (UML UML 4.0.0.v20120604-0919), if I create genmodels of EMF models that reference the uml.ecore (these genmodels reference then reference also the uml.genmodel), I find a strange package "Types". What is the meaning of this package? Is it supposed to be there? Am I supposed to generate code for this package, for every UML-dependent model/plug-in that I have?
>>>> I can't find any documentation on this, only this post seems related: http://www.eclipse.org/forums/index.php/m/892848/
>>>>
>>>>
>>>> Joel
>>>
>>>
>>
>>
>
>
Re: strange Types package? [message #895853 is a reply to message #895844] Mon, 16 July 2012 06:15 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4003
Registered: July 2009
Senior Member
Hi

The correct solution should be that you never see the Types package in
the GenModel (unless you look at the href's), so you should have no
confusing options as to how to generate it.

You can look at

GIT\org.eclipse.ocl\plugins\org.eclipse.ocl.uml\model\OCLUML.genmodel
wherein you will find no mention of the Types package. Reloading it
gives no opportunity to control the Types package.

GIT\org.eclipse.ocl\plugins\org.eclipse.ocl\model\OCL.genmodel which
similarly keeps the UML TYpes package hidden while introducing its own
types package.

GIT\org.eclipse.ocl\examples\org.eclipse.ocl.examples.pivot\model\Pivot.merged.genmodel
which is a simpler use of UML.

But it is possible that my usages have all been 'unifying' OCL primitive
types too and so I have avoided your problem. During the M3/M4/M5
evolution I had some problems that were caused by the need (at about M3)
for manual addition of a Types.genmodel reference. Manual deletion (at
about M5) cured the problems.

Regards

Ed Willink

On 16/07/2012 10:37, Joel Greenyer wrote:
> Well, so the package appears in the genmodel. Let's say before I had
> "mymodel", now there appears "mymodel" and "Types", and if I generate
> code from "mymodel" alone, it misses the Types package. My solution
> right now is to generate the Types package. But that feels redundant.
> I guess I should reference the org.eclipse.uml2.types plugin instead.
> But referencing the genmodel
> (org.eclipse.uml2.types\model\Types.genmodel) from my genmodel does
> not work. I guess I could manually modify the generated code to use
> the types in org.eclipse.uml2.types...
>
> But I can do many things... I would just like to know how to use it
> right.
>
> Joel
>
> On 16.07.2012 10:51, Ed Willink wrote:
>> Hi
>>
>> (I'm not the developer, just the first closely related user as an OCL
>> developer.) My understanding is that the Types package should be
>> shared by all users (just the same as the Java version of
>> Ecore.ecore). No user should recreate it. The attempt to make it a
>> hidden secret is a nice idea for migration, but I'm not convinced
>> that it can really be secret. There are indications that it makes
>> itself known. It appears that study of a couple of associated bugs
>> may reveal whether there are just a couple of additional paths on
>> which to keep it secret or whether it should be an explicit model
>> just like any other.
>>
>> So the mechanisms by which the visibility of the Types package became
>> a problem to you are important to know and understand. For instance,
>> perhaps the genmodel reload dialog is confusing and encourages an
>> unwise choice. Perhaps some third party tool automates this unwise
>> choice. Perhaps something should be more tolerant of this unwise choice.
>>
>> Regards
>>
>> Ed Willink
>>
>>
>> On 16/07/2012 07:46, Joel Greenyer wrote:
>>> Hi Ed,
>>> thanks for the info.
>>> I don't have a "real problem" so far, but I'd still just like to
>>> know whether it is intended that I now generate my own types
>>> packages in all my plugins that reference UML.
>>>
>>> Thanks
>>>
>>> Joel
>>>
>>> On 15.07.2012 19:40, Ed Willink wrote:
>>>> Hi
>>>>
>>>> You will find references to the Types package in
>>>> http://wiki.eclipse.org/MDT/UML2/UML2_4.0_Migration_Guide. The
>>>> Types package is the MDT/UML2 realisation of the UML 2.4.1
>>>> PrimtiveTypes package.
>>>>
>>>> The post (thread) you reference says "The intention is that the
>>>> Types package is a hidden secret, so that users should not notice a
>>>> UML2 3.0/4.0 change."
>>>>
>>>> If you have a real problem with the Types package please raise a
>>>> Bugzilla.
>>>>
>>>> Regards
>>>>
>>>> Ed Willibnk
>>>>
>>>>
>>>> On 15/07/2012 16:17, Joel Greenyer wrote:
>>>>> Hi,
>>>>> In e4 Juno (UML UML 4.0.0.v20120604-0919), if I create genmodels
>>>>> of EMF models that reference the uml.ecore (these genmodels
>>>>> reference then reference also the uml.genmodel), I find a strange
>>>>> package "Types". What is the meaning of this package? Is it
>>>>> supposed to be there? Am I supposed to generate code for this
>>>>> package, for every UML-dependent model/plug-in that I have?
>>>>> I can't find any documentation on this, only this post seems
>>>>> related: http://www.eclipse.org/forums/index.php/m/892848/
>>>>>
>>>>>
>>>>> Joel
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: strange Types package? [message #897343 is a reply to message #895853] Mon, 23 July 2012 12:28 Go to previous messageGo to next message
Joel Greenyer is currently offline Joel Greenyer
Messages: 170
Registered: July 2009
Senior Member
Ed,
by comparing your genmodels with mine, and after a lot of trying, I figured out that I have to change at minimum two things to have this "Types" package disappear in the genmodel (along with the need having to generate code from it, because the other package's code relies on it.)

1. In the created genmodel, there is a "genPackages" element that I need to remove:

<genPackages prefix="Types" ecorePackage="http://www.eclipse.org/uml2/4.0.0/Types#/">
<genDataTypes ecoreDataType="http://www.eclipse.org/uml2/4.0.0/Types#//Boolean"/>
<genDataTypes ecoreDataType="http://www.eclipse.org/uml2/4.0.0/Types#//Integer"/>
<genDataTypes ecoreDataType="http://www.eclipse.org/uml2/4.0.0/Types#//Real"/>
<genDataTypes ecoreDataType="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
<genDataTypes ecoreDataType="http://www.eclipse.org/uml2/4.0.0/Types#//UnlimitedNatural"/>
</genPackages>

but now, in the genmodel editor, it still shows up... (?) What I then need to do is replace
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel"
with
xmlns:genmodel="http://www.eclipse.org/uml2/2.2.0/GenModel"

Only then, the spooky Types Package will be gone.


I would still appreciate some information about what is going on here and what is the proper thing to do for people developing EMF models/plug-ins based on UML...


Joel







On 16.07.2012 12:15, Ed Willink wrote:
> Hi
>
> The correct solution should be that you never see the Types package in the GenModel (unless you look at the href's), so you should have no confusing options as to how to generate it.
>
> You can look at
>
> GIT\org.eclipse.ocl\plugins\org.eclipse.ocl.uml\model\OCLUML.genmodel wherein you will find no mention of the Types package. Reloading it gives no opportunity to control the Types package.
>
> GIT\org.eclipse.ocl\plugins\org.eclipse.ocl\model\OCL.genmodel which similarly keeps the UML TYpes package hidden while introducing its own types package.
>
> GIT\org.eclipse.ocl\examples\org.eclipse.ocl.examples.pivot\model\Pivot.merged.genmodel which is a simpler use of UML.
>
> But it is possible that my usages have all been 'unifying' OCL primitive types too and so I have avoided your problem. During the M3/M4/M5 evolution I had some problems that were caused by the need (at about M3) for manual addition of a Types.genmodel reference. Manual deletion (at about M5) cured the problems.
>
> Regards
>
> Ed Willink
>
> On 16/07/2012 10:37, Joel Greenyer wrote:
>> Well, so the package appears in the genmodel. Let's say before I had "mymodel", now there appears "mymodel" and "Types", and if I generate code from "mymodel" alone, it misses the Types package. My solution right now is to generate the Types package. But that feels redundant. I guess I should reference the org.eclipse.uml2.types plugin instead. But referencing the genmodel (org.eclipse.uml2.types\model\Types.genmodel) from my genmodel does not work. I guess I could manually modify the generated code to use the types in org.eclipse.uml2.types...
>>
>> But I can do many things... I would just like to know how to use it right.
>>
>> Joel
>>
>> On 16.07.2012 10:51, Ed Willink wrote:
>>> Hi
>>>
>>> (I'm not the developer, just the first closely related user as an OCL developer.) My understanding is that the Types package should be shared by all users (just the same as the Java version of Ecore.ecore). No user should recreate it. The attempt to make it a hidden secret is a nice idea for migration, but I'm not convinced that it can really be secret. There are indications that it makes itself known. It appears that study of a couple of associated bugs may reveal whether there are just a couple of additional paths on which to keep it secret or whether it should be an explicit model just like any other.
>>>
>>> So the mechanisms by which the visibility of the Types package became a problem to you are important to know and understand. For instance, perhaps the genmodel reload dialog is confusing and encourages an unwise choice. Perhaps some third party tool automates this unwise choice. Perhaps something should be more tolerant of this unwise choice.
>>>
>>> Regards
>>>
>>> Ed Willink
>>>
>>>
>>> On 16/07/2012 07:46, Joel Greenyer wrote:
>>>> Hi Ed,
>>>> thanks for the info.
>>>> I don't have a "real problem" so far, but I'd still just like to know whether it is intended that I now generate my own types packages in all my plugins that reference UML.
>>>>
>>>> Thanks
>>>>
>>>> Joel
>>>>
>>>> On 15.07.2012 19:40, Ed Willink wrote:
>>>>> Hi
>>>>>
>>>>> You will find references to the Types package in http://wiki.eclipse.org/MDT/UML2/UML2_4.0_Migration_Guide. The Types package is the MDT/UML2 realisation of the UML 2.4.1 PrimtiveTypes package.
>>>>>
>>>>> The post (thread) you reference says "The intention is that the Types package is a hidden secret, so that users should not notice a UML2 3.0/4.0 change."
>>>>>
>>>>> If you have a real problem with the Types package please raise a Bugzilla.
>>>>>
>>>>> Regards
>>>>>
>>>>> Ed Willibnk
>>>>>
>>>>>
>>>>> On 15/07/2012 16:17, Joel Greenyer wrote:
>>>>>> Hi,
>>>>>> In e4 Juno (UML UML 4.0.0.v20120604-0919), if I create genmodels of EMF models that reference the uml.ecore (these genmodels reference then reference also the uml.genmodel), I find a strange package "Types". What is the meaning of this package? Is it supposed to be there? Am I supposed to generate code for this package, for every UML-dependent model/plug-in that I have?
>>>>>> I can't find any documentation on this, only this post seems related: http://www.eclipse.org/forums/index.php/m/892848/
>>>>>>
>>>>>>
>>>>>> Joel
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: strange Types package? [message #897356 is a reply to message #897343] Mon, 23 July 2012 13:29 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4003
Registered: July 2009
Senior Member
Hi

Removing the genPackage is necessary, but it should never have been
added in the first place. Where did it come from?

The UML team took the design decision to have an enhanced UML genmodel
rather than a heavily annotated standard Ecore genmodel. It is therefore
mandatory to use http://www.eclipse.org/uml2/2.2.0/GenModel for UML.
This policy has not changed for many many years, so why have you got the
wrong URI? Using the wronmg URO probably caused the first genPackage
problem.

I suspect that there is an important user difficulty to solve once you
can identify how you migrated from
http://www.eclipse.org/uml2/2.2.0/GenModel to
http://www.eclipse.org/emf/2002/GenModel.

Then there is a minor but useful cleanup;
http://www.eclipse.org/emf/2002/GenModel could automatically prune the
unwanted Types genPackage.

Regards

Ed Willink



On 23/07/2012 17:28, Joel Greenyer wrote:
> Ed,
> by comparing your genmodels with mine, and after a lot of trying, I
> figured out that I have to change at minimum two things to have this
> "Types" package disappear in the genmodel (along with the need having
> to generate code from it, because the other package's code relies on it.)
>
> 1. In the created genmodel, there is a "genPackages" element that I
> need to remove:
>
> <genPackages prefix="Types"
> ecorePackage="http://www.eclipse.org/uml2/4.0.0/Types#/">
> <genDataTypes
> ecoreDataType="http://www.eclipse.org/uml2/4.0.0/Types#//Boolean"/>
> <genDataTypes
> ecoreDataType="http://www.eclipse.org/uml2/4.0.0/Types#//Integer"/>
> <genDataTypes
> ecoreDataType="http://www.eclipse.org/uml2/4.0.0/Types#//Real"/>
> <genDataTypes
> ecoreDataType="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
> <genDataTypes
> ecoreDataType="http://www.eclipse.org/uml2/4.0.0/Types#//UnlimitedNatural"/>
> </genPackages>
>
> but now, in the genmodel editor, it still shows up... (?) What I then
> need to do is replace
> xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel"
> with
> xmlns:genmodel="http://www.eclipse.org/uml2/2.2.0/GenModel"
>
> Only then, the spooky Types Package will be gone.
>
>
> I would still appreciate some information about what is going on here
> and what is the proper thing to do for people developing EMF
> models/plug-ins based on UML...
>
>
> Joel
>
>
>
>
>
>
>
> On 16.07.2012 12:15, Ed Willink wrote:
>> Hi
>>
>> The correct solution should be that you never see the Types package
>> in the GenModel (unless you look at the href's), so you should have
>> no confusing options as to how to generate it.
>>
>> You can look at
>>
>> GIT\org.eclipse.ocl\plugins\org.eclipse.ocl.uml\model\OCLUML.genmodel
>> wherein you will find no mention of the Types package. Reloading it
>> gives no opportunity to control the Types package.
>>
>> GIT\org.eclipse.ocl\plugins\org.eclipse.ocl\model\OCL.genmodel which
>> similarly keeps the UML TYpes package hidden while introducing its
>> own types package.
>>
>> GIT\org.eclipse.ocl\examples\org.eclipse.ocl.examples.pivot\model\Pivot.merged.genmodel
>> which is a simpler use of UML.
>>
>> But it is possible that my usages have all been 'unifying' OCL
>> primitive types too and so I have avoided your problem. During the
>> M3/M4/M5 evolution I had some problems that were caused by the need
>> (at about M3) for manual addition of a Types.genmodel reference.
>> Manual deletion (at about M5) cured the problems.
>>
>> Regards
>>
>> Ed Willink
>>
>> On 16/07/2012 10:37, Joel Greenyer wrote:
>>> Well, so the package appears in the genmodel. Let's say before I had
>>> "mymodel", now there appears "mymodel" and "Types", and if I
>>> generate code from "mymodel" alone, it misses the Types package. My
>>> solution right now is to generate the Types package. But that feels
>>> redundant. I guess I should reference the org.eclipse.uml2.types
>>> plugin instead. But referencing the genmodel
>>> (org.eclipse.uml2.types\model\Types.genmodel) from my genmodel does
>>> not work. I guess I could manually modify the generated code to use
>>> the types in org.eclipse.uml2.types...
>>>
>>> But I can do many things... I would just like to know how to use it
>>> right.
>>>
>>> Joel
>>>
>>> On 16.07.2012 10:51, Ed Willink wrote:
>>>> Hi
>>>>
>>>> (I'm not the developer, just the first closely related user as an
>>>> OCL developer.) My understanding is that the Types package should
>>>> be shared by all users (just the same as the Java version of
>>>> Ecore.ecore). No user should recreate it. The attempt to make it a
>>>> hidden secret is a nice idea for migration, but I'm not convinced
>>>> that it can really be secret. There are indications that it makes
>>>> itself known. It appears that study of a couple of associated bugs
>>>> may reveal whether there are just a couple of additional paths on
>>>> which to keep it secret or whether it should be an explicit model
>>>> just like any other.
>>>>
>>>> So the mechanisms by which the visibility of the Types package
>>>> became a problem to you are important to know and understand. For
>>>> instance, perhaps the genmodel reload dialog is confusing and
>>>> encourages an unwise choice. Perhaps some third party tool
>>>> automates this unwise choice. Perhaps something should be more
>>>> tolerant of this unwise choice.
>>>>
>>>> Regards
>>>>
>>>> Ed Willink
>>>>
>>>>
>>>> On 16/07/2012 07:46, Joel Greenyer wrote:
>>>>> Hi Ed,
>>>>> thanks for the info.
>>>>> I don't have a "real problem" so far, but I'd still just like to
>>>>> know whether it is intended that I now generate my own types
>>>>> packages in all my plugins that reference UML.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Joel
>>>>>
>>>>> On 15.07.2012 19:40, Ed Willink wrote:
>>>>>> Hi
>>>>>>
>>>>>> You will find references to the Types package in
>>>>>> http://wiki.eclipse.org/MDT/UML2/UML2_4.0_Migration_Guide. The
>>>>>> Types package is the MDT/UML2 realisation of the UML 2.4.1
>>>>>> PrimtiveTypes package.
>>>>>>
>>>>>> The post (thread) you reference says "The intention is that the
>>>>>> Types package is a hidden secret, so that users should not notice
>>>>>> a UML2 3.0/4.0 change."
>>>>>>
>>>>>> If you have a real problem with the Types package please raise a
>>>>>> Bugzilla.
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Ed Willibnk
>>>>>>
>>>>>>
>>>>>> On 15/07/2012 16:17, Joel Greenyer wrote:
>>>>>>> Hi,
>>>>>>> In e4 Juno (UML UML 4.0.0.v20120604-0919), if I create genmodels
>>>>>>> of EMF models that reference the uml.ecore (these genmodels
>>>>>>> reference then reference also the uml.genmodel), I find a
>>>>>>> strange package "Types". What is the meaning of this package? Is
>>>>>>> it supposed to be there? Am I supposed to generate code for this
>>>>>>> package, for every UML-dependent model/plug-in that I have?
>>>>>>> I can't find any documentation on this, only this post seems
>>>>>>> related: http://www.eclipse.org/forums/index.php/m/892848/
>>>>>>>
>>>>>>>
>>>>>>> Joel
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
Re: strange Types package? [message #897374 is a reply to message #897356] Mon, 23 July 2012 16:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25907
Registered: July 2009
Senior Member
Ed,

The problem is that you can't even use UML's GenModel if you simple want
to reference UML things in some other models; it's fine to argue you
need an extended GenModel if you want to extend UML2 but the current
problem is more serious. It's a new problem caused by the special
handling of this new Types model, which uses the generated Types package
instance, rather than referencing the GenPackage in the GenModel for the
development time version of the Type package. So, for example, it's
impossible to have references to UML2 from an Xcore-defined model.



On 23/07/2012 7:29 PM, Ed Willink wrote:
> Hi
>
> Removing the genPackage is necessary, but it should never have been
> added in the first place. Where did it come from?
>
> The UML team took the design decision to have an enhanced UML genmodel
> rather than a heavily annotated standard Ecore genmodel. It is
> therefore mandatory to use http://www.eclipse.org/uml2/2.2.0/GenModel
> for UML. This policy has not changed for many many years, so why have
> you got the wrong URI? Using the wronmg URO probably caused the first
> genPackage problem.
>
> I suspect that there is an important user difficulty to solve once you
> can identify how you migrated from
> http://www.eclipse.org/uml2/2.2.0/GenModel to
> http://www.eclipse.org/emf/2002/GenModel.
>
> Then there is a minor but useful cleanup;
> http://www.eclipse.org/emf/2002/GenModel could automatically prune the
> unwanted Types genPackage.
>
> Regards
>
> Ed Willink
>
>
>
> On 23/07/2012 17:28, Joel Greenyer wrote:
>> Ed,
>> by comparing your genmodels with mine, and after a lot of trying, I
>> figured out that I have to change at minimum two things to have this
>> "Types" package disappear in the genmodel (along with the need having
>> to generate code from it, because the other package's code relies on
>> it.)
>>
>> 1. In the created genmodel, there is a "genPackages" element that I
>> need to remove:
>>
>> <genPackages prefix="Types"
>> ecorePackage="http://www.eclipse.org/uml2/4.0.0/Types#/">
>> <genDataTypes
>> ecoreDataType="http://www.eclipse.org/uml2/4.0.0/Types#//Boolean"/>
>> <genDataTypes
>> ecoreDataType="http://www.eclipse.org/uml2/4.0.0/Types#//Integer"/>
>> <genDataTypes
>> ecoreDataType="http://www.eclipse.org/uml2/4.0.0/Types#//Real"/>
>> <genDataTypes
>> ecoreDataType="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
>> <genDataTypes
>> ecoreDataType="http://www.eclipse.org/uml2/4.0.0/Types#//UnlimitedNatural"/>
>> </genPackages>
>>
>> but now, in the genmodel editor, it still shows up... (?) What I then
>> need to do is replace
>> xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel"
>> with
>> xmlns:genmodel="http://www.eclipse.org/uml2/2.2.0/GenModel"
>>
>> Only then, the spooky Types Package will be gone.
>>
>>
>> I would still appreciate some information about what is going on here
>> and what is the proper thing to do for people developing EMF
>> models/plug-ins based on UML...
>>
>>
>> Joel
>>
>>
>>
>>
>>
>>
>>
>> On 16.07.2012 12:15, Ed Willink wrote:
>>> Hi
>>>
>>> The correct solution should be that you never see the Types package
>>> in the GenModel (unless you look at the href's), so you should have
>>> no confusing options as to how to generate it.
>>>
>>> You can look at
>>>
>>> GIT\org.eclipse.ocl\plugins\org.eclipse.ocl.uml\model\OCLUML.genmodel wherein
>>> you will find no mention of the Types package. Reloading it gives no
>>> opportunity to control the Types package.
>>>
>>> GIT\org.eclipse.ocl\plugins\org.eclipse.ocl\model\OCL.genmodel which
>>> similarly keeps the UML TYpes package hidden while introducing its
>>> own types package.
>>>
>>> GIT\org.eclipse.ocl\examples\org.eclipse.ocl.examples.pivot\model\Pivot.merged.genmodel
>>> which is a simpler use of UML.
>>>
>>> But it is possible that my usages have all been 'unifying' OCL
>>> primitive types too and so I have avoided your problem. During the
>>> M3/M4/M5 evolution I had some problems that were caused by the need
>>> (at about M3) for manual addition of a Types.genmodel reference.
>>> Manual deletion (at about M5) cured the problems.
>>>
>>> Regards
>>>
>>> Ed Willink
>>>
>>> On 16/07/2012 10:37, Joel Greenyer wrote:
>>>> Well, so the package appears in the genmodel. Let's say before I
>>>> had "mymodel", now there appears "mymodel" and "Types", and if I
>>>> generate code from "mymodel" alone, it misses the Types package. My
>>>> solution right now is to generate the Types package. But that feels
>>>> redundant. I guess I should reference the org.eclipse.uml2.types
>>>> plugin instead. But referencing the genmodel
>>>> (org.eclipse.uml2.types\model\Types.genmodel) from my genmodel does
>>>> not work. I guess I could manually modify the generated code to use
>>>> the types in org.eclipse.uml2.types...
>>>>
>>>> But I can do many things... I would just like to know how to use it
>>>> right.
>>>>
>>>> Joel
>>>>
>>>> On 16.07.2012 10:51, Ed Willink wrote:
>>>>> Hi
>>>>>
>>>>> (I'm not the developer, just the first closely related user as an
>>>>> OCL developer.) My understanding is that the Types package should
>>>>> be shared by all users (just the same as the Java version of
>>>>> Ecore.ecore). No user should recreate it. The attempt to make it a
>>>>> hidden secret is a nice idea for migration, but I'm not convinced
>>>>> that it can really be secret. There are indications that it makes
>>>>> itself known. It appears that study of a couple of associated bugs
>>>>> may reveal whether there are just a couple of additional paths on
>>>>> which to keep it secret or whether it should be an explicit model
>>>>> just like any other.
>>>>>
>>>>> So the mechanisms by which the visibility of the Types package
>>>>> became a problem to you are important to know and understand. For
>>>>> instance, perhaps the genmodel reload dialog is confusing and
>>>>> encourages an unwise choice. Perhaps some third party tool
>>>>> automates this unwise choice. Perhaps something should be more
>>>>> tolerant of this unwise choice.
>>>>>
>>>>> Regards
>>>>>
>>>>> Ed Willink
>>>>>
>>>>>
>>>>> On 16/07/2012 07:46, Joel Greenyer wrote:
>>>>>> Hi Ed,
>>>>>> thanks for the info.
>>>>>> I don't have a "real problem" so far, but I'd still just like to
>>>>>> know whether it is intended that I now generate my own types
>>>>>> packages in all my plugins that reference UML.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Joel
>>>>>>
>>>>>> On 15.07.2012 19:40, Ed Willink wrote:
>>>>>>> Hi
>>>>>>>
>>>>>>> You will find references to the Types package in
>>>>>>> http://wiki.eclipse.org/MDT/UML2/UML2_4.0_Migration_Guide. The
>>>>>>> Types package is the MDT/UML2 realisation of the UML 2.4.1
>>>>>>> PrimtiveTypes package.
>>>>>>>
>>>>>>> The post (thread) you reference says "The intention is that the
>>>>>>> Types package is a hidden secret, so that users should not
>>>>>>> notice a UML2 3.0/4.0 change."
>>>>>>>
>>>>>>> If you have a real problem with the Types package please raise a
>>>>>>> Bugzilla.
>>>>>>>
>>>>>>> Regards
>>>>>>>
>>>>>>> Ed Willibnk
>>>>>>>
>>>>>>>
>>>>>>> On 15/07/2012 16:17, Joel Greenyer wrote:
>>>>>>>> Hi,
>>>>>>>> In e4 Juno (UML UML 4.0.0.v20120604-0919), if I create
>>>>>>>> genmodels of EMF models that reference the uml.ecore (these
>>>>>>>> genmodels reference then reference also the uml.genmodel), I
>>>>>>>> find a strange package "Types". What is the meaning of this
>>>>>>>> package? Is it supposed to be there? Am I supposed to generate
>>>>>>>> code for this package, for every UML-dependent model/plug-in
>>>>>>>> that I have?
>>>>>>>> I can't find any documentation on this, only this post seems
>>>>>>>> related: http://www.eclipse.org/forums/index.php/m/892848/
>>>>>>>>
>>>>>>>>
>>>>>>>> Joel
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>
UML references from Xcore [message #897427 is a reply to message #897374] Tue, 24 July 2012 01:42 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4003
Registered: July 2009
Senior Member
Hi Ed

In "Re: strange Types package?" you wrote
>
> So, for example, it's impossible to have references to UML2 from an
> Xcore-defined model.
>
I'm not familiar with Xcore details, but surely Xcore is a nice textual
front end for Ecore, and Ecore cannot reference UML models anyway, since
the URIs in XXX.uml are not the same as those in the converted XXX.ecore?

I've argued a few times that the URI uniquely identifies the model
element, rather than the serialized artefact, so that Class YYY in
XXX.uml is the same model element as EClass YYY in XXX.ecore and so may
share the same URI; a tool's metamodel loader converting whatever model
serialization it encounters into the form that the tool requires.

Is this what is happening in Xcore?

Regards

Ed Willink
Re: UML references from Xcore [message #945693 is a reply to message #897427] Mon, 15 October 2012 10:40 Go to previous messageGo to next message
Ansgar Radermacher is currently offline Ansgar Radermacher
Messages: 14
Registered: March 2011
Junior Member

I have the same problem with a genmodel generated from an ecore (which in turn is generated automatically from a UML model).

The problem is quite nasty, as it causes a class cast exception in the generated package when a type from org.eclipse.uml2.uml.types Package is cast into a plugin-local types.

So any news on this issue?

Ansgar


PS: The tip to remove the "Types" package and change the genmodel schema from 2002 to 2.2.0 did not help.

Re: UML references from Xcore [message #945786 is a reply to message #945693] Mon, 15 October 2012 12:37 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4003
Registered: July 2009
Senior Member
Hi

Are you using the latest MDT/UML2 service release? The handling of the
Types package has been changed and so the problems reported in this
thread are no longer valid.

Regards

Ed Willink


On 15/10/2012 15:40, Ansgar Radermacher wrote:
>
> I have the same problem with a genmodel generated from an ecore (which
> in turn is generated automatically from a UML model).
>
> The problem is quite nasty, as it causes a class cast exception in the
> generated package when a type from org.eclipse.uml2.uml.types Package
> is cast into a plugin-local types.
>
> So any news on this issue?
>
> Ansgar
>
>
> PS: The tip to remove the "Types" package and change the genmodel
> schema from 2002 to 2.2.0 did not help.
>
>
Re: UML references from Xcore [message #946470 is a reply to message #945786] Tue, 16 October 2012 04:17 Go to previous message
Ansgar Radermacher is currently offline Ansgar Radermacher
Messages: 14
Registered: March 2011
Junior Member
Dear Ed,

Thanks for the hint. I though I was using the current one (within Juno SR1) - yet I had accidentally a UML 4.0.0 plug-in in my workspace which hid the 4.0.1.

Best regards


Previous Topic:Missing UML2 library in Indigo
Next Topic:How to find out that two Interaction Fragment in a Sequence Diagram occur at the same time
Goto Forum:
  


Current Time: Tue Jul 22 07:39:10 EDT 2014

Powered by FUDForum. Page generated in 0.02445 seconds