Bug 479058 - [Palettes] Stereotypes from sub-packages of Profiles not supported for palette customization
Summary: [Palettes] Stereotypes from sub-packages of Profiles not supported for palett...
Status: UNCONFIRMED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Diagram (show other bugs)
Version: 1.1.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-05 12:15 EDT by Andreas Pleuss CLA
Modified: 2017-08-03 04:41 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Pleuss CLA 2015-10-05 12:15:03 EDT
When defining a custom palette, it is not possible to apply stereotypes (via post action) that are contained in sub-packages of a profile (such as Block from the SysML 1.4 Profile). In the NewLocalPaletteWizard such stereotypes are not displayed in the list and tools defined in a palette XML file that try to apply such stereotypes do not work. 

I've found 3 causes:
- StereotypePostAction.ProfileContentProvider.getChildren(Object) seems only to consider owned stereotypes but no stereotypes in nested packages. Maybe this could be changed by using allApplicableStereotypes() instead of getOwnedStereotypes(). 
- PaletteUtil.findProfileNameFromStereotypeName(String) does not consider sub-packages in Profiles as it just takes the name of the package where the stereotype is contained in as the name of the profile. Not sure how this can easily be changed (unless always choosing the top-level package). For instance, in SysML 1.4 the stereotype "SysML::Blocks::Block" is in the profile "SysML" while SysML::Blocks is just a sub-package. However, in the former sysml profile version, SysML::Blocks was a profile itself so it might be desirable to apply just SysML::Blocks instead of SysML(?) 
- Configuration.retrieveStereotypeFromQualifiedName(String, Profile) again uses getOwnedStereotypes() instead of allApplicableStereotypes() (or a method that navigates through the packages according to the stereotype's qualified name)