|
|
|
|
Re: Nodes Customization with Java [message #1768685 is a reply to message #1768675] |
Fri, 21 July 2017 14:08 |
Pierre Guilet Messages: 250 Registered: June 2017 |
Senior Member |
|
|
Yes the example is not up to date.
Replace SiriusPlugin.getDefault().getBundleImage((DNode) customStyle.eContainer()).getName() by
@Override
protected void refreshVisuals() {
CustomStyle customStyle = (CustomStyle) this.resolveSemanticElement();
if (customStyle.eContainer() instanceof DNode) {
ImageDescriptor imageDescriptorFromPlugin = AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "/icons/myIcon.png");
this.getPrimaryShape().setImage(imageDescriptorFromPlugin.createImage());
}
}
where "/icons/myIcon.png" is the path to your icon in your plugin. And be sure that the folders of your path are ticked in the build section of your manifest.mf
Also your EMPLOYEE_ID value in DiagSeqEditPartProvider must be set to the value used in your odesign:
String EMPLOYEE_ID="EMPLOYEE_ID"
Regards
Pierre Guilet - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
[Updated on: Fri, 21 July 2017 14:10] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03322 seconds