Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351674

Summary: [CompositeDiagram] Can't show the label of a Port after hiding it
Product: [Modeling] Papyrus Reporter: saadia dhouib <dhouib>
Component: CoreAssignee: Project Inbox <mdt-papyrus-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: benoit.maggi, papyrus-bugs, vincent.lorenzo
Version: 0.8.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description saadia dhouib CLA 2011-07-11 04:30:49 EDT
Steps to reproduce:
1. create a composite structure diagram
2. create a class
3. create a port
4. hide the label of the port (through no connetor's label button)
5. close the model
6. reopen the model
7. try to show the label of the port
Comment 1 Ansgar Radermacher CLA 2013-03-18 11:36:13 EDT
Still reproducible with Kepler 0.10.X. There is an exception.

 java.lang.NullPointerException
	at org.eclipse.papyrus.uml.diagram.menu.actions.ShowHideLabelsAction$ContentProvider.getParent(ShowHideLabelsAction.java:459)
	at org.eclipse.jface.viewers.AbstractTreeViewer.getParentElement(AbstractTreeViewer.java:1714)
	at org.eclipse.jface.viewers.TreeViewer.getParentElement(TreeViewer.java:607)
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpand(AbstractTreeViewer.java:1641)
	at org.eclipse.jface.viewers.CheckboxTreeViewer.setCheckedElements(CheckboxTreeViewer.java:482)
	...
Comment 2 Toni Siljamäki CLA 2013-10-09 10:36:57 EDT
The same is valid for all ports = also in component diagrams,
since the port and its label are trated as separate model elements.

See additional info in Bug 417394.
Comment 3 Benoit Maggi CLA 2016-11-23 07:45:51 EST
Still valid in Neon.1
Comment 4 Benoit Maggi CLA 2017-08-31 10:03:59 EDT
Still valid in Oxygen.0