How to output messages to XtextEditor [message #797432] |
Mon, 13 February 2012 08:30  |
Eclipse User |
|
|
|
I created a plug-in project and imported it to another project (org.xtext.example.mydsl).
System.out.println("hello world") is only able to print messages to Console. Now, I want to print the same message, but to the XtextEditor (at eclipse run-time application) ... (please see the attachment)
I used the code below to detect the location of the file and the editor type (XtextEditor):
IWorkbench wb = PlatformUI.getWorkbench();
IWorkbenchWindow workbenchWindow = wb.getActiveWorkbenchWindow();
IWorkbenchPage page = workbenchWindow.getActivePage();
System.out.println(page.getActiveEditor());
System.out.println(page.getActiveEditor().getEditorInput());
This is the result that I got:
org.eclipse.ui.part.FileEditorInput(/mydslproject/Myfile.mydsl)
org.eclipse.xtext.ui.editor.XtextEditor@4e7029b6
Question: Please tell me how to append words/messages in this XtextEditor at eclipse run-time application ? How do I append after the cursor position of this editor?
Thanks
|
|
|
|
Powered by
FUDForum. Page generated in 0.04443 seconds