[Solved] Getting project in implementation of ISpellingEngine [message #836264] |
Wed, 04 April 2012 09:43 |
Boris von Loesch Messages: 5 Registered: July 2009 Location: Germany |
Junior Member |
|
|
Hi,
I am one developer of the Texlipse plugin and we encountered a serious bug, which can lead to freezes of Eclipse (bugs.eclipse.org/bugs/show_bug.cgi?id=319098).
The main reason why this bug occurs is the need to get the project of the currently checked IDocument in our implementation of ISpellingEngine, since we have a language preference in the project. I have seen no other possibility but checking which editor is currently active and obtain the project from its IEditorInput (if it belongs to a project). On the one hand this is not very elegant, because it is by no means guaranteed that the checker always checks the currently active editor, and on the other hand can lead to freezes in rare situations where this implementation of ISpellingEngine is set as default spelling engine because of a deadlock in the UI thread.
Is there a better solution to get the project in the check routine of ISpellingEngine?
Thanks in advance,
Boris
[Updated on: Tue, 24 April 2012 12:04] Report message to a moderator
|
|
|
Re: Getting project in implementation of ISpellingEngine [message #854139 is a reply to message #836264] |
Mon, 23 April 2012 17:47 |
|
On 4/4/2012 5:43 AM, Boris von Loesch wrote:
> Hi,
>
> I am one developer of the Texlipse plugin and we encountered a serious
> bug, which can lead to freezes of Eclipse
> (bugs.eclipse.org/bugs/show_bug.cgi?id=319098).
> The main reason why this bug occurs is the need to get the project of
> the currently checked IDocument in our implementation of
> ISpellingEngine, since we have a language preference in the project. I
> have seen no other possibility but checking which editor is currently
> active and obtain the project from its IEditorInput (if it belongs to a
> project). On the one hand this is not very elegant, because it is by no
> means guaranteed that the checker always checks the currently active
> editor, and on the other hand can lead to freezes in rare situations
> where this implementation of ISpellingEngine is set as default spelling
> engine because of a deadlock in the UI thread.
>
> Is there a better solution to get the project in the check routine of
> ISpellingEngine?
>
> Thanks in advance,
> Boris
Check the APIs in the org.eclipse.core.filebuffers plug-in, particularly
ITextFileBufferManager#getTextFileBuffer(IDocument) .
--
---
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
|
Powered by
FUDForum. Page generated in 0.02083 seconds