Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » A question about IDocumentProvider
A question about IDocumentProvider [message #946997] Tue, 16 October 2012 18:13 Go to next message
Raymond Mising name is currently offline Raymond Mising nameFriend
Messages: 59
Registered: July 2009
Member
Hey guys,

I need to use org.eclipse.ui.texteditor.IDocumentProvider in my plug-in. I looked into the interface and its implementations and I found the connect(object) method is not synchronized. Is it thread safe?

Thanks.

Raymond
Re: A question about IDocumentProvider [message #947574 is a reply to message #946997] Wed, 17 October 2012 07:48 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 16.10.2012 20:13, Raymond Mising name wrote:
> Hey guys,
> I need to use org.eclipse.ui.texteditor.IDocumentProvider in my
> plug-in. I looked into the interface and its implementations and I
> found the connect(object) method is not synchronized. Is it thread safe?
Almost all types in *.ui.* packages are supposed to run in the UI thread
and hence not explicitly made thread-safe.

Dani
> Thanks.
>
> Raymond
Re: A question about IDocumentProvider [message #949223 is a reply to message #946997] Thu, 18 October 2012 20:26 Go to previous messageGo to next message
Raymond Mising name is currently offline Raymond Mising nameFriend
Messages: 59
Registered: July 2009
Member
Thanks Dani. In the org.eclipse.ui.editors.text.TextFileDocumentProvider#connect() method. I saw it accounted the number of how many clients were connected by doing ++ info.fCount. But I could not think of any case that can make the connected clients to be more than one. Can you give me an example? Thanks.
Re: A question about IDocumentProvider [message #949805 is a reply to message #949223] Fri, 19 October 2012 10:07 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 18.10.2012 22:26, Raymond Mising name wrote:
> Thanks Dani. In the
> org.eclipse.ui.editors.text.TextFileDocumentProvider#connect() method.
> I saw it accounted the number of how many clients were connected by
> doing ++ info.fCount. But I could not think of any case that can make
> the connected clients to be more than one. Can you give me an example?
e.g. open more than one editor on the same file.

Dani
> Thanks.
Re: A question about IDocumentProvider [message #949966 is a reply to message #949805] Fri, 19 October 2012 13:52 Go to previous messageGo to next message
Raymond Mising name is currently offline Raymond Mising nameFriend
Messages: 59
Registered: July 2009
Member
I tried that but it always jumped to the opened editor. How can open multiple editors on one file?
Re: A question about IDocumentProvider [message #949979 is a reply to message #949966] Fri, 19 October 2012 14:04 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 19.10.2012 15:52, Raymond Mising name wrote:
> I tried that but it always jumped to the opened editor. How can open
> multiple editors on one file?
Window > New Editor

Dani
Previous Topic:Open file at line from command line
Next Topic:Can't get SWT CheckBox Button and a Link to share row in GridLayout
Goto Forum:
  


Current Time: Tue Apr 16 16:42:47 GMT 2024

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

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

Back to the top