Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Custom shape not shown
Custom shape not shown [message #1833725] Thu, 22 October 2020 15:47 Go to next message
Christoph Lehr is currently offline Christoph LehrFriend
Messages: 24
Registered: June 2020
Junior Member
Hi all,

I'm trying to adapt the shape of an element if a certain Stereotype is applied. Unfortunately this does not really work. I managed to change the shapes and so on via my style sheet but I need to change the shape of certain classes and I want to disable the compartments.

I followed the following page for changing the symbol https://wiki.eclipse.org/MDT/Papyrus/UserGuide/Symbols and this video https://www.youtube.com/watch?v=90Qt9a_0c-k

I tried the following things to change the shape

  • adding it to the stereotype icons as a shape
  • directly refercing the svg in the css
  • using the TypeSymbolDefinition Stereotype and pointing to the svg file


I also renamed the path from the generated id to "PapyrusPath" as the page references, but it doesn't work either.

I added my style sheet and my svg to the attachments. Is there any step I'm missing or is my svg somehow corrupted?

Thanks for your help
BR Christoph

  • Attachment: shape.svg
    (Size: 0.72KB, Downloaded 81 times)
  • Attachment: style.css
    (Size: 0.06KB, Downloaded 51 times)
  • Attachment: UAReferenceType.png
    (Size: 0.43KB, Downloaded 46 times)
Re: Custom shape not shown [message #1833743 is a reply to message #1833725] Fri, 23 October 2020 06:59 Go to previous messageGo to next message
Christoph Lehr is currently offline Christoph LehrFriend
Messages: 24
Registered: June 2020
Junior Member
Update:

By applying the svg as a shape in the UML Profile and in the css I managed to get it displayed inside the Element but not as the actual shape (See display.png).

I changed some minor things in the svg and the css but I would need that the Class Element acutally has the shape of the svg.

Thanks in advance for your help.
BR Christoph
  • Attachment: display.png
    (Size: 3.04KB, Downloaded 54 times)
  • Attachment: shape_v2.svg
    (Size: 1.07KB, Downloaded 72 times)
  • Attachment: style_v2.css
    (Size: 0.27KB, Downloaded 50 times)
Re: Custom shape not shown [message #1833765 is a reply to message #1833743] Fri, 23 October 2020 13:09 Go to previous messageGo to next message
Robin F. is currently offline Robin F.Friend
Messages: 7
Registered: April 2019
Junior Member
Hello,

If you want the whole element displayed as your custom SVG shape, you should probably hide all compartments ("compartment_shape_display" included) and enable "shapeVisibility", i.e. something like this:

Class {
	elementIcon: false;
        displayIcon: false;
	displayHeader:false;
	displayBorder: true;
	svgFile: "platform:/resource/test/shape_v2.svg";
	followSVGSymbol:true;
        shapeVisibility: true;
}


HTH,
Robin
Re: Custom shape not shown [message #1833999 is a reply to message #1833765] Thu, 29 October 2020 18:22 Go to previous message
Christoph Lehr is currently offline Christoph LehrFriend
Messages: 24
Registered: June 2020
Junior Member
Thanks that works.
Previous Topic:F2 shortcut and EditHelperAdvice
Next Topic:CSS reference element selector
Goto Forum:
  


Current Time: Thu Apr 25 10:48:05 GMT 2024

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

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

Back to the top