Extension SDK 10.1.2

oracle.ide.explorer
Class ExplorerManager

java.lang.Object
  extended byoracle.ide.MultiManager
      extended byoracle.ide.PinnableManager
          extended byoracle.ide.explorer.ExplorerManager
All Implemented Interfaces:
Controller, Module

public abstract class ExplorerManager
extends PinnableManager

The ExplorerManager interface acts as a registry for Explorer types registered against a given Document type specific to a given View type. For example; Explorer type X.class applying to Document type D.class specific to View type V.class. The ExplorerManager preserves a reference to each of the Explorers that it has created as a result of calls to its getExplorerForHost method. Subsequent calls to this method, which pass the same host instance and a Context which refers to the same View instance, will result in receiving the same Explorer instance as the first call for that combination of host and View.


Field Summary
static java.lang.String SELECT_IN_STRUCTURE_CMD
          Select in Structure command.
static int SELECT_IN_STRUCTURE_CMD_ID
          Select in Structure command ID.
 
Constructor Summary
ExplorerManager()
           
 
Method Summary
abstract  TreeExplorer createTreeExplorer(Folder folder)
          Creates a TreeExplorer.
abstract  ContextMenu getContextMenu()
          Get the ContextMenu to be shared by all explorer windows.
abstract  java.lang.String getExplorerCaption(java.lang.Class explorerType, java.lang.Class dataType)
          Gets the caption to display for an Explorer of the given type when exploring data of the given type.
abstract  Explorer getExplorerForHost(View host, Context context)
          Gets the Explorer associated with the specified host for the given context.
abstract  javax.swing.Icon getExplorerIcon(java.lang.Class explorerType, java.lang.Class dataType)
          Gets the Icon to display for an Explorer of the given type when exploring data of the given type.
static ExplorerManager getExplorerManager()
          Returns the ExplorerManager instance that is active in the IDE.
abstract  java.util.List getExplorerTypes(java.lang.Class dataType)
          Get a list of Explorer types statically registered for a given data type as returned from Document.getData.
abstract  java.util.List getExplorerTypes(Element document)
          Get a list of Explorer types, both statically and dynamically registered, for a given Document instance.
abstract  void register(java.lang.Class dataType, java.lang.Class explorerType, java.lang.Class viewType)
          Register an Explorer type to be associated with Documents having a given data type.
abstract  void register(java.lang.Class dataType, java.lang.Class explorerType, java.lang.Class viewType, java.lang.String caption, ArrayResourceBundle bundle, int key)
          Register an Explorer type to be associated with Documents having a given data type.
abstract  void register(java.lang.Class dataType, java.lang.Class explorerType, java.lang.Class viewType, java.lang.String caption, javax.swing.Icon icon)
          Register an Explorer type to be associated with Documents having a given data type.
abstract  void register(java.lang.Class dataType, java.lang.Class explorerType, java.lang.Class viewType, java.lang.String caption, java.util.ResourceBundle bundle, java.lang.String key)
          Register an Explorer type to be associated with Documents having a given data type.
abstract  void registerDynamic(ExplorerInfo info)
          Registers an ExplorerInfo to control inclusion of an associated Explorer.
static void setExplorerManager(ExplorerManager explorerManager)
          Publishes the specified ExplorerManager as the active instance in the IDE.
abstract  boolean supportsStructure(View view)
          Returns true if the specified view supports exploring of its data.
abstract  void unregister(ExplorerInfo info)
          Unregister an ExplorerInfo.
 
Methods inherited from class oracle.ide.PinnableManager
handleEvent, showLastView, showView, update
 
Methods inherited from class oracle.ide.MultiManager
createDockableView, createShowAction, createToggleToolbarAction, findOrCreateView, findView, getDefaultName, getDefaultViewId, getDockableFactory, getLastView, getNewView, getOrientation, getRelativeView, getShowAction, getToggleToolbarMenuWeight, getViewCategory, getViewId, getViews, initialize, isToolbarVisible, setToolbarVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECT_IN_STRUCTURE_CMD

public static final java.lang.String SELECT_IN_STRUCTURE_CMD
Select in Structure command.

See Also:
Constant Field Values

SELECT_IN_STRUCTURE_CMD_ID

public static final int SELECT_IN_STRUCTURE_CMD_ID
Select in Structure command ID.

Constructor Detail

ExplorerManager

public ExplorerManager()
Method Detail

getExplorerManager

public static ExplorerManager getExplorerManager()
Returns the ExplorerManager instance that is active in the IDE.


setExplorerManager

public static void setExplorerManager(ExplorerManager explorerManager)
Publishes the specified ExplorerManager as the active instance in the IDE.


supportsStructure

public abstract boolean supportsStructure(View view)
Returns true if the specified view supports exploring of its data.


getContextMenu

public abstract ContextMenu getContextMenu()
Get the ContextMenu to be shared by all explorer windows.


register

public abstract void register(java.lang.Class dataType,
                              java.lang.Class explorerType,
                              java.lang.Class viewType)
Register an Explorer type to be associated with Documents having a given data type. This method behaves identically to the signature taking an Icon except that any previously registered caption and Icon are left as is. If no caption or icon have yet been registered a default will be used instead.

