An exemple :

The aciitemeditor plugin defines a PLIGIN_ID constant that is read from
teh plugin.properties file :

ACIITemConstants.java :
    String PLUGIN_ID =
Activator.getDefault().getPluginProperties().getString( "Plugin_id" );
//$NON-NLS-1$

Activator.java :

    public static ImageDescriptor getImageDescriptor( String path )
    {
        return imageDescriptorFromPlugin( ACIITemConstants.PLUGIN_ID,
path );
    }


ACIItemDialog.java, buttonPressed() :
    ...
            catch ( ParseException pe )
            {
                IStatus status = new Status( IStatus.ERROR,
ACIITemConstants.PLUGIN_ID, 1, Messages
                    .getString( "ACIItemDialog.error.invalidSyntax" ),
pe ); //$NON-NLS-1$
    ...

and okPressed()
    ...
        catch ( ParseException pe )
        {
            IStatus status = new Status( IStatus.ERROR,
ACIITemConstants.PLUGIN_ID, 1, Messages
                .getString( "ACIItemDialog.error.invalidSyntax" ), pe );
//$NON-NLS-1$
    ...


ACIItemTabFolderComposite.java, setInput() :
    ...
            IStatus status = new Status( IStatus.ERROR,
ACIITemConstants.PLUGIN_ID, 1, Messages
                .getString( "ACIItemTabFolderComposite.error.onInput" ),
pe ); //$NON-NLS-1$
    ...

and tabSelected()
    ...
                IStatus status = new Status( IStatus.ERROR,
ACIITemConstants.PLUGIN_ID, 1, Messages
                    .getString(
"ACIItemTabFolderComposite.error.onVisualEditor" ), pe ); //$NON-NLS-1$
    ...



I think we can keep the constant, using this form instead :

    String PLUGIN_ID = "org.apache.directory.studio.aciitemeditor";
//$NON-NLS-1$


or
    String Plugin_ID = ACIITemConstants.class.getPackage().getName();

assuming the Plugin_ID is always the package name.

-- 

Emmanuel Lecharny

Symas.com
directory.apache.org

Reply via email to