Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Profile definition results in dangling references when using a model library
Profile definition results in dangling references when using a model library [message #1834173] Wed, 04 November 2020 10:36 Go to next message
Jonas Geschke is currently offline Jonas GeschkeFriend
Messages: 9
Registered: November 2020
Junior Member
I am trying to use datatypes and classes from a model library in my profile.
But every time I try to define the profile Papyrus yield this error for every feature in a stereotype that has the type of a referenced datatype or class (enumeration work fine though):

The feature 'eType' of '<featureName>': <LibraryName_PackageName_TypeName>' contains a dangling reference '<LibraryName_PackageName_TypeName'
The feature 'eClassifier' of '<LibraryName_PackageName_TypeName>' contains a dangling reference '<LibraryName_PackageName_TypeName'

Eclipse Version:
Version: 2020-09 (4.17.0)
Build id: 20200910-1200

Papyrus Version:
4.8.x and 5.0 Nightly (both tested)
Re: Profile definition results in dangling references when using a model library [message #1834203 is a reply to message #1834173] Wed, 04 November 2020 19:47 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Difficult to tell for sure without any repro, but my guess is a failure to define/use an appropriate containment relationship.

Regards

Ed Willink
Re: Profile definition results in dangling references when using a model library [message #1834212 is a reply to message #1834203] Thu, 05 November 2020 07:09 Go to previous messageGo to next message
Jonas Geschke is currently offline Jonas GeschkeFriend
Messages: 9
Registered: November 2020
Junior Member
Hi Ed,

thanks for your fast response. I attached a minimal reproduction model.

Cheers,
Jonas Geschke
Re: Profile definition results in dangling references when using a model library [message #1834238 is a reply to message #1834212] Thu, 05 November 2020 13:24 Go to previous messageGo to next message
Vincent Lorenzo is currently offline Vincent LorenzoFriend
Messages: 249
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hi Jonas,
to my mind, it is a mistake to declare the Datatype in the library because at the model level, it won't be a reference to the datatype but it will be an instance of it.
So when you declare it in a library, I think the corresponding EClass is not created for it during the profile definition and you get an error.
When you declare the same Datatype directly in the profile, there is no problem.

Nevertheless, maybe your design is allowed and it is a UML2 bug.
Please, ask this question on UML2 forum to get a precise answer.

Regards,
/Vincent
Re: Profile definition results in dangling references when using a model library [message #1834269 is a reply to message #1834238] Fri, 06 November 2020 10:03 Go to previous messageGo to next message
Jonas Geschke is currently offline Jonas GeschkeFriend
Messages: 9
Registered: November 2020
Junior Member
Hi Vincent,

thanks for your response. You might be right. I will ask in the UML forum.

Cheers,
Jonas
Re: Profile definition results in dangling references when using a model library [message #1834281 is a reply to message #1834269] Fri, 06 November 2020 12:48 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

In many respects a DataType with Properties seems like a contradiction. If you want to have Properties use a Class. The fundamental difference is that a DataType defines a value replicated at each instantiation with deep comparison of copies ; there is no unique memory location. In contrast a Class is instantiated as an instance that has a unique location facilitating comparison by address..

However consider a ComplexNumber DataType with real and imag properties. This should certainly be usable as a structured value, requiring the instantiation to copy each property. So the problem is that you neglected to specify an aggregation for the usage.

Probably there is a validation bug to the effect that DataType-with-Property must have a non-None aggregation.

Regards

Ed Willink
Re: Profile definition results in dangling references when using a model library [message #1834390 is a reply to message #1834281] Mon, 09 November 2020 14:31 Go to previous messageGo to next message
Jonas Geschke is currently offline Jonas GeschkeFriend
Messages: 9
Registered: November 2020
Junior Member
Dear Ed,

You're right with that. However a specification of an aggregation of the properties of the stereotypes have no effect and it still yields the same error.
Also specifying an aggregation of the attribute of the datatype has no effect.

I assume that since the profile references a type from another package and once the profile is defined wants to reference an ecore instance of the package which was never generated. Could this be right?

Cheers,
Jonas
Re: Profile definition results in dangling references when using a model library [message #1834403 is a reply to message #1834390] Mon, 09 November 2020 19:17 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I'm not entirely clear what your problem is., since you've never identified what actions cause the problems. Using the Define->Profile action in the UML Editor, I see no problem with your earlier repro despite its questionable containment. It looks rather as if you/Papyrus has failed to invoke the underlying UML tooling appropriately. I'm afraid that I cannot help you with Papyrus wizards that I have never used.

Regards

Ed Willink
Re: Profile definition results in dangling references when using a model library [message #1834406 is a reply to message #1834403] Mon, 09 November 2020 19:36 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Since it works perfectly in the UML Model Editor, where Library.uml is transitively loaded, my best guess is that the Papyrus equivalent neglects to do a ResourceSet.resolveAll which UML's tooling may require.

Regards

Ed Willink
Re: Profile definition results in dangling references when using a model library [message #1834566 is a reply to message #1834406] Thu, 12 November 2020 13:31 Go to previous message
Vincent Lorenzo is currently offline Vincent LorenzoFriend
Messages: 249
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hi Jonas,
I confirm it is a Papyrus bug. I filled the bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=568757.

Regards,
/Vincent
Previous Topic:Create multiples messages in Papyrus communication diagram
Next Topic:Association or property type in UML Profile?
Goto Forum:
  


Current Time: Thu Apr 25 15:57:13 GMT 2024

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

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

Back to the top