Stereotype shapes and icons with Papyrus 0.10 [message #1233420] |
Sun, 19 January 2014 10:43  |
Eclipse User |
|
|
|
Hello everyone. I would like to define shapes and icons for a particular profile. I'm going through Properties -> UML -> Icons -> Plus sign to the Create a new image dialogue.
After providing a name and setting Kind as shape I click on the big plus sign button to select an image file. There are two issues with this:
1. The SVG format is not in the set of accepted formats, contrary to what the documentation reads.
2. When I select an image no extra buttons are presented in the dialogue, nor is any path selected. In the log the message below appears.
What could be wrong? I believe I have the latest versions of Eclipse (4.3) and Papyrus (0.10). Thank you.
Message
Exception Stack Trace
org.eclipse.papyrus.infra.core.services.ServiceNotFoundException: Can't find the ResourceSet needed retrieve the ServiceRegistry.
at org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResource.getServiceRegistry(ServiceUtilsForResource.java:64)
at org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject.getServiceRegistry(ServiceUtilsForEObject.java:43)
at org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject.getServiceRegistry(ServiceUtilsForEObject.java:1)
at org.eclipse.papyrus.infra.core.utils.AbstractServiceUtils.getTransactionalEditingDomain(AbstractServiceUtils.java:60)
at org.eclipse.papyrus.uml.properties.widgets.StereotypeImageEditor.browseAction(StereotypeImageEditor.java:140)
at org.eclipse.papyrus.uml.properties.widgets.StereotypeImageEditor.widgetSelected(StereotypeImageEditor.java:203)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1392)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3742)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3363)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:826)
at org.eclipse.jface.window.Window.open(Window.java:802)
at org.eclipse.papyrus.views.properties.creation.PropertyEditorFactory.createObject(PropertyEditorFactory.java:95)
at org.eclipse.papyrus.views.properties.creation.EcorePropertyEditorFactory.createObject(EcorePropertyEditorFactory.java:196)
at org.eclipse.papyrus.infra.widgets.editors.MultipleValueEditor.addAction(MultipleValueEditor.java:404)
at org.eclipse.papyrus.infra.widgets.editors.MultipleValueEditor.widgetSelected(MultipleValueEditor.java:383)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1392)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3742)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3363)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Session Data
eclipse.buildId=4.3.0.M20130911-1000
java.version=1.7.0_17
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Command-line arguments: -os linux -ws gtk -arch x86_64
|
|
|
|
|
|
|
|
Re: Stereotype shapes and icons with Papyrus 0.10 [message #1237670 is a reply to message #1237461] |
Thu, 30 January 2014 04:44   |
Eclipse User |
|
|
|
Hi Luis,
For this error:
java.net.MalformedURLException: no protocol: /home/lads/Desktop/Icons/Man.svg
at java.net.URL.<init>(URL.java:585)
at java.net.URL.<init>(URL.java:482)
at java.net.URL.<init>(URL.java:431)
try using the following path instead:
file:/home/lads/Desktop/Icons/Man.svg
There are three different ways for displaying the Stereotype icons in Papyrus, but only two of them are supported on Kepler (For the last one, you will need to update to the Luna M4/M5 developer build)
In Kepler, select the stereotyped element, then go to the Appearance tab of the properties view. In "Stereotype display", select either Icon or Shape. Then, select the stereotype in the "Applied stereotypes" field, and click on "Display"
The "Shape Display" in Kepler is not really efficient. The new (incoming) mechanisms in Luna are much more powerful. They require a little bit of setup, but once properly configured, they are much easier to manipulate.
Regards,
Camille
|
|
|
|
Re: Stereotype shapes and icons with Papyrus 0.10 [message #1237871 is a reply to message #1233420] |
Thu, 30 January 2014 15:40   |
Eclipse User |
|
|
|
Hi Luis,
Quote:Icon - has no effect on the stereotyped element, but there are no error messages or exceptions.
This option only works if you have defined an Icon for your stereotype. In your case, you have defined a Shape. You need to define both, if you want to be able to switch from one display to the other.
Quote:How can I set Shape as the default stereotype display, instead of Text?
You can't.
Quote:How do I get the edges linked to the stereotyped element back?
You can't.
That's where we get to the 3) option I was mentionning earlier: Papyrus 1.0.0/Luna provides a new framework for manipulating symbols, which is much more powerful. It is also fully integrated with the CSS/Stylesheets framework, which makes it possible to display the symbol for all stereotyped elements. However, it is still under development, so I can't tell much more than what's already described in the documentation (Which should already be enough)
Regards,
Camille
|
|
|
|
|
Re: Stereotype shapes and icons with Papyrus 0.10 [message #1723098 is a reply to message #1428477] |
Thu, 11 February 2016 10:22  |
Eclipse User |
|
|
|
For me, the only combination that worked with Papyrus 1.1.2 Mars is:
- Set the stereotype image's Kind to shape and set its Location to a platform:/ URI of a PNG image
- Set the target object's Appearance > Shape Decoration > Visible to true
[Updated on: Thu, 11 February 2016 10:37] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.05715 seconds