* + Add menus to the menu bar,
*/
public void initialise(Properties props) throws ToolPluginException
{
if (getToolsFramework().getToolsDir() == null)
throw new ToolPluginException("ToolsFramework installation does not have a tools direcory");
/** Create menu bar **/
_menuItem = new JMenuItem( BROWSE_OBJECT_STORE_MENU_ITEM );
_menuItem.setMnemonic(KeyEvent.VK_B);
_menuItem.addActionListener(this);
_menuItem.setIcon(getIcon16());
this.getFileMenu().add(_menuItem);
/** Setup the roots provider **/
String rootProviderClass = props.getProperty(ROOT_PROVIDER_PROPERTY);
/*
* initialise the root provider before the plugins in case a plugin needs to update the root provider
*/
if ( rootProviderClass != null )
{
try
{
_rootProvider = (ObjectStoreRootProvider)Class.forName(rootProviderClass).newInstance();
}
catch (Exception e)
{
throw new ToolPluginException("Failed to create object store root provider plugin:"+e);
}
}
else
{
_rootProvider = new DefaultRootProvider();
}
if (!initialize(props, INITIALIZER_PROPERTY) && !initialize(props, ALT_INITIALIZER_PROPERTY))
throw new ToolPluginException("Cannot locate plugin initializer for plugin " + getClass().getName());
/** Initialise the state viewers repository **/
StateViewersRepository.initialiseRepository(new File(getToolsFramework().getToolsDir().getFile(), PLUGINS_DIRECTORY));
EntityViewerRepository.initialiseRepository(props);