/** * Runs the tool denoted by the given name. * * @param aToolName * the name of the tool to run, cannot be <code>null</code>; * @param aParent * the parent window to use, can be <code>null</code>. */ public void invokeTool( final String aToolName, final Window aParent ) { if ( LOG.isLoggable( Level.INFO ) ) { LOG.log( Level.INFO, "Running tool: \"{0}\" ...", aToolName ); } final Tool<?> tool = getTool( aToolName ); if ( tool == null ) { JOptionPane.showMessageDialog( aParent, "No such tool found: " + aToolName, "Error ...", JOptionPane.ERROR_MESSAGE ); } else { final ToolContext context = createToolContext(); tool.invoke( aParent, context ); } updateActionsOnEDT(); }