View/Open Diagram in a SWT shell [message #1784831] |
Wed, 04 April 2018 10:58  |
Eclipse User |
|
|
|
Hello all :)
I am trying to view an specific diagram (I have the representation name) in a SWT Shell window. Basically, I need to view a diagram in my own java form as if I am previewing a diagram.
I there a way to do it ? or if not, can I export an snapshot of the diagram and view it in my form ?
Thanks,
Parsa
[Updated on: Wed, 04 April 2018 11:00] by Moderator
|
|
|
|
|
|
|
Re: View/Open Diagram in a SWT shell [message #1785019 is a reply to message #1784939] |
Sat, 07 April 2018 08:33   |
Eclipse User |
|
|
|
Thanks Pierre-Charles, changing the resolution worked.
However, when I was playing around with the Sirius API , I found that the editor could *somehow* be shown in a shell (see the image). But, the issue is that it will be very small and will not be resized to the parent shell, which I guess is because of the shell layout. But, as you can see in my code, I used openEditor, which opens and returns IEditorPart. Is there any other way to just get the IEditorPart and not opening it ? Have you seen anything like this before ?

My code is:
IEditorPart editor = DialectUIManager.INSTANCE.openEditor(session, current_representation, new NullProgressMonitor());
editor.createPartControl(parent); //parent is my created shell
[Updated on: Sat, 07 April 2018 08:40] by Moderator
|
|
|
|
Re: View/Open Diagram in a SWT shell [message #1785104 is a reply to message #1785100] |
Mon, 09 April 2018 10:00  |
Eclipse User |
|
|
|
Thanks Pierre-Charels. You are right, I noticed that it is not completely functional. I found that it is better to open the editor but maybe in the bottom view (I mean the section at the bottom of the page and not at the top). since I can manually drag the editor from top to bottom, I think it should also be programatically doable. I guess I will ask about the editors in SWT/JFace forums.
Bests,
Parsa
|
|
|
Powered by
FUDForum. Page generated in 0.05113 seconds