Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to change visibility of association member ends ?(classDiagram, visibility)
How to change visibility of association member ends ? [message #1825132] Fri, 17 April 2020 12:59 Go to next message
Eric Cousin is currently offline Eric CousinFriend
Messages: 6
Registered: April 2020
Junior Member
Hi,

I couldn't find in documentation how to change visibility of the member ends of associations in a class diagram. As shown in the joined picture, it's set to public by default, and I didn't find how to change it (to private for instance). The property tab (cf 2d joined picture) doesn't show any field or button to do that. Any hint ?
Thanks
Eric
Re: How to change visibility of association member ends ? [message #1826051 is a reply to message #1825132] Fri, 17 April 2020 18:21 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Setting visibility to private in UML, as with any object oriented programming language does not make the item invisible. A private Java class as example is still visible in the editor.
To make an item in the diagram invisible, mark the item and open its context menu. Choose Filter and filter the content you want to be invisible.
In Papyrus as with many other UML tools the diagram is a graphical editor.
/Carsten
Re: How to change visibility of association member ends ? [message #1826053 is a reply to message #1825132] Fri, 17 April 2020 18:29 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
For further information on visibility please read chapter
7.8.24 VisibilityKind [Enumeration]
of the UML 2.5.1 specification.
/Carsten
Re: How to change visibility of association member ends ? [message #1826070 is a reply to message #1826051] Sat, 18 April 2020 08:00 Go to previous messageGo to next message
Eric Cousin is currently offline Eric CousinFriend
Messages: 6
Registered: April 2020
Junior Member
Thx for your reply, but it wasn't my intent to make something "invisible".
My guess is just to have association member ends be labeled with a '-' (private) instead of a '+' (public)
Eric
deleted by author because of being wrong [message #1826071 is a reply to message #1826070] Sat, 18 April 2020 09:11 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Sorry,
Carsten

[Updated on: Sat, 18 April 2020 12:29]

Report message to a moderator

Re: How to change visibility of association member ends ? [message #1826078 is a reply to message #1826071] Sat, 18 April 2020 12:28 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Carsten Pitz wrote on Sat, 18 April 2020 11:11
Is the diagram synchronized?
If not try a refresh on the model.
If this does not work, file an issue.
/Carsten


Sorry, completely wrong answer from my side.

The accociation (uml::Association) is private. That is clear and shown on the left top of the properties menu.

But the member ends being uml::Properties are not. So Papyrus correctly shows the "+" to show these are public.

Setting the property representing the member end to private results in the wanted behavior.

/Carsten

EDIT: screenshot added

[Updated on: Sat, 18 April 2020 12:47]

Report message to a moderator

Re: How to change visibility of association member ends ? [message #1826085 is a reply to message #1826078] Sat, 18 April 2020 19:30 Go to previous messageGo to next message
Eric Cousin is currently offline Eric CousinFriend
Messages: 6
Registered: April 2020
Junior Member
Yeah, thanks for the screenshot, which has shown to me how to do it.
It's a shame that this setting can't be done directly when creating the association, but has to be done afterwards.
But, thanks to you, I was now able to do it
Eric
Re: How to change visibility of association member ends ? [message #1826089 is a reply to message #1826085] Sun, 19 April 2020 05:31 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Do you want to blame Papyrus for complying to the UML specification?
/Carsten
Re: How to change visibility of association member ends ? [message #1826091 is a reply to message #1826089] Sun, 19 April 2020 07:32 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

If you can come up with a sensible ergonomics for what you want a UI tool could perhaps implement it.

But fundamentally an Association is an edge between two nodes; you draw a line between two boxes.

Visibility is a characterstic of the edge-node junction; i.e. two ends, so you need to characterize it in an end-specific 'dialog'.

IIRC some tools do support a dual column in the edge dialog, one per end, but it all gets very cluttered particularly once you do the full UML bloat rather than some 'user-friendly' cherry pick that forces you to go to an advanced dialog for unusual stuff (such as visibility).

Regards

Ed Willink
Re: How to change visibility of association member ends ? [message #1826092 is a reply to message #1826091] Sun, 19 April 2020 07:42 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Hi Ed,
providing the visibility settings for member ends in lined implies all possible incarnations of the UML meta-class uml::Property to have visibility settings.
I have not yet investigated, if this is the case.
/Carsten
Re: How to change visibility of association member ends ? [message #1826093 is a reply to message #1826091] Sun, 19 April 2020 07:55 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Hi Ed,
isn't there a simple UML profile for Papyrus?
At least something like that was discussed.
UML I hate & love. I hate its complexity, but at the same time I love its versatility.
/Carsten

EDIT: my view on UML added

[Updated on: Sun, 19 April 2020 08:39]

Report message to a moderator

Re: How to change visibility of association member ends ? [message #1826095 is a reply to message #1826093] Sun, 19 April 2020 11:52 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Carsten

I'm not sure what you mean by a UML profile for Papyrus. Surely any profile is defined using UML and is editable with Papyrus. The OCLforUML profile is quite simple.

Not sure what you mean by "ends in lined" or "all possible incarnations of the UML meta-class uml::Property". Visibility is a property of the NamedElement class so just about everything can have a visibility. What it actually means is up to yur code generator (manual or automated).

I was just trying to point out that before a user complains about UML / Papyrus, they should actually be able to propose something better that it is compatible with the necessary information model. While UML is hard to change, Papyrus ergonomics has potential for improvement.

Regards

Ed Willink
Re: How to change visibility of association member ends ? [message #1826096 is a reply to message #1826095] Sun, 19 April 2020 12:18 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Hi Ed,

The "Profile" I referred to is
https://wiki.eclipse.org/Getting_Started_with_Papyrus_UMLLight

Yes, uml::NamedElement defines Visibilty. OK, then Visibilty is possible with a shared form.

Yes, even if IMHO opinion the usability of Papyrus is much better than the ones of IBM Rational Rhapsody, IBM RSA, Sparx Enterprise Architect, PTC UML Designer or VisualParadigm VisualParadigm it can be still improved.

On Papyrus useability
* Navigation is the best I have seen so far
* The magic connectors (as named by the ArchiMate specification) are fancy
* Window handling as derived from Eclipse RCP is top notch (i.e. multiple monitor support)

And functionality-wise Papyrus is IMHO far ahead of the crowd.
* model checking is the best I have seen so far
* OCL support is also the best I have seen so far (special thanks to you, Ed)
* Artifact generation (i.e. source code or office documents) is unparalleled.
* GIT support
* Source code editor support (JDT, CDT, web tools, ...)
Just to name a few.

/Carsten
Re: How to change visibility of association member ends ? [message #1826105 is a reply to message #1826089] Sun, 19 April 2020 17:39 Go to previous messageGo to next message
Eric Cousin is currently offline Eric CousinFriend
Messages: 6
Registered: April 2020
Junior Member
> Do you want to blame Papyrus for complying to the UML specification?
Certainly not.
It's just a UI concern. I didn't realized that end member had to be edited apart.
Eric

[Updated on: Sun, 19 April 2020 17:41]

Report message to a moderator

Re: How to change visibility of association member ends ? [message #1826107 is a reply to message #1826091] Sun, 19 April 2020 17:46 Go to previous messageGo to next message
Eric Cousin is currently offline Eric CousinFriend
Messages: 6
Registered: April 2020
Junior Member
Ed Willink wrote on Sun, 19 April 2020 07:32
Hi

If you can come up with a sensible ergonomics for what you want a UI tool could perhaps implement it.

But fundamentally an Association is an edge between two nodes; you draw a line between two boxes.

Visibility is a characterstic of the edge-node junction; i.e. two ends, so you need to characterize it in an end-specific 'dialog'.

IIRC some tools do support a dual column in the edge dialog, one per end, but it all gets very cluttered particularly once you do the full UML bloat rather than some 'user-friendly' cherry pick that forces you to go to an advanced dialog for unusual stuff (such as visibility).

Regards

Ed Willink


Indeed, that was what I was looking for. I'm new to Papyrus, and I had used several other UML graphic editors (Umbrello, BoUML) where this was the case. I now better understand the use of the model explorer.
Eric
Re: How to change visibility of association member ends ? [message #1826108 is a reply to message #1826105] Sun, 19 April 2020 17:49 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Hi Eric,
just a small hint. The official UML 2.5.1 specification by the OMG is the IMHO best Papyrus manual. An uml::MemberEnd references two or more uml::Property elements as member ends. This gives you a strong hint that each member end is configured separately. Papyrus follows the UML specification more catholic than the pope.
/Carsten
Re: How to change visibility of association member ends ? [message #1826114 is a reply to message #1826107] Sun, 19 April 2020 18:33 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Both Umbrello and BoUML only cover a small choice of what UML overs. Nevertheless I used BoUML a lot and really liked its simplicity. For more formal work back then I used ArgoUML. Later Eclipse Topcased which was superseded by Eclipse Papyrus. At customers I mostly use IBM Rational Rhapsody followed by Sparx Enterprise Architect.
/Carsten

Re: How to change visibility of association member ends ? [message #1826115 is a reply to message #1826114] Sun, 19 April 2020 19:18 Go to previous messageGo to next message
Eric Cousin is currently offline Eric CousinFriend
Messages: 6
Registered: April 2020
Junior Member
Thx for all these pointers.
Eric

[Updated on: Sun, 19 April 2020 20:30]

Report message to a moderator

Re: How to change visibility of association member ends ? [message #1826212 is a reply to message #1826115] Tue, 21 April 2020 08:35 Go to previous messageGo to next message
Thomas Wiman is currently offline Thomas WimanFriend
Messages: 83
Registered: June 2012
Location: Stockholm , Sweden
Member

I filed a "bug" five years ago about the fact that the association itself is displayed in the properties view when a member end is selected in the diagram editor.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=466949

If that "bug" (actually it should have been an enhanchment request) would be fixed, it would be a bit easier to set member end properties, without having to look them up using the model explorer.


Thomas Wiman
MetaModelAgent Product Manager
Re: How to change visibility of association member ends ? [message #1827159 is a reply to message #1826212] Fri, 08 May 2020 14:29 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Hi to all,

but especially to


    Eric Cousin
    Ed Willink
    Thomas Wiman


Associations are a very special case. Being a mere line between to boxes for most UML users, reading the UML specification an uml::Association between 2 uml::Classifier elements involves at least 5 UML elements.

To start with the uml::Association itself. An uml::Association references 2..* uml::MemberEnd elements. Each uml::MemberEnd references an uml::Classifier element via type. Each uml::MemberEnd can be either owned by the uml::Association or by the uml::Classifier element it references via type. An uml::MemberEnd is an uml::Property element either being an ownedEnd or a navigableOwnedEnd when owned by an uml::Association. It is referenced via owned attribute if it is referenced by an uml::StructuredClassifier, an uml::DataType, an uml::Interface, an uml::Signal or an UML::Artifact. As a side note: Both uml::BehavioredClassifier and uml::InformationItem despite being specializations of uml::Classifier do not feature any means to own an uml::MemberEnd.

Given that uml::Association is a quite complex construct being able to mix -- using W3C XLink slang -- internal and external link nature. Given that -- and Papyrus supports that perfectly -- an uml::Association element within a model of a Papyrus project can "link" two or more uml::Classififier elements each being contained in different models in different Papyrus projects without touching the models containing the uml::Association elements. I personally use that feature quite often, as it allows to use models as libraries. The model containing the uml::Association elements assembles uml::Classifier elements (= (sub-)systems) to specify a more capable system. By not touching the models containing the sub-systems these models can be re-used in different contexts. Please refer to attached export for further information.

Back to uml::MemberEnd elements. As uml::MemberEnd elements might by owned by an uml::Association but can also be owned by an uml::Classifier element, I personally would prefer the uml::MemberEnd properties dialog to be a self-contained pop-up dialog referenced by both the uml::Association properties dialog and the uml::Classifier properties dialog.

/Carsten

EDIT example attached
  • Attachment: Assembly.zip
    (Size: 6.36KB, Downloaded 58 times)

[Updated on: Fri, 08 May 2020 15:01]

Report message to a moderator

Re: How to change visibility of association member ends ? [message #1827207 is a reply to message #1827159] Sun, 10 May 2020 13:19 Go to previous messageGo to next message
Thomas Wiman is currently offline Thomas WimanFriend
Messages: 83
Registered: June 2012
Location: Stockholm , Sweden
Member

Carsten,

Thanks for an exhaustive elaboration of this topic.

I also think that the compliance with UML metamodel is very useful when it comes to organize the (sub)models and encourage reuse of classifier libraries.
The drawback is that a newcomer will find it complex and confusing if he/she only wants to draw a "line" between two elements.

I am glad that you agree on my opinion that properties involved in an association should be displayed in a dialog/view separately from the association itself.

/Thomas


Thomas Wiman
MetaModelAgent Product Manager
Re: How to change visibility of association member ends ? [message #1827208 is a reply to message #1827207] Sun, 10 May 2020 14:00 Go to previous message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 479
Registered: May 2015
Location: Germany
Senior Member
Hi Thomas,
I think we had this topic before in a different context.
In my 20+ years experience with UML the adopters I met either just wanted to draw some pictures or wanted to go MDA. So far I haven't met anyone in between.
Both are completely different markets.
The painters market is occupied by plantUML, Sparx EA and the like.
The MDA market is occupied by IBM Rational Rhapsody and Eclipse Papyrus.
There is a Papyrus UML light version. Or at least there was such an initiative. But I am only aware of the first publishing. I think it is discontinued. That Papyrus UML light aimed at the IMHO non-existent group of people in between. Nevertheless the Papyrus UML light might evolve into a simple drawing tool. Omitting all the model checks the full blown Eclipse Papyrus does. The users are only interested in getting some pictures they can drag and drop into a Word document. And I know many of them. No one of them ever seeked for more than a few paintings.
















Previous Topic:Difficulty to install MARTE
Next Topic:Feature request
Goto Forum:
  


Current Time: Sat Apr 20 03:29:15 GMT 2024

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

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

Back to the top