Extension SDK 9.0.5

oracle.jdeveloper.externaltools
Class ExternalToolManager

java.lang.Object
  extended byoracle.jdeveloper.externaltools.ExternalToolManager

public abstract class ExternalToolManager
extends java.lang.Object

Manages external tools in JDeveloper. You can obtain an instance of this class via the JNDI namespace "jdeveloper/external-tool-manager", or using the static getExternalToolManager() method.


Constructor Summary
ExternalToolManager()
           
 
Method Summary
abstract  void addExternalTool(ExternalTool tool)
          Programmatically add an external tool.
abstract  java.util.Iterator getAllExternalTools()
          Get all defined external tools.
static ExternalToolManager getExternalToolManager()
          Convenience method to obtain the ExternalToolManager.
abstract  java.util.Iterator getExternalToolsByType(ExternalToolType type)
          Get all defined external tools of a particular type.
abstract  MacroRegistry getMacroRegistry()
          Get the macro registry.
abstract  int getRegisteredTypeCount()
          Return the number of registered types.
abstract  java.util.Iterator getRegisteredTypes()
          Get all registered external tool types.
 ExternalToolType getType(ExternalTool tool)
          Get the type of the specified external tool
abstract  ExternalTool invokeCreateWizard(java.awt.Component parent, ExternalToolType type)
          Invoke the Define External Tool wizard programmatically.
abstract  boolean invokeEditDialog(java.awt.Component parent, ExternalTool tool)
          Invoke the Edit External Tool dialog programmatically.
abstract  void registerType(ExternalToolType type)
          Register a custom external tool type with the manager.
abstract  void removeExternalTool(ExternalTool tool)
          Remove an existing external tool.
abstract  void unregisterType(ExternalToolType type)
          Unregister a custom external tool type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalToolManager

public ExternalToolManager()
Method Detail

getExternalToolManager

public static final ExternalToolManager getExternalToolManager()
Convenience method to obtain the ExternalToolManager.

Returns:
the external tool manager

getMacroRegistry

public abstract MacroRegistry getMacroRegistry()
Get the macro registry. The macro registry stores information about MacroExpanders - classes that can be used to expand macros from an IDE context when tools are invoked.

Returns:
the macro registry.

registerType

public abstract void registerType(ExternalToolType type)
Register a custom external tool type with the manager. A new entry will appear on the first page of the Define External Tool wizard for the tool type.

Parameters:
type - the external tool type to register.

unregisterType

public abstract void unregisterType(ExternalToolType type)
Unregister a custom external tool type. Removes the type entry from the first page of the Define External Tool wizard. Note that any tools of this type will be visibly removed from the IDE, but will still exist in the persisted list of external tools.

Parameters:
type - the external tool type to unregister.

getRegisteredTypeCount

public abstract int getRegisteredTypeCount()
Return the number of registered types.

Returns:
a count of registered types.

getRegisteredTypes

public abstract java.util.Iterator getRegisteredTypes()
Get all registered external tool types.

Returns:
an iterator of ExternalToolType instances.

getAllExternalTools

public abstract java.util.Iterator getAllExternalTools()
Get all defined external tools.

Returns:
an iterator of external tools.

getExternalToolsByType

public abstract java.util.Iterator getExternalToolsByType(ExternalToolType type)
Get all defined external tools of a particular type.

Parameters:
type - the type of external tool to get
Returns:
an iterator of ExternalTool instances that were created by the specified ExternalToolType.

addExternalTool

public abstract void addExternalTool(ExternalTool tool)
Programmatically add an external tool. The tool will be immediately added to any menus or toolbars.

Parameters:
tool - the tool to add.

removeExternalTool

public abstract void removeExternalTool(ExternalTool tool)
Remove an existing external tool.

Parameters:
tool - the tool to remove.

invokeCreateWizard

public abstract ExternalTool invokeCreateWizard(java.awt.Component parent,
                                                ExternalToolType type)
Invoke the Define External Tool wizard programmatically.

Parameters:
parent - a component for parenting the wizard on.
type - an external tool type. If specified, the first page of the wizard will not be displayed, and the user will only be able to create a tool of the specified type. If null, the first page of the wizard will allow the user to choose which type of tool to create.
Returns:
a new ExternalTool instance if successful, which will have already been registered with the IDE and added to any menus. If the user cancels out of the wizard, returns null.

invokeEditDialog

public abstract boolean invokeEditDialog(java.awt.Component parent,
                                         ExternalTool tool)
Invoke the Edit External Tool dialog programmatically.

Parameters:
parent - a component for parenting the wizard on.
tool - the tool to edit. This tool must already exist and be registered with the tool manager. On return, if the user clicked OK, the specified tool will have been modified to
Returns:
true if the user clicked OK, false otherwise.

getType

public ExternalToolType getType(ExternalTool tool)
Get the type of the specified external tool

Parameters:
tool - the tool to get the type of
Returns:
the type instance for the specified tool, null if the type couldn't be determined.

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.