Bug 412476 - [Palettes] Stereotypes are not applied using custom palette for some elements
Summary: [Palettes] Stereotypes are not applied using custom palette for some elements
Status: NEW
Alias: None
Product: Papyrus
Classification: Modeling
Component: Diagram (show other bugs)
Version: 0.10.0   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-08 04:03 EDT by Dennis D. CLA
Modified: 2017-09-08 09:59 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis D. CLA 2013-07-08 04:03:28 EDT
For customizing we use stereotypes and a customized palette. We define new elements in the palette that apply these stereotypes. It works for many elements as documented (e.g. class, component, port) but not for others.

When defining a device or artifact in the custom palette to apply a stereotype, and using this tool to create a stereotyped device in a deployment diagram, the device or artifact is added to the diagram but the stereotype is not applied. I have to apply it manually via properties->profile.

Part of the custom palette xml description to add a stereotyped device to deployment diagram - does not work:

      <aspectTool description="Create new myDevice" iconpath="platform:/plugin/my.profile/icons/xxxxxx" id="composite.tool.device_1" name="myDevice" refToolId="deployment.tool.device">
        <postAction id="org.eclipse.papyrus.postaction.displayAppliedStereotypeactionprovider">
          <displayName name="profile::myDevice"/>
        </postAction>
        <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
          <stereotypesToApply>
            <stereotype stereotypeName="profile::myDevice"/>
          </stereotypesToApply>
        </postAction>
        <postAction displayKind="TextIconStereotype" displayPlace="With brace" id="org.eclipse.papyrus.postaction.changeStereotypeDisplayProvider"/>
      </aspectTool>





Part of custom palete to add stereotyped class to a class diagram -- works:

      <aspectTool description="Create new myClass" iconpath="platform:/plugin/my.profile/icons/xxxxxx" id="composite.tool.sysconfig_1" name="myClass" refToolId="composite.tool.class">
        <postAction id="org.eclipse.papyrus.postaction.displayAppliedStereotypeactionprovider">
          <displayName name="profile::myClass"/>
        </postAction>
        <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
          <stereotypesToApply>
            <stereotype stereotypeName="profile::myClass"/>
          </stereotypesToApply>
        </postAction>
        <postAction displayKind="TextIconStereotype" displayPlace="With brace" id="org.eclipse.papyrus.postaction.changeStereotypeDisplayProvider"/>
      </aspectTool>



No exceptions are thrown.
I followed these instructions for the custom palette: 
http://dev.eclipse.org/svnroot/modeling/org.eclipse.mdt.papyrus/trunk/doc/DevelopperDocuments/How-To/PapyrusDevelopperTutorial_OnPaletteCustomization_v1.0_d2010-05-10.odt

I'm using 0.9.2.v201302131112 from juno.
Comment 1 Camille Letavernier CLA 2013-07-08 07:37:39 EDT
Still valid in 0.10.0
Comment 2 Donald Pellegrino CLA 2015-05-26 09:10:59 EDT
In Papyrus 1.0.2, UML Component diagrams, Stereotypes are not shown for Artifact elements.