Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] Methode to create and open the QVT Editor
[QVTO] Methode to create and open the QVT Editor [message #479286] Mon, 10 August 2009 14:53 Go to next message
Youssef  is currently offline Youssef Friend
Messages: 16
Registered: July 2009
Junior Member
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Youssef  is currently offline Youssef Friend
Messages: 16
Registered: July 2009
Junior Member
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 #479973 is a reply to message #479296] Thu, 13 August 2009 10:17 Go to previous messageGo to next message
Youssef  is currently offline Youssef Friend
Messages: 16
Registered: July 2009
Junior Member
Hallo All,

I still get the same Exception.
I need a method to create the file in the workspace.
Please, I need your help. Confused

Thanks
Re: [QVTO] Methode to create and open the QVT Editor [message #479996 is a reply to message #479973] Thu, 13 August 2009 11:54 Go to previous message
Eclipse UserFriend
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
Previous Topic:Calling Java Code from QVTO 1.0.1
Next Topic:ATL : Metamodel with references to other metamodels
Goto Forum:
  


Current Time: Wed Jan 22 22:15:23 GMT 2025

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

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

Back to the top