Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Displaying stereotype shape immediately(CSS control of stereotype shape display)
Displaying stereotype shape immediately [message #1693823] Tue, 28 April 2015 14:12 Go to next message
Patrik Jonsson is currently offline Patrik JonssonFriend
Messages: 18
Registered: January 2015
Junior Member
Hi

I have created a profile with a few stereotypes with both Icons and Shapes defined. We are able to display the shapes using our .css with the following css fragment:

Compartment[kind="symbol"]  {
    visible:true;
}


However, this is only applied after having clicked the Display selected stereotype... button in the Appearance tab of the Properties view, see figure.
index.php/fa/21681/0/

We would want the stereotype shape to be immediately visible when creating a class in a diagram or when dragging it into the diagram. Perhaps controlled by .css or so.

Any advice?

Patrik
Re: Displaying stereotype shape immediately [message #1693829 is a reply to message #1693823] Tue, 28 April 2015 15:09 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi Patrik,

Instead of using Stereotype's Shapes, you can use CSS Shapes, such as:

[appliedStereotypes~=MyStereotype] > Compartment[kind=symbol] {
    visible: true;
}

[appliedStereotypes~=MyStereotype] {
    svgFile: 'platform:/plugin/my.plugin/images/myImage.svg'; //Works best with SVG, but can also work for other image formats, even if the property is named "svg" file

}


The image will be displayed as soon as "MyStereotype" is applied on the element. Then, you can create a new Palette Entry to create a Class stereotyped with MyStereotype directly

HTH,
Camille


Camille Letavernier
Re: Displaying stereotype shape immediately [message #1694008 is a reply to message #1693829] Thu, 30 April 2015 05:55 Go to previous message
Patrik Jonsson is currently offline Patrik JonssonFriend
Messages: 18
Registered: January 2015
Junior Member
Thanks Camille

Works like a charm.

Patrik
Previous Topic:Where do I get the code and the documentation ?
Next Topic:Display stereotype icon with css
Goto Forum:
  


Current Time: Sat Apr 20 15:26:11 GMT 2024

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

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

Back to the top