Getting IEditorInput in validator [message #1059627] |
Mon, 20 May 2013 22:48 |
Roza Ghamari Messages: 82 Registered: January 2013 |
Member |
|
|
Hi all,
I need to do some validation on my grammar based on the association of the file with a specific object I called MyResource. The command for opening the xtext editor is handled when user is right clicking on MyResource, hence I extended the FileEditorInput (called it MyEditorInput) and store the Myresource instance for the editor input there. However, I cannot get the instance of MyEditorInput in the MyGrammarJavaEditor code. I tried using PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getEditorInput()
but this it throw NullPointerException. Do you know any ways to get the editor input in validator? Do you think my solution for associating an external object with the xtext editor/file/resource is correct? Any other suggestions?
Thank you very much in advance!
|
|
|
Powered by
FUDForum. Page generated in 0.03357 seconds