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: Usage of ID like %PrefPage_StudioPage_id in plugin.xml
Date Fri, 25 Aug 2017 17:02:20 GMT
Actually, some of those IDs are referenced in teh code, like :


in
org.apache.directory.studio.connection.ui.ConnectionParameterPageManager :

        IExtensionPoint extensionPoint = registry.getExtensionPoint(
ConnectionUIPlugin.getDefault()
            .getPluginProperties().getString(
"ExtensionPoint_ConnectionParameterPages_id" ) ); //$NON-NLS-1$


in plugin.xml :

    ...

    <plugin>
        <extension-point
id="org.apache.directory.studio.connectionparameterpages"
name="%ExtensionPoint_ConnectionParameterPages_name"

    ...

and in plugin.properties :

    ...

   
ExtensionPoint_ConnectionParameterPages_id=org.apache.directory.studio.connectionparameterpages

    ...


( note that I would have expected to see <extension-point
id="%ExtensionPoint_ConnectionParameterPages_id" in the plugin.xml file...)


but still, I don't really see the added value of having such an
indirection when the property is not localized.


wdyt ?



Le 25/08/2017 à 18:39, Emmanuel Lécharny a écrit :
> Hi Stefan,
>
>
> a quick question : we are referencing a value through the
> %PrefPage_StudioPage_id which is defined in many plugin.properties files
> in many associated plugin.xml files :
>
>
> org.apache.directory.studio.connection.ui
>
> -----------------------------------------
>
>
> in plugin.xml :
>
> ...
>
>   <extension
>       point="org.eclipse.ui.preferencePages">
>     <page
>         category="%PrefPage_StudioPage_id"
>
> ...
>
> and in plugin.properties :
>
> ...
>
> PrefPage_StudioPage_id=org.apache.directory.studio.StudioPreferencePage
>
> ...
>
>
> org.apache.directory.studio.ldapbrowser.common
>
> ----------------------------------------------
>
>
> in plugin.xml :
>
> ...
>
>    <extension
>          point="org.eclipse.ui.preferencePages">
>       <page
>             category="%PrefPage_StudioPage_id"
> ...
>
> and in plugin.properties :
>
> ...
>
> PrefPage_StudioPage_id=org.apache.directory.studio.StudioPreferencePage
>
> ...
>
>
>
> org.apache.directory.studio.ldifeditor
>
> --------------------------------------
>
>
> in plugin.xml :
>
> ...
>
>    <extension
>          point="org.eclipse.ui.preferencePages">
>       <page
>             category="%PrefPage_StudioPage_id"
>
> ...
>
> and in plugin.properties :
>
> ...
>
> PrefPage_StudioPage_id=org.apache.directory.studio.StudioPreferencePage
>
> ...
>
>
> org.apache.directory.studio.schemaeditor
>
> ----------------------------------------
>
>
> in plugin.xml :
>
> ...
>
>     <extension
>          point="org.eclipse.ui.preferencePages">
>       <page
>            
> class="org.apache.directory.studio.schemaeditor.view.preferences.PluginPreferencePage"
>             category="%PrefPage_StudioPage_id"
> ...
>
> and in plugin.properties :
>
> ...
>
> PrefPage_StudioPage_id=org.apache.directory.studio.StudioPreferencePage
>
> ...
>
>
>
> To my understanding, the plugin.propeties file is the default property
> file, with some possible plugin_<lang>.properties files being localized
> version of it. It does not seems to make sense to store identifiers in
> it, and I'd rather use something like :
>
>
>
> ...
>
>     <extension
>          point="org.eclipse.ui.preferencePages">
>       <page
>            
> class="org.apache.directory.studio.schemaeditor.view.preferences.PluginPreferencePage"
>             category="org.apache.directory.studio.StudioPreferencePage"
> ...
>
>
> in the plugin.xml.
>
>
> Do you know if there is any valuable or historical reason why we have
> such thing in our code ? (I know that Eclipse has eveolved a lot since
> our first release, so what sounds weird now might have made sense years
> ago. Or I may also miss some important - and unknown to me - thing about
> the usage of ID in plugins).
>
>
> Many thanks !
>
>
>

-- 
Emmanuel Lecharny

Symas.com
directory.apache.org


Mime
View raw message