Entering text to the active editor [message #67504] |
Mon, 09 June 2003 01:35 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03610 seconds