JFace TextViewer, iTextStore & a thread [message #458086] |
Sat, 09 July 2005 10:15  |
Eclipse User |
|
|
|
Originally posted by: hisdudenessabides.gmail.com
Hi there,
I'm new to Jface/Swt. Being used to Swing, I'm a bit confused about
how to do this:
I want to use a TextViewer, by updating its document model from within
another thread (that is continously reading data from a server ). But
I think I will have 3 problems:
a) The Document class (or any IDocument implementation) does not have
an appendText method ! I can't replace all the text each time text
updates ...
b) The set methods of the Document class are not synchronized.
c) I can't pass a textViewer reference to the server thread because
that's a GUI object that belongs to the main thread...
Should I use an iTextStore implementation ? And is the right way to have a
Vector class (which has synchornized get/add methods) as its datamodel ?
Therefore, I really need your advice on how to go about this.
Any help is appreciated,
Thank you,
|
|
|
Re: JFace TextViewer, iTextStore & a thread [message #458991 is a reply to message #458086] |
Thu, 28 July 2005 09:51  |
Eclipse User |
|
|
|
If you're still looking for answers to these questions then you should ask
in the eclipse.platform newsgroup, since that is where jface lives.
"Ahsan" <hisdudenessabides@gmail.com> wrote in message
news:51c5969c7d1b1ea2aa7eb753c4ab8fb2$1@www.eclipse.org...
>
> Hi there,
>
> I'm new to Jface/Swt. Being used to Swing, I'm a bit confused about
> how to do this:
>
> I want to use a TextViewer, by updating its document model from within
> another thread (that is continously reading data from a server ). But
> I think I will have 3 problems:
>
> a) The Document class (or any IDocument implementation) does not have
> an appendText method ! I can't replace all the text each time text
> updates ...
>
> b) The set methods of the Document class are not synchronized.
>
> c) I can't pass a textViewer reference to the server thread because
> that's a GUI object that belongs to the main thread...
>
> Should I use an iTextStore implementation ? And is the right way to have a
> Vector class (which has synchornized get/add methods) as its datamodel ?
>
> Therefore, I really need your advice on how to go about this.
>
> Any help is appreciated,
>
> Thank you,
>
|
|
|
Powered by
FUDForum. Page generated in 0.25988 seconds