Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to customize the palette?
How to customize the palette? [message #1597853] Mon, 02 February 2015 15:55 Go to next message
Adrien Lefevre is currently offline Adrien LefevreFriend
Messages: 27
Registered: January 2015
Junior Member
Good afternoon,

I would like to know if there is a methodological guide to customize the palette because I couldn't find one in the help contents.

In fact, I have made a specific profil and I have created some stereotypes on the classifier metaclass but I can't add them in the palette (Requirement Diagram).

Thank you very much,

Adrien.
Re: How to customize the palette? [message #1755913 is a reply to message #1597853] Thu, 09 March 2017 09:52 Go to previous messageGo to next message
Bernd Busam is currently offline Bernd BusamFriend
Messages: 10
Registered: February 2017
Location: Hamburg, Germany
Junior Member
Hi Adrien,

did you come any further? I was able to create a custom palette via externsion point "org.eclipse.papyrus.uml.diagram.common.paletteDefinition".

   <extension
         point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition">
          <paletteDefinition 
          		ID="de.oose.papyrus.sysml.sysmod.palette"
        		class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
        		icon="img/logo.jpg" 
        		name="Diagram Elements"
        		path="palette.xml">       	
        		<Priority name="Medium"/>
        		<editor id="org.eclipse.papyrus.uml.diagram.clazz"/>
			</paletteDefinition>
   </extension>


The defintion of the palette items is done via palette.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<paletteDefinition>
    <content>
        <drawer iconpath="/img" id="sysmodDrawer" name="SYSMOD">
            <aspectTool description="Create a SYSMOD user (Actor)"
                iconpath="platform:/plugin/SYSMOD41/img/sysmod_user_16_16.png"
                id="clazz.tool.class_sysmod_user" 
                name="User (Block)" 
                refToolId="clazz.tool.class">                
                <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
                    <stereotypesToApply>
                        <stereotype stereotypeName="SYSMOD41::User" />
                    </stereotypesToApply>
                </postAction>
            </aspectTool>

            <aspectTool description="Create a SYSMOD External System (Actor)"
                iconpath="platform:/plugin/SYSMOD41/img/sysmod_external_system_16_16.png"
                id="clazz.tool.class_sysmod_external_system" 
                name="External System (Block)" 
                refToolId="clazz.tool.class">                
                <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
                    <stereotypesToApply>
                        <stereotype stereotypeName="SYSMOD41::ExternalSystem" />
                    </stereotypesToApply>
                </postAction>
            </aspectTool>
        </drawer>
    </content>
</paletteDefinition>


Unfortunately the creation of correctly stereotyped model elements does only work for stereotypes, that are derived by generalization-relationship from their SYSML super-stereotype.

Stereotypes, which are created by extension-releationship from a metaclass are not created as the "generalized" ones, if droped in a model diagram. In this case I see this console message:

!MESSAGE impossible to retrieve the stereotype SYSMOD41::User


Any idea?

Bernd
Re: How to customize the palette? [message #1756034 is a reply to message #1755913] Fri, 10 March 2017 09:54 Go to previous messageGo to next message
Patrick Tessier is currently offline Patrick TessierFriend
Messages: 341
Registered: July 2009
Location: Paris Saclay, France
Senior Member
If fact , thete xas a lack about the palette customization/
The palette is being refactored, the documentation of this customization will be added.
Re: How to customize the palette? [message #1756062 is a reply to message #1756034] Fri, 10 March 2017 13:21 Go to previous messageGo to next message
Bernd Busam is currently offline Bernd BusamFriend
Messages: 10
Registered: February 2017
Location: Hamburg, Germany
Junior Member
Thanks Patrick, how can I keep track to get informed about the fix? Is is planned for a specific release?
Re: How to customize the palette? [message #1759061 is a reply to message #1756062] Wed, 05 April 2017 16:32 Go to previous message
Bernd Busam is currently offline Bernd BusamFriend
Messages: 10
Registered: February 2017
Location: Hamburg, Germany
Junior Member
I would like to come back to the problem that sterotypes created by extension relationship from a metaclass are not instanciated. Example:

My Profile:
Stereotype <<System>> is created by generalization from SysML Stereotype Block
Stereotype <<User>> is created by extension from UML Metaclass Actor

System appears correctly with stereotype <<system>> when I add it from the palette to my diagram Smile
User comes without stereotype Sad

Now I figured out that all the stereotypes created by extension relationship are not vilible in my profile. Could have realized this earlier Rolling Eyes After this illumination this might not longer be the right stream. Do you know a more appropriate one?

Any idea how to fix this?
Previous Topic:Difference between "Action Execution Specification" and "Behavior Execution Specifica
Next Topic:Applying user defined stereotypes to the model elements in block definition diagram,SysML
Goto Forum:
  


Current Time: Wed Sep 11 23:21:46 GMT 2024

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

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

Back to the top