Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334617 - [Profile Properties] Trying to unnapply a parent's profile throws an exception
Summary: [Profile Properties] Trying to unnapply a parent's profile throws an exception
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Views (show other bugs)
Version: 0.10.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Camille Letavernier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-18 05:34 EST by Vincent Hémery CLA
Modified: 2014-08-19 11:56 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Hémery CLA 2011-01-18 05:34:50 EST
Apply a profile on a package

Select a child package.

Inspect the Profile properties tab.

Try and remove the profile which comes from the parent package.

The operation fails and the exception is available in the Error log :

org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.IllegalArgumentException: org.eclipse.uml2.uml.internal.impl.ProfileImpl@1562036 (name: Ecore, visibility: <unset>))
	at org.eclipse.swt.SWT.error(SWT.java:4083)
	at org.eclipse.swt.SWT.error(SWT.java:3998)
	at ...
Caused by: java.lang.IllegalArgumentException: org.eclipse.uml2.uml.internal.impl.ProfileImpl@1562036 (name: Ecore, visibility: <unset>)
	at ... 23 more


The problem comes from the fact that the profile application is returned by the method org.eclipse.uml2.uml.Package.getAllAppliedProfiles() since it is applied on a parent package, but not by the method org.eclipse.uml2.uml.Package.getAppliedProfiles() since it is not applied directly on this package.

Either such profile applications should not appear in this tab, or they should be grayed with a warning message or a tooltip indicating they come from a parent package, and preventing them from being manipulated here.
Comment 1 Camille Letavernier CLA 2014-08-19 11:56:08 EDT
In the current version, the properties view only displays the profiles directly applied on the current package (i.e. getAppliedProfiles() instead of getAllAppliedProfiles()).

I close the task