directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <>
Subject Re: [Studio] Questions about LdifSourceViewerConfiguration class
Date Thu, 12 Mar 2015 19:40:19 GMT
Hi Emmanuel,

On 03/12/2015 07:48 PM, Emmanuel L├ęcharny wrote:
> OTOH, all those setters are called in the
> LdifEditorWidget.createWidget() method, when we call
> sourceViewer.configure( sourceViewerConfiguration );
> That makes me wonder why we don't create all the elements in the
> constructor. Any good reason ?

To be honest I don't remember if there is/was a good reason. When
looking into other implementations the objects are also created lazily
when calling the getter, however the objects are not assigned to a
member variable.

It would be interesting to test if the getters are called more than
once. You can try to move the creation to the constructor and see what
happens. Please note that the class is not only used by the LDIF editor
itself, but also from a number of ModificationLogsView, SearchLogsView,
BatchOperationWizardPage, and LdifEditorSyntaxColoringPreferencePage.

Another thought, I think e4 supports dependency injection, so maybe it
makes sense to try to migrate (later, much much later) to e4 and avoid
hand-wiring all the stuff.

Kind Regards,

View raw message