Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Node with rotating Image
Node with rotating Image [message #1429597] Tue, 23 September 2014 12:51 Go to next message
Who Cares is currently offline Who CaresFriend
Messages: 6
Registered: July 2014
Junior Member
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 12:51 Go to previous messageGo to next message
Who Cares is currently offline Who CaresFriend
Messages: 6
Registered: July 2014
Junior Member
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 14:24 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
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 10:45 Go to previous message
Raphael BenSussan is currently offline Raphael BenSussanFriend
Messages: 1
Registered: February 2015
Junior Member
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: Tue Apr 23 06:53:30 GMT 2024

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

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

Back to the top