Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to output messages to XtextEditor
How to output messages to XtextEditor [message #797432] Mon, 13 February 2012 08:30 Go to next message
Eddie L. is currently offline Eddie L.
Messages: 2
Registered: February 2012
Junior Member
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
Re: How to output messages to XtextEditor [message #800057 is a reply to message #797432] Thu, 16 February 2012 11:30 Go to previous message
Eddie L. is currently offline Eddie L.
Messages: 2
Registered: February 2012
Junior Member
Hello,

I am currently working on a project. Please let me know if you have any other ideas of how to output (string) messages to XtextEditor!!!!

Thanks
Previous Topic:How to disable key binding command menu pop up
Next Topic:Error in exporting RAP product
Goto Forum:
  


Current Time: Fri Aug 29 16:23:54 EDT 2014

Powered by FUDForum. Page generated in 0.15718 seconds