Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Text placeholder for different properties in SVG
Text placeholder for different properties in SVG [message #1756476] Fri, 17 March 2017 14:48 Go to next message
Athanasios Zolotas is currently offline Athanasios ZolotasFriend
Messages: 52
Registered: November 2016
Location: York
Member
Hi,

I managed to create custom SVG shapes for my stereotypes that have a "placeholder" (called [PapyrusLabel]) that dictates Papyrus where to place the name of the stereotype in the SVG. Is it possible to have placeholders to dictate where the content of different properties of my stereotype will be placed?

Fore example, have a placeholder in the SVG to show that in the top right corner the content of the "id" property of my stereotype will be placed and and another placeholder below that saying that the content of the "comments" property of the stereotype will be placed.

Thanks
Re: Text placeholder for different properties in SVG [message #1756482 is a reply to message #1756476] Fri, 17 March 2017 15:29 Go to previous messageGo to next message
Remi Schnekenburger is currently offline Remi SchnekenburgerFriend
Messages: 169
Registered: July 2009
Location: Palaiseau, France
Senior Member
Hi Thanos,

It is possible, but it requires many extensions and overrides, as this feature was mainly hard - coded for the name of the elements. Only one "forced" label has been initially planed for SVGs. The SVG are interpretred on the fly to set the content of the Papyrus label, used for name display.
You should have a look for example to the class SVGNodePlateFigure in o.e.p.infra.gmfdiag.common plugin. This one locates the papyrus label for the name. You should extend this class with yours if you want to add more customized labels in SVG. You may also want to have a look to the org.eclipse.papyrus.uml.diagram.common.figure.node.AutomaticCompartmentLayoutManager, which layouts the name label.

I would say, not the easiest customization Wink

HTH,
Rémi



Remi Schnekenburger

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/

[Updated on: Fri, 17 March 2017 15:30]

Report message to a moderator

Re: Text placeholder for different properties in SVG [message #1756483 is a reply to message #1756482] Fri, 17 March 2017 15:37 Go to previous message
Athanasios Zolotas is currently offline Athanasios ZolotasFriend
Messages: 52
Registered: November 2016
Location: York
Member
Hi Rémi,

Your help is really appreciated, especially if you take into account that documentation for such corner cases is not available (I wouldn't expect documentation for this, even from proprietary tools).

I will take a look on what you suggested and I will come back if I am stuck.

Thanks again
Previous Topic:Custom shapes for Associations
Next Topic:Custom diagram type for DSML: plugin/extension
Goto Forum:
  


Current Time: Thu Apr 25 12:21:16 GMT 2024

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

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

Back to the top