See Also:
register(Class, Class, Class, String, Icon)

register

public abstract void register(java.lang.Class dataType,
                              java.lang.Class explorerType,
                              java.lang.Class viewType,
                              java.lang.String caption,
                              ArrayResourceBundle bundle,
                              int key)
Register an Explorer type to be associated with Documents having a given data type. This method behaves identically to the signature taking an Icon directly, except that it delays the loading of the Icon until needed.

See Also:
register(Class, Class, Class, String, Icon)

register

public abstract void register(java.lang.Class dataType,
                              java.lang.Class explorerType,
                              java.lang.Class viewType,
                              java.lang.String caption,
                              java.util.ResourceBundle bundle,
                              java.lang.String key)
Register an Explorer type to be associated with Documents having a given data type. This method behaves identically to the signature taking an Icon directly, except that it delays the loading of the Icon until needed.

See Also:
register(Class, Class, Class, String, Icon)

register

public abstract void register(java.lang.Class dataType,
                              java.lang.Class explorerType,
                              java.lang.Class viewType,
                              java.lang.String caption,
                              javax.swing.Icon icon)
Register an Explorer type to be associated with Documents having a given data type. An instance of the specified explorerType will be displayed in the ExplorerWindow when views of class viewType become active on a context whose Document's data (as returned by Document.getData()) is of type dataType. If a null is supplied for viewtype, then the registration will apply to all views. If multiple data types all extend a common class, only the Class object for that common class need be registered as retrievals will be attempted all the way up a given data type's inheritance path until a match can be found or the search fails. Registrations during performance sensitive points, like during startup, should register using one of the versions taking a ResourceBundle and key for delayed loading of the Icon.

Parameters:
dataType - Class of result returned from Document.getData
explorerType - Class of Explorer to associate with the given data type
viewType - Class of View to which the association applies
caption - Name to use when representing the explorer
icon - Icon to use when representing the explorer
See Also:
getExplorerForHost(View, Context), #getExplorerForHost(View, Context, Class), getExplorerTypes(java.lang.Class), getExplorerCaption(java.lang.Class, java.lang.Class), getExplorerIcon(java.lang.Class, java.lang.Class)

registerDynamic

public abstract void registerDynamic(ExplorerInfo info)
Registers an ExplorerInfo to control inclusion of an associated Explorer. Upon opening of each ExplorerWindow, ExplorerInfo.getExplorerWeight(oracle.ide.model.Element) will be called to determine if, and in what order, an identifier for the represented Explorer should be included in the list of available Explorer for a given object. The weight returned would typically coincide with that returned by any related FlatEditorAddin

Parameters:
info - the ExplorerInfo to register
See Also:
unregister(oracle.ide.explorer.ExplorerInfo), FlatEditorAddin.getEditorWeight(oracle.ide.model.Element), EditorManager.registerDynamic(oracle.ide.editor.FlatEditorAddin)

unregister

public abstract void unregister(ExplorerInfo info)
Unregister an ExplorerInfo.

Parameters:
info - the ExplorerInfo to unregister
See Also:
registerDynamic(oracle.ide.explorer.ExplorerInfo)

getExplorerTypes

public abstract java.util.List getExplorerTypes(java.lang.Class dataType)
Get a list of Explorer types statically registered for a given data type as returned from Document.getData.

Parameters:
dataType - Class of result returned from Document.getData
Returns:
list of registered types
See Also:
register(java.lang.Class, java.lang.Class, java.lang.Class)

getExplorerTypes

public abstract java.util.List getExplorerTypes(Element document)
Get a list of Explorer types, both statically and dynamically registered, for a given Document instance.

Returns:
lisrt of registered types, both static and dynamic
See Also:
register(java.lang.Class, java.lang.Class, java.lang.Class), registerDynamic(oracle.ide.explorer.ExplorerInfo)

getExplorerIcon

public abstract javax.swing.Icon getExplorerIcon(java.lang.Class explorerType,
                                                 java.lang.Class dataType)
Gets the Icon to display for an Explorer of the given type when exploring data of the given type.

Parameters:
dataType - data type being explored at the time the Icon is desired.
Returns:
an Icon to represent the given explorer type when exploring the given data type.

getExplorerCaption

public abstract java.lang.String getExplorerCaption(java.lang.Class explorerType,
                                                    java.lang.Class dataType)
Gets the caption to display for an Explorer of the given type when exploring data of the given type.

Parameters:
dataType - data type being explored at the time the caption is desired.
Returns:
a caption to represent the given explorer type when exploring the the given data type.

getExplorerForHost

public abstract Explorer getExplorerForHost(View host,
                                            Context context)
Gets the Explorer associated with the specified host for the given context. The result of Context.getView is used to determine which type of Explorer to return unless a Class value is provided from Context.getExtraData to indicate which Explorer type to fetch.


createTreeExplorer

public abstract TreeExplorer createTreeExplorer(Folder folder)
Creates a TreeExplorer. Tree explorers can be used to display Elements in a tree structure.


Extension SDK

 

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