Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Module dependency

Hi Alexander,

Am Fr., 13. März 2020 um 18:49 Uhr schrieb Alexander Fedorov
<alexander.fedorov@xxxxxxxxxx>:
>
> Hi Martin,
>
> I used to assume the code is clear enough, but it seems I was wrong.
> Thanks for pointing to this fact! :)
>
> 1) "org.eclipse.cdt.core.options" package provides generic API
> 2) "org.eclipse.cdt.doxygen.core" package provides domain-specific API
> for doxygen - you will need to define your own, but very similar.
> 3) org.eclipse.cdt.doxygen.internal.core.DoxygenPreferenceAccess is
> implementation for DoxygenConfiguration and DoxygenPreferences interfaces
> === warning! magic starts from here
> 4) and, org.eclipse.cdt.doxygen.internal.core.DoxygenPreferenceAccess is
> an OSGi component (see annotation and manifest in OSGI-INF/)

This is is the magic I did not catch.

> 5) CEditorPreferencePage gets the DoxygenPreferences service via E4
> context:  EclipseContextFactory
> .getServiceContext(FrameworkUtil.getBundle(getClass()).getBundleContext())
>                  .get(DoxygenPreferences.class)
>
> This is how it works. Hope it will help.
>
> And I also have a question for you: where do you expect to find this
> info initially? It is important question, because it may help us to

Somewhere in the javadocs in the o.e.c.c.options package. Maybe a
simple example in the javadocs.

I one looks at the docs in o.e.c.c.options, he/she will have no clue
how to use OptionMetadata to get the actual data (that is: there is no
indication that someone will have to implement steps 2-5 you outlined
above).

BTW, I just need three String keys to access preferences for 2
Booleans and a String from jface.preferences. What was not on my
radar, is that I was expected to create at least 3 classes and
configure an OSGI-service to accomplish the task.
I expected to just move the String keys from *.ui bundle to *.core bundle.

Regards, Martin


Back to the top