[QVTO] Methode to create and open the QVT Editor [message #479286] |
Mon, 10 August 2009 14:53  |
Eclipse User |
|
|
|
Hallo All,
I want to integrate the M2M QVTO Editor in my RCP Application. this is my
first TextEditor in my RCP Application. so i search one Methode to create
a Editor with Input and another Methode to open the Editor.
in which packages exist these Methodes.
I found a run() Mehtode in the package
"org.eclipse.m2m.internal.qvt.oml.editor.ui.actions". is this Methode
helpful?
Thanks,
Greetings
|
|
|
Re: [QVTO] Methode to create and open the QVT Editor [message #479296 is a reply to message #479286] |
Mon, 10 August 2009 15:33   |
Eclipse User |
|
|
|
Originally posted by: formatzeh.gmx.de
To open an editor you need its ID. For the QVT editor it is:
org.eclipse.m2m.qvt.oml.editor.ui.QvtEditor
You can discover the ID when pressing Shift+Alt+F1 (Plugin spy) when an
editor is open. Then you have to invoke the following Code:
IDE.openEditor(page, uri, editorId, activate)
where page is the page in which the editor will be opened, uri the file
to show and activate a boolean value to open and activate the editor
directly.
|
|
|
Re: [QVTO] Methode to create and open the QVT Editor [message #479533 is a reply to message #479296] |
Tue, 11 August 2009 13:21   |
Eclipse User |
|
|
|
Thank you very much
i can now open the editor but I become a java.lang.IllegalStateException:
"Editor source viewer document must be available" because (IDocument) doc
= null. this Exception is threw in ASTProvider SubClass.
which method in QVTEditor can store and invoke a file in workspace?
I think that has to do with DocumentProvider and its Content.
Thanks you a gain for your help.
Greetings
|
|
|
|
Re: [QVTO] Methode to create and open the QVT Editor [message #479996 is a reply to message #479973] |
Thu, 13 August 2009 11:54  |
Eclipse User |
|
|
|
Originally posted by: dvorak.radek.gmail.com
Hi Youssef,
You have to use a file input with the editor, that is the limitation (bug)
of 2.0.0 release.
It looks like you have used uri, which caused the problem.
The snippet bellow works for sure:
IDE.openEditor(activeWorkbenchWindow.getActivePage(),
ResourcesPlugin.getWorkspace().getRoot().getFile(new
Path("/x/src/Simpleuml_To_Rdb.qvto")),
"org.eclipse.m2m.qvt.oml.editor.ui.QvtEditor", true);
Sorry for the delay!
Regards,
/Radek
On Thu, 13 Aug 2009 12:17:29 +0200, Youssef <aitlaydi.youssef@gmail.com>
wrote:
> Hallo All,
>
> I still get the same Exception.
> I need a method to create the file in the workspace.
> Please, I need your help. :? Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.02933 seconds