Skip to main content


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 13:30 Go to next message
Eddie L. is currently offline Eddie L.Friend
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 16:30 Go to previous message
Eddie L. is currently offline Eddie L.Friend
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: Thu Apr 25 15:55:13 GMT 2024

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

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

Back to the top