Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.ide.externaltools
Class ExternalToolManager

java.lang.Object
  extended by oracle.ide.externaltools.ExternalToolManager


public abstract class ExternalToolManager
extends java.lang.Object

Manages external tools. You can obtain an instance of this class using the getExternalToolManager() method.

Extension developers should not subclass this class.


Constructor Summary
protected ExternalToolManager()
           

 

Method Summary
abstract  void addExternalTool(ExternalTool tool)
          Programmatically adds an external tool.
 void addExternalToolListener(ExternalToolListener listener)
          Adds a listener for events related to external tools.
 void fireToolStarted(ExternalToolEvent event)
          Notifies all listeners that an external tool has started.
 void fireToolWillStart(ExternalToolEvent event)
          Notifies all listeners that an external tool is about to start.
 java.util.Iterator<ExternalTool> getAllExternalTools()
          Deprecated. since 11.1.1.0.1. Use tools().
static ExternalToolManager getExternalToolManager()
          Obtains the singleton external tool manager.
 java.util.Iterator<ExternalTool> getExternalToolsByType(ExternalToolType type)
          Deprecated. since 11.1.1.0.1. Use toolsOfType(ExternalToolType).
abstract  MacroRegistry getMacroRegistry()
          Gets the macro registry.
abstract  int getRegisteredTypeCount()
          Returns the number of registered types.
abstract  java.util.Iterator<ExternalToolType> getRegisteredTypes()
          Gets all registered external tool types.
 java.util.List<ExternalToolScanner> getScanners()
          Returns all registered scanners.
 ExternalToolType getType(ExternalTool tool)
          Gets the type of the specified external tool
abstract  ExternalTool invokeCreateWizard(java.awt.Component parent, ExternalToolType type)
          Invokes the Define External Tool wizard programmatically.
abstract  boolean invokeEditDialog(java.awt.Component parent, ExternalTool tool)
          Invokes the Edit External Tool dialog programmatically.
 void registerScanner(ExternalToolScanner scanner)
          Deprecated. since 11.0. Scanners should be registered in the <externaltools> section of the extension manifest.
abstract  void registerType(ExternalToolType type)
          Deprecated. since 11.1.2.0 where external tools must be declaratively registered
abstract  void removeExternalTool(ExternalTool tool)
          Removes an existing external tool.
 void removeExternalToolListener(ExternalToolListener listener)
          Removes a listener for events related to external tools.
static java.util.Set<java.lang.String> scannerTags(java.util.Collection<ExternalTool> tools)
          Returns the set of scannerTags used by a collection of tools.
abstract  java.util.Collection<ExternalTool> tools()
          Returns all defined external tools.
abstract  java.util.Collection<ExternalTool> toolsOfType(ExternalToolType type)
          Returns external tools of a specific type.
 void unregisterScanner(ExternalToolScanner scanner)
          Deprecated. since 11.0. No replacement.
abstract  void unregisterType(ExternalToolType type)
          Deprecated. since 11.1.2.0 where external tools must be declaratively registered

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

ExternalToolManager

protected ExternalToolManager()

Method Detail

getExternalToolManager

public static final ExternalToolManager getExternalToolManager()
Obtains the singleton external tool manager.
Returns:
the external tool manager

addExternalToolListener

public final void addExternalToolListener(ExternalToolListener listener)
Adds a listener for events related to external tools.

It is safe to call this method from any thread.

Parameters:
listener - a listener to add.
Throws:
java.lang.NullPointerException - if listener is null.
Since:
11.1.1.0.1

removeExternalToolListener

public final void removeExternalToolListener(ExternalToolListener listener)
Removes a listener for events related to external tools.

It is safe to call this method from any thread.

Parameters:
listener - a listener to remove.
Since:
11.1.1.0.1

fireToolWillStart

public final void fireToolWillStart(ExternalToolEvent event)
                             throws ExternalToolVetoException
Notifies all listeners that an external tool is about to start.

This API is intended for ExternalToolType implementors, and should not be used directly by extension developers.

It is safe to call this method from any thread.

Parameters:
event - an event to fire.
Throws:
java.lang.NullPointerException - if tool is null.
ExternalToolVetoException - if a listener vetoed the event.
Since:
11.1.1.0.1

fireToolStarted

public final void fireToolStarted(ExternalToolEvent event)
Notifies all listeners that an external tool has started.

This API is intended for ExternalToolType implementors, and should not be used directly by extension developers.

It is safe to call this method from any thread.

Parameters:
event - an event to fire.
Throws:
java.lang.NullPointerException - if tool is null.
Since:
11.1.1.0.1

registerScanner

public void registerScanner(ExternalToolScanner scanner)
Deprecated. since 11.0. Scanners should be registered in the <externaltools> section of the extension manifest.
Registers a scanner with the manager. Scanners create "default" external tools for the user. Normally a scanner will only be invoked once automatically for the current user after you register it using this method. The user can always manually scan from the external tools dialog.
Parameters:
scanner - a scanner that can find external tools

unregisterScanner

public void unregisterScanner(ExternalToolScanner scanner)
Deprecated. since 11.0. No replacement.
Unregisters a previously registered scanner.
Parameters:
scanner - the scanner to unregister.

getScanners

public java.util.List<ExternalToolScanner> getScanners()
Returns all registered scanners.
Returns:
an unmodifiable list of all registered scanners.

getMacroRegistry

public abstract MacroRegistry getMacroRegistry()
Gets 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

@Deprecated
public abstract void registerType(ExternalToolType type)
Deprecated. since 11.1.2.0 where external tools must be declaratively registered
Registers 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

@Deprecated
public abstract void unregisterType(ExternalToolType type)
Deprecated. since 11.1.2.0 where external tools must be declaratively registered
Unregisters 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()
Returns the number of registered types.
Returns:
a count of registered types.

getRegisteredTypes

public abstract java.util.Iterator<ExternalToolType> getRegisteredTypes()
Gets all registered external tool types.
Returns:
an iterator of ExternalToolType instances.

getAllExternalTools

public final java.util.Iterator<ExternalTool> getAllExternalTools()
Deprecated. since 11.1.1.0.1. Use tools().
Gets all defined external tools.
Returns:
an iterator of external tools.

tools

public abstract java.util.Collection<ExternalTool> tools()
Returns all defined external tools.
Returns:
all defined external tools. The collection is unmodifiable.
Since:
11.1.1.0.1

getExternalToolsByType

public final java.util.Iterator<ExternalTool> getExternalToolsByType(ExternalToolType type)
Deprecated. since 11.1.1.0.1. Use toolsOfType(ExternalToolType).
Gets 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.

toolsOfType

public abstract java.util.Collection<ExternalTool> toolsOfType(ExternalToolType type)
Returns external tools of a specific type.
Parameters:
type - the type of external tool to get.
Returns:
all external tools of the specified type. The collection is unmodifiable.
Since:
11.1.1.0.1

addExternalTool

public abstract void addExternalTool(ExternalTool tool)
Programmatically adds 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)
Removes an existing external tool.
Parameters:
tool - the tool to remove.

invokeCreateWizard

public abstract ExternalTool invokeCreateWizard(java.awt.Component parent,
                                                ExternalToolType type)
Invokes 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)
Invokes 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)
Gets 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.

scannerTags

@NotNull
public static java.util.Set<java.lang.String> scannerTags(java.util.Collection<ExternalTool> tools)
Returns the set of scannerTags used by a collection of tools. This method is provided as a convenience for ExternalToolScanner implementations.
Parameters:
tools - a collection of tools.
Returns:
an unmodifiable collection of scanner tags. Will never return null.
Since:
11.1.1.0.1

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


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