Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » need clarification about "package import"(package import)
need clarification about "package import" [message #498926] Thu, 19 November 2009 08:54 Go to next message
Raphael Faudou is currently offline Raphael FaudouFriend
Messages: 105
Registered: July 2009
Senior Member
Hi all,
after creating a "packageImport" into two packages p1 and p2 each containing a class named "class1" I get no warnings when I validate the model.
Is it normal? I would expect to get a warning to tell me that now two elements have the same name in same namespace (p1 namespace now contains two classes named "class1").

Did I miss something? or is it a bug?
Thanks
raphaël
Re: need clarification about "package import" [message #498967 is a reply to message #498926] Thu, 19 November 2009 11:22 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad VarnicaFriend
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
UML2 model element creation is related to an Id and not to a name. I mean that you can have two elements having the same name in the same package but no being identical.
The difference is the UML id
The name control is a jdt compilation control which doesn't allow to have same classifier name inside the same package.

I don't see any value in adding a new model validation rule based on names inside the UML2 meta model validation process if all the logic is based on Ids management ?

A work around is when adding a package merge between two packages is to manually delete the element if you don't want to use the same name. You can also use directly the metamodel element and the UML2 editor to visualize it as a tree. You can then just drop elements to the visual diagram to display it. I mean that dropping already existing model elements into visual diagrams will avoid such a problem if at the diagram creation you never create two elements having the same name Confused
Re: need clarification about "package import" [message #498970 is a reply to message #498967] Thu, 19 November 2009 11:49 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Vlad,

Comments below.

Vlad Varnica wrote:
> UML2 model element creation is related to an Id and not to a name.
He didn't ask about IDs.
> I mean that you can have two elements having the same name in the same
> package but no being identical.
In this case they are in different packages.
> The difference is the UML id
> The name control is a jdt compilation control which doesn't allow to
> have same classifier name inside the same package.
There weren't any questions about Java so what does JDT have to do with
the original question.
> I don't see any value in adding a new model validation rule based on
> names inside the UML2 meta model validation process if all the logic
> is based on Ids management ?
In fact there is such logic already. You can't have two classes with
the same name in a single package.
>
> A work around is when adding a package merge between two packages is
> to manually delete the element if you don't want to use the same name.
Package merge wasn't part of the question either.
> You can also use directly the metamodel element and the UML2 editor to
> visualize it as a tree.
Nor was there a question about diagrams.
> You can then just drop elements to the visual diagram to display it. I
> mean that dropping already existing model elements into visual
> diagrams will avoid such a problem if at the diagram creation you
> never create two elements having the same name :?
Jeesh. The question was about why importing two packages that have
conflicting class names doesn't cause a problem and you've not said a
single thing about that actual question. I'm not sure the answer to
it. Hopefully someone will answer that...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: need clarification about "package import" [message #498982 is a reply to message #498926] Thu, 19 November 2009 12:34 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

--=-DCtQdl0gvM9gIFEa58Zg
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi, Rapha=C3=ABl,

As I understand it, the semantics of package import is to import only
elements of the package that do not clash with names already in the
importing namespace. This effectively ensures that the unique names
constraint cannot be violated by package import: in the extreme case,
the import would not bring in *any* names.

If you use element imports to import the two class1 elements, then the
constraint would be violated. However, with element import you can
assign an alias to give the imported element a distinct name in the
importing namespace.

HTH,

Christian


On Thu, 2009-11-19 at 03:54 -0500, Raphael Faudou wrote:

> Hi all,
> after creating a "packageImport" into two packages p1 and p2 each contain=
ing a class named "class1" I get no warnings when I validate the model.
> Is it normal? I would expect to get a warning to tell me that now two ele=
ments have the same name in same namespace (p1 namespace now contains two c=
lasses named "class1").
>=20
> Did I miss something? or is it a bug?
> Thanks
> rapha=C3=ABl

--=-DCtQdl0gvM9gIFEa58Zg
Content-Type: text/html; charset="utf-8"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Rapha&#235;l,<BR>
<BR>
As I understand it, the semantics of package import is to import only elements of the package that do not clash with names already in the importing namespace.&nbsp; This effectively ensures that the unique names constraint cannot be violated by package import:&nbsp; in the extreme case, the import would not bring in *any* names.<BR>
<BR>
If you use element imports to import the two class1 elements, then the constraint would be violated.&nbsp; However, with element import you can assign an alias to give the imported element a distinct name in the importing namespace.<BR>
<BR>
HTH,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Thu, 2009-11-19 at 03:54 -0500, Raphael Faudou wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hi all,
after creating a &quot;packageImport&quot; into two packages p1 and p2 each containing a class named &quot;class1&quot; I get no warnings when I validate the model.
Is it normal? I would expect to get a warning to tell me that now two elements have the same name in same namespace (p1 namespace now contains two classes named &quot;class1&quot;).

Did I miss something? or is it a bug?
Thanks
rapha&#235;l
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-DCtQdl0gvM9gIFEa58Zg--
Re: need clarification about "package import" [message #498988 is a reply to message #498982] Thu, 19 November 2009 13:12 Go to previous messageGo to next message
Raphael Faudou is currently offline Raphael FaudouFriend
Messages: 105
Registered: July 2009
Senior Member
Thanks a lot Christian !
Very clear and helpfull
Cheers
raphaël

Christian W. Damus a écrit :
> Hi, Raphaël,
>
> As I understand it, the semantics of package import is to import only
> elements of the package that do not clash with names already in the
> importing namespace. This effectively ensures that the unique names
> constraint cannot be violated by package import: in the extreme case,
> the import would not bring in *any* names.
>
> If you use element imports to import the two class1 elements, then the
> constraint would be violated. However, with element import you can
> assign an alias to give the imported element a distinct name in the
> importing namespace.
>
> HTH,
>
> Christian
>
>
> On Thu, 2009-11-19 at 03:54 -0500, Raphael Faudou wrote:
>> Hi all,
>> after creating a "packageImport" into two packages p1 and p2 each containing a class named "class1" I get no warnings when I validate the model.
>> Is it normal? I would expect to get a warning to tell me that now two elements have the same name in same namespace (p1 namespace now contains two classes named "class1").
>>
>> Did I miss something? or is it a bug?
>> Thanks
>> raphaël
Re: need clarification about "package import" [message #499204 is a reply to message #498970] Fri, 20 November 2009 12:28 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad VarnicaFriend
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
Ed,

My comment below :

Vlad said: I mean that you can have two elements having the same name in the same package but no being identical.
Ed said: In this case they are in different packages.

Sorry Ed but for UML modeling you can have the same name in the same package. The management of the model is related to id and not to names and this is the best way to do. Imagine also that you refactor the name of one classifier. Now in the model the name has changed and how to make this change everywhere ? If the model is based on name management and not id then it is impossible and a serious limitation in the use of such a model. There is a post on our forum dealing with Soyatec eUML use of EMF with Java compare to EclipseUML use of Id. http://www.ejb3.org/new_architecture_features.html

Vlad said: The name control is a jdt compilation control which doesn't allow to have same classifier name inside the same package.
Ed said:There weren't any questions about Java so what does JDT have to do with the original question.

Hey Ed this an example coming from the real life nothing else !!

Vlad said: I don't see any value in adding a new model validation rule based on names inside the UML2 meta model validation process if all the logic is based on Ids management ?
Ed said: In fact there is such logic already. You can't have two classes with the same name in a single package.

No way for such a limitation !! you can have the same name as many times as needed for UML modeling purposes. I don't agree with your statements whcih make a confusion between EMF and UML modeling. This is not JDK compilation this is modeling stage !! When you add a package merge information between two package then this information is saved in the UML meta model. You don't need any other extension and for me the model is still valid because classifiers are managed by id and not by names.


btw, if the modeling projects are playing adding validation rules related to EMF and not to UML then we will stop using your plugins and wish you good luck for your modeling projects and topcased tool.

[Updated on: Fri, 20 November 2009 12:42]

Report message to a moderator

Re: need clarification about "package import" [message #499216 is a reply to message #499204] Fri, 20 November 2009 13:07 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

--=-kYQCSlCkaQhhxs7EUN3W
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi, Vlad,

A UML modeling tool should absolutely permit users to create classes
having the same name in the same package. However, such a tool is also
expected to implement the UML metamodel's constraint defined for
Namespaces that requires all members of the namespace to be
distinguishable and to report violations of that constraint:

--------8<--------
Constraints
[1] All the members of a Namespace are distinguishable within it.
membersAreDistinguishable()

Additional Operations
[2] The Boolean query membersAreDistinguishable() determines whether all
of the namespace=E2=80=99s members are
distinguishable within it.
Namespace::membersAreDistinguishable() : Boolean;
membersAreDistinguishable =3D
self.member->forAll( memb |
self.member->excluding(memb)->forAll(other |
memb.isDistinguishableFrom(other, self)))
-------->8--------

Types (e.g., classes) are only distinguished in their containing
namespaces by their names. BehavioralFeatures (e.g., operations) are
distinguished by their signatures, which include feature name and
parameter types.

Of course the name of an element has nothing to do with object identity.
Everybody knows that :-)

Cheers,

Christian

On Fri, 2009-11-20 at 07:28 -0500, Vlad Varnica wrote:

> Ed,
>=20
> My comment below :
>=20
> Vlad said: I mean that you can have two elements having the same =
name in the same package but no being identical.
> Ed said : In this case they are in different packages.
>=20
> Sorry Ed but for UML modeling you can have the same name in the same pack=
age. The management of the model is related to id and not to names and this=
is the best way to do.
> Imagine also that you refactor the name of one classifier. Now in the mod=
el the name has changed and how to make this change everywhere ? If the mod=
el is based on name management and not id then it is impossible and a serio=
us limitation in the use of such a model [/B] There is a post on our forum =
dealing with Soyatec eUML use of EMF with Java compare to EclipseUML use of=
Id.
>=20
> Vlad said: The name control is a jdt compilation control which doe=
sn't allow to have same classifier name inside the same package.
> Ed said: There weren't any questions about Java so what does JDT h=
ave to do with the original question.
>=20
> Hey Ed this an example coming from the real life nothing else !!
>=20
> Vlad said: I don't see any value in adding a new model validation rule ba=
sed on names inside the UML2 meta model validation process if all the logic=
is based on Ids management ?
> Ed said: In fact there is such logic already. You can't have two classes =
with the same name in a single package.
>=20
> No way for such a limitation !! you can have the same name as many times =
as needed for UML modeling purposes. I don't agree with your statements whc=
ih make a confusion between EMF and UML modeling. This is not JDK compilati=
on this is modeling stage !!
>=20
> When you add a package merge information between two package then this in=
formation is saved in the UML meta model. You don't need any other extensio=
n and for me the model is still valid because classifiers are managed by id=
and not by names.
>=20
>=20

--=-kYQCSlCkaQhhxs7EUN3W
Content-Type: text/html; charset="utf-8"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Vlad,<BR>
<BR>
A UML modeling tool should absolutely permit users to create classes having the same name in the same package.&nbsp; However, such a tool is also expected to implement the UML metamodel's constraint defined for Namespaces that requires all members of the namespace to be distinguishable and to report violations of that constraint:<BR>
<BR>
--------8&lt;--------<BR>
Constraints<BR>
[1] All the members of a Namespace are distinguishable within it.<BR>
&nbsp;&nbsp;&nbsp; membersAreDistinguishable()<BR>
<BR>
Additional Operations<BR>
[2] The Boolean query membersAreDistinguishable() determines whether all of the namespace&#8217;s members are<BR>
&nbsp;&nbsp;&nbsp; distinguishable within it.<BR>
&nbsp;&nbsp;&nbsp; Namespace::membersAreDistinguishable() : Boolean;<BR>
&nbsp;&nbsp;&nbsp; membersAreDistinguishable =<BR>
&nbsp;&nbsp;&nbsp; self.member-&gt;forAll( memb |<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; self.member-&gt;excluding(memb)-&gt;forAll(other |<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; memb.isDistinguishableFrom(other, self)))<BR>
--------&gt;8--------<BR>
<BR>
Types (e.g., classes) are only distinguished in their containing namespaces by their names.&nbsp; BehavioralFeatures (e.g., operations) are distinguished by their signatures, which include feature name and parameter types.<BR>
<BR>
Of course the name of an element has nothing to do with object identity.&nbsp; Everybody knows that&nbsp; :-)<BR>
<BR>
Cheers,<BR>
<BR>
Christian<BR>
<BR>
On Fri, 2009-11-20 at 07:28 -0500, Vlad Varnica wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Ed,

My comment below :

Vlad said: I mean that you can have two elements having the same name in the same package but no being identical.
Ed said : In this case they are in different packages.

Sorry Ed but for UML modeling you can have the same name in the same package. The management of the model is related to id and not to names and this is the best way to do.
Imagine also that you refactor the name of one classifier. Now in the model the name has changed and how to make this change everywhere ? If the model is based on name management and not id then it is impossible and a serious limitation in the use of such a model [/B] There is a post on our forum dealing with Soyatec eUML use of EMF with Java compare to EclipseUML use of Id.

Vlad said: The name control is a jdt compilation control which doesn't allow to have same classifier name inside the same package.
Ed said: There weren't any questions about Java so what does JDT have to do with the original question.

Hey Ed this an example coming from the real life nothing else !!

Vlad said: I don't see any value in adding a new model validation rule based on names inside the UML2 meta model validation process if all the logic is based on Ids management ?
Ed said: In fact there is such logic already. You can't have two classes with the same name in a single package.

No way for such a limitation !! you can have the same name as many times as needed for UML modeling purposes. I don't agree with your statements whcih make a confusion between EMF and UML modeling. This is not JDK compilation this is modeling stage !!

When you add a package merge information between two package then this information is saved in the UML meta model. You don't need any other extension and for me the model is still valid because classifiers are managed by id and not by names.


</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-kYQCSlCkaQhhxs7EUN3W--
Re: need clarification about "package import" [message #499232 is a reply to message #499216] Fri, 20 November 2009 14:07 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad VarnicaFriend
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member

I definitely prefer this Christian's explanation Razz

Don't be confused but in my return of experience I can testify that very few modeling users understand the concept of object identify managed by UML metamodel Ids.
Thanks for post.
Re: need clarification about "package import" [message #628078 is a reply to message #498982] Thu, 19 November 2009 13:12 Go to previous messageGo to next message
Raphael Faudou is currently offline Raphael FaudouFriend
Messages: 105
Registered: July 2009
Senior Member
Thanks a lot Christian !
Very clear and helpfull
Cheers
raphaël

Christian W. Damus a écrit :
> Hi, Raphaël,
>
> As I understand it, the semantics of package import is to import only
> elements of the package that do not clash with names already in the
> importing namespace. This effectively ensures that the unique names
> constraint cannot be violated by package import: in the extreme case,
> the import would not bring in *any* names.
>
> If you use element imports to import the two class1 elements, then the
> constraint would be violated. However, with element import you can
> assign an alias to give the imported element a distinct name in the
> importing namespace.
>
> HTH,
>
> Christian
>
>
> On Thu, 2009-11-19 at 03:54 -0500, Raphael Faudou wrote:
>> Hi all,
>> after creating a "packageImport" into two packages p1 and p2 each containing a class named "class1" I get no warnings when I validate the model.
>> Is it normal? I would expect to get a warning to tell me that now two elements have the same name in same namespace (p1 namespace now contains two classes named "class1").
>>
>> Did I miss something? or is it a bug?
>> Thanks
>> raphaël
Re: need clarification about "package import" [message #628081 is a reply to message #498970] Fri, 20 November 2009 12:28 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad VarnicaFriend
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
Ed,

My comment below :

Vlad said: I mean that you can have two elements having the same name in the same package but no being identical.
Ed said : In this case they are in different packages.

Sorry Ed but for UML modeling you can have the same name in the same package. The management of the model is related to id and not to names and this is the best way to do.
Imagine also that you refactor the name of one classifier. Now in the model the name has changed and how to make this change everywhere ? If the model is based on name management and not id then it is impossible and a serious limitation in the use of such a model [/B] There is a post on our forum dealing with Soyatec eUML use of EMF with Java compare to EclipseUML use of Id.

Vlad said: The name control is a jdt compilation control which doesn't allow to have same classifier name inside the same package.
Ed said: There weren't any questions about Java so what does JDT have to do with the original question.

Hey Ed this an example coming from the real life nothing else !!

Vlad said: I don't see any value in adding a new model validation rule based on names inside the UML2 meta model validation process if all the logic is based on Ids management ?
Ed said: In fact there is such logic already. You can't have two classes with the same name in a single package.

No way for such a limitation !! you can have the same name as many times as needed for UML modeling purposes. I don't agree with your statements whcih make a confusion between EMF and UML modeling. This is not JDK compilation this is modeling stage !!

When you add a package merge information between two package then this information is saved in the UML meta model. You don't need any other extension and for me the model is still valid because classifiers are managed by id and not by names.
Re: need clarification about "package import" [message #628082 is a reply to message #628081] Fri, 20 November 2009 13:07 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

--=-kYQCSlCkaQhhxs7EUN3W
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi, Vlad,

A UML modeling tool should absolutely permit users to create classes
having the same name in the same package. However, such a tool is also
expected to implement the UML metamodel's constraint defined for
Namespaces that requires all members of the namespace to be
distinguishable and to report violations of that constraint:

--------8<--------
Constraints
[1] All the members of a Namespace are distinguishable within it.
membersAreDistinguishable()

Additional Operations
[2] The Boolean query membersAreDistinguishable() determines whether all
of the namespace=E2=80=99s members are
distinguishable within it.
Namespace::membersAreDistinguishable() : Boolean;
membersAreDistinguishable =3D
self.member->forAll( memb |
self.member->excluding(memb)->forAll(other |
memb.isDistinguishableFrom(other, self)))
-------->8--------

Types (e.g., classes) are only distinguished in their containing
namespaces by their names. BehavioralFeatures (e.g., operations) are
distinguished by their signatures, which include feature name and
parameter types.

Of course the name of an element has nothing to do with object identity.
Everybody knows that :-)

Cheers,

Christian

On Fri, 2009-11-20 at 07:28 -0500, Vlad Varnica wrote:

> Ed,
>=20
> My comment below :
>=20
> Vlad said: I mean that you can have two elements having the same =
name in the same package but no being identical.
> Ed said : In this case they are in different packages.
>=20
> Sorry Ed but for UML modeling you can have the same name in the same pack=
age. The management of the model is related to id and not to names and this=
is the best way to do.
> Imagine also that you refactor the name of one classifier. Now in the mod=
el the name has changed and how to make this change everywhere ? If the mod=
el is based on name management and not id then it is impossible and a serio=
us limitation in the use of such a model [/B] There is a post on our forum =
dealing with Soyatec eUML use of EMF with Java compare to EclipseUML use of=
Id.
>=20
> Vlad said: The name control is a jdt compilation control which doe=
sn't allow to have same classifier name inside the same package.
> Ed said: There weren't any questions about Java so what does JDT h=
ave to do with the original question.
>=20
> Hey Ed this an example coming from the real life nothing else !!
>=20
> Vlad said: I don't see any value in adding a new model validation rule ba=
sed on names inside the UML2 meta model validation process if all the logic=
is based on Ids management ?
> Ed said: In fact there is such logic already. You can't have two classes =
with the same name in a single package.
>=20
> No way for such a limitation !! you can have the same name as many times =
as needed for UML modeling purposes. I don't agree with your statements whc=
ih make a confusion between EMF and UML modeling. This is not JDK compilati=
on this is modeling stage !!
>=20
> When you add a package merge information between two package then this in=
formation is saved in the UML meta model. You don't need any other extensio=
n and for me the model is still valid because classifiers are managed by id=
and not by names.
>=20
>=20

--=-kYQCSlCkaQhhxs7EUN3W
Content-Type: text/html; charset="utf-8"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Vlad,<BR>
<BR>
A UML modeling tool should absolutely permit users to create classes having the same name in the same package.&nbsp; However, such a tool is also expected to implement the UML metamodel's constraint defined for Namespaces that requires all members of the namespace to be distinguishable and to report violations of that constraint:<BR>
<BR>
--------8&lt;--------<BR>
Constraints<BR>
[1] All the members of a Namespace are distinguishable within it.<BR>
&nbsp;&nbsp;&nbsp; membersAreDistinguishable()<BR>
<BR>
Additional Operations<BR>
[2] The Boolean query membersAreDistinguishable() determines whether all of the namespace&#8217;s members are<BR>
&nbsp;&nbsp;&nbsp; distinguishable within it.<BR>
&nbsp;&nbsp;&nbsp; Namespace::membersAreDistinguishable() : Boolean;<BR>
&nbsp;&nbsp;&nbsp; membersAreDistinguishable =<BR>
&nbsp;&nbsp;&nbsp; self.member-&gt;forAll( memb |<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; self.member-&gt;excluding(memb)-&gt;forAll(other |<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; memb.isDistinguishableFrom(other, self)))<BR>
--------&gt;8--------<BR>
<BR>
Types (e.g., classes) are only distinguished in their containing namespaces by their names.&nbsp; BehavioralFeatures (e.g., operations) are distinguished by their signatures, which include feature name and parameter types.<BR>
<BR>
Of course the name of an element has nothing to do with object identity.&nbsp; Everybody knows that&nbsp; :-)<BR>
<BR>
Cheers,<BR>
<BR>
Christian<BR>
<BR>
On Fri, 2009-11-20 at 07:28 -0500, Vlad Varnica wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Ed,

My comment below :

Vlad said: I mean that you can have two elements having the same name in the same package but no being identical.
Ed said : In this case they are in different packages.

Sorry Ed but for UML modeling you can have the same name in the same package. The management of the model is related to id and not to names and this is the best way to do.
Imagine also that you refactor the name of one classifier. Now in the model the name has changed and how to make this change everywhere ? If the model is based on name management and not id then it is impossible and a serious limitation in the use of such a model [/B] There is a post on our forum dealing with Soyatec eUML use of EMF with Java compare to EclipseUML use of Id.

Vlad said: The name control is a jdt compilation control which doesn't allow to have same classifier name inside the same package.
Ed said: There weren't any questions about Java so what does JDT have to do with the original question.

Hey Ed this an example coming from the real life nothing else !!

Vlad said: I don't see any value in adding a new model validation rule based on names inside the UML2 meta model validation process if all the logic is based on Ids management ?
Ed said: In fact there is such logic already. You can't have two classes with the same name in a single package.

No way for such a limitation !! you can have the same name as many times as needed for UML modeling purposes. I don't agree with your statements whcih make a confusion between EMF and UML modeling. This is not JDK compilation this is modeling stage !!

When you add a package merge information between two package then this information is saved in the UML meta model. You don't need any other extension and for me the model is still valid because classifiers are managed by id and not by names.


</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-kYQCSlCkaQhhxs7EUN3W--
Re: need clarification about "package import" [message #628083 is a reply to message #499216] Fri, 20 November 2009 14:07 Go to previous message
Vlad Varnica is currently offline Vlad VarnicaFriend
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
I definitely prefer this Christian's explanation :p

Don't be confused but in my return of experience I can testify that very few modeling users understand the concept of object identify managed by UML metamodel Ids.
Thanks for post.
Previous Topic:Problem Applying Stereotype
Next Topic:Extending the UML2 metamodel and customizing the ItemProvider super class
Goto Forum:
  


Current Time: Fri Apr 19 15:42:36 GMT 2024

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

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

Back to the top