Skip to main content



      Home
Home » Eclipse Projects » Sirius » Node with rotating Image
Node with rotating Image [message #1429597] Tue, 23 September 2014 08:51 Go to next message
Eclipse UserFriend
Hi,

I want to create a bordered node with an Image whose orientation should change depending on which border it is attached to.
I didnt know how to do this myself, which is why I looked into the obeo UMLDesigner, where this technique is used for the required interfaces.

I imported the plugin which provides this functionality into my workspace and use the extension point from within my plugin, where I addded an top-image (for testing purposes an arrow) and an ID. When I use this as a custom style from inside my project I get a green square displayed as the style instead of the black arrow I used as image.

What could I be doing wrong?
The official UMLDesigner uses a Conditional Style which wraps the rotableNode with a "[container <> self.eContainer()/]" expression. but the default style looks the same as the conditional style so I dont see the difference this would make. Nevertheless I tried to do this as well, but I got the same result as described above.
I attached images of the relevant part of the VSM as well as the plugin.xml:
index.php/fa/19226/0/
index.php/fa/19227/0/
Re: Node with rotating Image [message #1429598 is a reply to message #1429597] Tue, 23 September 2014 08:51 Go to previous messageGo to next message
Eclipse UserFriend
I could not link to the plugin before due to forum constraints:
https://github.com/ObeoNetwork/UML-Designer/tree/master/plugins/org.obeonetwork.gmf.runtime.diagram.ui.extension
Re: Node with rotating Image [message #1429646 is a reply to message #1429597] Tue, 23 September 2014 10:24 Go to previous messageGo to next message
Eclipse UserFriend
Hi Who,

If you use customStyle and if you have read the Sirius manual, you
should create your own EditPart which will be associated to the id of
your custom style. And creating your own EditPart is standard GMF.

Best Regards.

Le 23/09/2014 14:51, Who Cares a écrit :
> Hi,
>
> I want to create a bordered node with an Image whose orientation should change depending on which border it is attached to.
> I didnt know how to do this myself, which is why I looked into the obeo UMLDesigner, where this technique is used for the required interfaces.
>
> I imported the plugin which provides this functionality into my workspace and use the extension point from within my plugin, where I addded an top-image (for testing purposes an arrow) and an ID. When I use this as a custom style from inside my project I get a green square displayed as the style instead of the black arrow I used as image.
>
> What could I be doing wrong?
> The official UMLDesigner uses a Conditional Style which wraps the rotableNode with a "[container <> self.eContainer()/]" expression. but the default style looks the same as the conditional style so I dont see the difference this would make. Nevertheless I tried to do this as well, but I got the same result as described above.
> I attached images of the relevant part of the VSM as well as the plugin.xml:
>
>


--
Esteban Dugueperoux - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Node with rotating Image [message #1623814 is a reply to message #1429646] Thu, 19 February 2015 05:45 Go to previous message
Eclipse UserFriend
Sorry to reopen this topic.

I'm now trying to include a rotating image.

I got the content of the UML-Designer repo and I found one interesting class : org.obeonetwork.gmf.runtime.diagram.ui.extension.rotatable.RotatableImageBasedOnFirstSourceConnectionEditPart

This seems to fit totally with what I want, but the issue is that I don't know how to put this style on my image.

What I would like to do is to add a custom style (with ID = the EditPart) inside my WorkspaceImage node, but it doesn't let me do this.
Obviously I looked into the official documentation, but didn't find any answer.
Has someone already experienced this?
Thanks
index.php/fa/20909/0/

Previous Topic:SysML-Designer
Next Topic:Boader of workspace image
Goto Forum:
  


Current Time: Fri May 16 18:06:42 EDT 2025

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

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

Back to the top