Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Creating my own IDocument and IDocumentProvider will help in editor state
Creating my own IDocument and IDocumentProvider will help in editor state [message #211271] Mon, 15 March 2004 15:11 Go to next message
Syed Rizvi is currently offline Syed RizviFriend
Messages: 145
Registered: July 2009
Senior Member
Hi all,

I have similar question on the newsgroup but haven't yet resolved my
problem.I am trying to make the editor readonly by using setEditable()
method and want to enter text into the editor through sockets.
setEditable() doesn't work in my case for some reason that I have not been
able to figure out,as it is being invoked from a ui thread.I used
AsyncExec for it but no results. I have read in previous posts that if I
create my own IDocumentProvider and IDocument I will be able to get the
job done.
My only question is that how these two interfaces will help me?. The
reason I am asking this is because setEditable() is called by the
SourceViewer() and IDocument and iDocumentprovider is used for creating a
document for the editor. Which methods do I have to call on iDocument or
IDocumentProvider that will help me in changing the state of the
ediotr.How can I change the editor state by calling methods of these
interfaces.
Secondly I am using IDocument.replace method to enter text into the
editor.Is there any method that I can use so that I can enter whatever is
being comming in the editor through sockets.

I would really apprecaite any pointer as I am running out of time for
submitting this project at school.

Thanks

Syed
Re: Creating my own IDocument and IDocumentProvider will help in editor state [message #211291 is a reply to message #211271] Mon, 15 March 2004 15:22 Go to previous message
Eclipse UserFriend
Originally posted by: sma-r.hotmail.com

I am using the JavaEditor Example for this plugin.

Syed

Syed wrote:

> Hi all,

> I have similar question on the newsgroup but haven't yet resolved my
> problem.I am trying to make the editor readonly by using setEditable()
> method and want to enter text into the editor through sockets.
> setEditable() doesn't work in my case for some reason that I have not been
> able to figure out,as it is being invoked from a ui thread.I used
> AsyncExec for it but no results. I have read in previous posts that if I
> create my own IDocumentProvider and IDocument I will be able to get the
> job done.
> My only question is that how these two interfaces will help me?. The
> reason I am asking this is because setEditable() is called by the
> SourceViewer() and IDocument and iDocumentprovider is used for creating a
> document for the editor. Which methods do I have to call on iDocument or
> IDocumentProvider that will help me in changing the state of the
> ediotr.How can I change the editor state by calling methods of these
> interfaces.
> Secondly I am using IDocument.replace method to enter text into the
> editor.Is there any method that I can use so that I can enter whatever is
> being comming in the editor through sockets.

> I would really apprecaite any pointer as I am running out of time for
> submitting this project at school.

> Thanks

> Syed
Previous Topic:Any way to create a view without the title bar?
Next Topic:Help system performance
Goto Forum:
  


Current Time: Fri Oct 18 13:09:12 GMT 2024

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

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

Back to the top