Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Entering text to the active editor
Entering text to the active editor [message #67504] Mon, 09 June 2003 01:35
Eclipse UserFriend
Hi all,

I like to know how can I enter text to the ActiveEditor through
Sockets,while searching for this I found a code snippet that does part of
the job but I am still not sure how to get the data of socket point to the
getInput of the document.


IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
if (window != null) {
IWorkbenchPage page = window.getActivePage();
if (page != null) {
IEditorPart e = page.getActiveEditor();
if (e instanceof ITextEditor) {
ITextEditor te = (ITextEditor) e;
IDocument document = te.getDocumentProvider()
.getDocument(te.getInput());
...
}
}
}

I would really appreciate any pointers.

Syed
Previous Topic:Seeking and FTP Tool
Next Topic:What are the eclipse/WSAD 5.0 ant tasks?
Goto Forum:
  


Current Time: Sat May 10 15:42:46 EDT 2025

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

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

Back to the top