directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: [Studio] Questions about LdifSourceViewerConfiguration class
Date Thu, 12 Mar 2015 18:12:28 GMT
Ahhh, my bad.

We have two content types, DEFAULT_CONTENT_TYPE and LDIF_RECORD, so the
double registration makes sense.




Le 12/03/15 19:02, Emmanuel Lécharny a écrit :
> Hi,
>
> I'm currently reviewing a few classes, trying to remove some potential
> NPE. While doing so, I found things that I'm not sure are necessary or
> correct in the LdifSourceViewerConfiguration class. Typically :
>
> line 165 :
>
>             damagerRepairer = new LdifDamagerRepairer( this.editor );
>
>             this.presentationReconciler.setDamager( damagerRepairer,
> IDocument.DEFAULT_CONTENT_TYPE );
>             this.presentationReconciler.setRepairer( damagerRepairer,
> IDocument.DEFAULT_CONTENT_TYPE );
>
>             this.presentationReconciler.setDamager( damagerRepairer,
> LdifPartitionScanner.LDIF_RECORD );
>             this.presentationReconciler.setRepairer( damagerRepairer,
> LdifPartitionScanner.LDIF_RECORD );
>
> Why do we set the damaRepairer twice ? My understanding is that the
> second setting is enough, am I correct ?
>
> Same for line 217 :
>                 this.contentAssistant = new DialogContentAssistant();
>
>                 this.contentAssistProcessor = new
> LdifCompletionProcessor( editor, contentAssistant );
>                 this.contentAssistant.setContentAssistProcessor(
> this.contentAssistProcessor,
>                     LdifPartitionScanner.LDIF_RECORD );
>                 this.contentAssistant.setContentAssistProcessor(
> this.contentAssistProcessor,
>                     IDocument.DEFAULT_CONTENT_TYPE );
>
> we set the ContentAssistProcessor twice, with two different values, and
> I suspect that the second setting is wrong.
>
> Pardon me if these are dumb questions, I'm quite a virging in Eclipse
> programming...
>
> Thanks !


Mime
View raw message