Skip to main content



      Home
Home » Modeling » Papyrus » Text placeholder for different properties in SVG
Text placeholder for different properties in SVG [message #1756476] Fri, 17 March 2017 10:48 Go to next message
Eclipse UserFriend
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 11:29 Go to previous messageGo to next message
Eclipse UserFriend
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

[Updated on: Fri, 17 March 2017 11:30] by Moderator

Re: Text placeholder for different properties in SVG [message #1756483 is a reply to message #1756482] Fri, 17 March 2017 11:37 Go to previous message
Eclipse UserFriend
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: Tue Jul 22 13:46:15 EDT 2025

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

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

Back to the top