|
|
|
Re: Juno: code errors in generated model code of static uml profile [message #895751 is a reply to message #892848] |
Sun, 15 July 2012 17:44 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi
See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=382637.
Regards
Ed Willink
On 30/06/2012 13:41, Ed Willink wrote:
> Hi
>
> Are you specifying Types.genmodel as a used gen package? If so, this
> looks like a justification for reopening
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=366348.
>
> The intention is that the Types package is a hidden secret, so that
> users should not notice a UML2 3.0/4.0 change.
>
> Regards
>
> Ed Willink
>
>
> On 30/06/2012 12:22, Ed Merks wrote:
>> Christian,
>>
>> I think this is a problem with the latest version of the
>> UML2.genmodel, which treats this types packages as kind of a built-in
>> model for which it produces a GenPackage wrapper automatically. I
>> suspect it's not initializing the GenPackage's prefix property
>> properly. Please open a bugzilla against UML2.
>>
>>
>> On 29/06/2012 12:29 PM, Christian Drabek wrote:
>>> I'm porting a static profile from indigo to juno release.
>>> I have already updated all changed extension points and references
>>> inside the uml profile. But when generating the model code from the
>>> genmodel, I experience a case error in the PackageImpl class (see
>>> below). It is easy to correct by hand and the profile works fine
>>> afterwards, but annoying as the error reappears every time the model
>>> code is generated again. Did I miss something while porting? Is
>>> there any way to fix this?
>>>
>>> In the following snipped org.eclipse.uml2.types.typesPackage should
>>> actually be org.eclipse.uml2.types.TypesPackage. The line wasn't
>>> even there in indigo.
>>>
>>>
>>> /**
>>> * Complete the initialization of the package and its
>>> meta-model. This
>>> * method is guarded to have no affect on any invocation but its
>>> first.
>>> * <!-- begin-user-doc -->
>>> * <!-- end-user-doc -->
>>> * @generated
>>> */
>>> public void initializePackageContents() {
>>> if (isInitialized) return;
>>> isInitialized = true;
>>>
>>> // Initialize package
>>> setName(eNAME);
>>> setNsPrefix(eNS_PREFIX);
>>> setNsURI(eNS_URI);
>>>
>>> // Obtain other dependent packages
>>> UMLPackage theUMLPackage =
>>> (UMLPackage)EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI);
>>> org.eclipse.uml2.types.typesPackage thetypesPackage =
>>> (org.eclipse.uml2.types.typesPackage)EPackage.Registry.INSTANCE.getEPackage(org.eclipse.uml2.types.typesPackage.eNS_URI);
>>>
>>> SystemViewPackage theSystemViewPackage =
>>> (SystemViewPackage)EPackage.Registry.INSTANCE.getEPackage(SystemViewPackage.eNS_URI);
>>> ..
>>>
>>>
>>
>>
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03941 seconds