| Summary: | Papyrus Palette | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Papyrus | Reporter: | Alexandre Cortier <alexandre.cortier> | ||||||||||||||||||||||||
| Component: | Core | Assignee: | Project Inbox <mdt-papyrus-inbox> | ||||||||||||||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||||||||||||||
| Severity: | critical | ||||||||||||||||||||||||||
| Priority: | P3 | CC: | yann.tanguy | ||||||||||||||||||||||||
| Version: | 0.8.0 | ||||||||||||||||||||||||||
| Target Milestone: | SR1 | ||||||||||||||||||||||||||
| Hardware: | PC | ||||||||||||||||||||||||||
| OS: | Windows XP | ||||||||||||||||||||||||||
| Whiteboard: | |||||||||||||||||||||||||||
| Bug Depends on: | 348529, 350152 | ||||||||||||||||||||||||||
| Bug Blocks: | |||||||||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||||||||
Can you attach the palette xml file ? It should be located in your workspace under ".metadata\.plugins\org.eclipse.papyrus.diagram.common". Which Papyrus version are you currently using ? Created attachment 198388 [details]
Papyrus Palette (1)
Created attachment 198389 [details]
Papyrus Palette (2)
Created attachment 198390 [details]
Papyrus Palette (3)
See the palettes that I Have defined in attachment. I work on Eclipse Modeling Indigo RC4 with the 0.8.0 version of Papyrus. Notice that I have defined static profiles. I'm currently in a development phase : I launch a second Eclipse in runtime to test my profiles and defined my palettes... Thanks. (In reply to comment #5) > See the palettes that I Have defined in attachment. > > I work on Eclipse Modeling Indigo RC4 with the 0.8.0 version of Papyrus. > > Notice that I have defined static profiles. I'm currently in a development phase > : I launch a second Eclipse in runtime to test my profiles and defined my > palettes... > > Thanks. Let's separate concerns, do you have problems with each palette ? - Palette_acortier_1308578475744 -> relates to IBD - Palette_acortier_1308581267039 -> relates to BDD - Palette_acortier_1308669931762 -> relates to Activity diagram ? Then can you give the name of a button that has an incorrect behavior (ex: "System" or "Assembly" in the IBD related palette). Created attachment 198446 [details]
Screen capture - Step_1
Created attachment 198447 [details]
Screen capture - Step_2
Created attachment 198448 [details]
Screen shot - Step 3
Created attachment 198449 [details]
Screen shot - Step 4
Created attachment 198450 [details]
Screen shot - Step 5
Created attachment 198451 [details]
Error log 1
Created attachment 198452 [details]
Error log 2
(In reply to comment #6) > Let's separate concerns, do you have problems with each palette ? > - Palette_acortier_1308578475744 -> relates to IBD > - Palette_acortier_1308581267039 -> relates to BDD > - Palette_acortier_1308669931762 -> relates to Activity diagram ? > > Then can you give the name of a button that has an incorrect behavior (ex: > "System" or "Assembly" in the IBD related palette). Yes, I have a problem with each palette. For instance - Palette_acortier_1308581267039 -> relates to BDD 1/ I open Eclipse in runtime. 2/ In a BDD I use a palette element : TC_Activity. A TC_Activity is an operation with 4 stereotypes applied on it: - TC_Activity (sterotype wich extends Operation) - NamingAndDescriptionData, DomainData, ValidationData : stereotypes which extends NamedElement It works... See Screen Shots : Step_1, Step_2, Step_3. It works but in the Console view of the Eclipse from which I launched the runtime I obtained errors (see log1.txt) 3/ Then I select an other element in the palette : EP EP is an operation with 4 stereotypes applied on it : - TC_Activity (sterotype wich extends Operation) - NamingAndDescriptionData, DomainData, ValidationData This time it doesn't work well (see screen shots Step_4, Step_5 and log 2) In fact, it always works the first time (when I just launch the application). Then I have an erratic behavior. I probably made mistakes... --------------------------------------------------- I have some other questions (so I will try to do something by myself) : - I can't delete a palette : is-it a known bug ? - The customized palettes are located in .metadata\.plugins\org.eclipse.papyrus.diagram.common. I thought that deleting the. xml, the palettes would be permanently removed. It is not the case... Is there an other location to configure palettes ? - How can I reuse my customized palette in an other workspace ? Created attachment 198455 [details]
Small example for custom palette reuse
> I have some other questions (so I will try to do something by myself) : > - I can't delete a palette : is-it a known bug ? > - The customized palettes are located in > .metadata\.plugins\org.eclipse.papyrus.diagram.common. I thought that deleting > the. xml, the palettes would be permanently removed. It is not the case... Is > there an other location to configure palettes ? Can you enter a bug for these previous issues. > - How can I reuse my customized palette in an other workspace ? I have added a small plug-in example that give some hints for custom palette reuse. My workflow when I have to create palettes is: - specify / test my palette with dynamic customization tool (what you did) - save the xml file created by the tool - create a plug-in and declare a palette for a diagram (see the example attached: the declaration is in the plugin.xml file) - in general I prefer (re-)writting the final palette xml file myself (help yoursel with the palette xml created by dynamic customization tool - use an xml editor to make it readable) - proceed iteratively : add a button -> test -> add a button ... (it may be easier for debug than copying the whole palette xml generated by the customization tool) > 2/ In a BDD I use a palette element : TC_Activity. > A TC_Activity is an operation with 4 stereotypes applied on it: > - TC_Activity (sterotype wich extends Operation) > - NamingAndDescriptionData, DomainData, ValidationData : stereotypes which > extends NamedElement > It works... See Screen Shots : Step_1, Step_2, Step_3. > It works but in the Console view of the Eclipse from which I launched the > runtime I obtained errors (see log1.txt) > The exception in log1.txt is related to a bug in the BDD (see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=348529). To make simple, the palette asks for stereotype application, then tries to make the stereotype visible in the diagram and fail doing this. The post action responsible for this is <postAction displayKind="TextIconStereotype" displayPlace="Compartment" id="org.eclipse.papyrus.postaction.changeStereotypeDisplayProvider"/>. > 3/ Then I select an other element in the palette : EP > EP is an operation with 4 stereotypes applied on it : > - TC_Activity (sterotype wich extends Operation) > - NamingAndDescriptionData, DomainData, ValidationData > > This time it doesn't work well (see screen shots Step_4, Step_5 and log 2) > > > In fact, it always works the first time (when I just launch the application). > Then I have an erratic behavior. > > I probably made mistakes... > I don't know, really don't understand what happens at this point... I could not detect any obvious issue in the palette xml file (I mean for TC_App and EP)... (In reply to comment #17) > I don't know, really don't understand what happens at this point... I could not > detect any obvious issue in the palette xml file (I mean for TC_App and EP)... Thanks for your responses. I follow your worflow that give some hints for custom palette reuse. (See below my my palette definition) : is-it possible that the problem comes from the post-action "org.eclipse.papyrus.applystereotypeactionprovider" ? I have the same problem : in fact, the list of stereotypes to apply seems not to be refresh (For instance, I create a System with the palette defined below. Then I create a Sub-System. The last created object has its own stereotypes, plus the stereotype define for System.... <?xml version="1.0" encoding="UTF-8" standalone="no"?><paletteDefinition><content> <drawer iconpath="/icons/drawer.gif" id="Drawer__1308832824948" name="Test 1"> <aspectTool description="Create a new Part" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif" id="blockdefinition.tool.system" name="System" refToolId="blockdefinition.tool.part"> <postAction id="org.eclipse.papyrus.applystereotypeactionprovider"> <stereotypesToApply> <stereotype stereotypeName="SpaceStandards::SpaceSystemDataModel::Hardware::System"/> <stereotype stereotypeName="SpaceStandards::CommonDatas::DomainData"/> <stereotype stereotypeName="SpaceStandards::CommonDatas::NamingAndDescriptionData"/> </stereotypesToApply> </postAction> </aspectTool> <aspectTool description="Create a new Part" iconpath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif" id="blockdefinition.tool.part_1308832909198" name="SubSystem" refToolId="blockdefinition.tool.part"> <postAction id="org.eclipse.papyrus.applystereotypeactionprovider"> <stereotypesToApply> <stereotype stereotypeName="SpaceStandards::CommonDatas::DomainData"/> <stereotype stereotypeName="SpaceStandards::CommonDatas::NamingAndDescriptionData"/> <stereotype stereotypeName="SpaceStandards::SpaceSystemDataModel::Hardware::SubSystem"/> /stereotypesToApply> </postAction> </aspectTool> </drawer> </content> </paletteDefinition> (In reply to comment #18) > > I follow your worflow that give some hints for custom palette > reuse. (See below my my palette definition) : is-it possible that the problem > comes from the post-action "org.eclipse.papyrus.applystereotypeactionprovider" ? > > I have the same problem : in fact, the list of stereotypes to apply seems not to > be refresh (For instance, I create a System with the palette defined below. Then > I create a Sub-System. The last created object has its own stereotypes, plus the > stereotype define for System.... > I managed to reproduce the problem (only in BDD not in Class Diagram by the way), it should be easier for debug... I fix a problem (https://bugs.eclipse.org/bugs/show_bug.cgi?id=350152) which is in my opinion responsible for the problems you get in the Block Definition Diagram, can you test ? (you should not need to re-create or modify your palette xml files to get this work) Seems to be fixed, I close the task. |
Hy, I have a problem using customized Palettes in MDT Papyrus. I have defined a palette extending the editor org.eclipse.papyrus.sysml.diagram.blockdefinition. I defined several elements (say E1, E2, E3). These elements are SysML Part with a set of applied stereotypes on it (say S1,S2,S3,S4). In a block definition diagram, I create a SysML Block. Then I used my customized palette to define new 'extended' Parts. For instance, my palette configuration is the following : - S1,S2,S3 are applied on E1 - S1,S2,S4 are applied on E2 --> I can defined a new customized SysML Part, say E1. - It works --> Then I try to create an other elemet, say E2. - I obtained an erratic behavior : a Part is created with the following stereotypes : S1,S2,S3,S4 --> If I choose other elements in my palette (say E3) - same bug : a part is created but applied stereotypes on it do not correspond to what it is expected. Alexandre Cortier