Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » ConvertToMetamodelAction makes classifiers private
ConvertToMetamodelAction makes classifiers private [message #476985] Mon, 25 February 2008 15:41 Go to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi,

In using the UML Editor for metamodeling, I find that the "Convert to
Metamodel" action in the editor menu correctly stereotypes my classes as
<<metaclass>> but it also reduces the visibility of my enumerations and
other data types to private.

I see in the action, the UMLSwitch::caseClassifier(Classifier) method is
override to make all non-metaclasses private. This is OK for associations,
but I'd like users of my metamodel to be able to reference my data types.

Why should these have private visibility? Will badness ensue if I change
them back to public visibility?

Thanks,

Christian
Re: ConvertToMetamodelAction makes classifiers private [message #476995 is a reply to message #476985] Wed, 27 February 2008 14:17 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Christian,

This action was originally written to meet the needs of the UML2 metamodel
itself, and is only provided as a sample. In UML, the primitive types are
part of a separate library, so the ones defined in the metamodel are marked
as private to hide them from clients (so as not to cause confusion).
Generally speaking, however, I believe it's intended that types (data types,
primitive types, enumerations, etc.) associated with a profile and "made
available" by applying the profile are maintained in separate libraries, but
of course this is only a guideline and has no semantic force:
It should be possible to define a UML extension that combines profiles and
model libraries (including template libraries) into a single logical unit.
However, within such a unit, for definitional clarity and for ease of
interchange (e.g., 'reference by name'), it should still be possible to keep
the libraries and the profiles distinct from each other.

If you open a Bugzilla report, we could look into changing the action so
that only the associations are made private by default (in which case we
would have to manually make the four primitive types in UML private)...

Cheers,

Kenn

"Christian W. Damus" <cdamus@ca.ibm.com> wrote in message
news:fpunjr$1gu$1@build.eclipse.org...
> Hi,
>
> In using the UML Editor for metamodeling, I find that the "Convert to
> Metamodel" action in the editor menu correctly stereotypes my classes as
> <<metaclass>> but it also reduces the visibility of my enumerations and
> other data types to private.
>
> I see in the action, the UMLSwitch::caseClassifier(Classifier) method is
> override to make all non-metaclasses private. This is OK for
> associations,
> but I'd like users of my metamodel to be able to reference my data types.
>
> Why should these have private visibility? Will badness ensue if I change
> them back to public visibility?
>
> Thanks,
>
> Christian
>
Re: ConvertToMetamodelAction makes classifiers private [message #477000 is a reply to message #476995] Wed, 27 February 2008 14:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Kenn,

Yes, I had figured that the UML primitive types should be private in the
metamodel, because they are defined as a separate model library. I was
actually surprised to find that the UML specification merges this library
instead of merely importing it (with private visibility). Seems like an
issue for the RTF ...

I'm not sure, though, that one can argue that data types are intended
generally to be defined in model libraries. The UML metamodel, itself,
doesn't do this with its various Enumerations, nor do other standard
metamodels such as OCL or standard profiles such as the UML Testing
Profile.

In any case, I understand this action is contributed by the examples (I was
surprised to find it), and it is quite convenient. It's not difficult to
re-publish the elements that it makes private post facto. However, in case
there should be interest in promoting this action into the SDK in support
of metamodellers like me, find https://bugs.eclipse.org/220558 with a patch
attached.

Thanks,

Christian


Kenn Hussey wrote:

> Christian,
>
> This action was originally written to meet the needs of the UML2 metamodel
> itself, and is only provided as a sample. In UML, the primitive types are
> part of a separate library, so the ones defined in the metamodel are
> marked as private to hide them from clients (so as not to cause
> confusion). Generally speaking, however, I believe it's intended that
> types (data types, primitive types, enumerations, etc.) associated with a
> profile and "made available" by applying the profile are maintained in
> separate libraries, but of course this is only a guideline and has no
> semantic force: It should be possible to define a UML extension that
> combines profiles and model libraries (including template libraries) into
> a single logical unit. However, within such a unit, for definitional
> clarity and for ease of interchange (e.g., 'reference by name'), it should
> still be possible to keep the libraries and the profiles distinct from
> each other.
>
> If you open a Bugzilla report, we could look into changing the action so
> that only the associations are made private by default (in which case we
> would have to manually make the four primitive types in UML private)...
>
> Cheers,
>
> Kenn

-----8<-----
Re: ConvertToMetamodelAction makes classifiers private [message #477001 is a reply to message #477000] Wed, 27 February 2008 15:15 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Thanks, we'll address this enhancement ASAP.

Kenn

"Christian W. Damus" <cdamus@ca.ibm.com> wrote in message
news:fq3tdi$efb$1@build.eclipse.org...
> Hi, Kenn,
>
> Yes, I had figured that the UML primitive types should be private in the
> metamodel, because they are defined as a separate model library. I was
> actually surprised to find that the UML specification merges this library
> instead of merely importing it (with private visibility). Seems like an
> issue for the RTF ...
>
> I'm not sure, though, that one can argue that data types are intended
> generally to be defined in model libraries. The UML metamodel, itself,
> doesn't do this with its various Enumerations, nor do other standard
> metamodels such as OCL or standard profiles such as the UML Testing
> Profile.
>
> In any case, I understand this action is contributed by the examples (I
> was
> surprised to find it), and it is quite convenient. It's not difficult to
> re-publish the elements that it makes private post facto. However, in
> case
> there should be interest in promoting this action into the SDK in support
> of metamodellers like me, find https://bugs.eclipse.org/220558 with a
> patch
> attached.
>
> Thanks,
>
> Christian
>
>
> Kenn Hussey wrote:
>
>> Christian,
>>
>> This action was originally written to meet the needs of the UML2
>> metamodel
>> itself, and is only provided as a sample. In UML, the primitive types are
>> part of a separate library, so the ones defined in the metamodel are
>> marked as private to hide them from clients (so as not to cause
>> confusion). Generally speaking, however, I believe it's intended that
>> types (data types, primitive types, enumerations, etc.) associated with a
>> profile and "made available" by applying the profile are maintained in
>> separate libraries, but of course this is only a guideline and has no
>> semantic force: It should be possible to define a UML extension that
>> combines profiles and model libraries (including template libraries) into
>> a single logical unit. However, within such a unit, for definitional
>> clarity and for ease of interchange (e.g., 'reference by name'), it
>> should
>> still be possible to keep the libraries and the profiles distinct from
>> each other.
>>
>> If you open a Bugzilla report, we could look into changing the action so
>> that only the associations are made private by default (in which case we
>> would have to manually make the four primitive types in UML private)...
>>
>> Cheers,
>>
>> Kenn
>
> -----8<-----
Re: ConvertToMetamodelAction makes classifiers private [message #626098 is a reply to message #476985] Wed, 27 February 2008 14:17 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Christian,

This action was originally written to meet the needs of the UML2 metamodel
itself, and is only provided as a sample. In UML, the primitive types are
part of a separate library, so the ones defined in the metamodel are marked
as private to hide them from clients (so as not to cause confusion).
Generally speaking, however, I believe it's intended that types (data types,
primitive types, enumerations, etc.) associated with a profile and "made
available" by applying the profile are maintained in separate libraries, but
of course this is only a guideline and has no semantic force:
It should be possible to define a UML extension that combines profiles and
model libraries (including template libraries) into a single logical unit.
However, within such a unit, for definitional clarity and for ease of
interchange (e.g., 'reference by name'), it should still be possible to keep
the libraries and the profiles distinct from each other.

If you open a Bugzilla report, we could look into changing the action so
that only the associations are made private by default (in which case we
would have to manually make the four primitive types in UML private)...

Cheers,

Kenn

"Christian W. Damus" <cdamus@ca.ibm.com> wrote in message
news:fpunjr$1gu$1@build.eclipse.org...
> Hi,
>
> In using the UML Editor for metamodeling, I find that the "Convert to
> Metamodel" action in the editor menu correctly stereotypes my classes as
> <<metaclass>> but it also reduces the visibility of my enumerations and
> other data types to private.
>
> I see in the action, the UMLSwitch::caseClassifier(Classifier) method is
> override to make all non-metaclasses private. This is OK for
> associations,
> but I'd like users of my metamodel to be able to reference my data types.
>
> Why should these have private visibility? Will badness ensue if I change
> them back to public visibility?
>
> Thanks,
>
> Christian
>
Re: ConvertToMetamodelAction makes classifiers private [message #626103 is a reply to message #476995] Wed, 27 February 2008 14:51 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Kenn,

Yes, I had figured that the UML primitive types should be private in the
metamodel, because they are defined as a separate model library. I was
actually surprised to find that the UML specification merges this library
instead of merely importing it (with private visibility). Seems like an
issue for the RTF ...

I'm not sure, though, that one can argue that data types are intended
generally to be defined in model libraries. The UML metamodel, itself,
doesn't do this with its various Enumerations, nor do other standard
metamodels such as OCL or standard profiles such as the UML Testing
Profile.

In any case, I understand this action is contributed by the examples (I was
surprised to find it), and it is quite convenient. It's not difficult to
re-publish the elements that it makes private post facto. However, in case
there should be interest in promoting this action into the SDK in support
of metamodellers like me, find https://bugs.eclipse.org/220558 with a patch
attached.

Thanks,

Christian


Kenn Hussey wrote:

> Christian,
>
> This action was originally written to meet the needs of the UML2 metamodel
> itself, and is only provided as a sample. In UML, the primitive types are
> part of a separate library, so the ones defined in the metamodel are
> marked as private to hide them from clients (so as not to cause
> confusion). Generally speaking, however, I believe it's intended that
> types (data types, primitive types, enumerations, etc.) associated with a
> profile and "made available" by applying the profile are maintained in
> separate libraries, but of course this is only a guideline and has no
> semantic force: It should be possible to define a UML extension that
> combines profiles and model libraries (including template libraries) into
> a single logical unit. However, within such a unit, for definitional
> clarity and for ease of interchange (e.g., 'reference by name'), it should
> still be possible to keep the libraries and the profiles distinct from
> each other.
>
> If you open a Bugzilla report, we could look into changing the action so
> that only the associations are made private by default (in which case we
> would have to manually make the four primitive types in UML private)...
>
> Cheers,
>
> Kenn

-----8<-----
Re: ConvertToMetamodelAction makes classifiers private [message #626104 is a reply to message #477000] Wed, 27 February 2008 15:15 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Thanks, we'll address this enhancement ASAP.

Kenn

"Christian W. Damus" <cdamus@ca.ibm.com> wrote in message
news:fq3tdi$efb$1@build.eclipse.org...
> Hi, Kenn,
>
> Yes, I had figured that the UML primitive types should be private in the
> metamodel, because they are defined as a separate model library. I was
> actually surprised to find that the UML specification merges this library
> instead of merely importing it (with private visibility). Seems like an
> issue for the RTF ...
>
> I'm not sure, though, that one can argue that data types are intended
> generally to be defined in model libraries. The UML metamodel, itself,
> doesn't do this with its various Enumerations, nor do other standard
> metamodels such as OCL or standard profiles such as the UML Testing
> Profile.
>
> In any case, I understand this action is contributed by the examples (I
> was
> surprised to find it), and it is quite convenient. It's not difficult to
> re-publish the elements that it makes private post facto. However, in
> case
> there should be interest in promoting this action into the SDK in support
> of metamodellers like me, find https://bugs.eclipse.org/220558 with a
> patch
> attached.
>
> Thanks,
>
> Christian
>
>
> Kenn Hussey wrote:
>
>> Christian,
>>
>> This action was originally written to meet the needs of the UML2
>> metamodel
>> itself, and is only provided as a sample. In UML, the primitive types are
>> part of a separate library, so the ones defined in the metamodel are
>> marked as private to hide them from clients (so as not to cause
>> confusion). Generally speaking, however, I believe it's intended that
>> types (data types, primitive types, enumerations, etc.) associated with a
>> profile and "made available" by applying the profile are maintained in
>> separate libraries, but of course this is only a guideline and has no
>> semantic force: It should be possible to define a UML extension that
>> combines profiles and model libraries (including template libraries) into
>> a single logical unit. However, within such a unit, for definitional
>> clarity and for ease of interchange (e.g., 'reference by name'), it
>> should
>> still be possible to keep the libraries and the profiles distinct from
>> each other.
>>
>> If you open a Bugzilla report, we could look into changing the action so
>> that only the associations are made private by default (in which case we
>> would have to manually make the four primitive types in UML private)...
>>
>> Cheers,
>>
>> Kenn
>
> -----8<-----
Previous Topic:No UML2 Properties in UML-sourced GenModel
Next Topic:Loading emx is slow
Goto Forum:
  


Current Time: Fri Apr 19 14:40:08 GMT 2024

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

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

Back to the top