|
Re: Change Diagram Representations Within a Single Editor [message #1696444 is a reply to message #1695958] |
Tue, 26 May 2015 14:10 |
Esteban Dugueperoux 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
|
|
|
Powered by
FUDForum. Page generated in 0.03198 seconds