Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Change Diagram Representations Within a Single Editor
Change Diagram Representations Within a Single Editor [message #1695958] Wed, 20 May 2015 14:44 Go to next message
Joe Chip is currently offline Joe ChipFriend
Messages: 1
Registered: May 2015
Junior Member
Hello,

I have a base diagram definition and am looking to allow users to select a container element that exists on it and navigate to a new diagram (from a different definition) in which the selected container is the base diagram element. I realize this can be accomplished using the create or navigate operations, however, I need the selected representation to replace the original within the same editor. This way the user is able to move between different views of the base model and its container elements without having to manage separate editors.

My first attempts at this functionality was to use layers and filters. This seems to fail for two reasons:
1) I need the target of the diagram representation to change so that the 'canvas' represents the container element instead of the base model element. Filters and layering don't seem to address this.
2) Filtering out the container element also filters out its children, which I need to remain visible in the new view.

I have been able to demonstrate this functionality by calling DDiagramEditorImpl.setInput() in a right-click menu operation which is obviously undesirable as the editor type is not API. Is there a way that I can accomplish this representation switching either by extending the existing editor functionality or by some other means provided in Sirius that I have overlooked?

Thanks!
index.php/fa/21886/0/
Custom navigation operation to move to a representation based on the selected container element.

index.php/fa/21887/0/
The editor has changed representations and now displays the container element diagram
  • Attachment: diag1.png
    (Size: 42.24KB, Downloaded 227 times)
  • Attachment: diag2.png
    (Size: 25.94KB, Downloaded 228 times)
Re: Change Diagram Representations Within a Single Editor [message #1696444 is a reply to message #1695958] Tue, 26 May 2015 14:10 Go to previous message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi Joe,

It is an interesting need, indeed you can use your own mechanism for
navigation if you want only a single opened editor at a time by using
IReusableEditor.setInput(). Currently Sirius doesn't support that
through odesign specification, but this could be considered as a feature
request. You can raise a enhancement in our bugzilla. And If you are
interested in the code which manage that, it is in
org.eclipse.sirius.ui.tools.internal.editor.MenuHelper.

Best Regards.

Le 20/05/2015 18:53, Joe Chip a écrit :
> Hello,
>
> I have a base diagram definition and am looking to allow users to select a container element that exists on it and navigate to a new diagram (from a different definition) in which the selected container is the base diagram element. I realize this can be accomplished using the create or navigate operations, however, I need the selected representation to replace the original within the same editor. This way the user is able to move between different views of the base model and its container elements without having to manage separate editors.
>
> My first attempts at this functionality was to use layers and filters. This seems to fail for two reasons:
> 1) I need the target of the diagram representation to change so that the 'canvas' represents the container element instead of the base model element. Filters and layering don't seem to address this.
> 2) Filtering out the container element also filters out its children, which I need to remain visible in the new view.
>
> I have been able to demonstrate this functionality by calling DDiagramEditorImpl.setInput() in a right-click menu operation which is obviously undesirable as the editor type is not API. Is there a way that I can accomplish this representation switching either by extending the existing editor functionality or by some other means provided in Sirius that I have overlooked?
>
> Thanks!
>
> Custom navigation operation to move to a representation based on the selected container element.
>
>
> The editor has changed representations and now displays the container element diagram
>



--
Esteban Dugueperoux - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Sirius Editor loads the wrong class at runtime
Next Topic:Model change validation
Goto Forum:
  


Current Time: Thu Jan 21 12:36:09 GMT 2021

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

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

Back to the top