Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Fixing the Tree View window
Fixing the Tree View window [message #1841324] Wed, 12 May 2021 09:46 Go to next message
Jad El-khoury is currently offline Jad El-khouryFriend
Messages: 61
Registered: August 2015
Member
For a given diagram, I need to show a tree structure of items that is always available when the user is working with the diagram. This is similar to the "Model Explorer", but the tree should only show some types of semantic elements (and not all files, different projects, etc.).

Is there a way to do this in Sirius?

I have experimented with a Tree diagram. I like the view that it presents. But the window is completely independent of the "source" diagram. It's also not so obvious for the user how to open this new window?

Can I for example associate a Tree diagram with another Diagram so that it always open as soon as the other diagram is opened?
Re: Fixing the Tree View window [message #1841539 is a reply to message #1841324] Thu, 20 May 2021 08:58 Go to previous messageGo to next message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 182
Registered: October 2014
Senior Member
Hello

There is no such ability in Sirius to synchronise two editors. You have to do it by yourself.
I would recommend to use a IPartListener to know when an editor is opened or closed [1]
Then you can test if the given IWorkbenchPart part is an instance of a org.eclipse.sirius.diagram.ui.tools.api.editor.DDiagramEditor. Then you can get information and call Sirius API [2] to open another representation (in your case the Tree representation)

[1] http://archive.eclipse.org/eclipse/downloads/documentation/2.0/html/plugins/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/IPartService.html
[2] org.eclipse.sirius.ui.business.api.dialect.DialectUIServices.openEditor(Session, DRepresentation, IProgressMonitor)

Best regards
Laurent


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Fixing the Tree View window [message #1841555 is a reply to message #1841539] Thu, 20 May 2021 15:00 Go to previous message
Jad El-khoury is currently offline Jad El-khouryFriend
Messages: 61
Registered: August 2015
Member
Thanks for this tip laurent.

A follow up question is how to "call Sirius API".

I am quite familiar with adding Java services to a Sirius model. But can't seem to work out the documentation to access and call Sirius APIs.
For example, where is this API defined? How can I call it?
Previous Topic:Forcing some mappings to anchor on the diagrams' edge
Next Topic:Adding metamodel plug-in problem
Goto Forum:
  


Current Time: Wed Apr 24 21:33:30 GMT 2024

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

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

Back to the top