Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] Re: Using org.eclipse.dltk.ui.correctionProcessor extension point

Hi William,

It depends how you report these problems & corrections for them.
In particular, did you implemented
IScriptCorrectionProcessor.canFix(IScriptAnnotation) ? At least I was
able to reproduce your case if I return false from this method.
These annotations are loaded from markers, then the active editor
content is rechecked (it is rechecked after every change) and marker
annotations are overloaded with the newer ones.

Eventually it should be simplified on DLTK side, but for now you have
to implement multiple methods, etc.

Regards,
Alex

On Wed, Aug 25, 2010 at 19:19, William Candillon <wcandillon@xxxxxxxxx> wrote:
> Hi Alex,
>
> Thank you very much, I'm now able to activate the ScriptCorrectionAssistant.
> Everything works like a charm but when I save a file, the red marker
> problem goes over the lightbub icon (see screenshot:
> http://tinyurl.com/37nc5c8).
>
> What can I do to fix that?
>
> Thank you very much for your help.
>
> Best regards,
>
> William
>
> On Fri, Aug 20, 2010 at 12:53 PM, Alex Panchenko <alex@xxxxxxxxx> wrote:
>> Hi William,
>>
>> markerResolution is activated for markers in the Problems view, so they work after the document was saved and built.
>> and correctionProcessor is called from the editor (probably even for unsaved document)
>>
>> In DLTK 2.0 to activate the correctionProcessor I think you should add the following:
>>
>> @Override
>> public IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer) {
>>        if (getEditor() != null)
>>                return new ScriptCorrectionAssistant(getEditor(), fPreferenceStore, getColorManager());
>>        return null;
>> }
>>
>> to your ScriptSourceViewerConfiguration
>>
>> Definitely, it will be simplified in DLTK 3.0, and this code will be added to the base class.
>>
>> Regards,
>> Alex
>>
>> ----- Original Message -----
>> From: "William Candillon" <wcandillon@xxxxxxxxx>
>> To: "DLTK Developer Discussions" <dltk-dev@xxxxxxxxxxx>
>> Sent: Thursday, August 12, 2010 10:05:49 PM GMT +06:00 Almaty, Novosibirsk
>> Subject: [Dltk-dev] Re: Using org.eclipse.dltk.ui.correctionProcessor extension point
>>
>> Also how this extension point is different from
>> org.eclipse.ui.ide.markerResolution ?
>>
>> Best regards,
>>
>> William
>>
>> On Thu, Aug 12, 2010 at 4:19 PM, William Candillon <wcandillon@xxxxxxxxx> wrote:
>>> Hi,
>>>
>>> I'm looking to use the org.eclipse.dltk.ui.correctionProcessor extension point.
>>> I declared the following extension point:
>>>  <extension
>>>       point="org.eclipse.dltk.ui.correctionProcessor">
>>>    <correctionProcessor
>>>          class="org.eclipse.wst.xquery.set.internal.ui.corrections.SETCorrectionProcessor"
>>>          nature="org.eclipse.wst.xquery.core.nature">
>>>    </correctionProcessor>
>>>  </extension>
>>>
>>> However, when running the editor, the class SETCorrectionProcessor is
>>> never loaded.
>>> How do I get org.eclipse.dltk.ui.text.ScriptCorrectionProcessorManager
>>> to be invoked?
>>> I tried to debug it and noticed that
>>> org.eclipse.dltk.ui.text.ScriptCorrectionProcessorManager is never
>>> loaded as well.
>>> am I missing something? What should I do? Is there some documentation
>>> available for this extension point? Or a small example maybe?
>>>
>>> Best regards,
>>>
>>> William
>>>
>> _______________________________________________
>> dltk-dev mailing list
>> dltk-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/dltk-dev
>> _______________________________________________
>> dltk-dev mailing list
>> dltk-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/dltk-dev
>>
> _______________________________________________
> dltk-dev mailing list
> dltk-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/dltk-dev
>


Back to the top