Skip to main content



      Home
Home » Newcomers » Newcomers » Dynamically changing Document's content
Dynamically changing Document's content [message #212418] Mon, 28 May 2007 01:47
Eclipse UserFriend
Originally posted by: checknaliniasha.yahoo.com

Hey Daniel,

Iam working on a project in which I need to change the existing document
not by a keyboard but through the content coming from another source
(containg the offset).

our approach to this is:-

IWorkbenchPage page = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage();
IEditorPart part = page.getActiveEditor();
ITextEditor editor = (ITextEditor)part;
IDocumentProvider dp=editor.getDocumentProvider();

IDocument doc= dp.getDocument(editor.getEditorInput());
DocumentEvent e= new DocumentEvent(doc, 10, 2, "hi" );
this.fireDocumentAboutToBeChanged(e);

But we want to fire this method on doc. How can we acheive this.
Are we on the right track or not.Please suggest the right approach to do
this.

Thanks
Previous Topic:fatjar plug-in license
Next Topic:Welcome Screen Content
Goto Forum:
  


Current Time: Tue Apr 29 02:58:14 EDT 2025

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

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

Back to the top