Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.ide.explorer
Class ExplorerManager

java.lang.Object
  extended by oracle.ide.view.MultiManager
      extended by oracle.ide.view.PinnableManager
          extended by oracle.ide.explorer.ExplorerManager
All Implemented Interfaces:
Addin, Controller

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.
 
Fields inherited from interface oracle.ide.controller.Controller
UPDATE_FROM_ACTION_PERFORMED, UPDATE_FROM_ACTIVE_VIEW_CHANGED, UPDATE_FROM_UNDO, UPDATE_FROM_USER_EXTENSION, UPDATE_FROM_VIEW_SELECTION_CHANGED
 
Constructor Summary
ExplorerManager()
           
 
Method Summary
 void addStructureSupportForClass(MetaClass metaClass)
          Adds a MetaClass for a class that supports structure views
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)
          Deprecated. use register(Class,Class,Class,String,Icon). Since 11.0
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.
 void removeStructureSupportForClass(MetaClass metaClass)
          Removes a MetaClass that was added previously.
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 argument View supports exploring of its data.
abstract  void unregister(ExplorerInfo info)
          Unregister an ExplorerInfo.
 
Methods inherited from class oracle.ide.view.PinnableManager
handleEvent, showLastView, showView, update
 
Methods inherited from class oracle.ide.view.MultiManager
createDockableView, createShowAction, createToggleToolbarAction, findOrCreateView, findView, getAcceleratorFile, 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 argument View supports exploring of its data.

Parameters:
view -
Returns:
boolean true or false as described above.

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)
Deprecated. use register(Class,Class,Class,String,Icon). Since 11.0

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), 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 EditorAddin

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

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.

Parameters:
document - the Document whose getData is to be used for the search
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:
explorerType - Explorer type for which an Icon is desired
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:
explorerType - Explorer type for which a caption is desired
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 ExplorerContext.getExplorerType(..) 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.


addStructureSupportForClass

public void addStructureSupportForClass(MetaClass metaClass)
Adds a MetaClass for a class that supports structure views

Parameters:
metaClass - the MetaClass to add

removeStructureSupportForClass

public void removeStructureSupportForClass(MetaClass metaClass)
Removes a MetaClass that was added previously.

Parameters:
metaClass - the MetaClass to remove.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

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