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?
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.
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.
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.
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